tmath::sparse::SymSparseMatrix Class Reference

Symmetric sparse matrix class with selfadjoint storage. More...

#include <symsparsematrix.hpp>

Inheritance diagram for tmath::sparse::SymSparseMatrix:

Inheritance graph
[legend]
Collaboration diagram for tmath::sparse::SymSparseMatrix:

Collaboration graph
[legend]

List of all members.

Public Types

typedef Eigen::SparseMatrix
< TScalar
Base
enum  some_enums { EIGENFLAGS = Eigen::ColMajor|Eigen::SelfAdjoint|Eigen::LowerTriangular, EIGENSYM = Eigen::LowerTriangular }
typedef int TEigenIndex
typedef double TScalar
 the data type of the coefficients (real number)
typedef unsigned int TUnsignedIndex

Public Member Functions

SymSparseMatrix __neg__ () const
const char * __str__ () const
 transforms this objects into a string, required by SWIG
void Assign (SymSparseMatrix &other, bool keep_data=true)
TUnsignedIndex Cols () const
 returns the number of columns
TUnsignedIndex InnerNonZeros (TUnsignedIndex j) const
 returns the nonzeros of the j-th column
TUnsignedIndex InnerSize () const
 returns the number of inner elements
TUnsignedIndex NonZeros () const
 returns the number of nonzeros
SymSparseMatrix operator* (const double &x) const
SparseMatrix operator* (const SymSparseMatrix &x) const
template<typename Derived>
Matrix operator* (const Eigen::MatrixBase< Derived > &x) const
SymSparseMatrix operator+ (const SymSparseMatrix &x) const
SymSparseMatrix operator- (const SymSparseMatrix &x) const
SymSparseMatrix operator/ (const double &x) const
SymSparseMatrixoperator= (const SymSparseMatrix &other)
 The '=' operator for SymSparseMatrix.
TUnsignedIndex OuterSize () const
 returns the number of sparse column vectors
void Print (const std::string &format="%g ", TUnsignedIndex rows=20, TUnsignedIndex cols=20) const
void Prune (TScalar reference, TScalar epsilon)
 sets all elements with absolute value <= reference to zero and removes from storage
void Prune (TScalar reference)
 sets all elements with absolute value <= reference to zero and removes from storage
TUnsignedIndex Rows () const
 returns the number of rows
void SetZero ()
 sets the object to zero (clears it)
void Swap (SymSparseMatrix &other)
 swaps the contents of this object
template<typename OtherDerived>
 SymSparseMatrix (const Eigen::SparseMatrixBase< OtherDerived > &x)
 copy constructor from Eigen objects (no checks!!!)
 SymSparseMatrix ()
 default constructor
 SymSparseMatrix (const TUnsignedIndex &nrow, const TUnsignedIndex &ncol=1)
 constructs a nrow*ncol matrix
 SymSparseMatrix (const SparseMatrix &ar)
 SymSparseMatrix (SparseMatrix &ar, bool keep_data=true)
 SymSparseMatrix (const SymSparseMatrix &ar)
 SymSparseMatrix (SymSparseMatrix &ar, bool keep_data=true)
 copy constructor
SymSparseMatrix Transpose () const
 returns the transpose
virtual ~SymSparseMatrix ()
 destructor

Protected Attributes

unsigned int m_matrixType
 stores the matrix type


Detailed Description

Symmetric sparse matrix class with selfadjoint storage.

This class represents a symmetric sparse matrix. Only the lower triangular part and the diagonal are stored. The upper triangular part is "emulated".


Member Function Documentation

SymSparseMatrix tmath::sparse::SymSparseMatrix::__neg__ (  )  const [inline]

returns unary minus (B=-A)

SymSparseMatrix tmath::sparse::SymSparseMatrix::operator* ( const double &  x  )  const

overrides the sparsematrix-scalar product.

SparseMatrix tmath::sparse::SymSparseMatrix::operator* ( const SymSparseMatrix x  )  const

overrides the sparsematrix-densematrix product.

SymSparseMatrix tmath::sparse::SymSparseMatrix::operator+ ( const SymSparseMatrix x  )  const

overrides the sparsematrix-sparsematrix sum.

SymSparseMatrix tmath::sparse::SymSparseMatrix::operator- ( const SymSparseMatrix x  )  const

overrides the sparsematrix-sparsematrix subtraction

SymSparseMatrix tmath::sparse::SymSparseMatrix::operator/ ( const double &  x  )  const

overrides the sparsematrix-scalar division.

void tmath::sparse::SymSparseMatrix::Print ( const std::string &  format = "%g ",
TUnsignedIndex  rows = 20,
TUnsignedIndex  cols = 20 
) const

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


The documentation for this class was generated from the following file:

Generated on Wed Nov 17 17:36:01 2010 for 'tmath' Module Programming Interface by  doxygen 1.5.6