Skip to main content
Part of tmath encapsulates sparse matrix classes and algorithms

Public Types

Public Member Functions

Detailed Description

encapsulates sparse matrix classes and algorithms The default sparse matrix class. A class that represents storage for sparse linalg objects. The storage scheme is column_major (FORTRAN). It basically provides basic features of the Eigen::SparseMatrix class, i.e. basic operators and assembly methods. The storage scheme is described in the Eigen doc in detail. It should be noted that one can view any column_major sparse matrix as a set of ‘ncols’ sparse vectors. The sparse vectors are labeled by the index i (“outer iterator”), the access of the elements within these vectors is labeled by the Eigen::InnerIterator object it (“inner iterator”/ “inner loop”).

Constructor & Destructor Documentation

SparseMatrix() [1/4]

destructor copy constructor Parameters

SparseMatrix() [2/4]

copy constructor Parameters

SparseMatrix() [3/4]

copy constructor Parameters

SparseMatrix() [4/4]

copy constructor Parameters

Member Function Documentation

__neg__()

Returns unary minus of this matrix (return B = -A)

__str__()

transforms this objects into a string, required by SWIG Returns a 0-terminated string.

Assign()

assigns a new matrix to this object Parameters

Col()

extracts a column of this matrix (as a copy, not a reference!) Parameters Returns the column as sparse matrix

Cols()

Returns the number of columns

InnerSize()

Returns the number of inner elements

NonZeros()

Returns the number of nonzeros

operator*() [1/5]

overrides the sparsematrix-densematrix product. Parameters Returns (*this)*x

operator*() [2/5]

overrides the sparsematrix-densematrix product. Parameters Returns (*this)*x

operator*() [3/5]

overrides the sparsematrix-densematrix product. Parameters Returns (*this)*x

operator*() [4/5]

overrides the sparsematrix-densematrix product. Parameters Returns (*this)*x

operator*() [5/5]

overrides the sparsematrix-scalar product. Parameters Returns (*this)*x

operator+()

overrides the sparsematrix-sparsematrix sum. Parameters Returns (*this)+x

operator-()

overrides the sparsematrix-sparsematrix subtraction. Parameters Returns (*this)-x

operator/()

overrides the sparsematrix-scalar division. Parameters Returns (*this)/x

OuterSize()

Returns the number of sparse column vectors

Print()

prints the sparse matrix up to the given rows and columns (internally a temporary dense matrix will be created) Parameters

Prune() [1/2]

sets all elements with absolute value <= reference to zero and removes from storage Parameters

Prune() [2/2]

sets all elements with absolute value <= reference*epsilon to zero and removes from storage Parameters

Rows()

Returns the number of rows

Swap()

swaps the contents of this object Parameters

Transpose()

Returns the transpose