All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Public Types | Public Member Functions | Protected Member Functions
DinverCore::Generator Class Reference

Brief description of class still missing. More...

#include <Generator.h>

Inheritance diagram for DinverCore::Generator:
QGpCoreTools::Thread

List of all members.

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 ()

Detailed Description

Brief description of class still missing.

Full description of class still missing


Member Enumeration Documentation

Enumerator:
MonteCarlo 
Neighborhood 

Constructor & Destructor Documentation

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;
  }

Description of destructor still missing

References TRACE.

  {
    TRACE;
    delete _randomNumbers;
    delete _forward;
    delete _nav;
  }

Member Function Documentation

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);}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines