SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
iterator4d_range.hpp
Go to the documentation of this file.
1 /*
2  * Copyright(c):
3  * Signal Image and Communications (SIC) Department
4  * http://www.sic.sp2mi.univ-poitiers.fr/
5  * - University of Poitiers, France http://www.univ-poitiers.fr
6  * - XLIM Institute UMR CNRS 7252 http://www.xlim.fr/
7  *
8  * and
9  *
10  * D2 Fluid, Thermic and Combustion
11  * - University of Poitiers, France http://www.univ-poitiers.fr
12  * - PPRIME Institute - UPR CNRS 3346 http://www.pprime.fr
13  * - ISAE-ENSMA http://www.ensma.fr
14  *
15  * Contributor(s):
16  * The SLIP team,
17  * Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>,
18  * Laurent David <laurent.david_AT_lea.univ-poitiers.fr>,
19  * Ludovic Chatellier <ludovic.chatellier_AT_univ-poitiers.fr>,
20  * Lionel Thomas <lionel.thomas_AT_univ-poitiers.fr>,
21  * Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>,
22  * Julien Dombre <julien.dombre_AT_univ-poitiers.fr>.
23  *
24  * Description:
25  * The Simple Library of Image Processing (SLIP) is a new image processing
26  * library. It is written in the C++ language following as much as possible
27  * the ISO/ANSI C++ standard. It is consequently compatible with any system
28  * satisfying the ANSI C++ complience. It works on different Unix , Linux ,
29  * Mircrosoft Windows and Mac OS X plateforms. SLIP is a research library that
30  * was created by the Signal, Image and Communications (SIC) departement of
31  * the XLIM, UMR 7252 CNRS Institute in collaboration with the Fluids, Thermic
32  * and Combustion departement of the P', UPR 3346 CNRS Institute of the
33  * University of Poitiers.
34  *
35  * The SLIP Library source code has been registered to the APP (French Agency
36  * for the Protection of Programs) by the University of Poitiers and CNRS,
37  * under registration number IDDN.FR.001.300034.000.S.P.2010.000.21000.
38 
39  * http://www.sic.sp2mi.univ-poitiers.fr/slip/
40  *
41  * This software is governed by the CeCILL-C license under French law and
42  * abiding by the rules of distribution of free software. You can use,
43  * modify and/ or redistribute the software under the terms of the CeCILL-C
44  * license as circulated by CEA, CNRS and INRIA at the following URL
45  * http://www.cecill.info.
46  * As a counterpart to the access to the source code and rights to copy,
47  * modify and redistribute granted by the license, users are provided only
48  * with a limited warranty and the software's author, the holder of the
49  * economic rights, and the successive licensors have only limited
50  * liability.
51  *
52  * In this respect, the user's attention is drawn to the risks associated
53  * with loading, using, modifying and/or developing or reproducing the
54  * software by the user in light of its specific status of free software,
55  * that may mean that it is complicated to manipulate, and that also
56  * therefore means that it is reserved for developers and experienced
57  * professionals having in-depth computer knowledge. Users are therefore
58  * encouraged to load and test the software's suitability as regards their
59  * requirements in conditions enabling the security of their systems and/or
60  * data to be ensured and, more generally, to use and operate it in the
61  * same conditions as regards security.
62  *
63  * The fact that you are presently reading this means that you have had
64  * knowledge of the CeCILL-C license and that you accept its terms.
65  */
66 
76 #ifndef SLIP_ITERATOR4D_RANGE_HPP
77 #define SLIP_ITERATOR4D_RANGE_HPP
78 
79 #include <iterator>
80 #include <cassert>
81 
82 #include "Point4d.hpp"
83 #include "DPoint4d.hpp"
84 #include "DPoint3d.hpp"
85 #include "DPoint2d.hpp"
86 #include "Range.hpp"
87 #include "iterator_types.hpp"
88 
89 namespace slip
90 {
111 template <class Container4D>
113 {
114 public:
115  //typedef std::random_access_iterator_tag iterator_category;
117  typedef typename Container4D::value_type value_type;
121  typedef typename Container4D::pointer pointer;
122  typedef typename Container4D::reference reference;
123 
124  typedef iterator4d_range self;
125 
126  typedef typename Container4D::size_type size_type;
131 
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)
138  {}
139 
153  iterator4d_range(Container4D* c,
154  const slip::Range<int>& r1,
155  const slip::Range<int>& r2,
156  const slip::Range<int>& r3,
157  const slip::Range<int>& r4):
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)
161  {}
162 
168  iterator4d_range(const self& o):
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_)
171  {}
172 
187  self& operator=(const self& o)
188  {
189  if(this != &o)
190  {
191  this->cont4d_ = o.cont4d_;
192  this->pos_ = o.pos_;
193  this->x1_ = o.x1_;
194  this->x2_ = o.x2_;
195  this->x3_ = o.x3_;
196  this->x4_ = o.x4_;
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_;
201  }
202  return *this;
203  }
212  inline
214  {
215  return *pos_;
216  }
217 
218  inline
220  {
221  return &(operator*());
222  }
223 
228 
234  inline
235  self& operator++()
236  {
237  if((x4_ < static_cast<int>(range_x4_.start() + (range_x4_.iterations() * range_x4_.stride()))) &&
238  (x3_ <= static_cast<int>(range_x3_.start() + (range_x3_.iterations() * range_x3_.stride()))) &&
239  (x2_ <= static_cast<int>(range_x2_.start() + (range_x2_.iterations() * range_x2_.stride()))) &&
240  (x1_ <= static_cast<int>(range_x1_.start() + (range_x1_.iterations() * range_x1_.stride()))))
241  {
242  this->x4_+= range_x4_.stride();
243  this->pos_+= range_x4_.stride();
244  }
245  else if((x3_ < static_cast<int>(range_x3_.start() + (range_x3_.iterations() * range_x3_.stride()))) &&
246  (x2_ <= static_cast<int>(range_x2_.start() + (range_x2_.iterations() * range_x2_.stride()))) &&
247  (x1_ <= static_cast<int>(range_x1_.start() + (range_x1_.iterations() * range_x1_.stride()))))
248  {
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()) +
255  this->x4_;
256  }
257  else if(x2_ < int(range_x2_.start() + (range_x2_.iterations() * range_x2_.stride())) &&
258  (x1_ <= int(range_x1_.start() + (range_x1_.iterations() * range_x1_.stride()))))
259  {
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()) +
267  this->x4_;
268  }
269  else if(x1_ < int(range_x1_.start() + (range_x1_.iterations() * range_x1_.stride())))
270  {
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()) +
279  this->x4_;
280  }
281  else
282  {
283  this->x1_ = range_x1_.start() + range_x1_.stride() * (range_x1_.iterations() + 1);
284  this->x2_ = range_x2_.start() + range_x2_.stride() * (range_x2_.iterations() + 1);
285  this->x3_ = range_x3_.start() + range_x3_.stride() * (range_x3_.iterations() + 1);
286  this->x4_ = range_x4_.start() + range_x4_.stride() * (range_x4_.iterations() + 1);
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()) +
291  this->x4_;
292  }
293  return *this;
294  }
295 
301  inline
302  self operator++(int)
303  {
304  self tmp = *this;
305  ++(*this);
306  return tmp;
307  }
308 
320  inline
321  self& operator--()
322  {
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())))
325  {
326  this->x4_-= range_x4_.stride();
327  this->pos_-= range_x4_.stride();
328  }
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())))
331  {
332  this->x3_-= range_x3_.stride();
333  this->x4_ = range_x4_.start() + range_x4_.stride() * range_x4_.iterations();
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()) +
338  this->x4_;
339  }
340  else if((x2_ > static_cast<int>(range_x2_.start())) && (x1_ >= static_cast<int>(range_x1_.start())))
341  {
342  this->x2_-= range_x2_.stride();
343  this->x3_ = range_x3_.start() + range_x3_.stride() * range_x3_.iterations();
344  this->x4_ = range_x4_.start() + range_x4_.stride() * range_x4_.iterations();
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()) +
349  this->x4_;
350  }
351  else if(x1_ > int(range_x2_.start()))
352  {
353  this->x1_-= range_x1_.stride();
354  this->x2_ = range_x2_.start() + range_x2_.stride() * range_x2_.iterations();
355  this->x3_ = range_x3_.start() + range_x3_.stride() * range_x3_.iterations();
356  this->x4_ = range_x4_.start() + range_x4_.stride() * range_x4_.iterations();
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()) +
361  this->x4_;
362  }
363  else
364  {
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()) +
373  this->x4_;
374  }
375  return *this;
376  }
377 
383  inline
384  self operator--(int)
385  {
386  self tmp = *this;
387  --(*this);
388  return tmp;
389  }
390 
404  inline
405  friend bool operator==(const self& i1,
406  const self& i2)
407  {
408 
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_));
411  }
412 
419  inline
420  friend bool operator!=(const self& i1,
421  const self& i2)
422  {
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_));
425  }
438  inline
439  friend bool operator<(const self& i1,
440  const self& i2)
441  {
442  return ( i1.pos_ < i2.pos_);
443  }
444 
451  inline
452  friend bool operator>(const self& i1,
453  const self& i2)
454  {
455 
456  return (i2 < i1);
457  }
458 
465  inline
466  friend bool operator<=(const self& i1,
467  const self& i2)
468  {
469 
470  return !(i2 < i1);
471  }
472 
479  inline
480  friend bool operator>=(const self& i1,
481  const self& i2)
482  {
483 
484  return !(i1 < i2);
485  }
499  inline
500  self& operator+=(const difference_type& d)
501  {
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()) +
510  this->x4_;
511  return *this;
512  }
513 
521  inline
522  self& operator-=(const difference_type& d)
523  {
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()) +
532  this->x4_;
533  return *this;
534  }
535 
543  inline
544  self operator+(const difference_type& d)
545  {
546  self tmp = *this;
547  tmp += d;
548  return tmp;
549  }
550 
558  inline
559  self operator-(const difference_type& d)
560  {
561  self tmp = *this;
562  tmp -= d;
563  return tmp;
564  }
565 
574  inline
575  friend difference_type operator-(const self& i1,
576  const self& i2)
577  {
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());
586  }
587 
588 
597  inline
599  {
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()];
604  }
605 
615  inline
617  {
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()];
621  }
622 
632  inline
634  {
635  return (*cont4d_)[this->x1_+ this->range_x1_.stride() * d.dx1()]
636  [this->x2_ + this->range_x2_.stride() * d.dx2()];
637  }
638 
648  inline
650  {
651  return (*cont4d_)[this->x1_+ this->range_x1_.stride() * n];
652  }
653 
659 
669  inline
670  typename Container4D::slab_range_iterator slab_begin(size_type slice, size_type row, size_type col)
671  {
672  return cont4d_->slab_begin(range_x2_.start() + slice * range_x2_.stride(),
673  range_x3_.start() + row * range_x3_.stride(),
674  range_x4_.start() + col * range_x4_.stride(),
675  range_x1_);
676  }
677 
687  inline
688  typename Container4D::slab_range_iterator slab_end(size_type slice, size_type row, size_type col)
689  {
690  return this->slab_begin(slice,row,col) + (range_x1_.iterations() + 1);
691  }
692 
702  inline
703  typename Container4D::slice_range_iterator slice_begin(size_type slab, size_type row, size_type col)
704  {
705  return cont4d_->slice_begin(range_x1_.start() + slab * range_x1_.stride(),
706  range_x3_.start() + row * range_x3_.stride(),
707  range_x4_.start() + col * range_x4_.stride(),
708  range_x2_);
709  }
710 
720  inline
721  typename Container4D::slice_range_iterator slice_end(size_type slab, size_type row, size_type col)
722  {
723  return this->slice_begin(slab,row,col) + (range_x2_.iterations() + 1);
724  }
725 
726 
736  inline
737  typename Container4D::row_range_iterator row_begin(size_type slab, size_type slice, size_type row)
738  {
739  return cont4d_->row_begin(range_x1_.start() + slice * range_x1_.stride(),
740  range_x2_.start() + slice * range_x2_.stride(),
741  range_x3_.start() + row * range_x3_.stride(),
742  range_x4_);
743  }
744 
754  inline
755  typename Container4D::row_range_iterator row_end(size_type slab, size_type slice, size_type row)
756  {
757  return this->row_begin(slab,slice,row) + (range_x4_.iterations() + 1);
758  }
759 
769  inline
770  typename Container4D::col_range_iterator col_begin(size_type slab, size_type slice, size_type col)
771  {
772  return cont4d_->col_begin(range_x1_.start() + slice * range_x1_.stride(),
773  range_x2_.start() + slice * range_x2_.stride(),
774  range_x4_.start() + col * range_x4_.stride(),
775  range_x3_);
776  }
777 
787  inline
788  typename Container4D::col_range_iterator col_end(size_type slab, size_type slice, size_type col)
789  {
790  return this->col_begin(slab,slice,col) + (range_x3_.iterations() + 1);
791  }
792 
798 
803  inline
804  int x1() const
805  {
806  return this->x1_;
807  }
812  inline
813  int t() const
814  {
815  return this->x1_;
816  }
821  inline
822  int x2() const
823  {
824  return this->x2_;
825  }
830  inline
831  int k() const
832  {
833  return this->x2_;
834  }
835 
840  inline
841  int x3() const
842  {
843  return this->x3_;
844  }
849  inline
850  int i() const
851  {
852  return this->x3_;
853  }
854 
859  inline
860  int x4() const
861  {
862  return this->x4_;
863  }
868  inline
869  int j() const
870  {
871  return this->x4_;
872  }
876 private:
877  Container4D* cont4d_; // pointer to the 4d container
878  pointer pos_; // linear position within the container
879  int x1_; // first subscript position
880  int x2_; // second subscript position
881  int x3_; // third subscript position
882  int x4_; // fourth subscript position
883  slip::Range<int> range_x1_; // range to iterate on the first axis
884  slip::Range<int> range_x2_; //range to iterate on the second axis
885  slip::Range<int> range_x3_; //range to iterate on the third axis
886  slip::Range<int> range_x4_; //range to iterate on the fourth axis
887 };
888 
909 template <class Container4D>
911 {
912 public:
913  //typedef std::random_access_iterator_tag iterator_category;
915  typedef typename Container4D::value_type value_type;
919  typedef typename Container4D::const_pointer pointer;
920  typedef typename Container4D::const_reference reference;
921 
923 
924  typedef typename Container4D::size_type size_type;
929 
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)
936  {}
937 
951  const_iterator4d_range(Container4D* c,
952  const slip::Range<int>& r1,
953  const slip::Range<int>& r2,
954  const slip::Range<int>& r3,
955  const slip::Range<int>& r4):
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)
959  {}
960 
966  const_iterator4d_range(const self& o):
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_)
969  {}
970 
985  self& operator=(const self& o)
986  {
987  if(this != &o)
988  {
989  this->cont4d_ = o.cont4d_;
990  this->pos_ = o.pos_;
991  this->x1_ = o.x1_;
992  this->x2_ = o.x2_;
993  this->x3_ = o.x3_;
994  this->x4_ = o.x4_;
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_;
999  }
1000  return *this;
1001  }
1010  inline
1012  {
1013  return *pos_;
1014  }
1015 
1016  inline
1018  {
1019  return &(operator*());
1020  }
1021 
1026 
1032  inline
1033  self& operator++()
1034  {
1035  if((x4_ < static_cast<int>(range_x4_.start() + (range_x4_.iterations() * range_x4_.stride()))) &&
1036  (x3_ <= static_cast<int>(range_x3_.start() + (range_x3_.iterations() * range_x3_.stride()))) &&
1037  (x2_ <= static_cast<int>(range_x2_.start() + (range_x2_.iterations() * range_x2_.stride()))) &&
1038  (x1_ <= static_cast<int>(range_x1_.start() + (range_x1_.iterations() * range_x1_.stride()))))
1039  {
1040  this->x4_+= range_x4_.stride();
1041  this->pos_+= range_x4_.stride();
1042  }
1043  else if((x3_ < static_cast<int>(range_x3_.start() + (range_x3_.iterations() * range_x3_.stride()))) &&
1044  (x2_ <= static_cast<int>(range_x2_.start() + (range_x2_.iterations() * range_x2_.stride()))) &&
1045  (x1_ <= static_cast<int>(range_x1_.start() + (range_x1_.iterations() * range_x1_.stride()))))
1046  {
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()) +
1053  this->x4_;
1054  }
1055  else if(x2_ < int(range_x2_.start() + (range_x2_.iterations() * range_x2_.stride())) &&
1056  (x1_ <= int(range_x1_.start() + (range_x1_.iterations() * range_x1_.stride()))))
1057  {
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()) +
1065  this->x4_;
1066  }
1067  else if(x1_ < int(range_x1_.start() + (range_x1_.iterations() * range_x1_.stride())))
1068  {
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()) +
1077  this->x4_;
1078  }
1079  else
1080  {
1081  this->x1_ = range_x1_.start() + range_x1_.stride() * (range_x1_.iterations() + 1);
1082  this->x2_ = range_x2_.start() + range_x2_.stride() * (range_x2_.iterations() + 1);
1083  this->x3_ = range_x3_.start() + range_x3_.stride() * (range_x3_.iterations() + 1);
1084  this->x4_ = range_x4_.start() + range_x4_.stride() * (range_x4_.iterations() + 1);
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()) +
1089  this->x4_;
1090  }
1091  return *this;
1092  }
1093 
1099  inline
1100  self operator++(int)
1101  {
1102  self tmp = *this;
1103  ++(*this);
1104  return tmp;
1105  }
1106 
1118  inline
1119  self& operator--()
1120  {
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())))
1123  {
1124  this->x4_-= range_x4_.stride();
1125  this->pos_-= range_x4_.stride();
1126  }
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())))
1129  {
1130  this->x3_-= range_x3_.stride();
1131  this->x4_ = range_x4_.start() + range_x4_.stride() * range_x4_.iterations();
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()) +
1136  this->x4_;
1137  }
1138  else if((x2_ > static_cast<int>(range_x2_.start())) && (x1_ >= static_cast<int>(range_x1_.start())))
1139  {
1140  this->x2_-= range_x2_.stride();
1141  this->x3_ = range_x3_.start() + range_x3_.stride() * range_x3_.iterations();
1142  this->x4_ = range_x4_.start() + range_x4_.stride() * range_x4_.iterations();
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()) +
1147  this->x4_;
1148  }
1149  else if(x1_ > int(range_x2_.start()))
1150  {
1151  this->x1_-= range_x1_.stride();
1152  this->x2_ = range_x2_.start() + range_x2_.stride() * range_x2_.iterations();
1153  this->x3_ = range_x3_.start() + range_x3_.stride() * range_x3_.iterations();
1154  this->x4_ = range_x4_.start() + range_x4_.stride() * range_x4_.iterations();
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()) +
1159  this->x4_;
1160  }
1161  else
1162  {
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()) +
1171  this->x4_;
1172  }
1173  return *this;
1174  }
1175 
1181  inline
1182  self operator--(int)
1183  {
1184  self tmp = *this;
1185  --(*this);
1186  return tmp;
1187  }
1188 
1202  inline
1203  friend bool operator==(const self& i1,
1204  const self& i2)
1205  {
1206 
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_));
1209  }
1210 
1217  inline
1218  friend bool operator!=(const self& i1,
1219  const self& i2)
1220  {
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_));
1223  }
1236  inline
1237  friend bool operator<(const self& i1,
1238  const self& i2)
1239  {
1240  return ( i1.pos_ < i2.pos_);
1241  }
1242 
1249  inline
1250  friend bool operator>(const self& i1,
1251  const self& i2)
1252  {
1253 
1254  return (i2 < i1);
1255  }
1256 
1263  inline
1264  friend bool operator<=(const self& i1,
1265  const self& i2)
1266  {
1267 
1268  return !(i2 < i1);
1269  }
1270 
1277  inline
1278  friend bool operator>=(const self& i1,
1279  const self& i2)
1280  {
1281 
1282  return !(i1 < i2);
1283  }
1297  inline
1298  self& operator+=(const difference_type& d)
1299  {
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()) +
1308  this->x4_;
1309  return *this;
1310  }
1311 
1319  inline
1320  self& operator-=(const difference_type& d)
1321  {
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()) +
1330  this->x4_;
1331  return *this;
1332  }
1333 
1341  inline
1343  {
1344  self tmp = *this;
1345  tmp += d;
1346  return tmp;
1347  }
1348 
1356  inline
1358  {
1359  self tmp = *this;
1360  tmp -= d;
1361  return tmp;
1362  }
1363 
1372  inline
1373  friend difference_type operator-(const self& i1,
1374  const self& i2)
1375  {
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());
1384  }
1385 
1386 
1395  inline
1397  {
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()];
1402  }
1403 
1413  inline
1415  {
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()];
1419  }
1420 
1430  inline
1432  {
1433  return (*cont4d_)[this->x1_+ this->range_x1_.stride() * d.dx1()]
1434  [this->x2_ + this->range_x2_.stride() * d.dx2()];
1435  }
1436 
1446  inline
1447  pointer* operator[](int n) const
1448  {
1449  return (*cont4d_)[this->x1_+ this->range_x1_.stride() * n];
1450  }
1451 
1457 
1467  inline
1468  typename Container4D::const_slab_range_iterator slab_begin(
1469  size_type slice, size_type row, size_type col) const
1470  {
1471  return cont4d_->slab_begin(range_x2_.start() + slice * range_x2_.stride(),
1472  range_x3_.start() + row * range_x3_.stride(),
1473  range_x4_.start() + col * range_x4_.stride(),
1474  range_x1_);
1475  }
1476 
1486  inline
1487  typename Container4D:: const_slab_range_iterator slab_end(
1488  size_type slice, size_type row, size_type col) const
1489  {
1490  return this->slab_begin(slice,row,col) + (range_x1_.iterations() + 1);
1491  }
1492 
1502  inline
1503  typename Container4D::const_slice_range_iterator slice_begin(
1504  size_type slab, size_type row, size_type col)const
1505  {
1506  return cont4d_->slice_begin(range_x1_.start() + slab * range_x1_.stride(),
1507  range_x3_.start() + row * range_x3_.stride(),
1508  range_x4_.start() + col * range_x4_.stride(),
1509  range_x2_);
1510  }
1511 
1521  inline
1522  typename Container4D::const_slice_range_iterator slice_end(
1523  size_type slab, size_type row, size_type col) const
1524  {
1525  return this->slice_begin(slab,row,col) + (range_x2_.iterations() + 1);
1526  }
1527 
1528 
1538  inline
1539  typename Container4D::const_row_range_iterator row_begin(
1540  size_type slab, size_type slice, size_type row) const
1541  {
1542  return cont4d_->row_begin(range_x1_.start() + slice * range_x1_.stride(),
1543  range_x2_.start() + slice * range_x2_.stride(),
1544  range_x3_.start() + row * range_x3_.stride(),
1545  range_x4_);
1546  }
1547 
1557  inline
1558  typename Container4D::const_row_range_iterator row_end(
1559  size_type slab, size_type slice, size_type row) const
1560  {
1561  return this->row_begin(slab,slice,row) + (range_x4_.iterations() + 1);
1562  }
1563 
1573  inline
1574  typename Container4D::const_col_range_iterator col_begin(
1575  size_type slab, size_type slice, size_type col) const
1576  {
1577  return cont4d_->col_begin(range_x1_.start() + slice * range_x1_.stride(),
1578  range_x2_.start() + slice * range_x2_.stride(),
1579  range_x4_.start() + col * range_x4_.stride(),
1580  range_x3_);
1581  }
1582 
1592  inline
1593  typename Container4D::const_col_range_iterator col_end(
1594  size_type slab, size_type slice, size_type col) const
1595  {
1596  return this->col_begin(slab,slice,col) + (range_x3_.iterations() + 1);
1597  }
1598 
1604 
1609  inline
1610  int x1() const
1611  {
1612  return this->x1_;
1613  }
1618  inline
1619  int t() const
1620  {
1621  return this->x1_;
1622  }
1627  inline
1628  int x2() const
1629  {
1630  return this->x2_;
1631  }
1636  inline
1637  int k() const
1638  {
1639  return this->x2_;
1640  }
1641 
1646  inline
1647  int x3() const
1648  {
1649  return this->x3_;
1650  }
1655  inline
1656  int i() const
1657  {
1658  return this->x3_;
1659  }
1660 
1665  inline
1666  int x4() const
1667  {
1668  return this->x4_;
1669  }
1674  inline
1675  int j() const
1676  {
1677  return this->x4_;
1678  }
1682 private:
1683  Container4D* cont4d_; // pointer to the 4d container
1684  pointer pos_; // linear position within the container
1685  int x1_; // first subscript position
1686  int x2_; // second subscript position
1687  int x3_; // third subscript position
1688  int x4_; // fourth subscript position
1689  slip::Range<int> range_x1_; // range to iterate on the first axis
1690  slip::Range<int> range_x2_; //range to iterate on the second axis
1691  slip::Range<int> range_x3_; //range to iterate on the third axis
1692  slip::Range<int> range_x4_; //range to iterate on the fourth axis
1693 };
1694 
1695 
1696 
1697 
1698 }//slip::
1699 
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.
Definition: Range.hpp:305
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.
Definition: DPoint3d.hpp:273
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.
Definition: DPoint2d.hpp:241
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.
Definition: DPoint2d.hpp:229
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.
Definition: DPoint4d.hpp:281
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.
Definition: DPoint4d.hpp:269
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.
Definition: DPoint4d.hpp:99
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.
Definition: DPoint3d.hpp:261
Difference of Point2D class, specialization of DPoint<CoordType,DIM> with DIM = 2.
Definition: Array2d.hpp:129
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.
Definition: Range.hpp:284
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.
Definition: DPoint4d.hpp:293
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.
Definition: DPoint4d.hpp:305
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.
Definition: Range.hpp:298
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.
Definition: DPoint3d.hpp:249
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.
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.