HOPS
HOPS class reference
MHO_MinWeight.hh
Go to the documentation of this file.
1 #ifndef MHO_MinWeight_HH__
2 #define MHO_MinWeight_HH__
3 
4 #include <cctype>
5 #include <cmath>
6 #include <complex>
7 #include <map>
8 #include <vector>
9 
10 #include "MHO_Constants.hh"
11 #include "MHO_Message.hh"
12 
14 #include "MHO_TableContainer.hh"
15 #include "MHO_UnaryOperator.hh"
16 
17 namespace hops
18 {
19 
31 class MHO_MinWeight: public MHO_UnaryOperator< weight_type >
32 {
33  public:
34  MHO_MinWeight();
35  virtual ~MHO_MinWeight();
36 
42  void SetMinWeight(double min_weight) { fMinWeight = min_weight; }
43 
44  protected:
52  virtual bool InitializeInPlace(weight_type* in) override;
61  virtual bool InitializeOutOfPlace(const weight_type* in, weight_type* out) override;
62 
70  virtual bool ExecuteInPlace(weight_type* in) override;
79  virtual bool ExecuteOutOfPlace(const weight_type* in, weight_type* out) override;
80 
81  private:
82  double fMinWeight;
83 };
84 
85 } // namespace hops
86 
87 #endif
Class MHO_MinWeight.
Definition: MHO_MinWeight.hh:32
virtual bool InitializeInPlace(weight_type *in) override
Initializes MHO_MinWeight in-place using input pointer.
Definition: MHO_MinWeight.cc:33
virtual bool ExecuteOutOfPlace(const weight_type *in, weight_type *out) override
Copies input weight and executes in-place operation on output.
Definition: MHO_MinWeight.cc:27
MHO_MinWeight()
Definition: MHO_MinWeight.cc:6
virtual bool ExecuteInPlace(weight_type *in) override
Zeroes out weights in-place for all values less than a specified minimum.
Definition: MHO_MinWeight.cc:13
virtual ~MHO_MinWeight()
Definition: MHO_MinWeight.cc:11
virtual bool InitializeOutOfPlace(const weight_type *in, weight_type *out) override
Initializes out-of-place weights using input weights.
Definition: MHO_MinWeight.cc:38
void SetMinWeight(double min_weight)
Setter for min weight.
Definition: MHO_MinWeight.hh:42
Class MHO_UnaryOperator.
Definition: MHO_UnaryOperator.hh:24
Definition: MHO_ChannelLabeler.hh:17