#include <ConnObjectValueGenerator.h>
Public Member Functions | |
ConnObjectValueGeneratorSpecialization () | |
virtual void | init (SimObjectPopulation const &src, SimObjectPopulation const &dst, RandomEngine *rnd=NULL) |
This function will be called to tell the decision predicate about the source and destination poulation. | |
virtual double | generate (size_t src_idx, size_t dst_idx, RandomEngine *rnd) |
It seems that this dummy implementation is needed for Py++ in order to be able to exclude (not exposed to python). | |
Protected Attributes | |
const S * | m_sourcePopulation |
const D * | m_destinationPopulation |
RandomEngine * | rnd_eng |
The reason why this class exists is a performance issue: If one would set up the python interface such that one could base python classes directly on ConnObjectValueGenerator then C++ classes based on PopObjectValueGenerator instatiated in python will have a lot of overhead when ConnObjectValueGenerator::generate is called. Since this method is called in the inner loop of constructing values this is not feasable. Template for type safe PopObjectValueGenerator's for different types of SimObjectPopulations.
Definition at line 76 of file ConnObjectValueGenerator.h.
ConnObjectValueGeneratorSpecialization< S, D >::ConnObjectValueGeneratorSpecialization | ( | ) | [inline] |
Definition at line 79 of file ConnObjectValueGenerator.h.
virtual void ConnObjectValueGeneratorSpecialization< S, D >::init | ( | SimObjectPopulation const & | src, | |
SimObjectPopulation const & | dst, | |||
RandomEngine * | rnd = NULL | |||
) | [inline, virtual] |
This function will be called to tell the decision predicate about the source and destination poulation.
This is a generic implementation which checks the actual type of the src and dst populations and stores references to the populations in the two protected members m_sourcePopulation and m_destinationPopulation.
Implements ConnObjectValueGenerator.
Definition at line 88 of file ConnObjectValueGenerator.h.
virtual double ConnObjectValueGeneratorSpecialization< S, D >::generate | ( | size_t | src_idx, | |
size_t | dst_idx, | |||
RandomEngine * | rnd | |||
) | [inline, virtual] |
It seems that this dummy implementation is needed for Py++
in order to be able to exclude (not exposed to python).
Implements ConnObjectValueGenerator.
Reimplemented in DelayCond, DelayCondAndSyn, and LateralDelayCondAndSyn.
Definition at line 105 of file ConnObjectValueGenerator.h.
const S* ConnObjectValueGeneratorSpecialization< S, D >::m_sourcePopulation [protected] |
Definition at line 108 of file ConnObjectValueGenerator.h.
Referenced by ConnObjectValueGeneratorSpecialization< AugmentedSpatialPopulation, AugmentedSpatialPopulation >::init().
const D* ConnObjectValueGeneratorSpecialization< S, D >::m_destinationPopulation [protected] |
Definition at line 112 of file ConnObjectValueGenerator.h.
Referenced by ConnObjectValueGeneratorSpecialization< AugmentedSpatialPopulation, AugmentedSpatialPopulation >::init().
RandomEngine* ConnObjectValueGeneratorSpecialization< S, D >::rnd_eng [protected] |
Definition at line 113 of file ConnObjectValueGenerator.h.
Referenced by ConnObjectValueGeneratorSpecialization< AugmentedSpatialPopulation, AugmentedSpatialPopulation >::init().