66 return nx1 * (nx2 * x3 + x2) + x1;
72 return nx1 * (nx2 * x3 + x2);
92 return nx3 * (nx2 * x1 + x2) + x3;
99 return nx3 * (nx2 * x1 + x2);
119 return nx3 * (nx1 * x2 + x1) + x3;
126 return nx3 * (nx1 * x2 + x1);
143template <
typename T,
typename IndexClass = IndexerX3X2X1>
152 using reference =
typename std::vector<value_type>::reference;
154 using pointer =
typename std::vector<value_type>::pointer;
158 template <
typename value_type2,
typename IndexClass2>
181 this->
data.swap(vec);
187 template <
typename value_type2>
192 for (std::size_t
i = 0;
i <
data.size(); ++
i)
220 template <
typename value_type2,
typename IndexClass2>
233 for (
int x3 = 0; x3 < this->
nx3; x3++)
234 for (
int x2 = 0; x2 < this->
nx2; x2++)
235 for (
int x1 = 0; x1 < this->
nx1; x1++)
236 this->
operator()(x1, x2, x3) =
static_cast<value_type>(
rhs.operator()(x1, x2, x3));
247 this->data.size() !=
rhs.data.size()) {
254 template <
typename value_type2,
typename IndexClass2>
257 if (this->
data.size() != rhs.
data.size())
261 for (
int x3 = 0; x3 < this->
nx3; x3++)
262 for (
int x2 = 0; x2 < this->
nx2; x2++)
263 for (
int x1 = 0; x1 < this->
nx1; x1++)
264 if (!
isUbEqual(this->
operator()(x1, x2, x3),
rhs.operator()(x1, x2, x3)))
272 template <
typename value_type2,
typename IndexClass2>
275 return !(*
this ==
rhs);
280#if !defined(VF_NO_RANGECHECK) && (defined(VF_DEBUG) || defined(VF_RANGECHECK))
290#if !defined(VF_NO_RANGECHECK) && (defined(VF_DEBUG) || defined(VF_RANGECHECK))
300#if !defined(VF_NO_RANGECHECK) && (defined(VF_DEBUG) || defined(VF_RANGECHECK))
310#if !defined(VF_NO_RANGECHECK) && (defined(VF_DEBUG) || defined(VF_RANGECHECK))
320#if !defined(VF_NO_RANGECHECK) && (defined(VF_DEBUG) || defined(VF_RANGECHECK))
330#if !defined(VF_NO_RANGECHECK) && (defined(VF_DEBUG) || defined(VF_RANGECHECK))
340 return (*
this)(x1, x2, x3);
352 std::stringstream
text;
356 text << (*this)(x1, x2, x3) <<
", ";
360 text << std::endl << std::endl;
368 std::stringstream
text;
369 text <<
"CbArray3D< storageType=" <<
typeid(
T).name() <<
", indexer=" <<
typeid(
IndexClass).name() <<
" >";
370 text <<
"( nx1=" << this->
nx1 <<
", nx2=" << this->
nx2 <<
", nx3=" << this->
nx3 <<
")";
409#if !defined(VF_NO_RANGECHECK) && (defined(VF_DEBUG) || defined(VF_RANGECHECK))
432 std::stringstream
out(
"index out of range - ");
433 out <<
"(" << x1 <<
"," << x2 <<
"," << x3 <<
") not in (" <<
nx1 <<
"," <<
nx2 <<
"," <<
nx3 <<
")";
void resize(const int &uniformDimensionSize)
bool operator==(const CbArray3D< value_type2, IndexClass2 > &rhs) const
std::vector< value_type > & getDataVector()
typename std::vector< value_type >::const_reference const_reference
reference getObject(const size_type &x1, const size_type &x2, const size_type &x3)
std::vector< value_type > data
virtual ~CbArray3D()=default
typename IndexClass::size_type size_type
std::string getInfo() const
std::string getExceptionErrorString(const size_type &x1, const size_type &x2, const size_type &x3) const
CbArray3D(const size_type &nx1, const size_type &nx2, const size_type &nx3, const value_type &val)
bool operator!=(const CbArray3D &src) const
typename std::vector< value_type >::const_pointer const_pointer
bool indicesInRange(const size_type &x1, const size_type &x2, const size_type &x3) const
std::size_t getDataVectorIndex(const size_type &x1, const size_type &x2, const size_type &x3) const
void reset(const value_type &val)
CbArray3D(const size_type &uniformDimensionSize)
SPtr< CbArray3D< T, IndexClass > > CbArray3DPtr
const_reference operator()(const size_type &x1, const size_type &x2, const size_type &x3) const
CbArray3D(const size_type &nx1, const size_type &nx2, const size_type &nx3)
const_reference getObject(const size_type &x1, const size_type &x2, const size_type &x3) const
reference operator()(const size_type &x1, const size_type &x2, const size_type &x3)
CbArray3D(const CbArray3D< value_type2 > &src)
bool operator!=(const CbArray3D< value_type2, IndexClass2 > &rhs) const
void resize(const size_type &nx1, const size_type &nx2, const size_type &nx3)
const_pointer getStartAdressOfSortedArray(const size_type &x1, const size_type &x2, const size_type &x3) const
typename std::vector< value_type >::pointer pointer
void resize(const size_type &nx1, const size_type &nx2, const size_type &nx3, const value_type &val)
std::string toString() const
CbArray3D & operator=(const CbArray3D< value_type2, IndexClass2 > &rhs)
bool operator==(const CbArray3D &rhs) const
pointer getStartAdressOfSortedArray(const size_type &x1, const size_type &x2, const size_type &x3)
CbArray3D(std::vector< value_type > &vec, const size_type &nx1, const size_type &nx2, const size_type &nx3)
typename std::vector< value_type >::reference reference
const std::vector< value_type > & getDataVector() const
CbArray3D & operator=(const CbArray3D &rhs)
CbArray3D(const CbArray3D &src)
void setObject(const size_type &x1, const size_type &x2, const size_type &x3, const value_type &value)
std::size_t getStartIndexOfSortedArray(const size_type &x1, const size_type &x2, const size_type &, const size_type &, const size_type &nx2, const size_type &nx3) const
std::size_t getIndex(const size_type &x1, const size_type &x2, const size_type &x3, const size_type &, const size_type &nx2, const size_type &nx3) const
std::size_t getStartIndexOfSortedArray(const size_type &x1, const size_type &x2, const size_type &, const size_type &nx1, const size_type &, const size_type &nx3) const
std::size_t getIndex(const size_type &x1, const size_type &x2, const size_type &x3, const size_type &nx1, const size_type &, const size_type &nx3) const
std::size_t getIndex(const size_type &x1, const size_type &x2, const size_type &x3, const size_type &nx1, const size_type &nx2, const size_type &) const
std::size_t getStartIndexOfSortedArray(const size_type &, const size_type &x2, const size_type &x3, const size_type &nx1, const size_type &nx2, const size_type &) const
std::shared_ptr< T > SPtr
UbTypeOp< typenameUbDuoT< N, UbDuo< A, B > >::ResultT >::RefT val(UbDuo< A, B > &d)
bool isUbEqual(const T1 &a, const T2 &b)