So-Bogus
A c++ sparse block matrix library aimed at Second Order cone problems
|
Compressed index, compatible with usual BSR/BSC formats. More...
#include <CompressedSparseBlockIndex.hpp>
Public Types | |
typedef Index_ | Index |
typedef BlockPtr_ | BlockPtr |
typedef SparseBlockIndexBase < SparseBlockIndex< true, Index_, BlockPtr_, ArrayType > > | Base |
typedef Base::InnerOffsetsType | InnerOffsetsType |
typedef Base::InnerIterator | InnerIterator |
typedef ArrayType< Index >::Type | Inner |
typedef ArrayType< Index >::Type | Outer |
typedef SparseBlockIndexTraits < SparseBlockIndex< true, Index_, BlockPtr_, ArrayType > > | Traits |
Public Member Functions | |
void | resizeOuter (Index size) |
void | reserve (Index nnz) |
Index | outerSize () const |
Index | nonZeros () const |
const InnerOffsetsType & | innerOffsetsArray () const |
template<bool Ordered> | |
void | insert (Index outIdx, Index inIdx, BlockPtr ptr) |
void | insertBack (Index outIdx, Index inIdx, BlockPtr ptr) |
void | finalize () |
Finalizes the outer indices vector. More... | |
void | clear () |
SparseBlockIndex & | operator= (const SparseBlockIndex &compressed) |
template<typename SourceDerived > | |
SparseBlockIndex & | operator= (const SparseBlockIndexBase< SourceDerived > &source) |
SparseBlockIndex & | move (SparseBlockIndex &compressed) |
template<typename SourceDerived > | |
SparseBlockIndex & | move (const SparseBlockIndexBase< SourceDerived > &source) |
Index | size (const Index outerIdx) const |
const Index * | rowIndex () const |
const Index * | columns () const |
const Index * | outerIndexPtr () const |
const Index * | innerIndexPtr () const |
SparseBlockIndex< true, Index_, BlockPtr_, ArrayType > & | derived () |
const SparseBlockIndex< true, Index_, BlockPtr_, ArrayType > & | derived () const |
Index | innerSize () const |
Number of elements of the minor indexing direction. More... | |
bool | hasInnerOffsets () const |
Returns whether the innerOffsetsArray() has been filled. | |
const Index * | innerOffsetsData () const |
Same as innerOffsetsArray, but returns a pointer instead. Assumes hasInnerOffsets() | |
InnerIterator | begin (const Index outerIdx) const |
Returns an iterator to the first non-empty block of outerIdx . | |
InnerIterator | last (const Index outerIdx) const |
Returns an iterator to the last non-empty block of outerIdx . | |
InnerIterator | end (const Index outerIdx) const |
Returns an iterator to the end of outerIdx . | |
Public Attributes | |
InnerOffsetsType | innerOffsets |
Inner | inner |
Vector of inner indices. | |
Outer | outer |
Vector encoding the start and end of inner vectors. | |
bool | valid |
Whether this index is currently valid. | |
Compressed index, compatible with usual BSR/BSC formats.
void bogus::SparseBlockIndex< true, Index_, BlockPtr_, ArrayType >::finalize | ( | ) |
Finalizes the outer indices vector.
Before calling this function, outer
[i] contains the number of blocks in the i
th inner vector
After calling this functions, outer
[i] contains the index of the start of the i
th inner vector in inner, and outer
[i+1] its end
|
inherited |
Number of elements of the minor indexing direction.
i.e. number of cols for a row-major index
void bogus::SparseBlockIndex< true, Index_, BlockPtr_, ArrayType >::insert | ( | Index | outIdx, |
Index | inIdx, | ||
BlockPtr | ptr | ||
) |