Greens-code
A modular quantum transport code
Public Member Functions | List of all members
selector< int > Class Template Reference

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)
 
selectoroperator++ ()
 
selector operator++ (int)
 
selectoroperator-- ()
 
selector operator-- (int)
 
selector operator+ (const selector c) const
 
selector operator- (const selector c) const
 
selectoroperator+= (const int c)
 
selectoroperator-= (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)
 

Detailed Description

template<int>
class selector< int >

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


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