PetaVision  Alpha
ColumnEnergyProbe.hpp
1 /*
2  * ColumnEnergyProbe.hpp
3  *
4  * Created on: Aug 12, 2015
5  * Author: pschultz
6  */
7 
8 #ifndef COLUMNENERGYPROBE_HPP_
9 #define COLUMNENERGYPROBE_HPP_
10 
11 #include "ColProbe.hpp"
12 
13 namespace PV {
14 
15 class BaseProbe;
16 
40 class ColumnEnergyProbe : public ColProbe {
41  public:
45  ColumnEnergyProbe(const char *probename, HyPerCol *hc);
46 
50  virtual ~ColumnEnergyProbe();
51 
60  int addTerm(BaseProbe *probe);
61 
70  virtual Response::Status outputState(double timevalue) override;
71 
72  virtual void calcValues(double timevalue) override;
73 
74  protected:
79 
85  int initializeColumnEnergyProbe(const char *probename, HyPerCol *hc);
86 
87  virtual void outputHeader() override;
88 
93  virtual bool needRecalc(double timevalue) override;
94 
99  virtual double referenceUpdateTime() const override;
100 
101  virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override;
102  virtual void ioParam_reductionInterval(enum ParamsIOFlag ioFlag);
103 
104  size_t numTerms;
105  BaseProbe **terms;
106 
107  private:
112  int initialize_base();
113 
114  int mSkipTimer = 0;
115  int mSkipInterval = 0;
116  double mLastTimeValue = -1;
117 }; // end class ColumnEnergyProbe
118 
119 } // end namespace PV
120 
121 #endif /* COLUMNENERGYPROBE_HPP_ */
virtual bool needRecalc(double timevalue) override
int addTerm(BaseProbe *probe)
Adds a probe to the energy calculation.
int initializeColumnEnergyProbe(const char *probename, HyPerCol *hc)
virtual double referenceUpdateTime() const override
virtual Response::Status outputState(double timevalue) override
virtual void outputHeader() override
virtual void calcValues(double timevalue) override
virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override