PetaVision  Alpha
KernelProbe.hpp
1 /*
2  * KernelPatchProbe.hpp
3  *
4  * Created on: Oct 21, 2011
5  * Author: pschultz
6  */
7 
8 #ifndef KERNELPROBE_HPP_
9 #define KERNELPROBE_HPP_
10 
11 #include "BaseHyPerConnProbe.hpp"
12 
13 namespace PV {
14 
16 
17  // Methods
18  public:
19  KernelProbe(const char *probename, HyPerCol *hc);
20  virtual ~KernelProbe();
21  virtual Response::Status
22  communicateInitInfo(std::shared_ptr<CommunicateInitInfoMessage const> message) override;
23  virtual Response::Status allocateDataStructures() override;
24  virtual Response::Status outputState(double timef) override;
25 
26  protected:
27  KernelProbe(); // Default constructor, can only be called by derived classes
28  int initialize(const char *probename, HyPerCol *hc);
29  virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override;
30  virtual void ioParam_kernelIndex(enum ParamsIOFlag ioFlag);
31  virtual void ioParam_arborId(enum ParamsIOFlag ioFlag);
32  virtual void ioParam_outputWeights(enum ParamsIOFlag ioFlag);
33  virtual void ioParam_outputPlasticIncr(enum ParamsIOFlag ioFlag);
34  virtual void ioParam_outputPatchIndices(enum ParamsIOFlag ioFlag);
35  int patchIndices(HyPerConn *conn);
36 
37  virtual void initNumValues() override;
38 
39  virtual void calcValues(double timevalue) override {
40  Fatal().printf("%s does not use calcValues.\n", getDescription_c());
41  };
42 
43  int getKernelIndex() { return kernelIndex; }
44  int getArbor() { return arborID; }
45  bool getOutputWeights() { return outputWeights; }
46  bool getOutputPlasticIncr() { return outputPlasticIncr; }
47  bool getOutputPatchIndices() { return outputPatchIndices; }
48 
49  private:
50  int initialize_base();
51 
52  // Member variables
53  private:
54  int kernelIndex; // which kernel index to investigate
55  int arborID; // which arbor to investigate
56  bool outputWeights; // whether to output W
57  bool outputPlasticIncr; // whether to output dW
58  bool outputPatchIndices; // whether to output which presynaptic neurons using
59  // the given kernel
60  // index
61 
62 }; // end of class KernelProbe block
63 
64 } // end of namespace PV block
65 
66 #endif /* KERNELPROBE_HPP_ */
virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override
Definition: KernelProbe.cpp:31
virtual void calcValues(double timevalue) override
Definition: KernelProbe.hpp:39
virtual Response::Status outputState(double timef) override
virtual void initNumValues() override
Definition: KernelProbe.cpp:64
virtual Response::Status communicateInitInfo(std::shared_ptr< CommunicateInitInfoMessage const > message) override
Definition: KernelProbe.cpp:67