STIR 6.4.0
ArrayFunctionObject.h
Go to the documentation of this file.
1//
2//
13/*
14 Copyright (C) 2000- 2009, Hammersmith Imanet Ltd
15 This file is part of STIR.
16
17 SPDX-License-Identifier: Apache-2.0
18
19 See STIR/LICENSE.txt for details
20*/
21
22#ifndef __stir_ArrayFunctionObject_H__
23#define __stir_ArrayFunctionObject_H__
24
25#include "stir/Succeeded.h"
26#include "stir/ArrayFwd.h"
27
28START_NAMESPACE_STIR
29
30template <int num_dimensions>
31class IndexRange;
36template <int num_dimensions, typename elemT>
38{
39public:
40 virtual ~ArrayFunctionObject() {}
42
45 virtual void operator()(Array<num_dimensions, elemT>& array) const = 0;
47
50 virtual void operator()(Array<num_dimensions, elemT>& out_array, const Array<num_dimensions, elemT>& in_array) const = 0;
52
56 virtual bool is_trivial() const = 0;
57
59
67 const IndexRange<num_dimensions>& output_indices) const
68 {
69 return Succeeded::no;
70 }
71
73
80 const IndexRange<num_dimensions>& input_indices) const
81 {
82 return Succeeded::no;
83 }
84};
85
86END_NAMESPACE_STIR
87
88#endif
forward declaration of stir::Array class for multi-dimensional (numeric) arrays
Declaration of class stir::Succeeded.
A class for operations on n-dimensional Arrays.
Definition ArrayFunctionObject.h:38
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
Definition ArrayFunctionObject.h:79
virtual void operator()(Array< num_dimensions, elemT > &out_array, const Array< num_dimensions, elemT > &in_array) const =0
result stored in another array
virtual bool is_trivial() const =0
Should return true when the operations won't modify the object at all.
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
Definition ArrayFunctionObject.h:66
virtual void operator()(Array< num_dimensions, elemT > &array) const =0
in-place modification
This class defines multi-dimensional (numeric) arrays.
Definition Array.h:78
This class defines ranges which can be 'irregular'.
Definition IndexRange.h:69
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44