PetaVision  Alpha
ArborList.hpp
1 /*
2  * ArborList.hpp
3  *
4  * Created on: Jan 5, 2018
5  * Author: pschultz
6  */
7 
8 #ifndef ARBORLIST_HPP_
9 #define ARBORLIST_HPP_
10 
11 #include "columns/BaseObject.hpp"
12 
13 namespace PV {
14 
18 class ArborList : public BaseObject {
19  protected:
29  virtual void ioParam_numAxonalArbors(enum ParamsIOFlag ioFlag);
30 
39  virtual void ioParam_delay(enum ParamsIOFlag ioFlag);
40  // end of ArborList parameters
42 
43  public:
44  ArborList(char const *name, HyPerCol *hc);
45  virtual ~ArborList();
46 
47  virtual void setObjectType() override;
48 
52  int getNumAxonalArbors() const { return mNumAxonalArbors; }
53 
54  int getDelay(int arbor) const { return mDelay[arbor]; }
55 
56  protected:
57  ArborList();
58 
59  int initialize(char const *name, HyPerCol *hc);
60 
61  virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override;
62 
63  virtual Response::Status
64  communicateInitInfo(std::shared_ptr<CommunicateInitInfoMessage const> message) override;
65 
66  void initializeDelays();
67 
68  void setDelay(int arborId, double delay);
69 
70  int maxDelaySteps();
71 
72  protected:
73  int mNumAxonalArbors = 1;
74  std::vector<int> mDelay; // The delays expressed in # of timesteps (delays ~= fDelayArray / t)
75  double *mDelaysParams = nullptr; // The raw delays in params, in the same units that dt is in.
76  int mNumDelays = 0; // The size of the mDelayParams array
77 
78 }; // class ArborList
79 
80 } // namespace PV
81 
82 #endif // ARBORLIST_HPP_
virtual void ioParam_delay(enum ParamsIOFlag ioFlag)
delay: Specifies delay(s) which the post layer will receive data
Definition: ArborList.cpp:47
virtual void ioParam_numAxonalArbors(enum ParamsIOFlag ioFlag)
numAxonalArbors: Specifies the number of arbors to use in the connection
Definition: ArborList.cpp:34
int getNumAxonalArbors() const
Definition: ArborList.hpp:52
virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override
Definition: ArborList.cpp:28