STIR  6.2.0
Public Member Functions | Protected Member Functions | List of all members
stir::ArrayFunctionObject_2ArgumentImplementation< num_dimensions, elemT > Class Template Referenceabstract

A convenience class for children of ArrayFunctionObject. It implements the in-place operator() in terms of the 2 argument version. More...

#include "stir/ArrayFunctionObject_2ArgumentImplementation.h"

Inheritance diagram for stir::ArrayFunctionObject_2ArgumentImplementation< num_dimensions, elemT >:
Inheritance graph
[legend]

Public Member Functions

void operator() (Array< num_dimensions, elemT > &array) const override
 in-place modification of array, implemented inline
 
void operator() (Array< num_dimensions, elemT > &out_array, const Array< num_dimensions, elemT > &in_array) const override
 result stored in another array More...
 
- Public Member Functions inherited from stir::ArrayFunctionObject< num_dimensions, elemT >
virtual bool is_trivial () const =0
 Should return true when the operations won't modify the object at all. More...
 
virtual Succeeded get_influencing_indices (IndexRange< num_dimensions > &influencing_indices, const IndexRange< num_dimensions > &output_indices) const
 sets the range of indices that influences the result in a set of coordinates output_indices More...
 
virtual Succeeded get_influenced_indices (IndexRange< num_dimensions > &influenced_indices, const IndexRange< num_dimensions > &input_indices) const
 sets the range of indices that gets influenced by a set of coordinate input_indices More...
 

Protected Member Functions

virtual void do_it (Array< num_dimensions, elemT > &out_array, const Array< num_dimensions, elemT > &in_array) const =0
 

Detailed Description

template<int num_dimensions, typename elemT>
class stir::ArrayFunctionObject_2ArgumentImplementation< num_dimensions, elemT >

A convenience class for children of ArrayFunctionObject. It implements the in-place operator() in terms of the 2 argument version.

Sadly, we need to introduce another virtual function for this, as redefining an overloaded function in a derived class, hides all other overladed versions. So, we cannot simply leave the 2 arg operator() undefined here. Similarly, we could not only define the 2 arg operator() in a derived class.

See also
ArrayFunctionObject_1ArgumentImplementation

Member Function Documentation

◆ operator()()

template<int num_dimensions, typename elemT>
void stir::ArrayFunctionObject_2ArgumentImplementation< num_dimensions, elemT >::operator() ( Array< num_dimensions, elemT > &  out_array,
const Array< num_dimensions, elemT > &  in_array 
) const
inlineoverridevirtual

result stored in another array

Warning
Not all derived classes will be able to handle arbitrary index ranges in out_array and in_array.

Implements stir::ArrayFunctionObject< num_dimensions, elemT >.


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