SparseMatrix< _Scalar, _Options > Class Template Reference
[Sparse module]

The main sparse matrix class. More...

Inheritance diagram for SparseMatrix< _Scalar, _Options >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int cols () const
EIGEN_DEPRECATED Scalar & fill (int row, int col)
EIGEN_DEPRECATED Scalar & fillrand (int row, int col)
void finalize ()
int innerSize () const
EIGEN_DONT_INLINE Scalar & insert (int row, int col)
int nonZeros () const
int outerSize () const
void reserve (int reserveSize)
void resize (int rows, int cols)
int rows () const
void setZero ()
EIGEN_DEPRECATED void startFill (int reserveSize=1000)
Scalar sum () const
 ~SparseMatrix ()

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

~SparseMatrix (  )  [inline]

Destructor


Member Function Documentation

int cols ( void   )  const [inline]
Returns:
the number of columns.
See also:
rows(), ColsAtCompileTime

Reimplemented from SparseMatrixBase< SparseMatrix< _Scalar, _Options > >.

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]
Returns:
the size of the inner dimension according to the storage order, i.e., the number of rows for a columns major matrix, and the number of cols otherwise

Reimplemented from SparseMatrixBase< SparseMatrix< _Scalar, _Options > >.

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]
Returns:
the number of non zero coefficients

Reimplemented from SparseMatrixBase< SparseMatrix< _Scalar, _Options > >.

int outerSize (  )  const [inline]
Returns:
the size of the storage major dimension, i.e., the number of columns for a columns major matrix, and the number of rows otherwise

Reimplemented from SparseMatrixBase< SparseMatrix< _Scalar, _Options > >.

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]
Returns:
the number of rows.
See also:
cols(), RowsAtCompileTime

Reimplemented from SparseMatrixBase< SparseMatrix< _Scalar, _Options > >.

void setZero (  )  [inline]

Removes all non zeros

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]

Overloaded for performance

Reimplemented from SparseMatrixBase< SparseMatrix< _Scalar, _Options > >.


The documentation for this class was generated from the following file:
Generated on Fri Mar 19 06:59:37 2010 for Eigen by  doxygen 1.6.3