Greens-code
A modular quantum transport code
|
Helper object for indexed access of matrices. More...
#include <matrix.hpp>
Public Member Functions | |
selector (size_t i) | |
size_t | get () const |
void | set (size_t c) |
selector & | operator++ () |
selector | operator++ (int) |
selector & | operator-- () |
selector | operator-- (int) |
selector | operator+ (const selector c) const |
selector | operator- (const selector c) const |
selector & | operator+= (const int c) |
selector & | operator-= (const int c) |
bool | operator== (const selector c) const |
bool | operator!= (const selector c) const |
bool | operator< (const selector c) |
bool | operator> (const selector c) |
bool | operator<= (const selector c) |
bool | operator>= (const selector c) |
Helper object for indexed access of matrices.
We use selector<0> and selector<1> as indizes to a Matrix row and column respectively. In such a way, we distinguish row- and column- access by type, and avoid mistakes by accessing a row as column or vice versa. Both types can be explicitly constructed by an int