All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Brief description of class still missing. More...
#include <Generator.h>
Public Types | |
enum | Type { MonteCarlo, Neighborhood } |
Public Member Functions | |
Generator (ModelRepository *repository, AbstractForward *forward) | |
void | setType (Type t) |
void | setWalkCount (int n) |
void | stop () |
~Generator () | |
Protected Member Functions | |
virtual void | run () |
Brief description of class still missing.
Full description of class still missing
DinverCore::Generator::Generator | ( | ModelRepository * | repository, |
AbstractForward * | forward | ||
) |
Description of constructor still missing
References MonteCarlo, and TRACE.
: Thread(), _terminated(false) { TRACE; _type=MonteCarlo; _walkCount=2; // In a parallel implementations, random seed is meanningless // The random pathway depends upon CPU load and task distributions // Internal seed is set from current time. _randomNumbers=new Random(0); _repository=repository; _forward=forward; _generatorModelsSerialNumber=0; // First S/N starts at 1; _nav=0; }
void DinverCore::Generator::run | ( | ) | [protected, virtual] |
References MonteCarlo, and TRACE.
{ TRACE; switch(_type) { case MonteCarlo: monteCarloLoop(); break; case Neighborhood: neighborhoodLoop(); break; } }
void DinverCore::Generator::setType | ( | Type | t | ) | [inline] |
Referenced by DinverCore::ModelRepository::start().
{_type=t;}
void DinverCore::Generator::setWalkCount | ( | int | n | ) | [inline] |
Referenced by DinverCore::ModelRepository::start().
{_walkCount=n;}
void DinverCore::Generator::stop | ( | ) | [inline] |
{_terminated.setValue(true);}