#include <PositionBased2dValueGenerator.h>
Public Member Functions | |
PositionBased2dValueGenerator (const vector< double > &values, int size_x, int size_y, double offset_x=0.0, double offset_y=0.0, double scale_x=1.0, double scale_y=1.0) | |
virtual | ~PositionBased2dValueGenerator () |
virtual double | generate (RandomEngine *rnd) |
This function will be called to decide whether to make a connection or not. | |
virtual PopObjectValueGenerator * | clone (void) const |
Protected Attributes | |
vector< double > | values |
int | size_x |
int | size_y |
double | offset_x |
double | offset_y |
double | scale_x |
double | scale_y |
Definition at line 21 of file PositionBased2dValueGenerator.h.
PositionBased2dValueGenerator::~PositionBased2dValueGenerator | ( | ) | [virtual] |
Definition at line 29 of file PositionBased2dValueGenerator.cpp.
double PositionBased2dValueGenerator::generate | ( | RandomEngine * | rnd | ) | [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. |
Implements PopObjectValueGenerator.
Definition at line 34 of file PositionBased2dValueGenerator.cpp.
References SpatialSimObjectPopulation::getLocation(), PopObjectValueGeneratorSpecialization< SpatialSimObjectPopulation >::m_idx, PopObjectValueGeneratorSpecialization< SpatialSimObjectPopulation >::m_pop, offset_x, offset_y, scale_x, scale_y, size_x, size_y, values, Point3D< T >::x(), and Point3D< T >::y().
PopObjectValueGenerator * PositionBased2dValueGenerator::clone | ( | void | ) | const [virtual] |
Implements PopObjectValueGenerator.
Definition at line 58 of file PositionBased2dValueGenerator.cpp.
References offset_x, offset_y, PositionBased2dValueGenerator(), scale_x, scale_y, size_x, size_y, and values.
vector<double> PositionBased2dValueGenerator::values [protected] |
Definition at line 34 of file PositionBased2dValueGenerator.h.
Referenced by clone(), and generate().
int PositionBased2dValueGenerator::size_x [protected] |
Definition at line 35 of file PositionBased2dValueGenerator.h.
Referenced by clone(), and generate().
int PositionBased2dValueGenerator::size_y [protected] |
Definition at line 36 of file PositionBased2dValueGenerator.h.
Referenced by clone(), and generate().
double PositionBased2dValueGenerator::offset_x [protected] |
Definition at line 37 of file PositionBased2dValueGenerator.h.
Referenced by clone(), and generate().
double PositionBased2dValueGenerator::offset_y [protected] |
Definition at line 38 of file PositionBased2dValueGenerator.h.
Referenced by clone(), and generate().
double PositionBased2dValueGenerator::scale_x [protected] |
Definition at line 39 of file PositionBased2dValueGenerator.h.
Referenced by clone(), and generate().
double PositionBased2dValueGenerator::scale_y [protected] |
Definition at line 40 of file PositionBased2dValueGenerator.h.
Referenced by clone(), and generate().