LiTe
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | List of all members
SMFChain Class Reference

Markovian T-tessellation. More...

#include <ttessel.h>

Public Types

enum  ModType { SPLIT = 1, MERGE, FLIP }
 Types of modifications applicable to a T-tessellation. More...
 

Public Member Functions

 SMFChain (Energy *, double, double)
 Constructor for class SMFChain. More...
 
void set_energy (Energy *e)
 Set the energy function of the model to be simulated.
 
Energyget_energy ()
 Get the energy function of the model to be simulated.
 
void set_smf_prob (double, double)
 Set the probabilities of proposing a split and a merge. More...
 
ModType propose_modif_type ()
 Draw a type of modification (split or merge or flip)
 
double Hasting_ratio (TTessel::Split &, double *)
 Compute the Hastings ratio for a given split. More...
 
double Hasting_ratio (TTessel::Merge &, double *)
 Compute the Hastings ratio for a given merge. More...
 
double Hasting_ratio (TTessel::Flip &, double *)
 Compute the Hastings ratio for a given flip. More...
 
ModifCounts step (unsigned long int=1)
 Proceed to update(s) of the SMF chain. More...
 

Detailed Description

Markovian T-tessellation.

Updates are splits, merges and flips. Transitions ruled according a Metropolis-Hastings-Green construction.

Member Enumeration Documentation

Types of modifications applicable to a T-tessellation.

Enumerator
SPLIT 

split (of a face)

MERGE 

merge (of two faces separated by a non-blocking segment)

FLIP 

a segment is shortened, another one is lengthened

Constructor & Destructor Documentation

SMFChain::SMFChain ( Energy e,
double  prob_split,
double  prob_merge 
)

Constructor for class SMFChain.

Parameters
e: pointer to an Energy object defining the distribution to be simulated.
prob_split: probability of proposing a split
prob_merge: probability of proposing a merge

The probability of proposing a flip is complementary to the sum of probabilities of proposing a split or a merge. Therefore, the sum of the latter probabilities should be less than 1.

Member Function Documentation

double SMFChain::Hasting_ratio ( TTessel::Split s,
double *  e_var 
)

Compute the Hastings ratio for a given split.

Parameters
s: the split for which the Hastings ratio is computed
e_var: the address of a double where to store the energy variation
Returns
the value of the Hastings ratio
double SMFChain::Hasting_ratio ( TTessel::Merge m,
double *  e_var 
)

Compute the Hastings ratio for a given merge.

Parameters
m: the merge for which the Hastings ratio is computed
e_var: the address of a double where to store the energy variation
Returns
the value of the Hastings ratio
double SMFChain::Hasting_ratio ( TTessel::Flip f,
double *  e_var 
)

Compute the Hastings ratio for a given flip.

Parameters
f: the flip for which the Hastings ratio is computed
e_var: the address of a double where to store the energy variation
Returns
the value of the Hastings ratio
void SMFChain::set_smf_prob ( double  s,
double  m 
)

Set the probabilities of proposing a split and a merge.

Parameters
s: probability to propose a split
m: probability to propose a merge

The sum s+m should be smaller than 1. The probability to propose a flip is 1-s-m.

ModifCounts SMFChain::step ( unsigned long int  nb_step = 1)

Proceed to update(s) of the SMF chain.

Parameters
nb_step: number of updates to be done
Returns
some statistics on the proposals and their acceptation

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