HOPS
HOPS class reference
Classes | Public Member Functions | Protected Member Functions | List of all members
hops::MHO_SubSample< XArrayType > Class Template Reference

Class MHO_SubSample. More...

#include <MHO_SubSample.hh>

Inheritance diagram for hops::MHO_SubSample< XArrayType >:
[legend]

Public Member Functions

 MHO_SubSample ()
 
virtual ~MHO_SubSample ()
 
void SetDimensionAndStride (std::size_t dimension_index, std::size_t stride)
 set the axis to sub sample, and the stride at which samples are selected More...
 
- Public Member Functions inherited from hops::MHO_UnaryOperator< XArrayType >
 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 XArrayType *in, XArrayType *out)
 Setter for args. More...
 
virtual void SetArgs (XArrayType *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 (XArrayType *in) override
 Executes operation in-place and updates input array from workspace. More...
 
virtual bool ExecuteOutOfPlace (const XArrayType *in, XArrayType *out) override
 Function ExecuteOutOfPlace. More...
 
virtual bool InitializeInPlace (XArrayType *in) override
 Initializes in-place execution by calling InitializeOutOfPlace with workspace and returning its result. More...
 
virtual bool InitializeOutOfPlace (const XArrayType *in, XArrayType *out) override
 Initializes output array out-of-place using input array in. More...
 

Additional Inherited Members

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

Detailed Description

template<class XArrayType>
class hops::MHO_SubSample< XArrayType >

Class MHO_SubSample.

Sub-samples an array at the specified stride (e.g. select every-other point) Can only be applied to a single-axis at a time.

Author
J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
Date
Tue Aug 24 15:18:04 2021 -0400

Constructor & Destructor Documentation

◆ MHO_SubSample()

template<class XArrayType >
hops::MHO_SubSample< XArrayType >::MHO_SubSample ( )
inline

◆ ~MHO_SubSample()

template<class XArrayType >
virtual hops::MHO_SubSample< XArrayType >::~MHO_SubSample ( )
inlinevirtual

Member Function Documentation

◆ ExecuteInPlace()

template<class XArrayType >
virtual bool hops::MHO_SubSample< XArrayType >::ExecuteInPlace ( XArrayType *  in)
inlineoverrideprotectedvirtual

Executes operation in-place and updates input array from workspace.

Parameters
inInput array to be modified in-place.
Returns
Status of the execution operation.
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< XArrayType >.

◆ ExecuteOutOfPlace()

template<class XArrayType >
virtual bool hops::MHO_SubSample< XArrayType >::ExecuteOutOfPlace ( const XArrayType *  in,
XArrayType *  out 
)
inlineoverrideprotectedvirtual

Function ExecuteOutOfPlace.

Parameters
in(const XArrayType*)
out(XArrayType*)
Returns
Return value (bool)
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< XArrayType >.

◆ InitializeInPlace()

template<class XArrayType >
virtual bool hops::MHO_SubSample< XArrayType >::InitializeInPlace ( XArrayType *  in)
inlineoverrideprotectedvirtual

Initializes in-place execution by calling InitializeOutOfPlace with workspace and returning its result.

Parameters
inInput array of type XArrayType*
Returns
Boolean indicating success/failure of initialization
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< XArrayType >.

◆ InitializeOutOfPlace()

template<class XArrayType >
virtual bool hops::MHO_SubSample< XArrayType >::InitializeOutOfPlace ( const XArrayType *  in,
XArrayType *  out 
)
inlineoverrideprotectedvirtual

Initializes output array out-of-place using input array in.

Parameters
inInput array of type XArrayType
outOutput array of type XArrayType
Returns
True if initialization is successful, false otherwise.
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< XArrayType >.

◆ SetDimensionAndStride()

template<class XArrayType >
void hops::MHO_SubSample< XArrayType >::SetDimensionAndStride ( std::size_t  dimension_index,
std::size_t  stride 
)
inline

set the axis to sub sample, and the stride at which samples are selected

Parameters
dimension_indexIndex of the dimension to set (must be less than array rank).
strideStride at which samples are selected along the specified dimension.

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