![]() |
User Manual, Developers Guide and API Documentation |
![]() |
#include <markovchain/MarkovBase.hpp>


Public Member Functions | |
| int | getActualStateIndex (int actualchain) const |
| get the actual state index for a certain chain | |
| const T * | getStateContent (int index) const |
| returns a state from the vector of states | |
| const std::vector< double > & | getStateProbabilities () const |
| double | getStateProbability (int stateIndex) const |
| get the state probability for a state | |
| const std::vector< T > & | getStates () const |
| get Vector of States | |
| double | getTransitionMatrixElement (int row, int col) const |
| get Transitions/probabilities Matrix elements | |
| MarkovBase (int nos, int noc, std::vector< T > states, TransitionMatrixType matrix, std::vector< int > sStates) | |
| Creates a Complete MarkovBase. | |
| MarkovBase (int _numberOfChains) | |
| Creates an empty MarkovBase. numberOfChains is needed. | |
| int | readNumberOfStates (std::istream &in) |
| Reads the number of states from a stream. | |
| void | readTransitionsFromFile (std::istream &in) |
| Reads the matrix of transitions/probabilities between the states from a stream. | |
| void | setNumberOfStates (int _numberOfStates) |
| setNumberOfStates. The allocation of vectors and matrices is done afterwards | |
| void | setStartStates (std::vector< int > states) |
| set Start States | |
| void | setTransitionMatrix (const TransitionMatrixType &matrix) |
| set Transitions/probabilities Matrix | |
| void | setTransitionMatrixElement (int row, int col, double value) |
| set Transitions/probabilities Matrix elements | |
| virtual | ~MarkovBase () |
| MarkovBase destructor. | |
Protected Member Functions | |
| virtual void | calculateStateProbabilities () |
| determine the probability of each state. this cannot be done here, as it depends on the transition matrix type (continuous or discrete) | |
Protected Attributes | |
| std::vector< int > | actualStates |
| Internal representation of actual states: vector of actual states: one for each chain. | |
| wns::logger::Logger | logger |
| logger | |
| std::vector< int > | nextStates |
| Internal representation of next state: vector of next states, one for each chain. | |
| std::vector< double > | nextTransitionTime |
| Internal representation of next state transition time: vector of next states transition time, one for each chain. | |
| int | numberOfChains |
| Internal representation of the number of chains. | |
| int | numberOfStates |
| Internal representation of the number of states. | |
| std::vector< int > | startStates |
| Internal representation of start states: vector of start states, one for each chain. | |
| std::vector< double > | stateProbabilities |
| probability of each state. Calculated in calculateStateProbabilities (different for continuous and discrete) | |
| TransitionMatrixType | transitionsMatrix |
| Internal representation of the matrix of transitions/probabilities. | |
| std::vector< T > | vectorOfStates |
| representation of vector of states | |
Private Member Functions | |
| void | prepareTransitionMatrixAndVectorOfStates () |
| prepare transitions/probabilities Matrix and the vector of states. It is called when the numberOfStates is known. | |
Friends | |
| class | MarkovBaseTest |
| std::ostream & | operator<< (std::ostream &os, const MarkovBase &markov) |
Definition at line 52 of file MarkovBase.hpp.
| wns::markovchain::MarkovBase< T >::MarkovBase | ( | int | _numberOfChains | ) | [inline] |
Definition at line 69 of file MarkovBase.hpp.
| wns::markovchain::MarkovBase< T >::MarkovBase | ( | int | nos, | |
| int | noc, | |||
| std::vector< T > | states, | |||
| TransitionMatrixType | matrix, | |||
| std::vector< int > | sStates | |||
| ) | [inline] |
NumberOfStates: nos NumberOfChains: noc states: vector that contains all the states matrix: transition matrix/probability matrix startstates: vector with position of startstate of each chain actualstates: vector with position of actualstate of each chain nextstates: vector with position of nextstate of each chain nextTransitionTime: vector with Nexttransitiontime of each chain
Definition at line 99 of file MarkovBase.hpp.
| virtual wns::markovchain::MarkovBase< T >::~MarkovBase | ( | ) | [inline, virtual] |
Definition at line 123 of file MarkovBase.hpp.
| virtual void wns::markovchain::MarkovBase< T >::calculateStateProbabilities | ( | ) | [inline, protected, virtual] |
Reimplemented in wns::markovchain::MarkovContinuousTime< T >, wns::markovchain::MarkovContinuousTimeTraffic, wns::markovchain::MarkovDiscreteTime< T >, wns::markovchain::MarkovDiscreteTimeTraffic, wns::markovchain::MarkovContinuousTime< wns::markovchain::TrafficSpec >, and wns::markovchain::MarkovDiscreteTime< wns::markovchain::TrafficSpec >.
Definition at line 289 of file MarkovBase.hpp.
| int wns::markovchain::MarkovBase< T >::getActualStateIndex | ( | int | actualchain | ) | const [inline] |
Definition at line 153 of file MarkovBase.hpp.
| const T* wns::markovchain::MarkovBase< T >::getStateContent | ( | int | index | ) | const [inline] |
Definition at line 179 of file MarkovBase.hpp.
| const std::vector<double>& wns::markovchain::MarkovBase< T >::getStateProbabilities | ( | ) | const [inline] |
Definition at line 169 of file MarkovBase.hpp.
| double wns::markovchain::MarkovBase< T >::getStateProbability | ( | int | stateIndex | ) | const [inline] |
Definition at line 162 of file MarkovBase.hpp.
| const std::vector<T>& wns::markovchain::MarkovBase< T >::getStates | ( | ) | const [inline] |
Definition at line 143 of file MarkovBase.hpp.
| double wns::markovchain::MarkovBase< T >::getTransitionMatrixElement | ( | int | row, | |
| int | col | |||
| ) | const [inline] |
Definition at line 209 of file MarkovBase.hpp.
| void wns::markovchain::MarkovBase< T >::prepareTransitionMatrixAndVectorOfStates | ( | ) | [inline, private] |
Definition at line 358 of file MarkovBase.hpp.
| int wns::markovchain::MarkovBase< T >::readNumberOfStates | ( | std::istream & | in | ) | [inline] |
Definition at line 231 of file MarkovBase.hpp.
| void wns::markovchain::MarkovBase< T >::readTransitionsFromFile | ( | std::istream & | in | ) | [inline] |
Definition at line 259 of file MarkovBase.hpp.
| void wns::markovchain::MarkovBase< T >::setNumberOfStates | ( | int | _numberOfStates | ) | [inline] |
Definition at line 133 of file MarkovBase.hpp.
| void wns::markovchain::MarkovBase< T >::setStartStates | ( | std::vector< int > | states | ) | [inline] |
Definition at line 188 of file MarkovBase.hpp.
| void wns::markovchain::MarkovBase< T >::setTransitionMatrix | ( | const TransitionMatrixType & | matrix | ) | [inline] |
Definition at line 222 of file MarkovBase.hpp.
| void wns::markovchain::MarkovBase< T >::setTransitionMatrixElement | ( | int | row, | |
| int | col, | |||
| double | value | |||
| ) | [inline] |
Definition at line 198 of file MarkovBase.hpp.
friend class MarkovBaseTest [friend] |
Definition at line 350 of file MarkovBase.hpp.
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const MarkovBase< T > & | markov | |||
| ) | [friend] |
Definition at line 57 of file MarkovBase.hpp.
std::vector<int> wns::markovchain::MarkovBase< T >::actualStates [protected] |
Definition at line 324 of file MarkovBase.hpp.
wns::logger::Logger wns::markovchain::MarkovBase< T >::logger [protected] |
Definition at line 347 of file MarkovBase.hpp.
std::vector<int> wns::markovchain::MarkovBase< T >::nextStates [protected] |
Definition at line 330 of file MarkovBase.hpp.
std::vector<double> wns::markovchain::MarkovBase< T >::nextTransitionTime [protected] |
Definition at line 336 of file MarkovBase.hpp.
int wns::markovchain::MarkovBase< T >::numberOfChains [protected] |
Definition at line 302 of file MarkovBase.hpp.
int wns::markovchain::MarkovBase< T >::numberOfStates [protected] |
Definition at line 297 of file MarkovBase.hpp.
std::vector<int> wns::markovchain::MarkovBase< T >::startStates [protected] |
Definition at line 318 of file MarkovBase.hpp.
std::vector<double> wns::markovchain::MarkovBase< T >::stateProbabilities [protected] |
Definition at line 342 of file MarkovBase.hpp.
TransitionMatrixType wns::markovchain::MarkovBase< T >::transitionsMatrix [protected] |
Definition at line 312 of file MarkovBase.hpp.
std::vector<T> wns::markovchain::MarkovBase< T >::vectorOfStates [protected] |
Definition at line 307 of file MarkovBase.hpp.
1.5.5