STIR  6.2.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 
27 START_NAMESPACE_STIR
28 
29 template <int num_dimensions, typename elemT>
30 class Array;
31 template <int num_dimensions>
32 class IndexRange;
37 template <int num_dimensions, typename elemT>
39 {
40 public:
41  virtual ~ArrayFunctionObject() {}
43 
46  virtual void operator()(Array<num_dimensions, elemT>& array) const = 0;
48 
51  virtual void operator()(Array<num_dimensions, elemT>& out_array, const Array<num_dimensions, elemT>& in_array) const = 0;
53 
57  virtual bool is_trivial() const = 0;
58 
60 
68  const IndexRange<num_dimensions>& output_indices) const
69  {
70  return Succeeded::no;
71  }
72 
74 
81  const IndexRange<num_dimensions>& input_indices) const
82  {
83  return Succeeded::no;
84  }
85 };
86 
87 END_NAMESPACE_STIR
88 
89 #endif
A class for operations on n-dimensional Arrays.
Definition: ArrayFunctionObject.h:38
Declaration of class stir::Succeeded.
This class defines ranges which can be &#39;irregular&#39;.
Definition: ArrayFunctionObject.h:32
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:67
This class defines multi-dimensional (numeric) arrays.
Definition: Array.h:73
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
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:80