a sparse vector class More...
Public Types | |
| enum | { IsColVector } |
|
typedef SparseMatrixBase < SparseVector > | SparseBase |
Public Member Functions | |
| CompressedStorage< Scalar > & | _data () |
| CompressedStorage< Scalar > & | _data () const |
| const int * | _innerIndexPtr () const |
| int * | _innerIndexPtr () |
| const Scalar * | _valuePtr () const |
| Scalar * | _valuePtr () |
| Scalar | coeff (int row, int col) const |
| Scalar | coeff (int i) const |
| Scalar & | coeffRef (int row, int col) |
| Scalar & | coeffRef (int i) |
| int | cols () const |
| void | endFill () |
| Scalar & | fill (int r, int c) |
| Scalar & | fill (int i) |
| Scalar & | fillrand (int r, int c) |
| Scalar & | fillrand (int i) |
| int | innerNonZeros (int j) const |
| int | innerSize () const |
| int | nonZeros () const |
| SparseVector & | operator= (const SparseVector &other) |
| template<typename OtherDerived > | |
| SparseVector & | operator= (const SparseMatrixBase< OtherDerived > &other) |
| int | outerSize () const |
| void | prune (Scalar reference, RealScalar epsilon=precision< RealScalar >()) |
| void | reserve (int reserveSize) |
| void | resize (int newSize) |
| void | resize (int rows, int cols) |
| void | resizeNonZeros (int size) |
| int | rows () const |
| void | setZero () |
| template<typename OtherDerived > | |
| SparseVector (const SparseMatrixBase< OtherDerived > &other) | |
| SparseVector (int size) | |
| template<typename OtherDerived > | |
| SparseVector (const MatrixBase< OtherDerived > &other) | |
| SparseVector (int rows, int cols) | |
| SparseVector (const SparseVector &other) | |
| void | startFill (int reserve) |
| void | swap (SparseVector &other) |
| ~SparseVector () | |
Public Attributes | |
| CompressedStorage< Scalar > | m_data |
| int | m_size |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const SparseVector &m) |
a sparse vector class
| _Scalar | the scalar type, i.e. the type of the coefficients |
See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme.
| ~SparseVector | ( | ) | [inline] |
Destructor
| Scalar& coeffRef | ( | int | i | ) | [inline] |
This insertion might be very costly if the number of nonzeros above i is large.
| Scalar& fillrand | ( | int | i | ) | [inline] |
Like fill() but with random coordinates.
| int nonZeros | ( | ) | const [inline] |
1.7.1