Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
Public Member Functions | List of all members
Cost Class Reference

Simulation data for CFTP algorithm. More...

#include <cost.h>

Public Member Functions

void init ()
 Initialization of the trajectories. More...
 
void init_state (const int nb)
 Creation of Cout vector without functional. More...
 
void clear ()
 Reinitialization of the object. More...
 
int value () const
 Give the first element of Class vector. More...
 
int value (const int i) const
 Give the ith value of Class vector. More...
 
int value_next () const
 Give the first element of Class_next vector. More...
 
int value_next (const int i) const
 Give the ith element of Class_next vector. More...
 
void swap ()
 Update of the trajectories after each CFTP iteration. More...
 
bool test ()
 Test the global backward trajectories coupling. More...
 
bool test_next ()
 Test the global forward trajectories coupling. More...
 
void free_cl ()
 Memory liberation of simulation vector. More...
 
void change (const int i, const int j)
 Modification of the ith Class_next element with the value of the jth element of Class vector. More...
 
void mk_cost (int *cost, int sz)
 Constucting the cost vector from an array. More...
 
int nb_cl ()
 Give the class (according to the study functional) number. More...
 

Detailed Description

Simulation data for CFTP algorithm.

Member Function Documentation

void Cost::change ( const int  i,
const int  j 
)

Modification of the ith Class_next element with the value of the jth element of Class vector.

This public method is used to generate next state of trajectories by the Walker aliasing algorithm.

Parameters
ian integer
jan integer
void Cost::clear ( )

Reinitialization of the object.

void Cost::free_cl ( )

Memory liberation of simulation vector.

void Cost::init ( )

Initialization of the trajectories.

void Cost::init_state ( const int  nb)

Creation of Cout vector without functional.

Parameters
nban integer corresponding to the space state dimension.
void Cost::mk_cost ( int *  cost,
int  sz 
)

Constucting the cost vector from an array.

Parameters
costan array where costs are stored
szthe size of this array
int Cost::nb_cl ( )

Give the class (according to the study functional) number.

void Cost::swap ( )

Update of the trajectories after each CFTP iteration.

bool Cost::test ( )

Test the global backward trajectories coupling.

Returns
true if there is coupling, false otherwise.
bool Cost::test_next ( )

Test the global forward trajectories coupling.

Returns
true if there is coupling, false otherwise.
int Cost::value ( ) const
inline

Give the first element of Class vector.

Its public method is used to obtain the generate value of each realization.

int Cost::value ( const int  i) const
inline

Give the ith value of Class vector.

It be useful to MCMC simulation to estimate a functional of stationary distribution.

int Cost::value_next ( ) const
inline

Give the first element of Class_next vector.

Its public method is used to obtain the generate value of each realization in Forward simulation.

int Cost::value_next ( const int  i) const
inline

Give the ith element of Class_next vector.


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