![]() |
Prev | Next | sparse_mat_info |
CppAD::mixed::sparse_mat_info mat_info
mat_info.resize(size)
mat_info.row
has prototype
CppAD::vector<size_t> mat_info.row
It has size zero when it is constructed.
After initialization it should contain the row indices
corresponding to possibly non-zero elements of the matrix.
K = mat_info.row.size()
below.
mat_info.col
has prototype
CppAD::vector<size_t> mat_info.col
It has size zero when it is constructed.
After initialization it should have the same size as
row
and contain the column indices
corresponding to possibly non-zero elements of the matrix.
mat_info.val
has prototype
CppAD::vector<double> mat_info.val
It has size zero when it is constructed.
After initialization it should either have size zero,
or the same size as
row
.
resize
argument has prototype
size_t size
All of the vectors,
row
,
col
, and
val
,
are modified to have the specified size.
mat_info
is a sparsity pattern if,
for
k = 0 , ... , K-1
,
the element with index
(mat_info.row[k], mat_info.col[k])
is possibly non-zero and the size or elements of
mat_info.val
are not specified.
mat_info
is a sparse matrix if,
for
k = 0 , ... , K-1
,
the element with index
(mat_info.row[k], mat_info.col[k])
is possibly non-zero and has value
mat_info.val[k]
.
K
is zero (
mat_info.row.size()
is zero),
we say that
mat_info
is the empty matrix.
k = 0 , ... , K-1
,
mat_info.col[k] <= mat_info.col[k+1]
if( mat_info.col[k] == mat_info.col[k+1] )
mat_info.row[k] < mat_info.row[k+1]
we say that
mat_info
is in column major order.
k = 0 , ... , K-1
,
mat_info.row[k] <= mat_info.row[k+1]
if( mat_info.row[k] == mat_info.row[k+1] )
mat_info.col[k] < mat_info.col[k+1]
we say that
mat_info
is in row major order.
k = 0 , ... , K-1
,
mat_info.row[k] >= mat_info.col[k]
we say that
mat_info
is lower triangular.