PyConnectionDecisionPredicate Class Reference

Interface for ConnectionDecisionPredicate which allows to implement ConnectionDecisionPredicate's directly in python. More...

#include <PyConnectionDecisionPredicate.h>

Inheritance diagram for PyConnectionDecisionPredicate:

Inheritance graph
[legend]
Collaboration diagram for PyConnectionDecisionPredicate:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void init (SimObjectPopulation const &source, SimObjectPopulation const &destination, RandomEngine *rnd)
 Implementation to be overriden in python.
virtual bool decide (size_t src, size_t dst, RandomEngine *rnd)
 Implementation to be overriden in python.


Detailed Description

Interface for ConnectionDecisionPredicate which allows to implement ConnectionDecisionPredicate's directly in python.

The reason why this class exists is a performance issue: If one would set up the python interface such that one could directly base python classes directly on ConnectionDecisionPredicate C++ classes based on ConnectionDecisionPredicate instatiated in python will have a lot of overhead when ConnectionDecisionPredicate::decide is called. Since this method is called in the inner loop of (virtual any) wiring algorithm this is not feasable.

Definition at line 23 of file PyConnectionDecisionPredicate.h.


Member Function Documentation

virtual void PyConnectionDecisionPredicate::init ( SimObjectPopulation const &  source,
SimObjectPopulation const &  destination,
RandomEngine rnd 
) [inline, virtual]

Implementation to be overriden in python.

Typically references to source and destination will be stored.

Implements ConnectionDecisionPredicate.

Definition at line 32 of file PyConnectionDecisionPredicate.h.

virtual bool PyConnectionDecisionPredicate::decide ( size_t  src,
size_t  dst,
RandomEngine rnd 
) [inline, virtual]

Implementation to be overriden in python.

Parameters:
src The index into the source population
dst The index into the destination population
rnd A reference to the RandomNumberEngine to use for stochastic decisions.
Since only the indices into the source and destination populations are provided the method init has to store references to them.

Implements ConnectionDecisionPredicate.

Definition at line 43 of file PyConnectionDecisionPredicate.h.


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

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