103 ZIVID_CORE_EXPORT std::string array2DToString(std::size_t width, std::size_t height);
117 template<
typename DataFormat>
176 return *(
data() + idx);
232 std::default_delete<DataFormat[]>()
237 std::size_t m_height;
238 std::shared_ptr<DataFormat> m_data;
#define ZIVID_CORE_EXPORT
Definition: CoreExport.h:101
Two-dimensional container of data
Definition: Array2D.h:119
ConstIterator cbegin() const
Iterator to the beginning of the array
Definition: Array2D.h:205
const DataFormat * ConstIterator
The iterator type for immutable access. It iterates over individual Array2D elements in row major ord...
Definition: Array2D.h:127
friend class Array2DFactory
Definition: Array2D.h:223
const DataFormat & operator()(size_t i, size_t j) const
Constant reference to an element given by row and column
Definition: Array2D.h:187
ConstIterator cend() const
Iterator to the end of the array
Definition: Array2D.h:211
const DataFormat & operator()(size_t idx) const
Constant reference to an element given by a 1D linear index
Definition: Array2D.h:174
size_t height() const
Get the height of the array (number of rows)
Definition: Array2D.h:142
const DataFormat * data() const
Pointer to the first data element of the array
Definition: Array2D.h:162
bool isEmpty() const
Check if the array is empty
Definition: Array2D.h:155
std::string toString() const
Get array information as string
Definition: Array2D.h:217
ConstIterator end() const
Iterator to the end of the array
Definition: Array2D.h:199
DataFormat ValueType
The type of the elements stored in the Array2D
Definition: Array2D.h:122
size_t size() const
Get the number of elements in the array
Definition: Array2D.h:149
size_t width() const
Get the width of the array (number of columns)
Definition: Array2D.h:136
ConstIterator begin() const
Iterator to the beginning of the array
Definition: Array2D.h:193
Array2D()
Create an empty Array2D
Definition: Array2D.h:130
The main Zivid namespace. All Zivid code is found here
Definition: Application.h:99
std::ostream & operator<<(std::ostream &stream, const Array2D< T > &array)
Serialize array information to a stream
Definition: Array2D.h:243