HOPS
HOPS class reference
Public Member Functions | Protected Member Functions | List of all members
hops::MHO_MinWeight Class Reference

Class MHO_MinWeight. More...

#include <MHO_MinWeight.hh>

Inheritance diagram for hops::MHO_MinWeight:
[legend]

Public Member Functions

 MHO_MinWeight ()
 
virtual ~MHO_MinWeight ()
 
void SetMinWeight (double min_weight)
 Setter for min weight. More...
 
- Public Member Functions inherited from hops::MHO_UnaryOperator< weight_type >
 MHO_UnaryOperator ()
 
virtual ~MHO_UnaryOperator ()
 
virtual bool Execute () override
 Executes operation using provided arguments and return type. More...
 
virtual bool Execute () override=0
 Function Execute. More...
 
virtual bool Initialize () override
 Initializes the system using in-place or out-of-place arguments. More...
 
virtual bool Initialize () override=0
 Function Initialize. More...
 
 MHO_Operator ()
 
virtual void SetArgs (const weight_type *in, weight_type *out)
 Setter for args. More...
 
virtual void SetArgs (weight_type *in)
 Setter for args. More...
 
- Public Member Functions inherited from hops::MHO_Operator
 MHO_Operator ()
 
virtual ~MHO_Operator ()
 
std::string GetName () const
 Getter for operator name. More...
 
virtual double Priority () const
 Get the the priority field value. More...
 
void SetName (std::string name)
 Setter for operator name. More...
 
virtual void SetPriority (const double &priority)
 Setter for operator priority (determines order of execution within a operator category) More...
 

Protected Member Functions

virtual bool ExecuteInPlace (weight_type *in) override
 Zeroes out weights in-place for all values less than a specified minimum. More...
 
virtual bool ExecuteOutOfPlace (const weight_type *in, weight_type *out) override
 Copies input weight and executes in-place operation on output. More...
 
virtual bool InitializeInPlace (weight_type *in) override
 Initializes MHO_MinWeight in-place using input pointer. More...
 
virtual bool InitializeOutOfPlace (const weight_type *in, weight_type *out) override
 Initializes out-of-place weights using input weights. More...
 

Additional Inherited Members

- Protected Attributes inherited from hops::MHO_UnaryOperator< weight_type >
bool fInPlace
 
std::tuple< weight_type * > fInPlaceArgs
 
std::tuple< const weight_type *, weight_type * > fOutOfPlaceArgs
 

Detailed Description

Class MHO_MinWeight.

Tue Apr 2 09:41:24 AM EDT 2024.

Author
J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
Date

Constructor & Destructor Documentation

◆ MHO_MinWeight()

hops::MHO_MinWeight::MHO_MinWeight ( )

◆ ~MHO_MinWeight()

hops::MHO_MinWeight::~MHO_MinWeight ( )
virtual

Member Function Documentation

◆ ExecuteInPlace()

bool hops::MHO_MinWeight::ExecuteInPlace ( weight_type in)
overrideprotectedvirtual

Zeroes out weights in-place for all values less than a specified minimum.

Parameters
inInput weight array to be modified in-place.
Returns
True if execution was successful.
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< weight_type >.

◆ ExecuteOutOfPlace()

bool hops::MHO_MinWeight::ExecuteOutOfPlace ( const weight_type in,
weight_type out 
)
overrideprotectedvirtual

Copies input weight and executes in-place operation on output.

Parameters
inInput weight data to be copied
out(weight_type*)
Returns
Result of ExecuteInPlace operation on output
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< weight_type >.

◆ InitializeInPlace()

bool hops::MHO_MinWeight::InitializeInPlace ( weight_type in)
overrideprotectedvirtual

Initializes MHO_MinWeight in-place using input pointer.

Parameters
inPointer to weight_type for initialization.
Returns
True if successful.
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< weight_type >.

◆ InitializeOutOfPlace()

bool hops::MHO_MinWeight::InitializeOutOfPlace ( const weight_type in,
weight_type out 
)
overrideprotectedvirtual

Initializes out-of-place weights using input weights.

Parameters
inPointer to constant input weight array.
out(weight_type*)
Returns
True if initialization is successful.
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< weight_type >.

◆ SetMinWeight()

void hops::MHO_MinWeight::SetMinWeight ( double  min_weight)
inline

Setter for min weight.

Parameters
min_weightthe minimum allowed weight value

The documentation for this class was generated from the following files: