ConnObjectValueGeneratorSpecialization< S, D > Class Template Reference

Class exposed to python where user defined value genrators can be derived. More...

#include <ConnObjectValueGenerator.h>

Inheritance diagram for ConnObjectValueGeneratorSpecialization< S, D >:

Inheritance graph
[legend]
Collaboration diagram for ConnObjectValueGeneratorSpecialization< S, D >:

Collaboration graph
[legend]

List of all members.

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
RandomEnginernd_eng


Detailed Description

template<typename S, typename D>
class ConnObjectValueGeneratorSpecialization< S, D >

Class exposed to python where user defined value genrators can be derived.

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.


Constructor & Destructor Documentation

template<typename S, typename D>
ConnObjectValueGeneratorSpecialization< S, D >::ConnObjectValueGeneratorSpecialization (  )  [inline]

Definition at line 79 of file ConnObjectValueGenerator.h.


Member Function Documentation

template<typename S, typename D>
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.

template<typename S, typename D>
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.


Member Data Documentation

template<typename S, typename D>
const S* ConnObjectValueGeneratorSpecialization< S, D >::m_sourcePopulation [protected]

template<typename S, typename D>
const D* ConnObjectValueGeneratorSpecialization< S, D >::m_destinationPopulation [protected]

template<typename S, typename D>
RandomEngine* ConnObjectValueGeneratorSpecialization< S, D >::rnd_eng [protected]


The documentation for this class was generated from the following file:

Generated on Wed Jul 9 16:34:47 2008 for PCSIM by  doxygen 1.5.5