List of all members.
Classes |
struct | default_prunning_func |
class | InnerIterator |
Public Types |
enum | { Options = _Options
} |
typedef MappedSparseMatrix
< Scalar, Flags > | Map |
typedef CompressedStorage
< Scalar, Index > | Storage |
Public Member Functions |
Index | rows () const |
Index | cols () const |
Index | innerSize () const |
Index | outerSize () const |
Index | innerNonZeros (Index j) const |
const Scalar * | _valuePtr () const |
Scalar * | _valuePtr () |
const Index * | _innerIndexPtr () const |
Index * | _innerIndexPtr () |
const Index * | _outerIndexPtr () const |
Index * | _outerIndexPtr () |
Storage & | data () |
const Storage & | data () const |
Scalar | coeff (Index row, Index col) const |
Scalar & | coeffRef (Index row, Index col) |
void | setZero () |
Index | nonZeros () const |
void | reserve (Index reserveSize) |
Scalar & | insertBack (Index row, Index col) |
Scalar & | insertBackByOuterInner (Index outer, Index inner) |
Scalar & | insertBackByOuterInnerUnordered (Index outer, Index inner) |
void | startVec (Index outer) |
EIGEN_DONT_INLINE Scalar & | insert (Index row, Index col) |
void | finalize () |
void | prune (Scalar reference, RealScalar epsilon=NumTraits< RealScalar >::dummy_precision()) |
template<typename KeepFunc > |
void | prune (const KeepFunc &keep=KeepFunc()) |
void | resize (Index rows, Index cols) |
void | resizeNonZeros (Index size) |
| SparseMatrix () |
| SparseMatrix (Index rows, Index cols) |
template<typename OtherDerived > |
| SparseMatrix (const SparseMatrixBase< OtherDerived > &other) |
| SparseMatrix (const SparseMatrix &other) |
void | swap (SparseMatrix &other) |
SparseMatrix & | operator= (const SparseMatrix &other) |
template<typename Lhs , typename Rhs > |
SparseMatrix & | operator= (const SparseSparseProduct< Lhs, Rhs > &product) |
template<typename OtherDerived > |
SparseMatrix & | operator= (const ReturnByValue< OtherDerived > &other) |
template<typename OtherDerived > |
SparseMatrix & | operator= (const EigenBase< OtherDerived > &other) |
template<typename OtherDerived > |
EIGEN_DONT_INLINE SparseMatrix & | operator= (const SparseMatrixBase< OtherDerived > &other) |
| ~SparseMatrix () |
Scalar | sum () const |
EIGEN_DEPRECATED void | startFill (Index reserveSize=1000) |
EIGEN_DEPRECATED Scalar & | fillrand (Index row, Index col) |
EIGEN_DEPRECATED Scalar & | fill (Index row, Index col) |
EIGEN_DEPRECATED void | endFill () |
Protected Types |
typedef SparseMatrix< Scalar,(Flags
&~RowMajorBit)|(IsRowMajor?RowMajorBit:0)> | TransposedSparseMatrix |
Protected Attributes |
Index | m_outerSize |
Index | m_innerSize |
Index * | m_outerIndex |
CompressedStorage< Scalar, Index > | m_data |
Friends |
std::ostream & | operator<< (std::ostream &s, const SparseMatrix &m) |
Detailed Description
template<typename _Scalar, int _Options, typename _Index>
class SparseMatrix< _Scalar, _Options, _Index >
The main sparse matrix class.
This class implements a sparse matrix using the very common compressed row/column storage scheme.
- Template 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. |
| _Index | the type of the indices. Default is int . |
See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme.
This class can be extended with the help of the plugin mechanism described on the page TopicCustomizingEigen by defining the preprocessor symbol EIGEN_SPARSEMATRIX_PLUGIN
.
Member Typedef Documentation
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
Member Enumeration Documentation
template<typename _Scalar, int _Options, typename _Index>
Constructor & Destructor Documentation
template<typename _Scalar, int _Options, typename _Index>
Default constructor yielding an empty 0
x
0
matrix
template<typename _Scalar, int _Options, typename _Index>
Constructs a rows x
cols empty matrix
template<typename _Scalar, int _Options, typename _Index>
template<typename OtherDerived >
Constructs a sparse matrix from the sparse expression other
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
Member Function Documentation
template<typename _Scalar, int _Options, typename _Index>
const Index* SparseMatrix< _Scalar, _Options, _Index >::_innerIndexPtr |
( |
|
) |
const [inline] |
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
const Index* SparseMatrix< _Scalar, _Options, _Index >::_outerIndexPtr |
( |
|
) |
const [inline] |
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
EIGEN_DEPRECATED void SparseMatrix< _Scalar, _Options, _Index >::endFill |
( |
|
) |
[inline] |
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
void SparseMatrix< _Scalar, _Options, _Index >::finalize |
( |
|
) |
[inline] |
Must be called after inserting a set of non zero entries.
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
- 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.
template<typename _Scalar, int _Options, typename _Index>
- Returns:
- a reference to the non zero coefficient at position row, col assuming that:
- the nonzero does not already exist
- the new coefficient is the last one according to the storage order
Before filling a given inner vector you must call the statVec(Index) function.
After an insertion session, you should call the finalize() function.
- See also:
- insert, insertBackByOuterInner, startVec
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
- Warning:
- use it only if you know what you are doing
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
template<typename OtherDerived >
template<typename _Scalar, int _Options, typename _Index>
template<typename OtherDerived >
template<typename _Scalar, int _Options, typename _Index>
template<typename Lhs , typename Rhs >
template<typename _Scalar, int _Options, typename _Index>
template<typename OtherDerived >
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
Suppress all nonzeros which are smaller than reference under the tolerence epsilon
template<typename _Scalar, int _Options, typename _Index>
template<typename KeepFunc >
void SparseMatrix< _Scalar, _Options, _Index >::prune |
( |
const KeepFunc & |
keep = KeepFunc() |
) |
[inline] |
Suppress all nonzeros which do not satisfy the predicate keep. The functor type KeepFunc must implement the following function:
- See also:
- prune(Scalar,RealScalar)
template<typename _Scalar, int _Options, typename _Index>
void SparseMatrix< _Scalar, _Options, _Index >::reserve |
( |
Index |
reserveSize |
) |
[inline] |
Preallocates reserveSize non zeros
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
void SparseMatrix< _Scalar, _Options, _Index >::resizeNonZeros |
( |
Index |
size |
) |
[inline] |
Low level API Resize the nonzero vector to size
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
void SparseMatrix< _Scalar, _Options, _Index >::setZero |
( |
|
) |
[inline] |
template<typename _Scalar, int _Options, typename _Index>
EIGEN_DEPRECATED void SparseMatrix< _Scalar, _Options, _Index >::startFill |
( |
Index |
reserveSize = 1000 |
) |
[inline] |
- Deprecated:
- use setZero() and reserve() Initializes the filling process of
*this
.
- Parameters:
-
| reserveSize | approximate number of nonzeros Note that the matrix *this is zero-ed. |
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar , int _Options, typename _Index >
template<typename _Scalar, int _Options, typename _Index>
Swap the content of two sparse matrices of same type (optimization)
Friends And Related Function Documentation
template<typename _Scalar, int _Options, typename _Index>
std::ostream& operator<< |
( |
std::ostream & |
s, |
|
|
const SparseMatrix< _Scalar, _Options, _Index > & |
m | |
|
) |
| | [friend] |
Member Data Documentation
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
template<typename _Scalar, int _Options, typename _Index>
The documentation for this class was generated from the following files:
- /home/hauberg/Dokumenter/Capture/humim-tracker-0.1/src/ntk/geometry/Eigen/src/Sparse/SparseMatrix.h
- /home/hauberg/Dokumenter/Capture/humim-tracker-0.1/src/ntk/geometry/Eigen/src/Sparse/SparseRedux.h