STIR  6.3.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 
28 START_NAMESPACE_STIR
29 
30 template <int num_dimensions>
31 class IndexRange;
36 template <int num_dimensions, typename elemT>
38 {
39 public:
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 
86 END_NAMESPACE_STIR
87 
88 #endif
A class for operations on n-dimensional Arrays.
Definition: ArrayFunctionObject.h:37
forward declaration of stir::Array class for multi-dimensional (numeric) arrays
Declaration of class stir::Succeeded.
This class defines ranges which can be &#39;irregular&#39;.
Definition: ArrayFunctionObject.h:31
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
This class defines multi-dimensional (numeric) arrays.
Definition: Array.h:77
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:79