76 #ifndef SLIP_ITERATOR4D_RANGE_HPP
77 #define SLIP_ITERATOR4D_RANGE_HPP
111 template <
class Container4D>
121 typedef typename Container4D::pointer
pointer;
137 cont4d_(0),pos_(0),x1_(0),x2_(0),x3_(0),x4_(0),range_x1_(0,0),range_x2_(0,0),range_x3_(0,0),range_x4_(0,0)
158 cont4d_(c),pos_((*c)[r1.start()][r2.start()][r3.start()]+ r4.start())
159 ,x1_(r1.start()),x2_(r2.start()),x3_(r3.start()),x4_(r4.start())
160 ,range_x1_(r1),range_x2_(r2),range_x3_(r3),range_x4_(r4)
169 cont4d_(o.cont4d_),pos_(o.pos_),x1_(o.x1_),x2_(o.x2_),x3_(o.x3_),x4_(o.x4_),
170 range_x1_(o.range_x1_),range_x2_(o.range_x2_),range_x3_(o.range_x3_),range_x4_(o.range_x4_)
191 this->cont4d_ = o.cont4d_;
197 this->range_x1_ = o.range_x1_;
198 this->range_x2_ = o.range_x2_;
199 this->range_x3_ = o.range_x3_;
200 this->range_x4_ = o.range_x4_;
242 this->x4_+= range_x4_.
stride();
243 this->pos_+= range_x4_.
stride();
245 else if((x3_ < static_cast<int>(range_x3_.
start() + (range_x3_.
iterations() * range_x3_.
stride()))) &&
249 this->x3_+= range_x3_.
stride();
250 this->x4_ = range_x4_.
start();
251 this->pos_ = cont4d_->begin() +
252 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
253 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
254 this->x3_ * static_cast<int>(cont4d_->cols()) +
260 this->x2_+= range_x2_.
stride();
261 this->x3_ = range_x3_.
start();
262 this->x4_ = range_x4_.
start();
263 this->pos_ = cont4d_->begin() +
264 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
265 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
266 this->x3_ * static_cast<int>(cont4d_->cols()) +
271 this->x1_+= range_x1_.
stride();
272 this->x2_ = range_x2_.
start();
273 this->x3_ = range_x3_.
start();
274 this->x4_ = range_x4_.
start();
275 this->pos_ = cont4d_->begin() +
276 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
277 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
278 this->x3_ * static_cast<int>(cont4d_->cols()) +
287 this->pos_ = cont4d_->begin() +
288 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
289 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
290 this->x3_ * static_cast<int>(cont4d_->cols()) +
323 if((x4_ > static_cast<int>(range_x4_.
start())) && (x3_ >=
static_cast<int>(range_x3_.
start())) &&
324 (x2_ >=
static_cast<int>(range_x2_.
start())) && (x1_ >=
static_cast<int>(range_x1_.
start())))
326 this->x4_-= range_x4_.
stride();
327 this->pos_-= range_x4_.
stride();
329 else if((x3_ > static_cast<int>(range_x3_.
start())) && (x2_ >=
static_cast<int>(range_x2_.
start())) &&
330 (x1_ >=
static_cast<int>(range_x1_.
start())))
332 this->x3_-= range_x3_.
stride();
334 this->pos_ = cont4d_->begin() +
335 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
336 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
337 this->x3_ * static_cast<int>(cont4d_->cols()) +
340 else if((x2_ > static_cast<int>(range_x2_.
start())) && (x1_ >=
static_cast<int>(range_x1_.
start())))
342 this->x2_-= range_x2_.
stride();
345 this->pos_ = cont4d_->begin() +
346 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
347 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
348 this->x3_ * static_cast<int>(cont4d_->cols()) +
351 else if(x1_ >
int(range_x2_.
start()))
353 this->x1_-= range_x1_.
stride();
357 this->pos_ = cont4d_->begin() +
358 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
359 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
360 this->x3_ * static_cast<int>(cont4d_->cols()) +
365 this->x1_ = int(range_x1_.
start()-range_x1_.
stride());
366 this->x2_ = int(range_x2_.
start()-range_x2_.
stride());
367 this->x3_ = int(range_x3_.
start()-range_x3_.
stride());
368 this->x4_ = int(range_x4_.
start()-range_x4_.
stride());
369 this->pos_ = cont4d_->begin() +
370 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
371 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
372 this->x3_ * static_cast<int>(cont4d_->cols()) +
409 return ( (i1.cont4d_ == i2.cont4d_) && (i1.pos_ == i2.pos_)
410 && (i1.x1_ == i2.x1_) && (i1.x2_ == i2.x2_) && (i1.x3_ == i2.x3_) && (i1.x4_ == i2.x4_));
423 return ( (i1.cont4d_ != i2.cont4d_) || (i1.pos_ != i2.pos_)
424 || (i1.x1_ != i2.x1_) || (i1.x2_ != i2.x2_) || (i1.x3_ != i2.x3_) || (i1.x4_ != i2.x4_));
442 return ( i1.pos_ < i2.pos_);
502 this->x1_ += this->range_x1_.
stride() * d.
dx1();
503 this->x2_ += this->range_x2_.
stride() * d.
dx2();
504 this->x3_ += this->range_x3_.
stride() * d.
dx3();
505 this->x4_ += this->range_x4_.
stride() * d.
dx4();
506 this->pos_ = cont4d_->begin() +
507 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
508 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
509 this->x3_ * static_cast<int>(cont4d_->cols()) +
524 this->x1_ -= this->range_x1_.
stride() * d.
dx1();
525 this->x2_ -= this->range_x2_.
stride() * d.
dx2();
526 this->x3_ -= this->range_x3_.
stride() * d.
dx3();
527 this->x4_ -= this->range_x4_.
stride() * d.
dx4();
528 this->pos_ = cont4d_->begin() +
529 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
530 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
531 this->x3_ * static_cast<int>(cont4d_->cols()) +
578 assert(i1.range_x1_.stride() == i2.range_x1_.stride());
579 assert(i1.range_x2_.stride() == i2.range_x2_.stride());
580 assert(i1.range_x3_.stride() == i2.range_x3_.stride());
581 assert(i1.range_x4_.stride() == i2.range_x4_.stride());
582 return difference_type(static_cast<int>((i1.x1_ - i2.x1_)/i1.range_x1_.stride()),
583 static_cast<int>((i1.x2_ - i2.x2_))/i1.range_x2_.stride(),
584 static_cast<int>((i1.x3_ - i2.x3_))/i1.range_x3_.stride(),
585 static_cast<int>((i1.x4_ - i2.x4_))/i1.range_x4_.stride());
600 return (*cont4d_)[this->x1_+ this->range_x1_.
stride() * d.
dx1()]
601 [this->x2_+ this->range_x2_.
stride() * d.
dx2()]
602 [this->x3_+ this->range_x3_.
stride() * d.
dx3()]
603 [this->x4_+ this->range_x4_.
stride() * d.
dx4()];
618 return (*cont4d_)[this->x1_+ this->range_x1_.
stride() * d.
dx1()]
619 [this->x2_ + this->range_x2_.
stride() * d.
dx2()]
620 [this->x3_ + this->range_x3_.
stride() * d.
dx3()];
635 return (*cont4d_)[this->x1_+ this->range_x1_.
stride() * d.
dx1()]
636 [this->x2_ + this->range_x2_.
stride() * d.
dx2()];
651 return (*cont4d_)[this->x1_+ this->range_x1_.
stride() * n];
672 return cont4d_->slab_begin(range_x2_.
start() + slice * range_x2_.
stride(),
705 return cont4d_->slice_begin(range_x1_.
start() + slab * range_x1_.
stride(),
739 return cont4d_->row_begin(range_x1_.
start() + slice * range_x1_.
stride(),
772 return cont4d_->col_begin(range_x1_.
start() + slice * range_x1_.
stride(),
877 Container4D* cont4d_;
909 template <
class Container4D>
919 typedef typename Container4D::const_pointer
pointer;
920 typedef typename Container4D::const_reference
reference;
935 cont4d_(0),pos_(0),x1_(0),x2_(0),x3_(0),x4_(0),range_x1_(0,0),range_x2_(0,0),range_x3_(0,0),range_x4_(0,0)
956 cont4d_(c),pos_((*c)[r1.start()][r2.start()][r3.start()]+ r4.start())
957 ,x1_(r1.start()),x2_(r2.start()),x3_(r3.start()),x4_(r4.start())
958 ,range_x1_(r1),range_x2_(r2),range_x3_(r3),range_x4_(r4)
967 cont4d_(o.cont4d_),pos_(o.pos_),x1_(o.x1_),x2_(o.x2_),x3_(o.x3_),x4_(o.x4_),
968 range_x1_(o.range_x1_),range_x2_(o.range_x2_),range_x3_(o.range_x3_),range_x4_(o.range_x4_)
989 this->cont4d_ = o.cont4d_;
995 this->range_x1_ = o.range_x1_;
996 this->range_x2_ = o.range_x2_;
997 this->range_x3_ = o.range_x3_;
998 this->range_x4_ = o.range_x4_;
1040 this->x4_+= range_x4_.
stride();
1041 this->pos_+= range_x4_.
stride();
1043 else if((x3_ < static_cast<int>(range_x3_.
start() + (range_x3_.
iterations() * range_x3_.
stride()))) &&
1047 this->x3_+= range_x3_.
stride();
1048 this->x4_ = range_x4_.
start();
1049 this->pos_ = cont4d_->begin() +
1050 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
1051 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
1052 this->x3_ * static_cast<int>(cont4d_->cols()) +
1058 this->x2_+= range_x2_.
stride();
1059 this->x3_ = range_x3_.
start();
1060 this->x4_ = range_x4_.
start();
1061 this->pos_ = cont4d_->begin() +
1062 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
1063 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
1064 this->x3_ * static_cast<int>(cont4d_->cols()) +
1069 this->x1_+= range_x1_.
stride();
1070 this->x2_ = range_x2_.
start();
1071 this->x3_ = range_x3_.
start();
1072 this->x4_ = range_x4_.
start();
1073 this->pos_ = cont4d_->begin() +
1074 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
1075 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
1076 this->x3_ * static_cast<int>(cont4d_->cols()) +
1085 this->pos_ = cont4d_->begin() +
1086 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
1087 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
1088 this->x3_ * static_cast<int>(cont4d_->cols()) +
1121 if((x4_ > static_cast<int>(range_x4_.
start())) && (x3_ >=
static_cast<int>(range_x3_.
start())) &&
1122 (x2_ >=
static_cast<int>(range_x2_.
start())) && (x1_ >=
static_cast<int>(range_x1_.
start())))
1124 this->x4_-= range_x4_.
stride();
1125 this->pos_-= range_x4_.
stride();
1127 else if((x3_ > static_cast<int>(range_x3_.
start())) && (x2_ >=
static_cast<int>(range_x2_.
start())) &&
1128 (x1_ >=
static_cast<int>(range_x1_.
start())))
1130 this->x3_-= range_x3_.
stride();
1132 this->pos_ = cont4d_->begin() +
1133 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
1134 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
1135 this->x3_ * static_cast<int>(cont4d_->cols()) +
1138 else if((x2_ > static_cast<int>(range_x2_.
start())) && (x1_ >=
static_cast<int>(range_x1_.
start())))
1140 this->x2_-= range_x2_.
stride();
1143 this->pos_ = cont4d_->begin() +
1144 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
1145 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
1146 this->x3_ * static_cast<int>(cont4d_->cols()) +
1149 else if(x1_ >
int(range_x2_.
start()))
1151 this->x1_-= range_x1_.
stride();
1155 this->pos_ = cont4d_->begin() +
1156 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
1157 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
1158 this->x3_ * static_cast<int>(cont4d_->cols()) +
1163 this->x1_ = int(range_x1_.
start()-range_x1_.
stride());
1164 this->x2_ = int(range_x2_.
start()-range_x2_.
stride());
1165 this->x3_ = int(range_x3_.
start()-range_x3_.
stride());
1166 this->x4_ = int(range_x4_.
start()-range_x4_.
stride());
1167 this->pos_ = cont4d_->begin() +
1168 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
1169 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
1170 this->x3_ * static_cast<int>(cont4d_->cols()) +
1207 return ( (i1.cont4d_ == i2.cont4d_) && (i1.pos_ == i2.pos_)
1208 && (i1.x1_ == i2.x1_) && (i1.x2_ == i2.x2_) && (i1.x3_ == i2.x3_) && (i1.x4_ == i2.x4_));
1221 return ( (i1.cont4d_ != i2.cont4d_) || (i1.pos_ != i2.pos_)
1222 || (i1.x1_ != i2.x1_) || (i1.x2_ != i2.x2_) || (i1.x3_ != i2.x3_) || (i1.x4_ != i2.x4_));
1240 return ( i1.pos_ < i2.pos_);
1300 this->x1_ += this->range_x1_.
stride() * d.
dx1();
1301 this->x2_ += this->range_x2_.
stride() * d.
dx2();
1302 this->x3_ += this->range_x3_.
stride() * d.
dx3();
1303 this->x4_ += this->range_x4_.
stride() * d.
dx4();
1304 this->pos_ = cont4d_->begin() +
1305 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
1306 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
1307 this->x3_ * static_cast<int>(cont4d_->cols()) +
1322 this->x1_ -= this->range_x1_.
stride() * d.
dx1();
1323 this->x2_ -= this->range_x2_.
stride() * d.
dx2();
1324 this->x3_ -= this->range_x3_.
stride() * d.
dx3();
1325 this->x4_ -= this->range_x4_.
stride() * d.
dx4();
1326 this->pos_ = cont4d_->begin() +
1327 this->x1_ *
static_cast<int>(cont4d_->slices() * cont4d_->rows() * cont4d_->cols()) +
1328 this->x2_ * static_cast<int>(cont4d_->rows() * cont4d_->cols()) +
1329 this->x3_ * static_cast<int>(cont4d_->cols()) +
1376 assert(i1.range_x1_.stride() == i2.range_x1_.stride());
1377 assert(i1.range_x2_.stride() == i2.range_x2_.stride());
1378 assert(i1.range_x3_.stride() == i2.range_x3_.stride());
1379 assert(i1.range_x4_.stride() == i2.range_x4_.stride());
1380 return difference_type(static_cast<int>((i1.x1_ - i2.x1_)/i1.range_x1_.stride()),
1381 static_cast<int>((i1.x2_ - i2.x2_))/i1.range_x2_.stride(),
1382 static_cast<int>((i1.x3_ - i2.x3_))/i1.range_x3_.stride(),
1383 static_cast<int>((i1.x4_ - i2.x4_))/i1.range_x4_.stride());
1398 return (*cont4d_)[this->x1_+ this->range_x1_.
stride() * d.
dx1()]
1399 [this->x2_+ this->range_x2_.
stride() * d.
dx2()]
1400 [this->x3_+ this->range_x3_.
stride() * d.
dx3()]
1401 [this->x4_+ this->range_x4_.
stride() * d.
dx4()];
1416 return (*cont4d_)[this->x1_+ this->range_x1_.
stride() * d.
dx1()]
1417 [this->x2_ + this->range_x2_.
stride() * d.
dx2()]
1418 [this->x3_ + this->range_x3_.
stride() * d.
dx3()];
1433 return (*cont4d_)[this->x1_+ this->range_x1_.
stride() * d.
dx1()]
1434 [this->x2_ + this->range_x2_.
stride() * d.
dx2()];
1449 return (*cont4d_)[this->x1_+ this->range_x1_.
stride() * n];
1471 return cont4d_->slab_begin(range_x2_.
start() + slice * range_x2_.
stride(),
1487 typename Container4D:: const_slab_range_iterator
slab_end(
1506 return cont4d_->slice_begin(range_x1_.
start() + slab * range_x1_.
stride(),
1542 return cont4d_->row_begin(range_x1_.
start() + slice * range_x1_.
stride(),
1558 typename Container4D::const_row_range_iterator
row_end(
1577 return cont4d_->col_begin(range_x1_.
start() + slice * range_x1_.
stride(),
1593 typename Container4D::const_col_range_iterator
col_end(
1683 Container4D* cont4d_;
1700 #endif //SLIP_ITERATOR4D_RANGE_HPP
self operator--(int)
Postdecrement a const_iterator4d_range. Iterate to the previous location inside the Range4d...
std::size_t iterations() const
Rerturns the number of iterations of the range.
friend bool operator<=(const self &i1, const self &i2)
<= operator.
friend bool operator==(const self &i1, const self &i2)
Equality operator.
Provides a class to modelize the difference of slip::Point2d.
void dx3(const CoordType &dx)
Accessor of the first coordinate of DPoint3d.
Container4D::const_col_range_iterator col_end(size_type slab, size_type slice, size_type col) const
const_iterator4d_range element assignment operator.
int j() const
Access to the fourth subscript of the current const_iterator4d_range.
const_iterator4d_range(const self &o)
Constructs a copy of the const_iterator4d_range o.
int x3() const
Access to the third subscript of the current iterator4d_range.
Container4D::const_col_range_iterator col_begin(size_type slab, size_type slice, size_type col) const
const_iterator4d_range element assignment operator.
Container4D::const_pointer pointer
void dx2(const CoordType &dx)
Accessor of the second coordinate of DPoint2d.
Difference of Point3D class, specialization of DPoint<CoordType,DIM> with DIM = 3.
friend bool operator<(const self &i1, const self &i2)
< operator.
Container4D::row_range_iterator row_begin(size_type slab, size_type slice, size_type row)
iterator4d_range element assignment operator.
This is some iterator to iterate a 4d container into two Range defined by the indices and strides of ...
slip::DPoint2d< int > diff2d
friend bool operator>=(const self &i1, const self &i2)
>= operator.
Provides a class to tag SLIP iterators.
self & operator+=(const difference_type &d)
const_iterator4d_range addition.
Provides a class to modelize 4d points.
Provides a class to modelize the difference of slip::Point3d.
self operator++(int)
Postincrement a iterator4d_range. Iterate to the next location inside the Range4d.
Container4D::const_row_range_iterator row_end(size_type slab, size_type slice, size_type row) const
const_iterator4d_range element assignment operator.
self & operator++()
Preincrement a iterator4d_range. Iterate to the next location inside the Range.
self operator+(const difference_type &d)
const_iterator4d_range addition.
self operator++(int)
Postincrement a const_iterator4d_range. Iterate to the next location inside the Range4d.
int t() const
Access to the first subscript of the current const_iterator4d_range.
slip::DPoint3d< int > diff3d
pointer operator[](diff2d d)
iterator4d_range element assignment operator. Equivalent to *(k + d) = t.
int k() const
Access to the second subscript of the current iterator4d_range.
Container4D::const_slab_range_iterator slab_begin(size_type slice, size_type row, size_type col) const
const_iterator4d_range element assignment operator.
Container4D::size_type size_type
Container4D::reference reference
self operator--(int)
Postdecrement a iterator4d_range. Iterate to the previous location inside the Range4d.
self & operator-=(const difference_type &d)
iterator4d_range substraction.
slip::DPoint2d< int > diff2d
self & operator=(const self &o)
Assign a const_iterator4d_range.
self operator-(const difference_type &d)
const_iterator4d_range substraction.
void dx1(const CoordType &dx)
Accessor of the first coordinate of DPoint2d.
self & operator-=(const difference_type &d)
const_iterator4d_range substraction.
pointer * operator[](int n)
iterator4d_range element assignment operator. Equivalent to *(k + n) = t.
const_iterator4d_range()
Constructs a const_iterator4d_range.
friend bool operator>(const self &i1, const self &i2)
operator.
void dx2(const CoordType &dx)
Accessor of the second coordinate of DPoint4d.
Container4D::const_reference reference
Container4D::slice_range_iterator slice_begin(size_type slab, size_type row, size_type col)
iterator4d_range element assignment operator.
int x2() const
Access to the second subscript of the current iterator4d_range.
void dx1(const CoordType &dx)
Accessor of the first coordinate of DPoint4d.
int x1() const
Access to the first subscript of the current const_iterator4d_range.
Difference of Point4D class, specialization of DPoint<CoordType,DIM> with DIM = 4.
friend bool operator>(const self &i1, const self &i2)
operator.
int x2() const
Access to the second subscript of the current const_iterator4d_range.
const_iterator4d_range(Container4D *c, const slip::Range< int > &r1, const slip::Range< int > &r2, const slip::Range< int > &r3, const slip::Range< int > &r4)
Constructs a const_iterator4d_range.
Container4D::size_type size_type
self operator-(const difference_type &d)
iterator4d_range substraction.
self & operator=(const self &o)
Assign a iterator4d_range.
Provides a class to modelize the difference of 4d points.
friend bool operator==(const self &i1, const self &i2)
Equality operator.
Container4D::value_type value_type
Container4D::const_row_range_iterator row_begin(size_type slab, size_type slice, size_type row) const
const_iterator4d_range element assignment operator.
friend bool operator!=(const self &i1, const self &i2)
Inequality operator.
self operator+(const difference_type &d)
iterator4d_range addition.
Container4D::col_range_iterator col_end(size_type slab, size_type slice, size_type col)
iterator4d_range element assignment operator.
friend bool operator>=(const self &i1, const self &i2)
>= operator.
Container4D::pointer pointer
DPoint4d< int > difference_type
void dx2(const CoordType &dx)
Accessor of the second coordinate of DPoint3d.
Difference of Point2D class, specialization of DPoint<CoordType,DIM> with DIM = 2.
pointer operator[](diff3d d) const
const_iterator4d_range element assignment operator. Equivalent to *(k + d) = t.
SubType start() const
Accessor of the start subscript of the Range.
int j() const
Access to the fourth subscript of the current iterator4d_range.
reference operator[](difference_type d) const
const_iterator4d_range element assignment operator. Equivalent to *(k + d) = t.
friend difference_type operator-(const self &i1, const self &i2)
const_iterator4d_range difference operator.
void dx3(const CoordType &dx)
Accessor of the third coordinate of DPoint4d.
Container4D::row_range_iterator row_end(size_type slab, size_type slice, size_type row)
iterator4d_range element assignment operator.
int i() const
Access to the third subscript of the current iterator4d_range.
reference operator[](difference_type d)
iterator4d_range element assignment operator. Equivalent to *(k + d) = t.
iterator4d_range(Container4D *c, const slip::Range< int > &r1, const slip::Range< int > &r2, const slip::Range< int > &r3, const slip::Range< int > &r4)
Constructs a iterator4d_range.
Container4D::value_type value_type
reference operator*()
Dereference assignment operator. Returns the element that the current iterator4d_range i point to...
Container4D::const_slab_range_iterator slab_end(size_type slice, size_type row, size_type col) const
const_iterator4d_range element assignment operator.
friend bool operator<=(const self &i1, const self &i2)
<= operator.
Container4D::slice_range_iterator slice_end(size_type slab, size_type row, size_type col)
iterator4d_range element assignment operator.
iterator4d_range(const self &o)
Constructs a copy of the iterator4d_range o.
self & operator--()
Predecrement a const_iterator4d_range. Iterate to the previous location inside the Range4d...
int k() const
Access to the second subscript of the current const_iterator4d_range.
int x3() const
Access to the third subscript of the current const_iterator4d_range.
friend difference_type operator-(const self &i1, const self &i2)
iterator4d_range difference operator.
void dx4(const CoordType &dx)
Accessor of the fourth coordinate of DPoint4d.
Some const iterator to iterate a 4d container into two Range defined by the indices and strides of th...
friend bool operator<(const self &i1, const self &i2)
< operator.
int i() const
Access to the third subscript of the current const_iterator4d_range.
pointer operator[](diff2d d) const
const_iterator4d_range element assignment operator. Equivalent to *(k + d) = t.
int stride() const
Accessor of the stride of the Range.
int x4() const
Access to the fourth subscript of the current iterator4d_range.
pointer operator[](diff3d d)
iterator4d_range element assignment operator. Equivalent to *(k + d) = t.
Container4D::col_range_iterator col_begin(size_type slab, size_type slice, size_type col)
iterator4d_range element assignment operator.
reference operator*()
Dereference assignment operator. Returns the element that the current iterator4d_range i point to...
int x1() const
Access to the first subscript of the current iterator4d_range.
iterator4d_range()
Constructs a iterator4d_range.
Container4D::slab_range_iterator slab_end(size_type slice, size_type row, size_type col)
iterator4d_range element assignment operator.
friend bool operator!=(const self &i1, const self &i2)
Inequality operator.
void dx1(const CoordType &dx)
Accessor of the first coordinate of DPoint3d.
pointer * operator[](int n) const
const_iterator4d_range element assignment operator. Equivalent to *(k + n) = t.
self & operator--()
Predecrement a iterator4d_range. Iterate to the previous location inside the Range4d.
std::random_access_iterator4d_tag iterator_category
std::random_access_iterator4d_tag iterator_category
Provides a class to manipulate Ranges.
Container4D::const_slice_range_iterator slice_begin(size_type slab, size_type row, size_type col) const
const_iterator4d_range element assignment operator.
slip::DPoint3d< int > diff3d
int t() const
Access to the first subscript of the current iterator4d_range.
DPoint4d< int > difference_type
Container4D::const_slice_range_iterator slice_end(size_type slab, size_type row, size_type col) const
const_iterator4d_range element assignment operator.
int x4() const
Access to the fourth subscript of the current const_iterator4d_range.
Container4D::slab_range_iterator slab_begin(size_type slice, size_type row, size_type col)
iterator4d_range element assignment operator.
self & operator+=(const difference_type &d)
iterator4d_range addition.
self & operator++()
Preincrement a const_iterator4d_range. Iterate to the next location inside the Range.