ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
viennashe::models::chain Class Reference

Implementation of Markov-Chains. More...

#include <chain.hpp>

Public Types

typedef state_base::index_type index_type
 

Public Member Functions

void add_state (state_base const &st)
 Adds a single state to the chain. More...
 
void add_rate (state_base const &from, state_base const &to, rate_base const &r)
 Adds a rate between to states. Additionally adds the given states if necessary. More...
 
rate_base const & rate (state_base const &from, state_base const &to) const
 Returns a constant reference to a rate between the given states. More...
 
rate_base const & rate (index_type from, index_type to) const
 Returns a constant reference to a rate between to states identified by their resp. ids. More...
 
double get_rate (state_base const &from, state_base const &to) const
 Returns the actual rate (double value!) between to states. More...
 
index_type size1 () const
 Returns the row size of the rate-matrix. More...
 
index_type size2 () const
 Returns the column size of the rate-matrix. More...
 
double get_rate (index_type from, index_type to) const
 Returns the acutal rate (double value!) between to states identified by their resp. ids. More...
 
void print_rate_matrix () const
 Prints the rate matrix onto screen (log::info). Usefull for debugging. More...
 
template<typename MatrixT >
void get_rate_matrix (MatrixT &rate_matrix) const
 Fills the given rate_matrix. More...
 
void print_occupancies () const
 Prints the occupancies of each state in the chain onto screen (log::info). Usefull for debugging. More...
 
bool has_state (index_type idx) const
 Returns true if a state identified by its id is in the chain. More...
 
state_baseget_state (index_type idx)
 
state_base const & get_state (index_type idx) const
 
 ~chain ()
 

Protected Member Functions

void add_rate (index_type from, index_type to, rate_base const &r)
 

Detailed Description

Implementation of Markov-Chains.

Definition at line 84 of file chain.hpp.

Member Typedef Documentation

◆ index_type

Constructor & Destructor Documentation

◆ ~chain()

viennashe::models::chain::~chain ( )
inline

Definition at line 263 of file chain.hpp.

Member Function Documentation

◆ add_rate() [1/2]

void viennashe::models::chain::add_rate ( index_type  from,
index_type  to,
rate_base const &  r 
)
inlineprotected

Definition at line 277 of file chain.hpp.

◆ add_rate() [2/2]

void viennashe::models::chain::add_rate ( state_base const &  from,
state_base const &  to,
rate_base const &  r 
)
inline

Adds a rate between to states. Additionally adds the given states if necessary.

Definition at line 113 of file chain.hpp.

◆ add_state()

void viennashe::models::chain::add_state ( state_base const &  st)
inline

Adds a single state to the chain.

Definition at line 103 of file chain.hpp.

◆ get_rate() [1/2]

double viennashe::models::chain::get_rate ( index_type  from,
index_type  to 
) const
inline

Returns the acutal rate (double value!) between to states identified by their resp. ids.

Definition at line 151 of file chain.hpp.

◆ get_rate() [2/2]

double viennashe::models::chain::get_rate ( state_base const &  from,
state_base const &  to 
) const
inline

Returns the actual rate (double value!) between to states.

Definition at line 140 of file chain.hpp.

◆ get_rate_matrix()

template<typename MatrixT >
void viennashe::models::chain::get_rate_matrix ( MatrixT &  rate_matrix) const
inline

Fills the given rate_matrix.

Parameters
rate_matrixAn ublas compatible matrix. The matrix needs to be properly allocated!

Definition at line 208 of file chain.hpp.

◆ get_state() [1/2]

state_base & viennashe::models::chain::get_state ( index_type  idx)
inline

Definition at line 249 of file chain.hpp.

◆ get_state() [2/2]

state_base const & viennashe::models::chain::get_state ( index_type  idx) const
inline

Definition at line 255 of file chain.hpp.

◆ has_state()

bool viennashe::models::chain::has_state ( index_type  idx) const
inline

Returns true if a state identified by its id is in the chain.

Definition at line 247 of file chain.hpp.

◆ print_occupancies()

void viennashe::models::chain::print_occupancies ( ) const
inline

Prints the occupancies of each state in the chain onto screen (log::info). Usefull for debugging.

Definition at line 227 of file chain.hpp.

◆ print_rate_matrix()

void viennashe::models::chain::print_rate_matrix ( ) const
inline

Prints the rate matrix onto screen (log::info). Usefull for debugging.

Definition at line 164 of file chain.hpp.

◆ rate() [1/2]

rate_base const & viennashe::models::chain::rate ( index_type  from,
index_type  to 
) const
inline

Returns a constant reference to a rate between to states identified by their resp. ids.

Definition at line 127 of file chain.hpp.

◆ rate() [2/2]

rate_base const & viennashe::models::chain::rate ( state_base const &  from,
state_base const &  to 
) const
inline

Returns a constant reference to a rate between the given states.

Definition at line 121 of file chain.hpp.

◆ size1()

index_type viennashe::models::chain::size1 ( ) const
inline

Returns the row size of the rate-matrix.

Definition at line 146 of file chain.hpp.

◆ size2()

index_type viennashe::models::chain::size2 ( ) const
inline

Returns the column size of the rate-matrix.

Definition at line 148 of file chain.hpp.


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