SparseMatrix< _Scalar, _Options > Class Template Reference
[Sparse module]
The main sparse matrix class.
More...
List of all members.
Detailed Description
template<typename _Scalar, int _Options>
class Eigen::SparseMatrix< _Scalar, _Options >
The main sparse matrix class.
This class implements a sparse matrix using the very common compressed row/column storage scheme.
- Parameters:
-
| _Scalar | the scalar type, i.e. the type of the coefficients |
| _Options | Union of bit flags controlling the storage scheme. Currently the only possibility is RowMajor. The default is 0 which means column-major. |
See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme.
Constructor & Destructor Documentation
Member Function Documentation
| int cols |
( |
void |
|
) |
const [inline] |
| EIGEN_DEPRECATED Scalar& fill |
( |
int |
row, |
|
|
int |
col | |
|
) |
| | [inline] |
| EIGEN_DEPRECATED Scalar& fillrand |
( |
int |
row, |
|
|
int |
col | |
|
) |
| | [inline] |
| void finalize |
( |
|
) |
[inline] |
Must be called after inserting a set of non zero entries.
| int innerSize |
( |
|
) |
const [inline] |
| EIGEN_DONT_INLINE Scalar& insert |
( |
int |
row, |
|
|
int |
col | |
|
) |
| | [inline] |
- Returns:
- a reference to a novel non zero coefficient with coordinates row x col. The non zero coefficient must not already exist.
- Warning:
- This function can be extremely slow if the non zero coefficients are not inserted in a coherent order.
After an insertion session, you should call the finalize() function.
| int nonZeros |
( |
|
) |
const [inline] |
| int outerSize |
( |
|
) |
const [inline] |
| void reserve |
( |
int |
reserveSize |
) |
[inline] |
Preallocates reserveSize non zeros
| void resize |
( |
int |
rows, |
|
|
int |
cols | |
|
) |
| | [inline] |
Resizes the matrix to a rows x cols matrix and initializes it to zero
- See also:
- resizeNonZeros(int), reserve(), setZero()
| int rows |
( |
void |
|
) |
const [inline] |
| void setZero |
( |
|
) |
[inline] |
| EIGEN_DEPRECATED void startFill |
( |
int |
reserveSize = 1000 |
) |
[inline] |
- Parameters:
-
| reserveSize | approximate number of nonzeros Note that the matrix *this is zero-ed. |
| ei_traits< SparseMatrix< _Scalar, _Options > >::Scalar sum |
( |
|
) |
const [inline] |
The documentation for this class was generated from the following file: