#include <SimilarAttributeConnectionPredicate.h>
Public Member Functions | |
SimilarAttributeConnectionPredicate (string attr, double C=1.0, double tol=0.0) | |
virtual bool | decide (size_t src, size_t dst, RandomEngine *rnd) |
Return true if a uniform distributed random number is smaller than C * exp( -|px-py|^2 / lambda^2 ). |
Definition at line 21 of file SimilarAttributeConnectionPredicate.h.
SimilarAttributeConnectionPredicate::SimilarAttributeConnectionPredicate | ( | string | attr, | |
double | C = 1.0 , |
|||
double | tol = 0.0 | |||
) | [inline] |
Definition at line 24 of file SimilarAttributeConnectionPredicate.h.
virtual bool SimilarAttributeConnectionPredicate::decide | ( | size_t | src, | |
size_t | dst, | |||
RandomEngine * | rnd | |||
) | [inline, virtual] |
Return true if a uniform distributed random number is smaller than C * exp( -|px-py|^2 / lambda^2 ).
Self connections are not made by returning false if ID(src) == ID(dst).
Reimplemented from ConnectionDecisionPredicateSpecialization< AugmentedSpatialPopulation, AugmentedSpatialPopulation >.
Definition at line 33 of file SimilarAttributeConnectionPredicate.h.
References AugmentedSpatialPopulation::getAttributes(), SimObjectAttributes::getDouble(), ConnectionDecisionPredicateSpecialization< AugmentedSpatialPopulation, AugmentedSpatialPopulation >::m_destinationPopulation, and ConnectionDecisionPredicateSpecialization< AugmentedSpatialPopulation, AugmentedSpatialPopulation >::m_sourcePopulation.