8#include "warpxm/warpxm_config.h"
83 return (*
_data)[index];
88 return (*
_data)[index];
132 for (
int i = 0; i < num_pts; i++)
135 if (i != num_pts - 1)
168 _data = std::make_shared<std::vector<T>>(std::vector<T>());
184 std::shared_ptr<std::vector<T>>
_data;
WxRange represents a hyper-rectangular domain of an n-dimensional space of integers.
Definition: wxrange.h:23
int length(unsigned dim) const
Length of edge along dimension 'dim'.
Definition: wxrange.h:294
int size() const
Number of elements in range.
Definition: wxrange.h:304
std::shared_ptr< std::vector< T > > _data
Shared pointer containing data.
Definition: array.h:184
void link(const array_allocation_t &other)
Definition: array.h:155
virtual const T & operator[](int index) const
Definition: array.h:86
void allocate()
Definition: array.h:164
array_allocation_t(const array_allocation_t &other)=default
Copy Constructor.
array_allocation_t()=default
Default Constructor.
const T & operator()(size_t i, size_t j, size_t k) const
3D array access
Definition: array.h:110
void terminate()
Definition: array.h:172
virtual ~array_allocation_t()
Destructor.
Definition: array.h:39
void fill(const T &value)
Fill array with a value.
Definition: array.h:62
friend std::ostream & operator<<(std::ostream &stream, const array_allocation_t &array)
Definition: array.h:128
const T & operator()(size_t i, size_t j) const
2D array access
Definition: array.h:102
WxRange _range
Range of data.
Definition: array.h:181
array_allocation_t & operator=(const array_allocation_t &other)
Assignment operator - makes a shallow copy.
Definition: array.h:49
T * data()
Access the underlying data array.
Definition: array.h:71
array_allocation_t(const WxRange &range)
Allocate the array for a given range.
Definition: array.h:30
const T * data() const
Definition: array.h:76
void copy(const array_allocation_t &other)
Definition: array.h:145
const WxRange & range() const
Definition: array.h:123
T & operator()(size_t i, size_t j, size_t k)
3D array access
Definition: array.h:118
virtual T & operator[](int index)
Definition: array.h:81
T & operator()(size_t i, size_t j)
2D array access
Definition: array.h:94
patch_array_t()=default
Default Constructor.
patch_array_t & operator=(const patch_array_t &other)
Assignment operator - makes a shallow copy.
Definition: array.h:218
patch_array_t(const patch_array_t &other)=default
Copy Constructor.
const WxRange & interior_range() const
Returns range of interior of dataset.
Definition: array.h:237
virtual ~patch_array_t()
Destructor.
Definition: array.h:208
WxRange _interior_range
Range describing interior range of dataset.
Definition: array.h:244
patch_array_t(const WxRange &range)
Allocate the array for a given range.
Definition: array.h:199
Base namespace for everything not included in the global namespace.
Definition: field_source.h:8
#define real
Definition: wmoclunstructuredreconstruction.h:11