Mackey  V3.3
A C++ library for computing RO(G) graded homology
IteratorNNZ< T, row_only, col_only > Class Template Reference

Iterator over nonzero entries of Eigen matrices. More...

#include <General.hpp>

Inheritance diagram for IteratorNNZ< T, row_only, col_only >:
[legend]
Collaboration diagram for IteratorNNZ< T, row_only, col_only >:
[legend]

Public Member Functions

auto value ()
 The entry of the matrix. More...
 
auto row ()
 The row index. More...
 
auto col ()
 The column index. More...
 
IteratorNNZoperator++ ()
 Increase iterator. More...
 
 operator bool ()
 Is 1 if iterator is valid, 0 if nonvalid. More...
 
 IteratorNNZ (const T &matrix, storage row_start, storage col_start)
 Constructor given matrix and block (lower right corner) More...
 
 IteratorNNZ (const T &matrix, storage start)
 Constructor given matrix and symmetric block. More...
 

Detailed Description

template<typename T, bool row_only, bool col_only>
class mackey::IteratorNNZ< T, row_only, col_only >

Iterator over nonzero entries of Eigen matrices.

Template Parameters
TThe type of the Eigen matrix
row_onlySet to 1 to iterate only through the entries in the given row (so the block is a row)
col_onlySet to 1 to iterate only through the entries in the given column (so the block is a column)
Note
If both boolean templates are 0 then the block is any lower right corner

Constructor & Destructor Documentation

◆ IteratorNNZ() [1/2]

IteratorNNZ ( const T &  matrix,
storage  row_start,
storage  col_start 
)

Constructor given matrix and block (lower right corner)

Parameters
matrixThe matrix to iterate through
row_startThe starting row of the block: we only visit nonzero entries matrix(i,j) with i>=row_start
col_startThe starting column of the block: we only visit nonzero entries matrix(i,j) with j>=col_start

◆ IteratorNNZ() [2/2]

IteratorNNZ ( const T &  matrix,
storage  start 
)

Constructor given matrix and symmetric block.

Parameters
matrixThe matrix to iterate through
startThe starting row+column of the block: we only visit nonzero entries matrix(i,j) with i,j>=start

Member Function Documentation

◆ value()

auto value ( )

The entry of the matrix.

◆ row()

auto row ( )

The row index.

◆ col()

auto col ( )

The column index.

◆ operator++()

IteratorNNZ& operator++ ( )

Increase iterator.

◆ operator bool()

operator bool ( )

Is 1 if iterator is valid, 0 if nonvalid.


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