70 retState.
add(**varIter);
72 (
Idx)(((
double)std::rand() / (
double)RAND_MAX)
73 * (
double)(*varIter)->domainSize()));
virtual bool hasReachEnd()
Tests if end state has been reached.
<agrum/FMDP/simulation/abstractSimulator.h>
Instantiation & chgVal(const DiscreteVariable &v, Idx newval)
Assign newval to variable v in the Instantiation.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
const Sequence< const DiscreteVariable *> & variablesSequence() const final
Returns the sequence of DiscreteVariable of this instantiation.
Idx val(Idx i) const
Returns the current value of the variable at position i.
Instantiation _currentState
Tha state in which the system currently is.
virtual ~AbstractSimulator()
Default destructor.
void setInitialStateRandomly()
Sets the intial statefrom which we begun the simulation.
virtual SequenceIteratorSafe< const DiscreteVariable *> beginVariables()=0
Iteration over the variables of the simulated probleme.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual bool empty() const final
Returns true if the instantiation is empty.
virtual Instantiation _randomState()
Choses a random state as the first test for a run.
virtual SequenceIteratorSafe< const DiscreteVariable *> endVariables()=0
Iteration over the variables of the simulated probleme.
Class for assigning/browsing values to tuples of discrete variables.
Size Idx
Type for indexes.
void add(const DiscreteVariable &v) final
Adds a new variable in the Instantiation.
AbstractSimulator()
Default constructor.