The main sparse matrix class.
This class implements a sparse matrix using the very common compressed row/column storage scheme.
_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.
Definition at line 67 of file SparseMatrix.h.
#include <src/Sparse/SparseMatrix.h>
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 () |
Removes all non zeros. | |
Index | nonZeros () const |
void | reserve (Index reserveSize) |
Preallocates reserveSize non zeros. | |
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 () |
Must be called after inserting a set of non zero entries. | |
void | prune (Scalar reference, RealScalar epsilon=NumTraits< RealScalar >::dummy_precision()) |
Suppress all nonzeros which are smaller than reference under the tolerence epsilon. | |
template<typename KeepFunc > | |
void | prune (const KeepFunc &keep=KeepFunc()) |
Suppress all nonzeros which do not satisfy the predicate keep. | |
void | resize (Index rows, Index cols) |
Resizes the matrix to a rows x cols matrix and initializes it to zero. | |
void | resizeNonZeros (Index size) |
Low level API Resize the nonzero vector to size. | |
SparseMatrix () | |
Default constructor yielding an empty 0 x 0 matrix. | |
SparseMatrix (Index rows, Index cols) | |
Constructs a rows x cols empty matrix. | |
template<typename OtherDerived > | |
SparseMatrix (const SparseMatrixBase< OtherDerived > &other) | |
Constructs a sparse matrix from the sparse expression other. | |
SparseMatrix (const SparseMatrix &other) | |
Copy constructor. | |
void | swap (SparseMatrix &other) |
Swap the content of two sparse matrices of same type (optimization) | |
SparseMatrix & | operator= (const SparseMatrix &other) |
template<typename OtherDerived > | |
EIGEN_DONT_INLINE SparseMatrix & | operator= (const SparseMatrixBase< OtherDerived > &other) |
~SparseMatrix () | |
Destructor. | |
Scalar | sum () const |
Overloaded for performance. | |
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) |
typedef MappedSparseMatrix<Scalar,Flags> SparseMatrix< _Scalar, _Options, _Index >::Map |
Definition at line 79 of file SparseMatrix.h.
typedef CompressedStorage<Scalar,Index> SparseMatrix< _Scalar, _Options, _Index >::Storage |
Definition at line 81 of file SparseMatrix.h.
typedef SparseMatrix<Scalar,(Flags&~RowMajorBit)|(IsRowMajor?RowMajorBit:0)> SparseMatrix< _Scalar, _Options, _Index >::TransposedSparseMatrix [protected] |
Definition at line 88 of file SparseMatrix.h.
anonymous enum |
Definition at line 82 of file SparseMatrix.h.
SparseMatrix< _Scalar, _Options, _Index >::SparseMatrix | ( | ) | [inline] |
Default constructor yielding an empty 0
x
0
matrix.
Definition at line 396 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::resize().
SparseMatrix< _Scalar, _Options, _Index >::SparseMatrix | ( | Index | rows, |
Index | cols | ||
) | [inline] |
Constructs a rows x
cols empty matrix.
Definition at line 403 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::resize().
SparseMatrix< _Scalar, _Options, _Index >::SparseMatrix | ( | const SparseMatrixBase< OtherDerived > & | other ) | [inline] |
Constructs a sparse matrix from the sparse expression other.
Definition at line 411 of file SparseMatrix.h.
References EigenBase< Derived >::derived().
SparseMatrix< _Scalar, _Options, _Index >::SparseMatrix | ( | const SparseMatrix< _Scalar, _Options, _Index > & | other ) | [inline] |
Copy constructor.
Definition at line 418 of file SparseMatrix.h.
References EigenBase< Derived >::derived().
SparseMatrix< _Scalar, _Options, _Index >::~SparseMatrix | ( | ) | [inline] |
Destructor.
Definition at line 541 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex.
const Index* SparseMatrix< _Scalar, _Options, _Index >::_innerIndexPtr | ( | ) | const [inline] |
Definition at line 107 of file SparseMatrix.h.
References CompressedStorage< _Scalar, _Index >::index(), and SparseMatrix< _Scalar, _Options, _Index >::m_data.
Index* SparseMatrix< _Scalar, _Options, _Index >::_innerIndexPtr | ( | ) | [inline] |
Definition at line 108 of file SparseMatrix.h.
References CompressedStorage< _Scalar, _Index >::index(), and SparseMatrix< _Scalar, _Options, _Index >::m_data.
const Index* SparseMatrix< _Scalar, _Options, _Index >::_outerIndexPtr | ( | ) | const [inline] |
Definition at line 110 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex.
Index* SparseMatrix< _Scalar, _Options, _Index >::_outerIndexPtr | ( | ) | [inline] |
Definition at line 111 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex.
const Scalar* SparseMatrix< _Scalar, _Options, _Index >::_valuePtr | ( | ) | const [inline] |
Definition at line 104 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_data, and CompressedStorage< _Scalar, _Index >::value().
Scalar* SparseMatrix< _Scalar, _Options, _Index >::_valuePtr | ( | ) | [inline] |
Definition at line 105 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_data, and CompressedStorage< _Scalar, _Index >::value().
Scalar SparseMatrix< _Scalar, _Options, _Index >::coeff | ( | Index | row, |
Index | col | ||
) | const [inline] |
Definition at line 116 of file SparseMatrix.h.
References CompressedStorage< _Scalar, _Index >::atInRange(), SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::col(), SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::IsRowMajor, SparseMatrix< _Scalar, _Options, _Index >::m_data, SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex, and SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::row().
Scalar& SparseMatrix< _Scalar, _Options, _Index >::coeffRef | ( | Index | row, |
Index | col | ||
) | [inline] |
Definition at line 123 of file SparseMatrix.h.
References SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::col(), eigen_assert, end(), CompressedStorage< _Scalar, _Index >::index(), SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::IsRowMajor, SparseMatrix< _Scalar, _Options, _Index >::m_data, SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex, SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::row(), CompressedStorage< _Scalar, _Index >::searchLowerIndex(), and CompressedStorage< _Scalar, _Index >::value().
Index SparseMatrix< _Scalar, _Options, _Index >::cols | ( | void | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
Definition at line 98 of file SparseMatrix.h.
References SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::IsRowMajor, SparseMatrix< _Scalar, _Options, _Index >::m_innerSize, and SparseMatrix< _Scalar, _Options, _Index >::m_outerSize.
Referenced by SparseMatrix< _Scalar, _Options, _Index >::operator=(), and SparseMatrix< _Scalar, _Options, _Index >::resize().
Storage& SparseMatrix< _Scalar, _Options, _Index >::data | ( | ) | [inline] |
Definition at line 113 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_data.
Referenced by SparseInnerVectorSet< SparseMatrix< _Scalar, _Options, _Index >, Size >::operator=().
const Storage& SparseMatrix< _Scalar, _Options, _Index >::data | ( | ) | const [inline] |
Definition at line 114 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_data.
EIGEN_DEPRECATED void SparseMatrix< _Scalar, _Options, _Index >::endFill | ( | ) | [inline] |
Definition at line 602 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::finalize().
EIGEN_DEPRECATED Scalar& SparseMatrix< _Scalar, _Options, _Index >::fill | ( | Index | row, |
Index | col | ||
) | [inline] |
Definition at line 572 of file SparseMatrix.h.
References CompressedStorage< _Scalar, _Index >::append(), SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::col(), eigen_assert, CompressedStorage< _Scalar, _Index >::index(), SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::IsRowMajor, SparseMatrix< _Scalar, _Options, _Index >::m_data, SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex, SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::row(), CompressedStorage< _Scalar, _Index >::size(), and CompressedStorage< _Scalar, _Index >::value().
EIGEN_DEPRECATED Scalar& SparseMatrix< _Scalar, _Options, _Index >::fillrand | ( | Index | row, |
Index | col | ||
) | [inline] |
Definition at line 565 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::insert().
void SparseMatrix< _Scalar, _Options, _Index >::finalize | ( | ) | [inline] |
Must be called after inserting a set of non zero entries.
Definition at line 320 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_data, SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex, SparseMatrix< _Scalar, _Options, _Index >::m_outerSize, CompressedStorage< _Scalar, _Index >::size(), and SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::size().
Referenced by SparseMatrix< _Scalar, _Options, _Index >::endFill().
Index SparseMatrix< _Scalar, _Options, _Index >::innerNonZeros | ( | Index | j ) | const [inline] |
Definition at line 102 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex.
Index SparseMatrix< _Scalar, _Options, _Index >::innerSize | ( | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
Definition at line 100 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_innerSize.
EIGEN_DONT_INLINE Scalar& SparseMatrix< _Scalar, _Options, _Index >::insert | ( | Index | row, |
Index | col | ||
) | [inline] |
After an insertion session, you should call the finalize() function.
Definition at line 211 of file SparseMatrix.h.
References CompressedStorage< _Scalar, _Index >::allocatedSize(), SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::col(), CompressedStorage< _Scalar, _Index >::index(), SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::IsRowMajor, SparseMatrix< _Scalar, _Options, _Index >::m_data, SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex, SparseMatrix< _Scalar, _Options, _Index >::m_outerSize, CompressedStorage< _Scalar, _Index >::reserve(), CompressedStorage< _Scalar, _Index >::resize(), SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::row(), CompressedStorage< _Scalar, _Index >::size(), and CompressedStorage< _Scalar, _Index >::value().
Referenced by SparseMatrix< _Scalar, _Options, _Index >::fillrand().
Scalar& SparseMatrix< _Scalar, _Options, _Index >::insertBack | ( | Index | row, |
Index | col | ||
) | [inline] |
Before filling a given inner vector you must call the statVec(Index) function.
After an insertion session, you should call the finalize() function.
Definition at line 168 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::insertBackByOuterInner(), and SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::IsRowMajor.
Scalar& SparseMatrix< _Scalar, _Options, _Index >::insertBackByOuterInner | ( | Index | outer, |
Index | inner | ||
) | [inline] |
Definition at line 174 of file SparseMatrix.h.
References CompressedStorage< _Scalar, _Index >::append(), eigen_assert, CompressedStorage< _Scalar, _Index >::index(), SparseMatrix< _Scalar, _Options, _Index >::m_data, SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex, CompressedStorage< _Scalar, _Index >::size(), and CompressedStorage< _Scalar, _Index >::value().
Referenced by SparseMatrix< _Scalar, _Options, _Index >::insertBack().
Scalar& SparseMatrix< _Scalar, _Options, _Index >::insertBackByOuterInnerUnordered | ( | Index | outer, |
Index | inner | ||
) | [inline] |
Definition at line 185 of file SparseMatrix.h.
References CompressedStorage< _Scalar, _Index >::append(), SparseMatrix< _Scalar, _Options, _Index >::m_data, SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex, and CompressedStorage< _Scalar, _Index >::value().
Index SparseMatrix< _Scalar, _Options, _Index >::nonZeros | ( | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
Definition at line 149 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_data, and CompressedStorage< _Scalar, _Index >::size().
Referenced by SparseInnerVectorSet< SparseMatrix< _Scalar, _Options, _Index >, Size >::operator=().
EIGEN_DONT_INLINE SparseMatrix& SparseMatrix< _Scalar, _Options, _Index >::operator= | ( | const SparseMatrixBase< OtherDerived > & | other ) | [inline] |
Reimplemented from SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
Definition at line 465 of file SparseMatrix.h.
References SparseMatrixBase< Derived >::cols(), EigenBase< Derived >::derived(), SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::Flags, CompressedStorage< _Scalar, _Index >::index(), SparseMatrix< _Scalar, _Options, _Index >::m_data, SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex, SparseMatrix< _Scalar, _Options, _Index >::operator=(), SparseMatrix< _Scalar, _Options, _Index >::outerSize(), CompressedStorage< _Scalar, _Index >::resize(), SparseMatrix< _Scalar, _Options, _Index >::resize(), RowMajorBit, SparseMatrixBase< Derived >::rows(), SparseMatrix< _Scalar, _Options, _Index >::setZero(), and CompressedStorage< _Scalar, _Index >::value().
SparseMatrix& SparseMatrix< _Scalar, _Options, _Index >::operator= | ( | const SparseMatrix< _Scalar, _Options, _Index > & | other ) | [inline] |
Reimplemented from SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
Definition at line 434 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::cols(), EigenBase< Derived >::const_cast_derived(), SparseMatrixBase< Derived >::isRValue(), SparseMatrix< _Scalar, _Options, _Index >::m_data, SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex, SparseMatrix< _Scalar, _Options, _Index >::m_outerSize, mrpt::system::os::memcpy(), SparseMatrix< _Scalar, _Options, _Index >::resize(), SparseMatrix< _Scalar, _Options, _Index >::rows(), and SparseMatrix< _Scalar, _Options, _Index >::swap().
Referenced by SparseMatrix< _Scalar, _Options, _Index >::operator=().
Index SparseMatrix< _Scalar, _Options, _Index >::outerSize | ( | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
Definition at line 101 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_outerSize.
Referenced by SparseMatrix< _Scalar, _Options, _Index >::operator=(), SparseMatrix< _Scalar, _Options, _Index >::resize(), and SparseInnerVectorSet< SparseMatrix< _Scalar, _Options, _Index >, Size >::SparseInnerVectorSet().
void SparseMatrix< _Scalar, _Options, _Index >::prune | ( | Scalar | reference, |
RealScalar | epsilon = NumTraits<RealScalar>::dummy_precision() |
||
) | [inline] |
Suppress all nonzeros which are smaller than reference under the tolerence epsilon.
Definition at line 336 of file SparseMatrix.h.
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:
Definition at line 349 of file SparseMatrix.h.
References end(), CompressedStorage< _Scalar, _Index >::index(), SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::IsRowMajor, SparseMatrix< _Scalar, _Options, _Index >::m_data, SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex, SparseMatrix< _Scalar, _Options, _Index >::m_outerSize, CompressedStorage< _Scalar, _Index >::resize(), and CompressedStorage< _Scalar, _Index >::value().
void SparseMatrix< _Scalar, _Options, _Index >::reserve | ( | Index | reserveSize ) | [inline] |
Preallocates reserveSize non zeros.
Definition at line 152 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_data, and CompressedStorage< _Scalar, _Index >::reserve().
void SparseMatrix< _Scalar, _Options, _Index >::resize | ( | Index | rows, |
Index | cols | ||
) | [inline] |
Resizes the matrix to a rows x cols matrix and initializes it to zero.
Definition at line 374 of file SparseMatrix.h.
References CompressedStorage< _Scalar, _Index >::clear(), SparseMatrix< _Scalar, _Options, _Index >::cols(), SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::IsRowMajor, SparseMatrix< _Scalar, _Options, _Index >::m_data, SparseMatrix< _Scalar, _Options, _Index >::m_innerSize, SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex, SparseMatrix< _Scalar, _Options, _Index >::m_outerSize, SparseMatrix< _Scalar, _Options, _Index >::outerSize(), and SparseMatrix< _Scalar, _Options, _Index >::rows().
Referenced by SparseMatrix< _Scalar, _Options, _Index >::operator=(), and SparseMatrix< _Scalar, _Options, _Index >::SparseMatrix().
void SparseMatrix< _Scalar, _Options, _Index >::resizeNonZeros | ( | Index | size ) | [inline] |
Low level API Resize the nonzero vector to size.
Definition at line 390 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_data, and CompressedStorage< _Scalar, _Index >::resize().
Index SparseMatrix< _Scalar, _Options, _Index >::rows | ( | void | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
Definition at line 97 of file SparseMatrix.h.
References SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >::IsRowMajor, SparseMatrix< _Scalar, _Options, _Index >::m_innerSize, and SparseMatrix< _Scalar, _Options, _Index >::m_outerSize.
Referenced by SparseMatrix< _Scalar, _Options, _Index >::operator=(), and SparseMatrix< _Scalar, _Options, _Index >::resize().
void SparseMatrix< _Scalar, _Options, _Index >::setZero | ( | ) | [inline] |
Removes all non zeros.
Definition at line 142 of file SparseMatrix.h.
References CompressedStorage< _Scalar, _Index >::clear(), SparseMatrix< _Scalar, _Options, _Index >::m_data, SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex, and SparseMatrix< _Scalar, _Options, _Index >::m_outerSize.
Referenced by SparseMatrix< _Scalar, _Options, _Index >::operator=(), and SparseMatrix< _Scalar, _Options, _Index >::startFill().
EIGEN_DEPRECATED void SparseMatrix< _Scalar, _Options, _Index >::startFill | ( | Index | reserveSize = 1000 ) |
[inline] |
*this
.reserveSize | approximate number of nonzeros Note that the matrix *this is zero-ed. |
Definition at line 556 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_data, CompressedStorage< _Scalar, _Index >::reserve(), and SparseMatrix< _Scalar, _Options, _Index >::setZero().
void SparseMatrix< _Scalar, _Options, _Index >::startVec | ( | Index | outer ) | [inline] |
Definition at line 194 of file SparseMatrix.h.
References eigen_assert, SparseMatrix< _Scalar, _Options, _Index >::m_data, SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex, and CompressedStorage< _Scalar, _Index >::size().
internal::traits< SparseMatrix< _Scalar, _Options, _Index > >::Scalar SparseMatrix< _Scalar, _Options, _Index >::sum | ( | ) | const |
Overloaded for performance.
Reimplemented from SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
Definition at line 42 of file SparseRedux.h.
References eigen_assert, PlainObjectBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Map(), and mrpt::math::sum().
void SparseMatrix< _Scalar, _Options, _Index >::swap | ( | SparseMatrix< _Scalar, _Options, _Index > & | other ) | [inline] |
Swap the content of two sparse matrices of same type (optimization)
Definition at line 425 of file SparseMatrix.h.
References SparseMatrix< _Scalar, _Options, _Index >::m_data, SparseMatrix< _Scalar, _Options, _Index >::m_innerSize, SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex, SparseMatrix< _Scalar, _Options, _Index >::m_outerSize, and CompressedStorage< _Scalar, _Index >::swap().
Referenced by SparseMatrix< _Scalar, _Options, _Index >::operator=().
std::ostream& operator<< | ( | std::ostream & | s, |
const SparseMatrix< _Scalar, _Options, _Index > & | m | ||
) | [friend] |
Definition at line 518 of file SparseMatrix.h.
CompressedStorage<Scalar,Index> SparseMatrix< _Scalar, _Options, _Index >::m_data [protected] |
Definition at line 93 of file SparseMatrix.h.
Referenced by SparseMatrix< _Scalar, _Options, _Index >::_innerIndexPtr(), SparseMatrix< _Scalar, _Options, _Index >::_valuePtr(), SparseMatrix< _Scalar, _Options, _Index >::coeff(), SparseMatrix< _Scalar, _Options, _Index >::coeffRef(), SparseMatrix< _Scalar, _Options, _Index >::data(), SparseMatrix< _Scalar, _Options, _Index >::fill(), SparseMatrix< _Scalar, _Options, _Index >::finalize(), SparseMatrix< _Scalar, _Options, _Index >::insert(), SparseMatrix< _Scalar, _Options, _Index >::insertBackByOuterInner(), SparseMatrix< _Scalar, _Options, _Index >::insertBackByOuterInnerUnordered(), SparseMatrix< _Scalar, _Options, _Index >::nonZeros(), SparseMatrix< _Scalar, _Options, _Index >::operator=(), SparseMatrix< _Scalar, _Options, _Index >::prune(), SparseMatrix< _Scalar, _Options, _Index >::reserve(), SparseMatrix< _Scalar, _Options, _Index >::resize(), SparseMatrix< _Scalar, _Options, _Index >::resizeNonZeros(), SparseMatrix< _Scalar, _Options, _Index >::setZero(), SparseMatrix< _Scalar, _Options, _Index >::startFill(), SparseMatrix< _Scalar, _Options, _Index >::startVec(), and SparseMatrix< _Scalar, _Options, _Index >::swap().
Index SparseMatrix< _Scalar, _Options, _Index >::m_innerSize [protected] |
Definition at line 91 of file SparseMatrix.h.
Referenced by SparseMatrix< _Scalar, _Options, _Index >::cols(), SparseMatrix< _Scalar, _Options, _Index >::innerSize(), SparseMatrix< _Scalar, _Options, _Index >::resize(), SparseMatrix< _Scalar, _Options, _Index >::rows(), and SparseMatrix< _Scalar, _Options, _Index >::swap().
Index* SparseMatrix< _Scalar, _Options, _Index >::m_outerIndex [protected] |
Definition at line 92 of file SparseMatrix.h.
Referenced by SparseMatrix< _Scalar, _Options, _Index >::_outerIndexPtr(), SparseMatrix< _Scalar, _Options, _Index >::coeff(), SparseMatrix< _Scalar, _Options, _Index >::coeffRef(), SparseMatrix< _Scalar, _Options, _Index >::fill(), SparseMatrix< _Scalar, _Options, _Index >::finalize(), SparseMatrix< _Scalar, _Options, _Index >::innerNonZeros(), SparseMatrix< _Scalar, _Options, _Index >::insert(), SparseMatrix< _Scalar, _Options, _Index >::insertBackByOuterInner(), SparseMatrix< _Scalar, _Options, _Index >::insertBackByOuterInnerUnordered(), SparseMatrix< _Scalar, _Options, _Index >::operator=(), SparseMatrix< _Scalar, _Options, _Index >::prune(), SparseMatrix< _Scalar, _Options, _Index >::resize(), SparseMatrix< _Scalar, _Options, _Index >::setZero(), SparseMatrix< _Scalar, _Options, _Index >::startVec(), SparseMatrix< _Scalar, _Options, _Index >::swap(), and SparseMatrix< _Scalar, _Options, _Index >::~SparseMatrix().
Index SparseMatrix< _Scalar, _Options, _Index >::m_outerSize [protected] |
Definition at line 90 of file SparseMatrix.h.
Referenced by SparseMatrix< _Scalar, _Options, _Index >::cols(), SparseMatrix< _Scalar, _Options, _Index >::finalize(), SparseMatrix< _Scalar, _Options, _Index >::insert(), SparseMatrix< _Scalar, _Options, _Index >::operator=(), SparseMatrix< _Scalar, _Options, _Index >::outerSize(), SparseMatrix< _Scalar, _Options, _Index >::prune(), SparseMatrix< _Scalar, _Options, _Index >::resize(), SparseMatrix< _Scalar, _Options, _Index >::rows(), SparseMatrix< _Scalar, _Options, _Index >::setZero(), and SparseMatrix< _Scalar, _Options, _Index >::swap().
Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011 |