PetaVision  Alpha
QuotientColProbe.hpp
1 /*
2  * QuotientColProbe.hpp
3  *
4  * Created on: Aug 12, 2015
5  * Author: pschultz
6  */
7 
8 #ifndef QUOTIENTCOLPROBE_HPP_
9 #define QUOTIENTCOLPROBE_HPP_
10 
11 #include "ColProbe.hpp"
12 
13 namespace PV {
14 
15 class BaseProbe;
16 
26 class QuotientColProbe : public ColProbe {
27  public:
31  QuotientColProbe(const char *probename, HyPerCol *hc);
32 
36  virtual ~QuotientColProbe();
37 
43  virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override;
44 
60  virtual void ioParam_valueDescription(enum ParamsIOFlag ioFlag);
61 
71  virtual void ioParam_numerator(enum ParamsIOFlag ioFlag);
72 
82  virtual void ioParam_denominator(enum ParamsIOFlag ioFlag);
83  /* end of io functions for QuotientColProbe parameters */
85 
86  virtual Response::Status
87  communicateInitInfo(std::shared_ptr<CommunicateInitInfoMessage const> message) override;
88 
97  virtual Response::Status outputState(double timevalue) override;
98 
99  protected:
104 
110  int initializeQuotientColProbe(const char *probename, HyPerCol *hc);
111 
112  virtual bool needRecalc(double timevalue) override { return true; }
113 
114  virtual double referenceUpdateTime() const override;
115 
120  virtual void calcValues(double timeValue) override;
121 
122  virtual void outputHeader() override;
123 
124  private:
129  int initialize_base();
130 
131  // Member variables
132  protected:
133  char *valueDescription; // A string description of the quantity calculated by
134  // the probe, used by
135  // outputHeader
136  char *numerator; // The name of the probe that supplies the numerator
137  char *denominator; // The name of the probe that supplies the denominator
138  BaseProbe *numerProbe; // A pointer to the probe that supplies the numerator.
139  BaseProbe *denomProbe; // A pointer to the probe that supplies the denominator.
140 
141 }; // end class QuotientColProbe
142 
143 } // end namespace PV
144 
145 #endif /* QUOTIENTCOLPROBE_HPP_ */
virtual bool needRecalc(double timevalue) override
virtual void calcValues(double timeValue) override
virtual void outputHeader() override
virtual void ioParam_valueDescription(enum ParamsIOFlag ioFlag)
valueDescription: a short description of what the quantities computed by getValues() represent...
int initializeQuotientColProbe(const char *probename, HyPerCol *hc)
virtual void ioParam_numerator(enum ParamsIOFlag ioFlag)
numerator: A probe whose values are used in the numerators of the quotients. numerator can be a layer...
virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override
virtual double referenceUpdateTime() const override
virtual void ioParam_denominator(enum ParamsIOFlag ioFlag)
denominator: A probe whose values are used in the denominators of the quotients. denominator can be a...
virtual Response::Status communicateInitInfo(std::shared_ptr< CommunicateInitInfoMessage const > message) override
virtual Response::Status outputState(double timevalue) override