#include <LateralLongRangeOrientationConnectionPredicate.h>
Public Member Functions | |
LateralLongRangeOrientationConnectionPredicate (double C, double sigma21=1000e-6, double kappa2=1, double mu2=0, bool toroid=false, double toroid_off=0.0, int src_shape_x=1, int src_shape_y=1, int dst_shape_x=1, int dst_shape_y=1, double src_scale=1.0, double dst_scale=1.0, double src_center_x=0.0, double src_center_y=0.0, double dst_center_x=0.0, double dst_center_y=0.0) | |
New predicate with given parameters C and lambda. | |
virtual void | init (SimObjectPopulation const &src, SimObjectPopulation const &dst, RandomEngine *rnd) |
This function will be called to tell the decision predicate about the source and destination poulation. | |
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 ). | |
Public Attributes | |
double | m_C |
double | m_sigma21 |
double | m_kappa2 |
double | m_mu2 |
Point2DDistance< double > | m_distance |
UniformDistribution | m_unirnd |
Definition at line 22 of file LateralLongRangeOrientationConnectionPredicate.h.
LateralLongRangeOrientationConnectionPredicate::LateralLongRangeOrientationConnectionPredicate | ( | double | C, | |
double | sigma21 = 1000e-6 , |
|||
double | kappa2 = 1 , |
|||
double | mu2 = 0 , |
|||
bool | toroid = false , |
|||
double | toroid_off = 0.0 , |
|||
int | src_shape_x = 1 , |
|||
int | src_shape_y = 1 , |
|||
int | dst_shape_x = 1 , |
|||
int | dst_shape_y = 1 , |
|||
double | src_scale = 1.0 , |
|||
double | dst_scale = 1.0 , |
|||
double | src_center_x = 0.0 , |
|||
double | src_center_y = 0.0 , |
|||
double | dst_center_x = 0.0 , |
|||
double | dst_center_y = 0.0 | |||
) |
New predicate with given parameters C and lambda.
Definition at line 19 of file LateralLongRangeOrientationConnectionPredicate.cpp.
void LateralLongRangeOrientationConnectionPredicate::init | ( | SimObjectPopulation const & | src, | |
SimObjectPopulation const & | dst, | |||
RandomEngine * | rnd | |||
) | [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.
Reimplemented from ConnectionDecisionPredicateSpecialization< AugmentedSpatialPopulation, AugmentedSpatialPopulation >.
Definition at line 47 of file LateralLongRangeOrientationConnectionPredicate.cpp.
References ConnectionDecisionPredicateSpecialization< AugmentedSpatialPopulation, AugmentedSpatialPopulation >::init().
bool LateralLongRangeOrientationConnectionPredicate::decide | ( | size_t | src, | |
size_t | dst, | |||
RandomEngine * | rnd | |||
) | [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 52 of file LateralLongRangeOrientationConnectionPredicate.cpp.
References SimObjectAttributes::get(), AugmentedSpatialPopulation::getAttributes(), SimObjectPopulation::getID(), SpatialSimObjectPopulation::getLocation(), m_C, ConnectionDecisionPredicateSpecialization< AugmentedSpatialPopulation, AugmentedSpatialPopulation >::m_destinationPopulation, m_distance, m_kappa2, m_mu2, m_sigma21, ConnectionDecisionPredicateSpecialization< AugmentedSpatialPopulation, AugmentedSpatialPopulation >::m_sourcePopulation, m_unirnd, and Point2DDistance< T >::sqr_distance().
Definition at line 49 of file LateralLongRangeOrientationConnectionPredicate.h.
Referenced by decide().
Definition at line 50 of file LateralLongRangeOrientationConnectionPredicate.h.
Referenced by decide().
Definition at line 51 of file LateralLongRangeOrientationConnectionPredicate.h.
Referenced by decide().
Definition at line 52 of file LateralLongRangeOrientationConnectionPredicate.h.
Referenced by decide().
Definition at line 54 of file LateralLongRangeOrientationConnectionPredicate.h.
Referenced by decide().
Definition at line 55 of file LateralLongRangeOrientationConnectionPredicate.h.
Referenced by decide().