Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
|
Abstraction for algorithms that produce samples of some unspecified distribution. More...
#include <psiSampler.h>
Public Member Functions | |
psiSampler (markovChain *model) | |
constructor from a markovChain object More... | |
~psiSampler () | |
standard destructor More... | |
virtual double | sample () |
drawing a (pseudo)random value according to the distribution. More... | |
virtual void | iidSample (int n, double *sample) |
drawing an i.i.d. sample from the distribution. The result is returned in an array (that must have been already allocated) passed as a parameter. The Distribution class offers the default implementation with repeated call to sample(). More... | |
void | iidSample (int n, double *sample, int *cost) |
Version of iidSample with a cost function. More... | |
Abstraction for algorithms that produce samples of some unspecified distribution.
psiSampler::psiSampler | ( | markovChain * | model | ) |
constructor from a markovChain object
model | the Markov Chain |
psiSampler::~psiSampler | ( | ) |
standard destructor
|
virtual |
drawing an i.i.d. sample from the distribution. The result is returned in an array (that must have been already allocated) passed as a parameter. The Distribution class offers the default implementation with repeated call to sample().
n | the number of values to sample |
sample | an array to be filled with the sample |
Implements algorithmicSampler.
void psiSampler::iidSample | ( | int | n, |
double * | sample, | ||
int * | cost | ||
) |
Version of iidSample with a cost function.
n | size of the sample |
sample | array where to store the sample |
cost | array containing the cost function |
|
virtual |
drawing a (pseudo)random value according to the distribution.
Implements algorithmicSampler.