RetinotopicOrientationConnectionPredicate.h

Go to the documentation of this file.
00001 
00012 #ifndef RETINOTOPICORIENTATIONCONNECTIONPREDICATE_H
00013 #define RETINOTOPICORIENTATIONCONNECTIONPREDICATE_H
00014 
00015 #include <ConnectionDecisionPredicateSpecialization.h>
00016 
00017 #include "RandomDistribution.h"
00018 #include "Point2D.h"
00019 #include <cmath>
00020 #include <set>
00021 #include <utility>
00022 using std::set;
00023 using std::pair;
00024 /*
00025 #include <iostream>
00026 using std::cout;
00027 using std::cerr;
00028 using std::endl;
00029 */
00030 
00032 
00034 class RetinotopicOrientationConnectionPredicate : public AugmentedConnectionDecisionPredicate
00035 {
00036 public:
00037     RetinotopicOrientationConnectionPredicate(double C,
00038                                               int max_input_syn,
00039                                               int src_shape_x,
00040                                               int src_shape_y,
00041                                               double src_scale,
00042                                               RandomDistribution &nsub,
00043                                               RandomDistribution &phi,
00044                                               RandomDistribution &f,
00045                                               double aspectratio_min,
00046                                               double aspectratio_max);
00047 
00048     virtual void init(SimObjectPopulation const& src, SimObjectPopulation const& dst, RandomEngine *rnd);
00049 
00050     virtual bool decide(size_t src, size_t dst, RandomEngine *rnd)
00051     {
00052         pair<size_t, size_t> conn(src, dst);
00053 
00054         return m_connections.find(conn) != m_connections.end();
00055     };
00056 
00057     ~RetinotopicOrientationConnectionPredicate()
00058     {
00059         delete m_nsub;
00060         delete m_phi;
00061         delete m_f;
00062     }
00063 
00064 private:
00065     double m_C;
00066     int m_max_input_syn;
00067     Point2DDistance<double> m_distance;
00068 
00069     RandomDistribution *m_nsub;
00070     RandomDistribution *m_phi;
00071     RandomDistribution *m_f;
00072 
00073     double m_aspectratio_min;
00074     double m_aspectratio_max;
00075 
00076     set< pair<size_t, size_t> > m_connections;
00077 
00078     UniformDistribution m_unirnd;
00079 };
00080 
00081 #endif

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