#include <PopObjectValueGenerator.h>
Public Member Functions | |
PopObjectValueGenerator () | |
virtual | ~PopObjectValueGenerator () |
virtual void | prepare (SimObjectPopulation const &pop, size_t idx, RandomEngine *rnd=NULL)=0 |
This function will be called to tell the value generator about the population. | |
virtual double | generate (RandomEngine *rnd)=0 |
This function will be called to decide whether to make a connection or not. | |
virtual PopObjectValueGenerator * | clone (void) const =0 |
An abstract class used by PopObjectFactory to generate values for some parameters of the SimObject when RandomDistribution is not applicable (like values depending on location, distance etc.) This class should be derived for implementation of specific value assignments.
Definition at line 25 of file PopObjectValueGenerator.h.
PopObjectValueGenerator::PopObjectValueGenerator | ( | ) |
Definition at line 14 of file PopObjectValueGenerator.cpp.
PopObjectValueGenerator::~PopObjectValueGenerator | ( | ) | [virtual] |
Definition at line 19 of file PopObjectValueGenerator.cpp.
virtual void PopObjectValueGenerator::prepare | ( | SimObjectPopulation const & | pop, | |
size_t | idx, | |||
RandomEngine * | rnd = NULL | |||
) | [pure virtual] |
This function will be called to tell the value generator about the population.
An implementation of this function will check the actual type of the population and may store reference to the population. which will be used later on in the implementation of generate since this function just gets the indices within the population.
Implemented in PopObjectValueGeneratorSpecialization< P >, PopObjectValueGeneratorSpecialization< SpatialSimObjectPopulation >, PopObjectValueGeneratorSpecialization< SpatialFamilyPopulation >, PopObjectValueGeneratorSpecialization< SimObjectPopulation >, and PopObjectValueGeneratorSpecialization< AugmentedSpatialPopulation >.
virtual double PopObjectValueGenerator::generate | ( | RandomEngine * | rnd | ) | [pure virtual] |
This function will be called to decide whether to make a connection or not.
idx | The index into the population for which to generate the value Since only the indices into the source and destination populations are provided the method prepare has to store references to them. |
Implemented in PositionBased2dValueGenerator.
virtual PopObjectValueGenerator* PopObjectValueGenerator::clone | ( | void | ) | const [pure virtual] |
Implemented in PositionBased2dValueGenerator.
Referenced by PopObjectFactory::set(), and PopObjectAttributeFactory::set().