IVSparse  v1.0
A sparse matrix compression library.
SparseMatrix< T, indexT, 1, columnMajor >::InnerIterator

Public Member Functions

Constructors
 InnerIterator ()
 
 InnerIterator (SparseMatrix< T, indexT, 1, columnMajor > &mat, uint32_t vec)
 
 InnerIterator (SparseMatrix< T, indexT, 1, columnMajor >::Vector &vec)
 
Getters
indexT getIndex ()
 
indexT outerDim ()
 
indexT row ()
 
indexT col ()
 
value ()
 
void coeff (T newValue)
 

Detailed Description

template<typename T, typename indexT, bool columnMajor>
class IVSparse::SparseMatrix< T, indexT, 1, columnMajor >::InnerIterator

CSC Inner Iterator Class

The CSC Inner Iterator is a forward traversal iterator like the others in the IVSparse library. It's very low overhead and is used to traverse over the nonzeros of a single vector of a matrix or a vector on its own.

Constructor & Destructor Documentation

◆ InnerIterator() [1/3]

InnerIterator ( )
inline

Default Iterator Constructor

Creates an empty iterator that can't be used on its own.

◆ InnerIterator() [2/3]

InnerIterator ( SparseMatrix< T, indexT, 1, columnMajor > &  mat,
uint32_t  vec 
)
inline

CSC Matrix InnerIterator Constructor

The main constructor for the Inner Iterator. Given a matrix the iterator will forward traverse over the given vector of the matrix. The traversal is sorted by index.

◆ InnerIterator() [3/3]

InnerIterator ( SparseMatrix< T, indexT, 1, columnMajor >::Vector &  vec)

CSC Vector InnerIterator Constructor

Same as the previous constructor but for a single standalone vector. Can be used in the same way as the previous constructor.

Member Function Documentation

◆ getIndex()

indexT getIndex
Returns
The current index of the iterator.

◆ outerDim()

indexT outerDim
Returns
The current outer dimension of the iterator.

◆ row()

indexT row
Returns
The current row of the iterator.

◆ col()

indexT col
Returns
The current column of the iterator.

◆ value()

T value
Returns
The current value of the iterator.

◆ coeff()

void coeff ( newValue)

Changes the value where the iterator is pointing.

Note
This is the only way to update elements in the IVSparse format.
Warning
This method may break things if used without care, IVSparse is not meant to update values.