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

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

#include "stir/ArrayFunctionObject_1ArgumentImplementation.h"

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

Public Member Functions

void operator() (Array< num_dimensions, elemT > &array) const override
 in-place modification More...
 
void operator() (Array< num_dimensions, elemT > &out_array, const Array< num_dimensions, elemT > &in_array) const override
 result stored in another array, implemented inline
 
- 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 > &array) const =0
 

Detailed Description

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

A convenience class for children of ArrayFunctionObject. It implements the 2 argument operator() in terms of the in-place 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 1 arg operator() undefined here. Similarly, we could not only define the 1 arg operator() in a derived class.

See also
ArrayFunctionObject_2ArgumentImplementation

Member Function Documentation

◆ operator()()

template<int num_dimensions, typename elemT >
void stir::ArrayFunctionObject_1ArgumentImplementation< num_dimensions, elemT >::operator() ( Array< num_dimensions, elemT > &  array) const
inlineoverridevirtual

in-place modification

Warning
Not all derived classes will be able to handle arbitrary index ranges for in_array.

Implements stir::ArrayFunctionObject< num_dimensions, elemT >.


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