So-Bogus
A c++ sparse block matrix library aimed at Second Order cone problems
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
bogus::SparseBlockIndexBase< Derived > Struct Template Reference

Public Types

typedef SparseBlockIndexTraits
< Derived > 
Traits
 
typedef Traits::Index Index
 
typedef Traits::InnerIterator InnerIterator
 
typedef std::vector< Index > InnerOffsetsType
 Type of the array encoding the size of each block of the inner dimension. More...
 

Public Member Functions

 SparseBlockIndexBase (bool _valid=true)
 
Derived & derived ()
 
const Derived & derived () const
 
Index outerSize () const
 Number of elemnts of the major indexing direction. More...
 
Index innerSize () const
 Number of elements of the minor indexing direction. More...
 
bool hasInnerOffsets () const
 Returns whether the innerOffsetsArray() has been filled.
 
const InnerOffsetsTypeinnerOffsetsArray () const
 
Index nonZeros () const
 Returns the total number of nonZeros in this index. More...
 
const Index * innerOffsetsData () const
 Same as innerOffsetsArray, but returns a pointer instead. Assumes hasInnerOffsets()
 
Index size (const Index outerIdx) const
 Returns the number of blocks at the outer index outerIdx.
 
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

bool valid
 Whether this index is currently valid.
 

Member Typedef Documentation

template<typename Derived>
typedef std::vector< Index > bogus::SparseBlockIndexBase< Derived >::InnerOffsetsType

Type of the array encoding the size of each block of the inner dimension.

which can be retrieved as

innerOffsets[inner+1] - innerOffsets[inner]

Member Function Documentation

template<typename Derived>
const InnerOffsetsType& bogus::SparseBlockIndexBase< Derived >::innerOffsetsArray ( ) const
See Also
InnerOFfsetsType
template<typename Derived>
Index bogus::SparseBlockIndexBase< Derived >::innerSize ( ) const

Number of elements of the minor indexing direction.

i.e. number of cols for a row-major index

template<typename Derived>
Index bogus::SparseBlockIndexBase< Derived >::nonZeros ( ) const

Returns the total number of nonZeros in this index.

Depending on the index type, may performe som computations

template<typename Derived>
Index bogus::SparseBlockIndexBase< Derived >::outerSize ( ) const

Number of elemnts of the major indexing direction.

i.e. number of rows for a row-major index


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