SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GenericMultiComponent3d.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 
67 
74 #ifndef SLIP_GENERICMULTICOMPONENT3D_HPP
75 #define SLIP_GENERICMULTICOMPONENT3D_HPP
76 
77 #include <iostream>
78 #include <iterator>
79 #include <cassert>
80 #include <numeric>
81 #include <cmath>
82 #include <string>
83 #include <vector>
84 #include <cstddef>
85 #include "Matrix3d.hpp"
86 #include "Matrix.hpp"
87 #include "stride_iterator.hpp"
88 #include "kstride_iterator.hpp"
89 #include "iterator2d_box.hpp"
90 #include "apply.hpp"
91 #include "iterator3d_plane.hpp"
92 #include "iterator3d_box.hpp"
93 #include "iterator3d_range.hpp"
94 
97 
98 #include <boost/serialization/access.hpp>
99 #include <boost/serialization/split_member.hpp>
100 #include <boost/serialization/version.hpp>
101 
102 namespace slip
103 {
104 
105 template<class Block>
106 class stride_iterator;
107 
108 // template<class Block>
109 // class iterator3d_box;
110 
111 template <class Block>
112 class DPoint3d;
113 
114 template <class Block>
115 class Point3d;
116 
117 template <class Block>
118 class Box3d;
119 
120 template <typename Block>
122 
123 template <typename Block>
124 class Matrix3d;
125 
126 template <typename Block>
127 std::ostream& operator<<(std::ostream & out, const slip::GenericMultiComponent3d<Block>& a);
128 
129 template<typename Block>
132 
133 template<typename Block>
136 
137 // template<typename Block>
138 // bool operator<(const GenericMultiComponent3d<Block>& x,
139 // const GenericMultiComponent3d<Block>& y);
140 
141 // template<typename Block>
142 // bool operator>(const GenericMultiComponent3d<Block>& x,
143 // const GenericMultiComponent3d<Block>& y);
144 
145 // template<typename Block>
146 // bool operator<=(const GenericMultiComponent3d<Block>& x,
147 // const GenericMultiComponent3d<Block>& y);
148 
149 // template<typename Block>
150 // bool operator>=(const GenericMultiComponent3d<Block>& x,
151 // const GenericMultiComponent3d<Block>& y);
152 
179 template <typename Block>
181 {
182 public :
183 
184  typedef Block value_type;
187  typedef value_type* pointer;
188  typedef value_type const * const_pointer;
190  typedef value_type const & const_reference;
191 
192  typedef ptrdiff_t difference_type;
193  typedef std::size_t size_type;
194 
195  typedef pointer iterator;
197 
198  typedef std::reverse_iterator<iterator> reverse_iterator;
199  typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
200 
201 
202  //slice, row and col iterator
215 
216  typedef std::reverse_iterator<slice_iterator> reverse_slice_iterator;
217  typedef std::reverse_iterator<const_slice_iterator> const_reverse_slice_iterator;
218  typedef std::reverse_iterator<iterator> reverse_row_iterator;
219  typedef std::reverse_iterator<const_iterator> const_reverse_row_iterator;
220  typedef std::reverse_iterator<col_iterator> reverse_col_iterator;
221  typedef std::reverse_iterator<const_col_iterator> const_reverse_col_iterator;
222  typedef std::reverse_iterator<slice_range_iterator> reverse_slice_range_iterator;
223  typedef std::reverse_iterator<const_slice_range_iterator> const_reverse_slice_range_iterator;
224  typedef std::reverse_iterator<row_range_iterator> reverse_row_range_iterator;
225  typedef std::reverse_iterator<const_row_range_iterator> const_reverse_row_range_iterator;
226  typedef std::reverse_iterator<col_range_iterator> reverse_col_range_iterator;
227  typedef std::reverse_iterator<const_col_range_iterator> const_reverse_col_range_iterator;
228 
229 #ifdef ALL_PLANE_ITERATOR3D
230  //generic 1d iterator
231  typedef slip::stride_iterator<pointer> iterator1d;
232  typedef slip::stride_iterator<const_pointer> const_iterator1d;
233  typedef std::reverse_iterator<iterator1d> reverse_iterator1d;
234  typedef std::reverse_iterator<const_iterator1d> const_reverse_iterator1d;
235 #endif //ALL_PLANE_ITERATOR3D
236 
237  //iterator 2d
240  typedef std::reverse_iterator<iterator2d> reverse_iterator2d;
241  typedef std::reverse_iterator<const_iterator2d> const_reverse_iterator2d;
242 
243  //iterator 3d
248 
249  typedef std::reverse_iterator<iterator3d> reverse_iterator3d;
250  typedef std::reverse_iterator<const_iterator3d> const_reverse_iterator3d;
251  typedef std::reverse_iterator<iterator3d_range> reverse_iterator3d_range;
252  typedef std::reverse_iterator<const_iterator3d_range> const_reverse_iterator3d_range;
253 
254  //Component iterators
255  typedef typename Block::value_type block_value_type;
262 
263  typedef std::reverse_iterator<component_iterator> reverse_component_iterator;
264  typedef std::reverse_iterator<const_component_iterator> const_reverse_component_iterator;
265 
266  //component slice, row and col iterator
267 
280 
281  typedef std::reverse_iterator<component_slice_iterator> reverse_component_slice_iterator;
282  typedef std::reverse_iterator<const_component_slice_iterator> const_reverse_component_slice_iterator;
283  typedef std::reverse_iterator<component_slice_range_iterator> reverse_component_slice_range_iterator;
284  typedef std::reverse_iterator<const_component_slice_range_iterator> const_reverse_component_slice_range_iterator;
285  typedef std::reverse_iterator<component_row_iterator> reverse_component_row_iterator;
286  typedef std::reverse_iterator<const_component_row_iterator> const_reverse_component_row_iterator;
287  typedef std::reverse_iterator<component_row_range_iterator> reverse_component_row_range_iterator;
288  typedef std::reverse_iterator<const_component_row_range_iterator> const_reverse_component_row_range_iterator;
289  typedef std::reverse_iterator<component_col_iterator> reverse_component_col_iterator;
290  typedef std::reverse_iterator<const_component_col_iterator> const_reverse_component_col_iterator;
291  typedef std::reverse_iterator<component_col_range_iterator> reverse_component_col_range_iterator;
292  typedef std::reverse_iterator<const_component_col_range_iterator> const_reverse_component_col_range_iterator;
293 
294  //component iterator 3d
295 
297  typedef std::reverse_iterator<component_iterator3d> reverse_component_iterator3d;
299  typedef std::reverse_iterator<const_component_iterator3d> const_reverse_component_iterator3d;
300 
302  typedef std::reverse_iterator<component_iterator3d_range> reverse_component_iterator3d_range;
304  typedef std::reverse_iterator<const_component_iterator3d_range> const_reverse_component_iterator3d_range;
305 
306 
307  //default iterator of the container
310 
311 
312  static const std::size_t DIM = 3;
313  static const std::size_t COMPONENTS = Block::SIZE;
314 
315 public:
320 
325 
333  const size_type rows,
334  const size_type cols);
335 
344  const size_type rows,
345  const size_type cols,
346  const Block& val);
347 
356  const size_type rows,
357  const size_type cols,
358  typename Block::const_pointer val);
359 
368  const size_type rows,
369  const size_type cols,
370  const Block* val);
371 
372 
384  template<typename InputIterator>
386  const size_type rows,
387  const size_type cols,
388  InputIterator first,
389  InputIterator last)
390  {
391  matrix_ = new slip::Matrix3d<Block>(slices,rows,cols,first,last);
392  }
393 
408  template<typename InputIterator>
410  const size_type rows,
411  const size_type cols,
412  std::vector<InputIterator> first_iterators_list,
413  InputIterator last)
414 
415  {
416  matrix_ = new slip::Matrix3d<Block>(slices,rows,cols);
417  this->fill(first_iterators_list,last);
418  }
419 
420 
424  GenericMultiComponent3d(const self& rhs);
425 
429  virtual ~GenericMultiComponent3d();
430 
431 
442  void resize(const size_type slices,
443  const size_type rows,
444  const size_type cols,
445  const Block& val = Block());
446 
451 
452  //****************************************************************************
453  // One dimensional iterators
454  //****************************************************************************
455 
456 
457 
458  //----------------------Global iterators------------------------------
459 
477  iterator begin();
478 
498  const_iterator begin() const;
499 
517  iterator end();
518 
534  const_iterator end() const;
535 
554 
573 
592 
611 
617  //--------------------One dimensional slice iterators----------------------
618 
638  slice_iterator slice_begin(const size_type row, const size_type col);
639 
659  const_slice_iterator slice_begin(const size_type row, const size_type col) const;
660 
680  slice_iterator slice_end(const size_type row, const size_type col);
681 
701  const_slice_iterator slice_end(const size_type row, const size_type col) const;
702 
703 
724 
744  const_reverse_slice_iterator slice_rbegin(const size_type row, const size_type col) const;
745 
766 
767 
787  const_reverse_slice_iterator slice_rend(const size_type row, const size_type col) const;
788 
795  //-------------------row iterators----------
796 
807  row_iterator row_begin(const size_type slice,
808  const size_type row);
809 
821  const size_type row) const;
822 
823 
834  row_iterator row_end(const size_type slice,
835  const size_type row);
836 
837 
849  const size_type row) const;
850 
851 
863  const size_type row);
864 
876  const size_type row) const;
877 
878 
890  const size_type row);
891 
892 
904  const size_type row) const;
905 
906 
912  //-------------------Constant col iterators----------
913 
924  col_iterator col_begin(const size_type slice,
925  const size_type col);
926 
927 
939  const size_type col) const;
940 
951  col_iterator col_end(const size_type slice,
952  const size_type col);
953 
954 
966  const size_type col) const;
967 
968 
980  const size_type col);
981 
982 
994  const size_type col) const;
995 
1007  const size_type col);
1008 
1009 
1021  const size_type col) const;
1022 
1023 
1030  //------------------------slice range iterators -----------------------
1031 
1059  const slip::Range<int>& range);
1060 
1061 
1088  slice_range_iterator slice_end(const size_type row,const size_type col,
1089  const slip::Range<int>& range);
1090 
1091 
1119  const slip::Range<int>& range) const;
1120 
1148  const slip::Range<int>& range) const;
1149 
1150 
1178  const slip::Range<int>& range);
1179 
1180 
1208  const slip::Range<int>& range);
1209 
1210 
1238  const slip::Range<int>& range) const;
1239 
1267  const slip::Range<int>& range) const;
1268 
1269 
1276  //------------------------row range iterators -----------------------
1277 
1302  row_range_iterator row_begin(const size_type slice,const size_type row,
1303  const slip::Range<int>& range);
1304 
1329  row_range_iterator row_end(const size_type slice,const size_type row,
1330  const slip::Range<int>& range);
1331 
1332 
1357  const_row_range_iterator row_begin(const size_type slice,const size_type row,
1358  const slip::Range<int>& range) const;
1359 
1360 
1384  const_row_range_iterator row_end(const size_type slice,const size_type row,
1385  const slip::Range<int>& range) const;
1386 
1402  const slip::Range<int>& range);
1403 
1404 
1422  const slip::Range<int>& range);
1423 
1424 
1425 
1440  const slip::Range<int>& range) const;
1441 
1442 
1459  const slip::Range<int>& range) const;
1460 
1466  //------------------------col range iterators -----------------------
1467 
1468 
1494  col_range_iterator col_begin(const size_type slice,const size_type col,
1495  const slip::Range<int>& range);
1496 
1523  col_range_iterator col_end(const size_type slice,const size_type col,
1524  const slip::Range<int>& range);
1525 
1526 
1552  const_col_range_iterator col_begin(const size_type slice,const size_type col,
1553  const slip::Range<int>& range) const;
1554 
1555 
1582  const_col_range_iterator col_end(const size_type slice,const size_type col,
1583  const slip::Range<int>& range) const;
1584 
1601  const slip::Range<int>& range);
1602 
1620  const slip::Range<int>& range);
1621 
1638  col_rbegin(const size_type slice,const size_type col,
1639  const slip::Range<int>& range) const;
1640 
1657  const slip::Range<int>& range) const;
1658 
1661  //****************************************************************************
1662  // One dimensional plane iterators
1663  //****************************************************************************
1664 
1669 
1670  //----------------------Global plane iterators------------------------------
1671 
1689  iterator plane_begin(const size_type slice);
1690 
1708  const_iterator plane_begin(const size_type slice) const;
1709 
1727  iterator plane_end(const size_type slice);
1728 
1746  const_iterator plane_end(const size_type slice) const;
1747 
1766 
1784  const_reverse_iterator plane_rbegin(const size_type slice) const;
1785 
1803  reverse_iterator plane_rend(const size_type slice);
1804 
1822  const_reverse_iterator plane_rend(const size_type slice) const;
1823 
1826 #ifdef ALL_PLANE_ITERATOR3D
1827 
1831  //-------------------row and col plane iterators----------
1832 
1845  const_iterator1d plane_row_begin(PLANE_ORIENTATION P, const size_type plane_coordinate,
1846  const size_type row) const;
1847 
1860  iterator1d plane_row_begin(PLANE_ORIENTATION P, const size_type plane_coordinate,
1861  const size_type row);
1862 
1872  iterator1d plane_row_end(PLANE_ORIENTATION P, const size_type plane_coordinate, const size_type row);
1873 
1886  const_iterator1d plane_row_end(PLANE_ORIENTATION P, const size_type plane_coordinate,const size_type row) const;
1887 
1888 
1901  reverse_iterator1d plane_row_rbegin(PLANE_ORIENTATION P, const size_type plane_coordinate,
1902  const size_type row);
1903 
1916  const_reverse_iterator1d plane_row_rbegin(PLANE_ORIENTATION P, const size_type plane_coordinate,
1917  const size_type row) const;
1918 
1930  reverse_iterator1d plane_row_rend(PLANE_ORIENTATION P, const size_type plane_coordinate, const size_type row);
1931 
1944  const_reverse_iterator1d plane_row_rend(PLANE_ORIENTATION P, const size_type plane_coordinate,const size_type row) const;
1945 
1958  iterator1d plane_col_begin(PLANE_ORIENTATION P, const size_type plane_coordinate,
1959  const size_type col);
1960 
1973  const_iterator1d plane_col_begin(PLANE_ORIENTATION P, const size_type plane_coordinate,
1974  const size_type col) const;
1975 
1987  iterator1d plane_col_end(PLANE_ORIENTATION P, const size_type plane_coordinate, const size_type col);
1988 
2001  const_iterator1d plane_col_end(PLANE_ORIENTATION P, const size_type plane_coordinate,const size_type col) const;
2002 
2003 
2016  reverse_iterator1d plane_col_rbegin(PLANE_ORIENTATION P, const size_type plane_coordinate,
2017  const size_type col);
2018 
2031  const_reverse_iterator1d plane_col_rbegin(PLANE_ORIENTATION P, const size_type plane_coordinate,
2032  const size_type col) const;
2033 
2045  reverse_iterator1d plane_col_rend(PLANE_ORIENTATION P, const size_type plane_coordinate, const size_type col);
2046 
2059  const_reverse_iterator1d plane_col_rend(PLANE_ORIENTATION P, const size_type plane_coordinate,const size_type col) const;
2060 
2067  //-------------------plane box iterators----------
2068 
2069 
2070 
2083  const_iterator1d plane_row_begin(PLANE_ORIENTATION P, const size_type plane_coordinate,
2084  const size_type row, const Box2d<int> & b) const;
2085 
2099  iterator1d plane_row_begin(PLANE_ORIENTATION P, const size_type plane_coordinate,
2100  const size_type row, const Box2d<int> & b);
2101 
2102 
2103 
2115  iterator1d plane_row_end(PLANE_ORIENTATION P, const size_type plane_coordinate,
2116  const size_type row, const Box2d<int> & b);
2117 
2131  const_iterator1d plane_row_end(PLANE_ORIENTATION P, const size_type plane_coordinate,
2132  const size_type row, const Box2d<int> & b) const;
2133 
2134 
2149  reverse_iterator1d plane_row_rbegin(PLANE_ORIENTATION P, const size_type plane_coordinate,
2150  const size_type row, const Box2d<int> & b);
2151 
2165  const_reverse_iterator1d plane_row_rbegin(PLANE_ORIENTATION P, const size_type plane_coordinate,
2166  const size_type row, const Box2d<int> & b) const;
2167 
2180  reverse_iterator1d plane_row_rend(PLANE_ORIENTATION P, const size_type plane_coordinate,
2181  const size_type row, const Box2d<int> & b);
2182 
2196  const_reverse_iterator1d plane_row_rend(PLANE_ORIENTATION P, const size_type plane_coordinate,
2197  const size_type row, const Box2d<int> & b) const;
2198 
2212  iterator1d plane_col_begin(PLANE_ORIENTATION P, const size_type plane_coordinate,
2213  const size_type col, const Box2d<int> & b);
2214 
2227  const_iterator1d plane_col_begin(PLANE_ORIENTATION P, const size_type plane_coordinate,
2228  const size_type col, const Box2d<int> & b) const;
2229 
2242  iterator1d plane_col_end(PLANE_ORIENTATION P, const size_type plane_coordinate,
2243  const size_type col, const Box2d<int> & b);
2244 
2258  const_iterator1d plane_col_end(PLANE_ORIENTATION P, const size_type plane_coordinate,
2259  const size_type col, const Box2d<int> & b) const;
2260 
2261 
2275  reverse_iterator1d plane_col_rbegin(PLANE_ORIENTATION P, const size_type plane_coordinate,
2276  const size_type col, const Box2d<int> & b);
2277 
2291  const_reverse_iterator1d plane_col_rbegin(PLANE_ORIENTATION P, const size_type plane_coordinate,
2292  const size_type col, const Box2d<int> & b) const;
2293 
2306  reverse_iterator1d plane_col_rend(PLANE_ORIENTATION P, const size_type plane_coordinate,
2307  const size_type col, const Box2d<int> & b);
2308 
2322  const_reverse_iterator1d plane_col_rend(PLANE_ORIENTATION P, const size_type plane_coordinate,
2323  const size_type col, const Box2d<int> & b) const;
2324 
2325 
2328 #endif //ALL_PLANE_ITERATOR3D
2329 
2330  //****************************************************************************
2331  // Two dimensional plane iterators
2332  //****************************************************************************
2333 
2338 
2339  //------------------------ Global iterators------------------------------------
2340 
2360  iterator2d plane_upper_left(PLANE_ORIENTATION P, const size_type plane_coordinate);
2361 
2381  iterator2d plane_bottom_right(PLANE_ORIENTATION P, const size_type plane_coordinate);
2382 
2402  const_iterator2d plane_upper_left(PLANE_ORIENTATION P, const size_type plane_coordinate) const;
2403 
2423  const_iterator2d plane_bottom_right(PLANE_ORIENTATION P, const size_type plane_coordinate) const;
2424 
2444 
2464 
2483  const_reverse_iterator2d plane_rupper_left(PLANE_ORIENTATION P, const size_type plane_coordinate) const;
2484 
2504 
2511 
2512  //------------------------ Box iterators------------------------------------
2513 
2536  iterator2d plane_upper_left(PLANE_ORIENTATION P, const size_type plane_coordinate
2537  , const Box2d<int> & b);
2538 
2561  iterator2d plane_bottom_right(PLANE_ORIENTATION P, const size_type plane_coordinate
2562  , const Box2d<int> & b);
2563 
2587  , const Box2d<int> & b) const;
2588 
2612  , const Box2d<int> & b) const;
2613 
2637  , const Box2d<int> & b);
2638 
2662  , const Box2d<int> & b);
2663 
2687  , const Box2d<int> & b) const;
2688 
2712  , const Box2d<int> & b) const;
2713 
2716  //****************************************************************************
2717  // Three dimensional iterators
2718  //****************************************************************************
2719 
2724 
2725  //------------------------ Global iterators------------------------------------
2726 
2744 
2745 
2763 
2764 
2782 
2783 
2801 
2819 
2837 
2855 
2856 
2874 
2881 
2882  //------------------------ Box iterators------------------------------------
2883 
2906 
2907 
2931 
2932 
2955  const_iterator3d front_upper_left(const Box3d<int>& box) const;
2956 
2957 
2980  const_iterator3d back_bottom_right(const Box3d<int>& box) const;
2981 
2982 
2983 
3007 
3031 
3055 
3056 
3080 
3081 
3089 
3090  //------------------------ Range iterators------------------------------------
3091 
3118  iterator3d_range front_upper_left(const Range<int>& slice_range, const Range<int>& row_range,
3119  const Range<int>& col_range);
3120 
3147  iterator3d_range back_bottom_right(const Range<int>& slice_range, const Range<int>& row_range,
3148  const Range<int>& col_range);
3149 
3176  const_iterator3d_range front_upper_left(const Range<int>& slice_range, const Range<int>& row_range,
3177  const Range<int>& col_range) const;
3178 
3179 
3206  const_iterator3d_range back_bottom_right(const Range<int>& slice_range, const Range<int>& row_range,
3207  const Range<int>& col_range) const;
3208 
3236  reverse_iterator3d_range rfront_upper_left(const Range<int>& slice_range, const Range<int>& row_range,
3237  const Range<int>& col_range);
3238 
3266  reverse_iterator3d_range rback_bottom_right(const Range<int>& slice_range, const Range<int>& row_range,
3267  const Range<int>& col_range);
3268 
3296  const_reverse_iterator3d_range rfront_upper_left(const Range<int>& slice_range, const Range<int>& row_range,
3297  const Range<int>& col_range) const;
3298 
3326  const_reverse_iterator3d_range rback_bottom_right(const Range<int>& slice_range, const Range<int>& row_range,
3327  const Range<int>& col_range) const;
3328 
3329 
3332  //**************************************************************************************************************
3333  //**************************************************************************************************************
3334  //************************ Component iterator ***********************************
3335  //**************************************************************************************************************
3336  //**************************************************************************************************************
3337 
3342 
3343  //------------------------ Component iterators------------------------------------
3344 
3352  component_iterator begin(const std::size_t component);
3353 
3361  const_component_iterator begin(const std::size_t component) const;
3362 
3370  component_iterator end(const std::size_t component);
3371 
3379  const_component_iterator end(const std::size_t component) const;
3380 
3388  reverse_component_iterator rbegin(const std::size_t component);
3389 
3397  const_reverse_component_iterator rbegin(const std::size_t component) const;
3398 
3406  reverse_component_iterator rend(const std::size_t component);
3407 
3415  const_reverse_component_iterator rend(const std::size_t component) const;
3416 
3417 
3418 
3425  //--------------------One dimensional component slice iterators----------------------
3426 
3436  component_slice_iterator slice_begin(const std::size_t component, const size_type row, const size_type col);
3437 
3447  const_component_slice_iterator slice_begin(const std::size_t component, const size_type row, const size_type col) const;
3448 
3458  component_slice_iterator slice_end(const std::size_t component, const size_type row, const size_type col);
3459 
3469  const_component_slice_iterator slice_end(const std::size_t component, const size_type row, const size_type col) const;
3470 
3471 
3481  reverse_component_slice_iterator slice_rbegin(const std::size_t component, const size_type row, const size_type col);
3482 
3492  const_reverse_component_slice_iterator slice_rbegin(const std::size_t component, const size_type row, const size_type col) const;
3493 
3503  reverse_component_slice_iterator slice_rend(const std::size_t component, const size_type row, const size_type col);
3504 
3505 
3515  const_reverse_component_slice_iterator slice_rend(const std::size_t component, const size_type row, const size_type col) const;
3516 
3523  //-------------------row component iterators----------
3524 
3534  component_row_iterator row_begin(const std::size_t component, const size_type slice,
3535  const size_type row);
3536 
3546  const_component_row_iterator row_begin(const std::size_t component, const size_type slice,
3547  const size_type row) const;
3548 
3549 
3559  component_row_iterator row_end(const std::size_t component, const size_type slice,
3560  const size_type row);
3561 
3562 
3573  const_component_row_iterator row_end(const std::size_t component, const size_type slice,
3574  const size_type row) const;
3575 
3576 
3586  reverse_component_row_iterator row_rbegin(const std::size_t component, const size_type slice,
3587  const size_type row);
3588 
3598  const_reverse_component_row_iterator row_rbegin(const std::size_t component, const size_type slice,
3599  const size_type row) const;
3600 
3601 
3611  reverse_component_row_iterator row_rend(const std::size_t component, const size_type slice,
3612  const size_type row);
3613 
3614 
3624  const_reverse_component_row_iterator row_rend(const std::size_t component, const size_type slice,
3625  const size_type row) const;
3626 
3627 
3633  //-------------------Constant component col iterators----------
3634 
3644  component_col_iterator col_begin(const std::size_t component, const size_type slice,
3645  const size_type col);
3646 
3647 
3657  const_component_col_iterator col_begin(const std::size_t component, const size_type slice,
3658  const size_type col) const;
3659 
3669  component_col_iterator col_end(const std::size_t component, const size_type slice,
3670  const size_type col);
3671 
3672 
3682  const_component_col_iterator col_end(const std::size_t component, const size_type slice,
3683  const size_type col) const;
3684 
3685 
3695  reverse_component_col_iterator col_rbegin(const std::size_t component, const size_type slice,
3696  const size_type col);
3697 
3698 
3708  const_reverse_component_col_iterator col_rbegin(const std::size_t component, const size_type slice,
3709  const size_type col) const;
3710 
3720  reverse_component_col_iterator col_rend(const std::size_t component, const size_type slice,
3721  const size_type col);
3722 
3723 
3733  const_reverse_component_col_iterator col_rend(const std::size_t component, const size_type slice,
3734  const size_type col) const;
3735 
3736 
3743  //------------------------component slice range iterators -----------------------
3744 
3771  component_slice_range_iterator slice_begin(const std::size_t component, const size_type row,const size_type col,
3772  const slip::Range<int>& range);
3773 
3774 
3801  component_slice_range_iterator slice_end(const std::size_t component, const size_type row,const size_type col,
3802  const slip::Range<int>& range);
3803 
3804 
3829  const_component_slice_range_iterator slice_begin(const std::size_t component, const size_type row,const size_type col,
3830  const slip::Range<int>& range) const;
3831 
3856  const_component_slice_range_iterator slice_end(const std::size_t component, const size_type row,const size_type col,
3857  const slip::Range<int>& range) const;
3858 
3859 
3877  reverse_component_slice_range_iterator slice_rbegin(const std::size_t component, const size_type row,const size_type col,
3878  const slip::Range<int>& range);
3879 
3880 
3898  reverse_component_slice_range_iterator slice_rend(const std::size_t component, const size_type row,const size_type col,
3899  const slip::Range<int>& range);
3900 
3901 
3919  const_reverse_component_slice_range_iterator slice_rbegin(const std::size_t component, const size_type row,const size_type col,
3920  const slip::Range<int>& range) const;
3921 
3939  const_reverse_component_slice_range_iterator slice_rend(const std::size_t component, const size_type row,const size_type col,
3940  const slip::Range<int>& range) const;
3941 
3942 
3949  //------------------------component row range iterators -----------------------
3950 
3976  component_row_range_iterator row_begin(const std::size_t component, const size_type slice,const size_type row,
3977  const slip::Range<int>& range);
3978 
4004  component_row_range_iterator row_end(const std::size_t component, const size_type slice,const size_type row,
4005  const slip::Range<int>& range);
4006 
4007 
4033  const_component_row_range_iterator row_begin(const std::size_t component, const size_type slice,const size_type row,
4034  const slip::Range<int>& range) const;
4035 
4036 
4061  const_component_row_range_iterator row_end(const std::size_t component, const size_type slice,const size_type row,
4062  const slip::Range<int>& range) const;
4063 
4079  reverse_component_row_range_iterator row_rbegin(const std::size_t component, const size_type slice,const size_type row,
4080  const slip::Range<int>& range);
4081 
4082 
4100  reverse_component_row_range_iterator row_rend(const std::size_t component, const size_type slice,const size_type row,
4101  const slip::Range<int>& range);
4102 
4103 
4104 
4119  const_reverse_component_row_range_iterator row_rbegin(const std::size_t component, const size_type slice,const size_type row,
4120  const slip::Range<int>& range) const;
4121 
4122 
4139  const_reverse_component_row_range_iterator row_rend(const std::size_t component, const size_type slice,const size_type row,
4140  const slip::Range<int>& range) const;
4141 
4147  //------------------------component col range iterators -----------------------
4148 
4149 
4175  component_col_range_iterator col_begin(const std::size_t component, const size_type slice,const size_type col,
4176  const slip::Range<int>& range);
4177 
4204  component_col_range_iterator col_end(const std::size_t component, const size_type slice,const size_type col,
4205  const slip::Range<int>& range);
4206 
4207 
4233  const_component_col_range_iterator col_begin(const std::size_t component, const size_type slice,const size_type col,
4234  const slip::Range<int>& range) const;
4235 
4236 
4263  const_component_col_range_iterator col_end(const std::size_t component, const size_type slice,const size_type col,
4264  const slip::Range<int>& range) const;
4265 
4282  reverse_component_col_range_iterator col_rbegin(const std::size_t component, const size_type slice,const size_type col,
4283  const slip::Range<int>& range);
4284 
4302  reverse_component_col_range_iterator col_rend(const std::size_t component, const size_type slice,const size_type col,
4303  const slip::Range<int>& range);
4304 
4321  const_reverse_component_col_range_iterator col_rbegin(const std::size_t component, const size_type slice,const size_type col,
4322  const slip::Range<int>& range) const;
4323 
4340  const_reverse_component_col_range_iterator col_rend(const std::size_t component, const size_type slice,const size_type col,
4341  const slip::Range<int>& range) const;
4342 
4345  //****************************************************************************
4346  // One dimensional component plane iterators
4347  //****************************************************************************
4348 
4353 
4354  //----------------------Component global plane iterators------------------------------
4355 
4364  component_iterator plane_begin(const std::size_t component, const size_type slice);
4365 
4374  const_component_iterator plane_begin(const std::size_t component, const size_type slice) const;
4375 
4384  component_iterator plane_end(const std::size_t component, const size_type slice);
4385 
4394  const_component_iterator plane_end(const std::size_t component, const size_type slice) const;
4395 
4396 
4405  reverse_component_iterator plane_rbegin(const std::size_t component, const size_type slice);
4406 
4415  const_reverse_component_iterator plane_rbegin(const std::size_t component, const size_type slice) const;
4416 
4425  reverse_component_iterator plane_rend(const std::size_t component, const size_type slice);
4426 
4435  const_reverse_component_iterator plane_rend(const std::size_t component, const size_type slice) const;
4436 
4439  //****************************************************************************
4440  // Three dimensional component iterators
4441  //****************************************************************************
4442 
4447 
4448  //------------------------ Global component iterators------------------------------------
4449 
4467  component_iterator3d front_upper_left(const std::size_t component);
4468 
4487  component_iterator3d back_bottom_right(const std::size_t component);
4488 
4499  const_component_iterator3d front_upper_left(const std::size_t component) const;
4500 
4511  const_component_iterator3d back_bottom_right(const std::size_t component) const;
4512 
4523  reverse_component_iterator3d rfront_upper_left(const std::size_t component);
4524 
4535  reverse_component_iterator3d rback_bottom_right(const std::size_t component);
4536 
4547  const_reverse_component_iterator3d rfront_upper_left(const std::size_t component) const;
4548 
4549 
4560  const_reverse_component_iterator3d rback_bottom_right(const std::size_t component) const;
4561 
4562  //------------------------ Box component iterators------------------------------------
4563 
4578  component_iterator3d front_upper_left(const std::size_t component,
4579  const Box3d<int>& box);
4580 
4596  component_iterator3d back_bottom_right(const std::size_t component,
4597  const Box3d<int>& box);
4598 
4613  const_component_iterator3d front_upper_left(const std::size_t component,
4614  const Box3d<int>& box) const;
4615 
4630  const_component_iterator3d back_bottom_right(const std::size_t component,
4631  const Box3d<int>& box) const;
4632 
4648  reverse_component_iterator3d rfront_upper_left(const std::size_t component,
4649  const Box3d<int>& box);
4650 
4666  reverse_component_iterator3d rback_bottom_right(const std::size_t component,
4667  const Box3d<int>& box);
4668 
4684  const_reverse_component_iterator3d rfront_upper_left(const std::size_t component,
4685  const Box3d<int>& box) const;
4686 
4687 
4703  const_reverse_component_iterator3d rback_bottom_right(const std::size_t component,
4704  const Box3d<int>& box) const;
4705 
4706  //------------------------ Range component iterators------------------------------------
4707 
4725  component_iterator3d_range front_upper_left(const std::size_t component,
4726  const Range<int>& slice_range, const Range<int>& row_range,
4727  const Range<int>& col_range);
4728 
4746  component_iterator3d_range back_bottom_right(const std::size_t component,
4747  const Range<int>& slice_range, const Range<int>& row_range,
4748  const Range<int>& col_range);
4749 
4767  const_component_iterator3d_range front_upper_left(const std::size_t component,
4768  const Range<int>& slice_range, const Range<int>& row_range,
4769  const Range<int>& col_range) const;
4770 
4788  const_component_iterator3d_range back_bottom_right(const std::size_t component,
4789  const Range<int>& slice_range, const Range<int>& row_range,
4790  const Range<int>& col_range) const;
4791 
4809  reverse_component_iterator3d_range rfront_upper_left(const std::size_t component,
4810  const Range<int>& slice_range, const Range<int>& row_range,
4811  const Range<int>& col_range);
4812 
4830  reverse_component_iterator3d_range rback_bottom_right(const std::size_t component,
4831  const Range<int>& slice_range, const Range<int>& row_range,
4832  const Range<int>& col_range);
4833 
4851  const_reverse_component_iterator3d_range rfront_upper_left(const std::size_t component,
4852  const Range<int>& slice_range, const Range<int>& row_range,
4853  const Range<int>& col_range) const;
4854 
4873  const Range<int>& slice_range, const Range<int>& row_range,
4874  const Range<int>& col_range) const;
4875 
4882 
4888  friend std::ostream& operator<< <>(std::ostream & out, const self& a);
4889 
4896 
4905  self& operator=(const self & rhs);
4906 
4912  self& operator=(const Block& val);
4913 
4914 
4920  self& operator=(const typename Block::value_type& val);
4921 
4922 
4923 
4929  void fill(const Block& value)
4930  {
4931  std::fill_n(this->begin(),size(),value);
4932  }
4933 
4940  void fill(const typename Block::pointer value)
4941  {
4942  std::copy(value,value + size(), (typename Block::pointer)begin());
4943  }
4944 
4951  void fill(const Block* value)
4952  {
4953  std::copy(value,value + size(), this->begin());
4954  }
4955 
4964  template<typename InputIterator>
4965  void fill(InputIterator first,
4966  InputIterator last)
4967  {
4968  std::copy(first,last,this->begin());
4969  }
4970 
4979  template<typename InputIterator>
4980  void fill(std::vector<InputIterator> first_iterators_list,
4981  InputIterator last)
4982  {
4983  std::vector<typename slip::kstride_iterator<typename Block::pointer,Block::SIZE> > iterators_list(Block::SIZE);
4984 
4985  for(std::size_t component = 0; component < Block::SIZE; ++component)
4986  {
4987  iterators_list[component]= slip::kstride_iterator<typename Block::pointer,Block::SIZE>((typename Block::pointer)this->begin() + component);
4988  }
4989 
4990 
4991  while(first_iterators_list[0] != last)
4992  {
4993  for(std::size_t component = 0; component < Block::SIZE; ++component)
4994  {
4995  *iterators_list[component]++ = *first_iterators_list[component]++;
4996  }
4997  }
4998  iterators_list.clear();
4999  }
5000 
5001 
5011  template<typename InputIterator>
5012  void fill(std::size_t component,
5013  InputIterator first,
5014  InputIterator last)
5015  {
5016  std::copy(first,last,this->begin(component));
5017  }
5018 
5032  friend bool operator== <>(const GenericMultiComponent3d<Block>& x,
5034 
5042  friend bool operator!= <>(const GenericMultiComponent3d<Block>& x,
5044 
5045  // /*!
5046  // ** \brief Less than comparison operator (GenericMultiComponent3d ordering relation)
5047  // ** \param x A %GenericMultiComponent3d
5048  // ** \param y A %GenericMultiComponent3d of the same type of \a x
5049  // ** \return true iff \a x is lexicographically less than \a y
5050  // ** \pre x.size() == y.size()
5051  // */
5052  // friend bool operator< <>(const GenericMultiComponent3d<Block>& x,
5053  // const GenericMultiComponent3d<Block>& y);
5054 
5055  // /*!
5056  // ** \brief More than comparison operator
5057  // ** \param x A %GenericMultiComponent3d
5058  // ** \param y A %GenericMultiComponent3d of the same type of \a x
5059  // ** \return true iff y > x
5060  // ** \pre x.size() == y.size()
5061  // */
5062  // friend bool operator> <>(const GenericMultiComponent3d<Block>& x,
5063  // const GenericMultiComponent3d<Block>& y);
5064 
5065  // /*!
5066  // ** \brief Less than equal comparison operator
5067  // ** \param x A %GenericMultiComponent3d
5068  // ** \param y A %GenericMultiComponent3d of the same type of \a x
5069  // ** \return true iff !(y > x)
5070  // ** \pre x.size() == y.size()
5071  // */
5072  // friend bool operator<= <>(const GenericMultiComponent3d<Block>& x,
5073  // const GenericMultiComponent3d<Block>& y);
5074 
5075  // /*!
5076  // ** \brief More than equal comparison operator
5077  // ** \param x A %GenericMultiComponent3d
5078  // ** \param y A %GenericMultiComponent3d of the same type of \a x
5079  // ** \return true iff !(x < y)
5080  // ** \pre x.size() == y.size()
5081  // */
5082  // friend bool operator>= <>(const GenericMultiComponent3d<Block>& x,
5083  // const GenericMultiComponent3d<Block>& y);
5084 
5085 
5102  pointer* operator[](const size_type k);
5103 
5114  const_pointer const * operator[](const size_type k) const;
5115  // const_pointer* operator[](const size_type i) const ;
5129  reference operator()(const size_type k,
5130  const size_type i,
5131  const size_type j);
5132 
5147  const size_type i,
5148  const size_type j) const;
5149 
5156  size_type dim1() const;
5157 
5162  size_type slices() const;
5163 
5164 
5169  size_type dim2() const;
5170 
5171 
5176  size_type rows() const;
5177 
5178 
5183  size_type dim3() const;
5184 
5189  size_type columns() const;
5190 
5195  size_type cols() const;
5196 
5197 
5201  size_type size() const;
5202 
5206  size_type max_size() const;
5207 
5211  size_type slice_size() const;
5212 
5213 
5217  bool empty()const;
5218 
5223  void swap(self& M);
5224 
5225 
5231  Block min() const;
5232 
5233 
5239  Block max() const;
5240 
5241  // /*!
5242  // ** \brief Returns the sums of the elements of the %GenericMultiComponent3d
5243  // ** \pre size() != 0
5244  // */
5245  // Block sum() const;
5246 
5253  GenericMultiComponent3d<Block>& apply(Block(*fun)(Block));
5254 
5261  GenericMultiComponent3d<Block>& apply(Block(*fun)(const Block&));
5262 
5263 
5264 private:
5265  slip::Matrix3d<Block>* matrix_;
5266 
5267  private:
5268  friend class boost::serialization::access;
5269  template<class Archive>
5270  void save(Archive & ar, const unsigned int version) const
5271  {
5272  ar & this->matrix_;
5273  }
5274  template<class Archive>
5275  void load(Archive & ar, const unsigned int version)
5276  {
5277  ar & this->matrix_;
5278  }
5279  BOOST_SERIALIZATION_SPLIT_MEMBER();
5280 }; // end of MultiComponent3dContainer group
5282 }//slip::
5283 
5284 
5285 namespace slip
5286 {
5287 template<typename Block>
5288 inline
5290 matrix_(new slip::Matrix3d<Block>())
5291 {}
5292 
5293 template<typename Block>
5294 inline
5296  const typename GenericMultiComponent3d<Block>::size_type rows,
5297  const typename GenericMultiComponent3d<Block>::size_type cols):
5298  matrix_(new slip::Matrix3d<Block>(slices,rows,cols))
5299  {}
5300 
5301 template<typename Block>
5302 inline
5304  const typename GenericMultiComponent3d<Block>::size_type rows,
5305  const typename GenericMultiComponent3d<Block>::size_type cols,
5306  typename Block::const_pointer val):
5307  matrix_(new slip::Matrix3d<Block>(slices,rows,cols))
5308  {
5309  typename slip::Matrix3d<Block>::iterator it = matrix_->begin();
5310  typename slip::Matrix3d<Block>::iterator ite = matrix_->end();
5311 
5312  for(;it!=ite; it++)
5313  {
5314  for(typename GenericMultiComponent3d<Block>::size_type component = 0; component < Block::SIZE; ++component)
5315  {
5316  (*it)[component] = *val++;
5317  }
5318  }
5319  }
5320 
5321 template<typename Block>
5322 inline
5324  const typename GenericMultiComponent3d<Block>::size_type rows,
5325  const typename GenericMultiComponent3d<Block>::size_type cols,
5326  const Block& val):
5327  matrix_(new slip::Matrix3d<Block>(slices,rows,cols,val))
5328  {}
5329 
5330 template<typename Block>
5331 inline
5333  const typename GenericMultiComponent3d<Block>::size_type rows,
5334  const typename GenericMultiComponent3d<Block>::size_type cols,
5335  const Block* val):
5336  matrix_(new slip::Matrix3d<Block>(slices,rows,cols,val))
5337  {}
5338 
5339 template<typename Block>
5340 inline
5342 matrix_(new slip::Matrix3d<Block>((*rhs.matrix_)))
5343 {}
5344 
5345 template<typename Block>
5346 inline
5348 {
5349  delete matrix_;
5350 }
5351 
5352 template<typename Block>
5353 inline
5355 {
5356  if(this != &rhs)
5357  {
5358  *matrix_ = *(rhs.matrix_);
5359  }
5360  return *this;
5361 }
5362 
5363 template<typename Block>
5364 inline
5366 {
5367  std::fill_n(matrix_->begin(),matrix_->size(),val);
5368  return *this;
5369 }
5370 
5371 template<typename Block>
5372 inline
5374 {
5375  std::fill_n(matrix_->begin(),matrix_->size(),val);
5376  return *this;
5377 }
5378 
5379 template<typename Block>
5380 inline
5382  const typename GenericMultiComponent3d<Block>::size_type rows,
5383  const typename GenericMultiComponent3d<Block>::size_type cols,
5384  const Block& val)
5385  {
5386  matrix_->resize(slices,rows,cols,val);
5387  }
5388 
5390 // Iterators
5392 
5393 //****************************************************************************
5394 // One dimensional iterators
5395 //****************************************************************************
5396 
5397 
5398 
5399 //----------------------Global iterators------------------------------
5400 
5401 template<typename Block>
5402 inline
5405 {
5406  return matrix_->begin();
5407 }
5408 
5409 template<typename Block>
5410 inline
5413 {
5414  return matrix_->end();
5415 }
5416 
5417 template<typename Block>
5418 inline
5421 {
5422  Matrix3d<Block> const * tp(matrix_);
5423  return tp->begin();
5424 }
5425 
5426 template<typename Block>
5427 inline
5430 {
5431  Matrix3d<Block> const * tp(matrix_);
5432  return tp->end();
5433 }
5434 
5435 
5436 template<typename Block>
5437 inline
5440 {
5441  return typename GenericMultiComponent3d<Block>::reverse_iterator(this->end());
5442 }
5443 
5444 template<typename Block>
5445 inline
5448 {
5449  return typename GenericMultiComponent3d<Block>::reverse_iterator(this->begin());
5450 }
5451 
5452 template<typename Block>
5453 inline
5456 {
5457  return typename GenericMultiComponent3d<Block>::const_reverse_iterator(this->end());
5458 }
5459 
5460 template<typename Block>
5461 inline
5464 {
5465  return typename GenericMultiComponent3d<Block>::const_reverse_iterator(this->begin());
5466 }
5467 
5468 //--------------------slice iterators----------------------
5469 
5470 template<typename T>
5471 inline
5475  {
5476  return matrix_->slice_begin(row,col);
5477  }
5478 
5479 template<typename T>
5480 inline
5481 typename GenericMultiComponent3d<T>::const_slice_iterator
5482 GenericMultiComponent3d<T>::slice_begin(const GenericMultiComponent3d<T>::size_type row,
5483  const GenericMultiComponent3d<T>::size_type col) const
5484  {
5485  Matrix3d<T> const * tp(matrix_);
5486  return tp->slice_begin(row,col);
5487  }
5488 
5489 template<typename T>
5490 inline
5491 typename GenericMultiComponent3d<T>::slice_iterator
5492 GenericMultiComponent3d<T>::slice_end(const GenericMultiComponent3d<T>::size_type row,
5493  const GenericMultiComponent3d<T>::size_type col)
5494  {
5495  return matrix_->slice_end(row,col);
5496  }
5497 
5498 template<typename T>
5499 inline
5500 typename GenericMultiComponent3d<T>::const_slice_iterator
5501 GenericMultiComponent3d<T>::slice_end(const GenericMultiComponent3d<T>::size_type row,
5502  const GenericMultiComponent3d<T>::size_type col) const
5503  {
5504  Matrix3d<T> const * tp(matrix_);
5505  return tp->slice_end(row,col);
5506  }
5507 
5508 
5509 template<typename T>
5510 inline
5511 typename GenericMultiComponent3d<T>::reverse_slice_iterator
5512 GenericMultiComponent3d<T>::slice_rbegin(const GenericMultiComponent3d<T>::size_type row,
5513  const GenericMultiComponent3d<T>::size_type col)
5514  {
5515  return matrix_->slice_rbegin(row,col);
5516  }
5517 
5518 template<typename T>
5519 inline
5520 typename GenericMultiComponent3d<T>::const_reverse_slice_iterator
5521 GenericMultiComponent3d<T>::slice_rbegin(const GenericMultiComponent3d<T>::size_type row,
5522  const GenericMultiComponent3d<T>::size_type col) const
5523  {
5524  Matrix3d<T> const * tp(matrix_);
5525  return tp->slice_rbegin(row,col);
5526  }
5527 
5528 template<typename T>
5529 inline
5530 typename GenericMultiComponent3d<T>::reverse_slice_iterator
5531 GenericMultiComponent3d<T>::slice_rend(const GenericMultiComponent3d<T>::size_type row,
5532  const GenericMultiComponent3d<T>::size_type col)
5533  {
5534  return matrix_->slice_rend(row,col);
5535  }
5536 
5537 
5538 template<typename T>
5539 inline
5540 typename GenericMultiComponent3d<T>::const_reverse_slice_iterator
5541 GenericMultiComponent3d<T>::slice_rend(const GenericMultiComponent3d<T>::size_type row,
5542  const GenericMultiComponent3d<T>::size_type col) const
5543  {
5544  Matrix3d<T> const * tp(matrix_);
5545  return tp->slice_rend(row,col);
5546  }
5547 
5548 //--------------------row iterators----------------------
5549 
5550 
5551 template<typename Block>
5552 inline
5553 typename GenericMultiComponent3d<Block>::row_iterator
5554 GenericMultiComponent3d<Block>::row_begin(const typename GenericMultiComponent3d<Block>::size_type slice,
5555  const typename GenericMultiComponent3d<Block>::size_type row)
5556  {
5557  return matrix_->row_begin(slice,row);
5558  }
5559 
5560 template<typename Block>
5561 inline
5562 typename GenericMultiComponent3d<Block>::const_row_iterator
5563 GenericMultiComponent3d<Block>::row_begin(const typename GenericMultiComponent3d<Block>::size_type slice,
5564  const typename GenericMultiComponent3d<Block>::size_type row) const
5565  {
5566  Matrix3d<Block> const * tp(matrix_);
5567  return tp->row_begin(slice,row);
5568  }
5569 
5570 template<typename Block>
5571 inline
5572 typename GenericMultiComponent3d<Block>::row_iterator
5573 GenericMultiComponent3d<Block>::row_end(const typename GenericMultiComponent3d<Block>::size_type slice,
5574  const typename GenericMultiComponent3d<Block>::size_type row)
5575  {
5576  return matrix_->row_end(slice,row);
5577  }
5578 
5579 template<typename Block>
5580 inline
5581 typename GenericMultiComponent3d<Block>::const_row_iterator
5582 GenericMultiComponent3d<Block>::row_end(const typename GenericMultiComponent3d<Block>::size_type slice,
5583  const typename GenericMultiComponent3d<Block>::size_type row) const
5584  {
5585  Matrix3d<Block> const * tp(matrix_);
5586  return tp->row_end(slice,row);
5587  }
5588 
5589 
5590 template<typename Block>
5591 inline
5592 typename GenericMultiComponent3d<Block>::reverse_row_iterator
5593 GenericMultiComponent3d<Block>::row_rbegin(const typename GenericMultiComponent3d<Block>::size_type slice,
5594  const typename GenericMultiComponent3d<Block>::size_type row)
5595  {
5596  return matrix_->row_rbegin(slice,row);
5597  }
5598 
5599 template<typename Block>
5600 inline
5601 typename GenericMultiComponent3d<Block>::const_reverse_row_iterator
5602 GenericMultiComponent3d<Block>::row_rbegin(const typename GenericMultiComponent3d<Block>::size_type slice,
5603  const typename GenericMultiComponent3d<Block>::size_type row) const
5604  {
5605  Matrix3d<Block> const * tp(matrix_);
5606  return tp->row_rbegin(slice,row);
5607  }
5608 
5609 
5610 template<typename Block>
5611 inline
5612 typename GenericMultiComponent3d<Block>::reverse_row_iterator
5613 GenericMultiComponent3d<Block>::row_rend(const typename GenericMultiComponent3d<Block>::size_type slice,
5614  const typename GenericMultiComponent3d<Block>::size_type row)
5615  {
5616  return matrix_->row_rend(slice,row);
5617  }
5618 
5619 template<typename Block>
5620 inline
5621 typename GenericMultiComponent3d<Block>::const_reverse_row_iterator
5622 GenericMultiComponent3d<Block>::row_rend(const typename GenericMultiComponent3d<Block>::size_type slice,
5623  const typename GenericMultiComponent3d<Block>::size_type row) const
5624  {
5625  Matrix3d<Block> const * tp(matrix_);
5626  return tp->row_rend(slice,row);
5627  }
5628 
5629 //-------------------- col iterators----------------------
5630 
5631 template<typename Block>
5632 inline
5633 typename GenericMultiComponent3d<Block>::col_iterator
5634 GenericMultiComponent3d<Block>::col_begin(const typename GenericMultiComponent3d<Block>::size_type slice,
5635  const typename GenericMultiComponent3d<Block>::size_type col)
5636  {
5637  return matrix_->col_begin(slice,col);
5638  }
5639 
5640 template<typename Block>
5641 inline
5642 typename GenericMultiComponent3d<Block>::const_col_iterator
5643 GenericMultiComponent3d<Block>::col_begin(const typename GenericMultiComponent3d<Block>::size_type slice,
5644  const typename GenericMultiComponent3d<Block>::size_type col) const
5645  {
5646  Matrix3d<Block> const * tp(matrix_);
5647  return tp->col_begin(slice,col);
5648  }
5649 
5650 
5651 template<typename Block>
5652 inline
5653 typename GenericMultiComponent3d<Block>::col_iterator
5654 GenericMultiComponent3d<Block>::col_end(const typename GenericMultiComponent3d<Block>::size_type slice,
5655  const typename GenericMultiComponent3d<Block>::size_type col)
5656  {
5657  return matrix_->col_end(slice,col);
5658  }
5659 
5660 template<typename Block>
5661 inline
5662 typename GenericMultiComponent3d<Block>::const_col_iterator
5663 GenericMultiComponent3d<Block>::col_end(const typename GenericMultiComponent3d<Block>::size_type slice,
5664  const typename GenericMultiComponent3d<Block>::size_type col) const
5665  {
5666  Matrix3d<Block> const * tp(matrix_);
5667  return tp->col_end(slice,col);
5668  }
5669 
5670 
5671 template<typename Block>
5672 inline
5673 typename GenericMultiComponent3d<Block>::reverse_col_iterator
5674 GenericMultiComponent3d<Block>::col_rbegin(const typename GenericMultiComponent3d<Block>::size_type slice,
5675  const typename GenericMultiComponent3d<Block>::size_type col)
5676  {
5677  return matrix_->col_rbegin(slice,col);
5678  }
5679 
5680 template<typename Block>
5681 inline
5682 typename GenericMultiComponent3d<Block>::const_reverse_col_iterator
5683 GenericMultiComponent3d<Block>::col_rbegin(const typename GenericMultiComponent3d<Block>::size_type slice,
5684  const typename GenericMultiComponent3d<Block>::size_type col) const
5685  {
5686  Matrix3d<Block> const * tp(matrix_);
5687  return tp->col_rbegin(slice,col);
5688  }
5689 
5690 
5691 template<typename Block>
5692 inline
5693 typename GenericMultiComponent3d<Block>::reverse_col_iterator
5694 GenericMultiComponent3d<Block>::col_rend(const typename GenericMultiComponent3d<Block>::size_type slice,
5695  const typename GenericMultiComponent3d<Block>::size_type col)
5696  {
5697  return matrix_->col_rend(slice,col);
5698  }
5699 
5700 template<typename Block>
5701 inline
5702 typename GenericMultiComponent3d<Block>::const_reverse_col_iterator
5703 GenericMultiComponent3d<Block>::col_rend(const typename GenericMultiComponent3d<Block>::size_type slice,
5704  const typename GenericMultiComponent3d<Block>::size_type col) const
5705  {
5706  Matrix3d<Block> const * tp(matrix_);
5707  return tp->col_rend(slice,col);
5708  }
5709 
5710 //--------------------Constant slice range iterators----------------------
5711 
5712 template<typename Block>
5713 inline
5714 typename GenericMultiComponent3d<Block>::slice_range_iterator
5715 GenericMultiComponent3d<Block>::slice_begin(const typename GenericMultiComponent3d<Block>::size_type row,
5716  const typename GenericMultiComponent3d<Block>::size_type col,
5717  const slip::Range<int>& range)
5718  {
5719  return matrix_->slice_begin(row,col,range);
5720  }
5721 
5722 template<typename Block>
5723 inline
5724 typename GenericMultiComponent3d<Block>::const_slice_range_iterator
5725 GenericMultiComponent3d<Block>::slice_begin(const typename GenericMultiComponent3d<Block>::size_type row,
5726  const typename GenericMultiComponent3d<Block>::size_type col,
5727  const slip::Range<int>& range) const
5728  {
5729  Matrix3d<Block> const * tp(matrix_);
5730  return tp->slice_begin(row,col,range);
5731  }
5732 
5733 template<typename Block>
5734 inline
5735 typename GenericMultiComponent3d<Block>::slice_range_iterator
5736 GenericMultiComponent3d<Block>::slice_end(const typename GenericMultiComponent3d<Block>::size_type row,
5737  const typename GenericMultiComponent3d<Block>::size_type col,
5738  const slip::Range<int>& range)
5739  {
5740  return matrix_->slice_end(row,col,range);
5741  }
5742 
5743 template<typename Block>
5744 inline
5745 typename GenericMultiComponent3d<Block>::const_slice_range_iterator
5746 GenericMultiComponent3d<Block>::slice_end(const typename GenericMultiComponent3d<Block>::size_type row,
5747  const typename GenericMultiComponent3d<Block>::size_type col,
5748  const slip::Range<int>& range) const
5749  {
5750  Matrix3d<Block> const * tp(matrix_);
5751  return tp->slice_end(row,col,range);
5752  }
5753 
5754 template<typename Block>
5755 inline
5756 typename GenericMultiComponent3d<Block>::reverse_slice_range_iterator
5757 GenericMultiComponent3d<Block>::slice_rbegin(const typename GenericMultiComponent3d<Block>::size_type row,
5758  const typename GenericMultiComponent3d<Block>::size_type col,
5759  const slip::Range<int>& range)
5760  {
5761  return matrix_->slice_rbegin(row,col,range);
5762  }
5763 
5764 template<typename Block>
5765 inline
5766 typename GenericMultiComponent3d<Block>::const_reverse_slice_range_iterator
5767 GenericMultiComponent3d<Block>::slice_rbegin(const typename GenericMultiComponent3d<Block>::size_type row,
5768  const typename GenericMultiComponent3d<Block>::size_type col,
5769  const slip::Range<int>& range) const
5770  {
5771  Matrix3d<Block> const * tp(matrix_);
5772  return tp->slice_rbegin(row,col,range);
5773  }
5774 
5775 template<typename Block>
5776 inline
5777 typename GenericMultiComponent3d<Block>::reverse_slice_range_iterator
5778 GenericMultiComponent3d<Block>::slice_rend(const typename GenericMultiComponent3d<Block>::size_type row,
5779  const typename GenericMultiComponent3d<Block>::size_type col,
5780  const slip::Range<int>& range)
5781  {
5782  return matrix_->slice_rend(row,col,range);
5783  }
5784 
5785 template<typename Block>
5786 inline
5787 typename GenericMultiComponent3d<Block>::const_reverse_slice_range_iterator
5788 GenericMultiComponent3d<Block>::slice_rend(const typename GenericMultiComponent3d<Block>::size_type row,
5789  const typename GenericMultiComponent3d<Block>::size_type col,
5790  const slip::Range<int>& range) const
5791  {
5792  Matrix3d<Block> const * tp(matrix_);
5793  return tp->slice_rend(row,col,range);
5794  }
5795 
5796 
5797 //--------------------row range iterators----------------------
5798 
5799 template<typename Block>
5800 inline
5801 typename GenericMultiComponent3d<Block>::row_range_iterator
5802 GenericMultiComponent3d<Block>::row_begin(const typename GenericMultiComponent3d<Block>::size_type slice,
5803  const typename GenericMultiComponent3d<Block>::size_type row,
5804  const slip::Range<int>& range)
5805  {
5806  return matrix_->row_begin(slice,row,range);
5807  }
5808 
5809 template<typename Block>
5810 inline
5811 typename GenericMultiComponent3d<Block>::const_row_range_iterator
5812 GenericMultiComponent3d<Block>::row_begin(const typename GenericMultiComponent3d<Block>::size_type slice,
5813  const typename GenericMultiComponent3d<Block>::size_type row,
5814  const slip::Range<int>& range) const
5815  {
5816  Matrix3d<Block> const * tp(matrix_);
5817  return tp->row_begin(slice,row,range);
5818  }
5819 
5820 template<typename Block>
5821 inline
5822 typename GenericMultiComponent3d<Block>::row_range_iterator
5823 GenericMultiComponent3d<Block>::row_end(const typename GenericMultiComponent3d<Block>::size_type slice,
5824  const typename GenericMultiComponent3d<Block>::size_type row,
5825  const slip::Range<int>& range)
5826  {
5827  return matrix_->row_end(slice,row,range);
5828  }
5829 
5830 template<typename Block>
5831 inline
5832 typename GenericMultiComponent3d<Block>::const_row_range_iterator
5833 GenericMultiComponent3d<Block>::row_end(const typename GenericMultiComponent3d<Block>::size_type slice,
5834  const typename GenericMultiComponent3d<Block>::size_type row,
5835  const slip::Range<int>& range) const
5836  {
5837  Matrix3d<Block> const * tp(matrix_);
5838  return tp->row_end(slice,row,range);
5839  }
5840 
5841 template<typename Block>
5842 inline
5843 typename GenericMultiComponent3d<Block>::reverse_row_range_iterator
5844 GenericMultiComponent3d<Block>::row_rbegin(const typename GenericMultiComponent3d<Block>::size_type slice,
5845  const typename GenericMultiComponent3d<Block>::size_type row,
5846  const slip::Range<int>& range)
5847  {
5848  return matrix_->row_rbegin(slice,row,range);
5849  }
5850 
5851 template<typename Block>
5852 inline
5853 typename GenericMultiComponent3d<Block>::const_reverse_row_range_iterator
5854 GenericMultiComponent3d<Block>::row_rbegin(const typename GenericMultiComponent3d<Block>::size_type slice,
5855  const typename GenericMultiComponent3d<Block>::size_type row,
5856  const slip::Range<int>& range) const
5857  {
5858  Matrix3d<Block> const * tp(matrix_);
5859  return tp->row_rbegin(slice,row,range);
5860  }
5861 
5862 template<typename Block>
5863 inline
5864 typename GenericMultiComponent3d<Block>::reverse_row_range_iterator
5865 GenericMultiComponent3d<Block>::row_rend(const typename GenericMultiComponent3d<Block>::size_type slice,
5866  const typename GenericMultiComponent3d<Block>::size_type row,
5867  const slip::Range<int>& range)
5868  {
5869  return matrix_->row_rend(slice,row,range);
5870  }
5871 
5872 template<typename Block>
5873 inline
5874 typename GenericMultiComponent3d<Block>::const_reverse_row_range_iterator
5875 GenericMultiComponent3d<Block>::row_rend(const typename GenericMultiComponent3d<Block>::size_type slice,
5876  const typename GenericMultiComponent3d<Block>::size_type row,
5877  const slip::Range<int>& range) const
5878  {
5879  Matrix3d<Block> const * tp(matrix_);
5880  return tp->row_rend(slice,row,range);
5881  }
5882 
5883 //--------------------col range iterators----------------------
5884 
5885 template<typename Block>
5886 inline
5887 typename GenericMultiComponent3d<Block>::col_range_iterator
5888 GenericMultiComponent3d<Block>::col_begin(const typename GenericMultiComponent3d<Block>::size_type slice,
5889  const typename GenericMultiComponent3d<Block>::size_type col,
5890  const slip::Range<int>& range)
5891  {
5892  return matrix_->col_begin(slice,col,range);
5893  }
5894 
5895 template<typename Block>
5896 inline
5897 typename GenericMultiComponent3d<Block>::const_col_range_iterator
5898 GenericMultiComponent3d<Block>::col_begin(const typename GenericMultiComponent3d<Block>::size_type slice,
5899  const typename GenericMultiComponent3d<Block>::size_type col,
5900  const slip::Range<int>& range) const
5901  {
5902  Matrix3d<Block> const * tp(matrix_);
5903  return tp->col_begin(slice,col,range);
5904  }
5905 
5906 template<typename Block>
5907 inline
5908 typename GenericMultiComponent3d<Block>::col_range_iterator
5909 GenericMultiComponent3d<Block>::col_end(const typename GenericMultiComponent3d<Block>::size_type slice,
5910  const typename GenericMultiComponent3d<Block>::size_type col,
5911  const slip::Range<int>& range)
5912  {
5913  return matrix_->col_end(slice,col,range);
5914  }
5915 
5916 template<typename Block>
5917 inline
5918 typename GenericMultiComponent3d<Block>::const_col_range_iterator
5919 GenericMultiComponent3d<Block>::col_end(const typename GenericMultiComponent3d<Block>::size_type slice,
5920  const typename GenericMultiComponent3d<Block>::size_type col,
5921  const slip::Range<int>& range) const
5922  {
5923  Matrix3d<Block> const * tp(matrix_);
5924  return tp->col_end(slice,col,range);
5925  }
5926 
5927 template<typename Block>
5928 inline
5929 typename GenericMultiComponent3d<Block>::reverse_col_range_iterator
5930 GenericMultiComponent3d<Block>::col_rbegin(const typename GenericMultiComponent3d<Block>::size_type slice,
5931  const typename GenericMultiComponent3d<Block>::size_type col,
5932  const slip::Range<int>& range)
5933  {
5934  return matrix_->col_rbegin(slice,col,range);
5935  }
5936 
5937 template<typename Block>
5938 inline
5939 typename GenericMultiComponent3d<Block>::const_reverse_col_range_iterator
5940 GenericMultiComponent3d<Block>::col_rbegin(const typename GenericMultiComponent3d<Block>::size_type slice,
5941  const typename GenericMultiComponent3d<Block>::size_type col,
5942  const slip::Range<int>& range) const
5943  {
5944  Matrix3d<Block> const * tp(matrix_);
5945  return tp->col_rbegin(slice,col,range);
5946  }
5947 
5948 template<typename Block>
5949 inline
5950 typename GenericMultiComponent3d<Block>::reverse_col_range_iterator
5951 GenericMultiComponent3d<Block>::col_rend(const typename GenericMultiComponent3d<Block>::size_type slice,
5952  const typename GenericMultiComponent3d<Block>::size_type col,
5953  const slip::Range<int>& range)
5954  {
5955  return matrix_->col_rend(slice,col,range);
5956  }
5957 
5958 template<typename Block>
5959 inline
5960 typename GenericMultiComponent3d<Block>::const_reverse_col_range_iterator
5961 GenericMultiComponent3d<Block>::col_rend(const typename GenericMultiComponent3d<Block>::size_type slice,
5962  const typename GenericMultiComponent3d<Block>::size_type col,
5963  const slip::Range<int>& range) const
5964  {
5965  Matrix3d<Block> const * tp(matrix_);
5966  return tp->col_rend(slice,col,range);
5967  }
5968 
5969 //-------------------plane global iterators----------
5970 
5971 template<typename Block>
5972 inline
5973 typename GenericMultiComponent3d<Block>::iterator
5974 GenericMultiComponent3d<Block>::plane_begin(const typename GenericMultiComponent3d<Block>::size_type slice)
5975 {
5976  return matrix_->plane_begin(slice);
5977 }
5978 
5979 template<typename Block>
5980 inline
5981 typename GenericMultiComponent3d<Block>::const_iterator
5982 GenericMultiComponent3d<Block>::plane_begin(const typename GenericMultiComponent3d<Block>::size_type slice) const
5983 {
5984  Matrix3d<Block> const * tp(matrix_);
5985  return tp->plane_begin(slice);
5986 }
5987 
5988 template<typename Block>
5989 inline
5990 typename GenericMultiComponent3d<Block>::iterator
5991 GenericMultiComponent3d<Block>::plane_end(const typename GenericMultiComponent3d<Block>::size_type slice)
5992 {
5993  return matrix_->plane_end(slice);
5994 }
5995 
5996 template<typename Block>
5997 inline
5998 typename GenericMultiComponent3d<Block>::const_iterator
5999 GenericMultiComponent3d<Block>::plane_end(const typename GenericMultiComponent3d<Block>::size_type slice) const
6000 {
6001  Matrix3d<Block> const * tp(matrix_);
6002  return tp->plane_end(slice);
6003 }
6004 
6005 template<typename Block>
6006 inline
6007 typename GenericMultiComponent3d<Block>::reverse_iterator
6008 GenericMultiComponent3d<Block>::plane_rbegin(const typename GenericMultiComponent3d<Block>::size_type slice)
6009 {
6010  return matrix_->plane_rbegin(slice);
6011 }
6012 
6013 template<typename Block>
6014 inline
6015 typename GenericMultiComponent3d<Block>::const_reverse_iterator
6016 GenericMultiComponent3d<Block>::plane_rbegin(const typename GenericMultiComponent3d<Block>::size_type slice) const
6017 {
6018  Matrix3d<Block> const * tp(matrix_);
6019  return tp->plane_rbegin(slice);
6020 }
6021 
6022 template<typename Block>
6023 inline
6024 typename GenericMultiComponent3d<Block>::reverse_iterator
6025 GenericMultiComponent3d<Block>::plane_rend(const typename GenericMultiComponent3d<Block>::size_type slice)
6026 {
6027  return matrix_->plane_rend(slice);
6028 }
6029 
6030 template<typename Block>
6031 inline
6032 typename GenericMultiComponent3d<Block>::const_reverse_iterator
6033 GenericMultiComponent3d<Block>::plane_rend(const typename GenericMultiComponent3d<Block>::size_type slice) const
6034 {
6035  Matrix3d<Block> const * tp(matrix_);
6036  return tp->plane_rend(slice);
6037 }
6038 
6039 #ifdef ALL_PLANE_ITERATOR3D
6040 
6041 //-------------------plane row and col iterators----------
6042 
6043 
6044 template<typename Block>
6045 inline
6046 typename GenericMultiComponent3d<Block>::iterator1d
6047 GenericMultiComponent3d<Block>::plane_row_begin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6048  const typename GenericMultiComponent3d<Block>::size_type row)
6049  {
6050  return matrix_->plane_row_begin(P,plane_coordinate,row);
6051  }
6052 
6053 template<typename Block>
6054 inline
6055 typename GenericMultiComponent3d<Block>::const_iterator1d
6056 GenericMultiComponent3d<Block>::plane_row_begin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6057  const typename GenericMultiComponent3d<Block>::size_type row) const
6058  {
6059  Matrix3d<Block> const * tp(matrix_);
6060  return tp->plane_row_begin(P,plane_coordinate,row);
6061  }
6062 
6063 template<typename Block>
6064 inline
6065 typename GenericMultiComponent3d<Block>::iterator1d
6066 GenericMultiComponent3d<Block>::plane_row_end(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6067  const typename GenericMultiComponent3d<Block>::size_type row)
6068  {
6069  return matrix_->plane_row_end(P,plane_coordinate,row);
6070  }
6071 
6072 template<typename Block>
6073 inline
6074 typename GenericMultiComponent3d<Block>::const_iterator1d
6075 GenericMultiComponent3d<Block>::plane_row_end(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6076  const typename GenericMultiComponent3d<Block>::size_type row) const
6077  {
6078  Matrix3d<Block> const * tp(matrix_);
6079  return tp->plane_row_end(P,plane_coordinate,row);
6080  }
6081 
6082 template<typename Block>
6083 inline
6084 typename GenericMultiComponent3d<Block>::reverse_iterator1d
6085 GenericMultiComponent3d<Block>::plane_row_rbegin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6086  const typename GenericMultiComponent3d<Block>::size_type row)
6087  {
6088  return matrix_->plane_row_rbegin(P,plane_coordinate,row);
6089  }
6090 
6091 template<typename Block>
6092 inline
6093 typename GenericMultiComponent3d<Block>::const_reverse_iterator1d
6094 GenericMultiComponent3d<Block>::plane_row_rbegin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6095  const typename GenericMultiComponent3d<Block>::size_type row) const
6096  {
6097  Matrix3d<Block> const * tp(matrix_);
6098  return tp->plane_row_rbegin(P,plane_coordinate,row);
6099  }
6100 
6101 template<typename Block>
6102 inline
6103 typename GenericMultiComponent3d<Block>::reverse_iterator1d
6104 GenericMultiComponent3d<Block>::plane_row_rend(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6105  const typename GenericMultiComponent3d<Block>::size_type row)
6106  {
6107  return matrix_->plane_row_rend(P,plane_coordinate,row);
6108  }
6109 
6110 template<typename Block>
6111 inline
6112 typename GenericMultiComponent3d<Block>::const_reverse_iterator1d
6113 GenericMultiComponent3d<Block>::plane_row_rend(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6114  const typename GenericMultiComponent3d<Block>::size_type row) const
6115  {
6116  Matrix3d<Block> const * tp(matrix_);
6117  return tp->plane_row_rend(P,plane_coordinate,row);
6118  }
6119 
6120 template<typename Block>
6121 inline
6122 typename GenericMultiComponent3d<Block>::iterator1d
6123 GenericMultiComponent3d<Block>::plane_col_begin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6124  const typename GenericMultiComponent3d<Block>::size_type col)
6125  {
6126  return matrix_->plane_col_begin(P,plane_coordinate,col);
6127  }
6128 
6129 template<typename Block>
6130 inline
6131 typename GenericMultiComponent3d<Block>::const_iterator1d
6132 GenericMultiComponent3d<Block>::plane_col_begin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6133  const typename GenericMultiComponent3d<Block>::size_type col) const
6134  {
6135  Matrix3d<Block> const * tp(matrix_);
6136  return tp->plane_col_begin(P,plane_coordinate,col);
6137  }
6138 
6139 template<typename Block>
6140 inline
6141 typename GenericMultiComponent3d<Block>::iterator1d
6142 GenericMultiComponent3d<Block>::plane_col_end(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6143  const typename GenericMultiComponent3d<Block>::size_type col)
6144  {
6145  return matrix_->plane_col_end(P,plane_coordinate,col);
6146  }
6147 
6148 template<typename Block>
6149 inline
6150 typename GenericMultiComponent3d<Block>::const_iterator1d
6151 GenericMultiComponent3d<Block>::plane_col_end(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6152  const typename GenericMultiComponent3d<Block>::size_type col) const
6153  {
6154  Matrix3d<Block> const * tp(matrix_);
6155  return tp->plane_col_end(P,plane_coordinate,col);
6156  }
6157 
6158 template<typename Block>
6159 inline
6160 typename GenericMultiComponent3d<Block>::reverse_iterator1d
6161 GenericMultiComponent3d<Block>::plane_col_rbegin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6162  const typename GenericMultiComponent3d<Block>::size_type col)
6163  {
6164  return matrix_->plane_col_rbegin(P,plane_coordinate,col);
6165  }
6166 
6167 template<typename Block>
6168 inline
6169 typename GenericMultiComponent3d<Block>::const_reverse_iterator1d
6170 GenericMultiComponent3d<Block>::plane_col_rbegin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6171  const typename GenericMultiComponent3d<Block>::size_type col) const
6172  {
6173  Matrix3d<Block> const * tp(matrix_);
6174  return tp->plane_col_rbegin(P,plane_coordinate,col);
6175  }
6176 
6177 template<typename Block>
6178 inline
6179 typename GenericMultiComponent3d<Block>::reverse_iterator1d
6180 GenericMultiComponent3d<Block>::plane_col_rend(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6181  const typename GenericMultiComponent3d<Block>::size_type col)
6182  {
6183  return matrix_->plane_col_rend(P,plane_coordinate,col);
6184  }
6185 
6186 template<typename Block>
6187 inline
6188 typename GenericMultiComponent3d<Block>::const_reverse_iterator1d
6189 GenericMultiComponent3d<Block>::plane_col_rend(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6190  const typename GenericMultiComponent3d<Block>::size_type col) const
6191  {
6192  Matrix3d<Block> const * tp(matrix_);
6193  return tp->plane_col_rend(P,plane_coordinate,col);
6194  }
6195 
6196 //-------------------plane box iterators----------
6197 
6198 template<typename Block>
6199 inline
6200 typename GenericMultiComponent3d<Block>::const_iterator1d
6201 GenericMultiComponent3d<Block>::plane_row_begin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6202  const size_type row, const Box2d<int> & b) const
6203  {
6204  Matrix3d<Block> const * tp(matrix_);
6205  return tp->plane_row_begin(P,plane_coordinate,row,b);
6206  }
6207 
6208 template<typename Block>
6209 inline
6210 typename GenericMultiComponent3d<Block>::iterator1d
6211 GenericMultiComponent3d<Block>::plane_row_begin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6212  const size_type row, const Box2d<int> & b)
6213  {
6214  return matrix_->plane_row_begin(P,plane_coordinate,row,b);
6215  }
6216 
6217 template<typename Block>
6218 inline
6219 typename GenericMultiComponent3d<Block>::iterator1d
6220 GenericMultiComponent3d<Block>:: plane_row_end(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6221  const size_type row, const Box2d<int> & b)
6222  {
6223  return matrix_->plane_row_end(P,plane_coordinate,row,b);
6224  }
6225 
6226 template<typename Block>
6227 inline
6228 typename GenericMultiComponent3d<Block>::const_iterator1d
6229 GenericMultiComponent3d<Block>::plane_row_end(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6230  const size_type row, const Box2d<int> & b) const
6231  {
6232  Matrix3d<Block> const * tp(matrix_);
6233  return tp->plane_row_end(P,plane_coordinate,row,b);
6234  }
6235 
6236 template<typename Block>
6237 inline
6238 typename GenericMultiComponent3d<Block>::reverse_iterator1d
6239 GenericMultiComponent3d<Block>::plane_row_rbegin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6240  const size_type row, const Box2d<int> & b)
6241  {
6242  return matrix_->plane_row_rbegin(P,plane_coordinate,row,b);
6243  }
6244 
6245 template<typename Block>
6246 inline
6247 typename GenericMultiComponent3d<Block>::const_reverse_iterator1d
6248 GenericMultiComponent3d<Block>::plane_row_rbegin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6249  const size_type row, const Box2d<int> & b) const
6250  {
6251  Matrix3d<Block> const * tp(matrix_);
6252  return tp->plane_row_rbegin(P,plane_coordinate,row,b);
6253  }
6254 
6255 template<typename Block>
6256 inline
6257 typename GenericMultiComponent3d<Block>::reverse_iterator1d
6258 GenericMultiComponent3d<Block>::plane_row_rend(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6259  const size_type row, const Box2d<int> & b)
6260  {
6261  return matrix_->plane_row_rend(P,plane_coordinate,row,b);
6262  }
6263 
6264 template<typename Block>
6265 inline
6266 typename GenericMultiComponent3d<Block>::const_reverse_iterator1d
6267 GenericMultiComponent3d<Block>::plane_row_rend(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6268  const size_type row, const Box2d<int> & b) const
6269  {
6270  Matrix3d<Block> const * tp(matrix_);
6271  return tp->plane_row_rend(P,plane_coordinate,row,b);
6272  }
6273 
6274 template<typename Block>
6275 inline
6276 typename GenericMultiComponent3d<Block>::iterator1d
6277 GenericMultiComponent3d<Block>::plane_col_begin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6278  const size_type col, const Box2d<int> & b)
6279  {
6280  return matrix_->plane_col_begin(P,plane_coordinate,col,b);
6281  }
6282 
6283 template<typename Block>
6284 inline
6285 typename GenericMultiComponent3d<Block>::const_iterator1d
6286 GenericMultiComponent3d<Block>::plane_col_begin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6287  const size_type col, const Box2d<int> & b) const
6288  {
6289  Matrix3d<Block> const * tp(matrix_);
6290  return tp->plane_col_begin(P,plane_coordinate,col,b);
6291  }
6292 
6293 template<typename Block>
6294 inline
6295 typename GenericMultiComponent3d<Block>::iterator1d
6296 GenericMultiComponent3d<Block>::plane_col_end(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6297  const size_type col, const Box2d<int> & b)
6298  {
6299  return matrix_->plane_col_end(P,plane_coordinate,col,b);
6300  }
6301 
6302 template<typename Block>
6303 inline
6304 typename GenericMultiComponent3d<Block>::const_iterator1d
6305 GenericMultiComponent3d<Block>::plane_col_end(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6306  const size_type col, const Box2d<int> & b) const
6307  {
6308  Matrix3d<Block> const * tp(matrix_);
6309  return tp->plane_col_end(P,plane_coordinate,col,b);
6310  }
6311 
6312 template<typename Block>
6313 inline
6314 typename GenericMultiComponent3d<Block>::reverse_iterator1d
6315 GenericMultiComponent3d<Block>::plane_col_rbegin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6316  const size_type col, const Box2d<int> & b)
6317  {
6318  return matrix_->plane_col_rbegin(P,plane_coordinate,col,b);
6319  }
6320 
6321 template<typename Block>
6322 inline
6323 typename GenericMultiComponent3d<Block>::const_reverse_iterator1d
6324 GenericMultiComponent3d<Block>::plane_col_rbegin(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6325  const size_type col, const Box2d<int> & b) const
6326  {
6327  Matrix3d<Block> const * tp(matrix_);
6328  return tp->plane_col_rbegin(P,plane_coordinate,col,b);
6329  }
6330 
6331 template<typename Block>
6332 inline
6333 typename GenericMultiComponent3d<Block>::reverse_iterator1d
6334 GenericMultiComponent3d<Block>::plane_col_rend(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6335  const size_type col, const Box2d<int> & b)
6336  {
6337  return matrix_->plane_col_rend(P,plane_coordinate,col,b);
6338  }
6339 
6340 template<typename Block>
6341 inline
6342 typename GenericMultiComponent3d<Block>::const_reverse_iterator1d
6343 GenericMultiComponent3d<Block>::plane_col_rend(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6344  const size_type col, const Box2d<int> & b) const
6345  {
6346  Matrix3d<Block> const * tp(matrix_);
6347  return tp->plane_col_rend(P,plane_coordinate,col,b);
6348  }
6349 
6350 #endif //ALL_PLANE_ITERATOR3D
6351 
6352 //****************************************************************************
6353 // Two dimensional plane iterators
6354 //****************************************************************************
6355 
6356 //------------------------ Global iterators------------------------------------
6357 
6358 template<typename Block>
6359 inline
6360 typename GenericMultiComponent3d<Block>::iterator2d
6361 GenericMultiComponent3d<Block>::plane_upper_left(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate)
6362 {
6363  return matrix_->plane_upper_left(P,plane_coordinate);
6364 }
6365 
6366 template<typename Block>
6367 inline
6368 typename GenericMultiComponent3d<Block>::iterator2d
6369 GenericMultiComponent3d<Block>::plane_bottom_right(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate)
6370 {
6371  return matrix_->plane_bottom_right(P,plane_coordinate);
6372 }
6373 
6374 template<typename Block>
6375 inline
6376 typename GenericMultiComponent3d<Block>::const_iterator2d
6377 GenericMultiComponent3d<Block>::plane_upper_left(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate) const
6378 {
6379  Matrix3d<Block> const * tp(matrix_);
6380  return tp->plane_upper_left(P,plane_coordinate);
6381 }
6382 
6383 template<typename Block>
6384 inline
6385 typename GenericMultiComponent3d<Block>::const_iterator2d
6386 GenericMultiComponent3d<Block>::plane_bottom_right(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate) const
6387 {
6388  Matrix3d<Block> const * tp(matrix_);
6389  return tp->plane_bottom_right(P,plane_coordinate);
6390 }
6391 
6392 template<typename Block>
6393 inline
6394 typename GenericMultiComponent3d<Block>::reverse_iterator2d
6395 GenericMultiComponent3d<Block>::plane_rupper_left(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate)
6396 {
6397  return matrix_->plane_rupper_left(P,plane_coordinate);
6398 }
6399 
6400 template<typename Block>
6401 inline
6402 typename GenericMultiComponent3d<Block>::reverse_iterator2d
6403 GenericMultiComponent3d<Block>::plane_rbottom_right(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate)
6404 {
6405  return matrix_->plane_rbottom_right(P,plane_coordinate);
6406 }
6407 
6408 template<typename Block>
6409 inline
6410 typename GenericMultiComponent3d<Block>::const_reverse_iterator2d
6411 GenericMultiComponent3d<Block>::plane_rupper_left(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate) const
6412 {
6413  Matrix3d<Block> const * tp(matrix_);
6414  return tp->plane_rupper_left(P,plane_coordinate);
6415 }
6416 
6417 template<typename Block>
6418 inline
6419 typename GenericMultiComponent3d<Block>::const_reverse_iterator2d
6420 GenericMultiComponent3d<Block>::plane_rbottom_right(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate) const
6421 {
6422  Matrix3d<Block> const * tp(matrix_);
6423  return tp->plane_rbottom_right(P,plane_coordinate);
6424 }
6425 
6426 //------------------------ Box iterators------------------------------------
6427 
6428 template<typename Block>
6429 inline
6430 typename GenericMultiComponent3d<Block>::iterator2d
6431 GenericMultiComponent3d<Block>::plane_upper_left(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate, const Box2d<int>& b)
6432 {
6433  return matrix_->plane_upper_left(P,plane_coordinate,b);
6434 }
6435 
6436 template<typename Block>
6437 inline
6438 typename GenericMultiComponent3d<Block>::iterator2d
6439 GenericMultiComponent3d<Block>::plane_bottom_right(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate, const Box2d<int>& b)
6440 {
6441  return matrix_->plane_bottom_right(P,plane_coordinate,b);
6442 }
6443 
6444 template<typename Block>
6445 inline
6446 typename GenericMultiComponent3d<Block>::const_iterator2d
6447 GenericMultiComponent3d<Block>::plane_upper_left(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate, const Box2d<int>& b) const
6448 {
6449  Matrix3d<Block> const * tp(matrix_);
6450  return tp->plane_upper_left(P,plane_coordinate,b);
6451 }
6452 
6453 template<typename Block>
6454 inline
6455 typename GenericMultiComponent3d<Block>::const_iterator2d
6456 GenericMultiComponent3d<Block>::plane_bottom_right(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate, const Box2d<int>& b) const
6457 {
6458  Matrix3d<Block> const * tp(matrix_);
6459  return tp->plane_bottom_right(P,plane_coordinate,b);
6460 }
6461 
6462 template<typename Block>
6463 inline
6464 typename GenericMultiComponent3d<Block>::reverse_iterator2d
6465 GenericMultiComponent3d<Block>::plane_rupper_left(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate, const Box2d<int>& b)
6466 {
6467  return matrix_->plane_rupper_left(P,plane_coordinate,b);
6468 }
6469 
6470 template<typename Block>
6471 inline
6472 typename GenericMultiComponent3d<Block>::reverse_iterator2d
6473 GenericMultiComponent3d<Block>::plane_rbottom_right(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate, const Box2d<int>& b)
6474 {
6475  return matrix_->plane_rbottom_right(P,plane_coordinate,b);
6476 }
6477 
6478 template<typename Block>
6479 inline
6480 typename GenericMultiComponent3d<Block>::const_reverse_iterator2d
6481 GenericMultiComponent3d<Block>::plane_rupper_left(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate, const Box2d<int>& b) const
6482 {
6483  Matrix3d<Block> const * tp(matrix_);
6484  return tp->plane_rupper_left(P,plane_coordinate,b);
6485 }
6486 
6487 template<typename Block>
6488 inline
6489 typename GenericMultiComponent3d<Block>::const_reverse_iterator2d
6490 GenericMultiComponent3d<Block>::plane_rbottom_right(PLANE_ORIENTATION P, const typename GenericMultiComponent3d<Block>::size_type plane_coordinate,
6491  const Box2d<int>& b) const
6492  {
6493  Matrix3d<Block> const * tp(matrix_);
6494  return tp->plane_rbottom_right(P,plane_coordinate,b);
6495  }
6496 
6497 //****************************************************************************
6498 // Three dimensional iterators
6499 //****************************************************************************
6500 
6501 //------------------------ Global iterators------------------------------------
6502 
6503 template<typename Block>
6504 inline
6506 {
6507  return matrix_->front_upper_left();
6508 }
6509 
6510 template<typename Block>
6511 inline
6513 {
6514  Matrix3d<Block> const * tp(matrix_);
6515  return tp->front_upper_left();
6516 }
6517 
6518 template<typename Block>
6519 inline
6521 {
6522  return matrix_->back_bottom_right();
6523 }
6524 
6525 template<typename Block>
6526 inline
6528 {
6529  Matrix3d<Block> const * tp(matrix_);
6530  return tp->back_bottom_right();
6531 }
6532 
6533 template<typename Block>
6534 inline
6537 {
6538  return matrix_->rback_bottom_right();
6539 }
6540 
6541 template<typename Block>
6542 inline
6545 {
6546  Matrix3d<Block> const * tp(matrix_);
6547  return tp->rback_bottom_right();
6548 }
6549 
6550 template<typename Block>
6551 inline
6554 {
6555  return matrix_->rfront_upper_left();
6556 }
6557 
6558 template<typename Block>
6559 inline
6562 {
6563  Matrix3d<Block> const * tp(matrix_);
6564  return tp->rfront_upper_left();
6565 }
6566 
6567 //------------------------ Box iterators------------------------------------
6568 
6569 template<typename Block>
6570 inline
6572 {
6573  return matrix_->front_upper_left(box);
6574 }
6575 
6576 template<typename Block>
6577 inline
6579 {
6580  Matrix3d<Block> const * tp(matrix_);
6581  return tp->front_upper_left(box);
6582 }
6583 
6584 
6585 template<typename Block>
6586 inline
6589 {
6590  return matrix_->back_bottom_right(box);
6591 }
6592 
6593 template<typename Block>
6594 inline
6597 {
6598  Matrix3d<Block> const * tp(matrix_);
6599  return tp->back_bottom_right(box);
6600 }
6601 
6602 template<typename Block>
6603 inline
6606 {
6607  return matrix_->rback_bottom_right(box);
6608 }
6609 
6610 template<typename Block>
6611 inline
6614 {
6615  Matrix3d<Block> const * tp(matrix_);
6616  return tp->rback_bottom_right(box);
6617 }
6618 
6619 template<typename Block>
6620 inline
6623 {
6624  return matrix_->rfront_upper_left(box);
6625 }
6626 
6627 template<typename Block>
6628 inline
6631 {
6632  Matrix3d<Block> const * tp(matrix_);
6633  return tp->rfront_upper_left(box);
6634 }
6635 
6636 //------------------------ Range iterators------------------------------------
6637 
6638 template<typename Block>
6639 inline
6642  const Range<int>& row_range,
6643  const Range<int>& col_range)
6644  {
6645  return matrix_->front_upper_left(slice_range,row_range,col_range);
6646  }
6647 
6648 template<typename Block>
6649 inline
6652  const Range<int>& row_range,
6653  const Range<int>& col_range)
6654  {
6655  return matrix_->back_bottom_right(slice_range,row_range,col_range);
6656  }
6657 
6658 
6659 template<typename Block>
6660 inline
6663  const Range<int>& row_range,
6664  const Range<int>& col_range) const
6665  {
6666  Matrix3d<Block> const * tp(matrix_);
6667  return tp->front_upper_left(slice_range,row_range,col_range);
6668  }
6669 
6670 
6671 template<typename Block>
6672 inline
6675  const Range<int>& row_range,
6676  const Range<int>& col_range) const
6677  {
6678  Matrix3d<Block> const * tp(matrix_);
6679  return tp->back_bottom_right(slice_range,row_range,col_range);
6680  }
6681 
6682 template<typename Block>
6683 inline
6686  const Range<int>& row_range,
6687  const Range<int>& col_range)
6688  {
6689  return matrix_->rfront_upper_left(slice_range,row_range,col_range);
6690  }
6691 
6692 template<typename Block>
6693 inline
6696  const Range<int>& row_range,
6697  const Range<int>& col_range) const
6698  {
6699  Matrix3d<Block> const * tp(matrix_);
6700  return tp->rfront_upper_left(slice_range,row_range,col_range);
6701  }
6702 
6703 template<typename Block>
6704 inline
6707  const Range<int>& row_range,
6708  const Range<int>& col_range)
6709  {
6710  return matrix_->rback_bottom_right(slice_range,row_range,col_range);
6711  }
6712 
6713 template<typename Block>
6714 inline
6717  const Range<int>& row_range,
6718  const Range<int>& col_range) const
6719  {
6720  Matrix3d<Block> const * tp(matrix_);
6721  return tp->rback_bottom_right(slice_range,row_range,col_range);
6722  }
6723 
6724 
6725 //****************************************************************************
6726 // Component iterator
6727 //****************************************************************************
6728 
6729 //------------------------ One dimensional global component iterators------------------------------------
6730 
6731 template<typename Block>
6732 inline
6734 GenericMultiComponent3d<Block>::begin(const std::size_t component)
6735 {
6736  return typename GenericMultiComponent3d<Block>::component_iterator((typename Block::pointer)begin() + component);
6737 }
6738 
6739 template<typename Block>
6740 inline
6742 GenericMultiComponent3d<Block>::end(const std::size_t component)
6743 {
6744  return typename GenericMultiComponent3d<Block>::component_iterator((typename Block::pointer)end() + component);
6745 }
6746 
6747 template<typename Block>
6748 inline
6750 GenericMultiComponent3d<Block>::begin(const std::size_t component) const
6751 {
6752  return typename GenericMultiComponent3d<Block>::const_component_iterator((typename Block::const_pointer)begin() + component);
6753 }
6754 
6755 template<typename Block>
6756 inline
6758 GenericMultiComponent3d<Block>::end(const std::size_t component) const
6759 {
6760  return typename GenericMultiComponent3d<Block>::const_component_iterator((typename Block::const_pointer)end() + component);
6761 }
6762 
6763 
6764 template<typename Block>
6765 inline
6767 GenericMultiComponent3d<Block>::rbegin(const std::size_t component)
6768 {
6769  return typename GenericMultiComponent3d<Block>::reverse_component_iterator(this->end(component));
6770 }
6771 
6772 template<typename Block>
6773 inline
6775 GenericMultiComponent3d<Block>::rend(const std::size_t component)
6776 {
6777  return typename GenericMultiComponent3d<Block>::reverse_component_iterator(this->begin(component));
6778 }
6779 
6780 template<typename Block>
6781 inline
6783 GenericMultiComponent3d<Block>::rbegin(const std::size_t component) const
6784 {
6785  return typename GenericMultiComponent3d<Block>::const_reverse_component_iterator(this->end(component));
6786 }
6787 
6788 template<typename Block>
6789 inline
6791 GenericMultiComponent3d<Block>::rend(const std::size_t component) const
6792 {
6793  return typename GenericMultiComponent3d<Block>::const_reverse_component_iterator(this->begin(component));
6794 }
6795 
6796 
6797 //--------------------One dimensional component slice iterators----------------------
6798 
6799 
6800 template<typename Block>
6801 inline
6804 {
6805  return slip::stride_iterator<typename GenericMultiComponent3d<Block>::block_pointer>(&((*this)[0][row][col][component]), Block::SIZE * this->dim2() * this->dim3());
6806 }
6807 
6808 template<typename Block>
6809 inline
6810 typename GenericMultiComponent3d<Block>::const_component_slice_iterator
6811 GenericMultiComponent3d<Block>::slice_begin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row, const typename GenericMultiComponent3d<Block>::size_type col) const
6812 {
6813  return slip::stride_iterator<typename GenericMultiComponent3d<Block>::const_block_pointer>(&((*this)[0][row][col][component]), Block::SIZE * this->dim2() * this->dim3());
6814 }
6815 
6816 template<typename Block>
6817 inline
6818 typename GenericMultiComponent3d<Block>::component_slice_iterator
6819 GenericMultiComponent3d<Block>::slice_end(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row, const typename GenericMultiComponent3d<Block>::size_type col)
6820 {
6821  return ++(slip::stride_iterator<typename GenericMultiComponent3d<Block>::block_pointer>(&((*this)[this->dim1()-1][row][col][component]), Block::SIZE * this->dim2() * this->dim3()));
6822 }
6823 
6824 template<typename Block>
6825 inline
6826 typename GenericMultiComponent3d<Block>::const_component_slice_iterator
6827 GenericMultiComponent3d<Block>::slice_end(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row, const typename GenericMultiComponent3d<Block>::size_type col) const
6828 {
6829  return ++(slip::stride_iterator<typename GenericMultiComponent3d<Block>::const_block_pointer>(&((*this)[this->dim1()-1][row][col][component]), Block::SIZE * this->dim2() * this->dim3()));
6830 }
6831 
6832 template<typename Block>
6833 inline
6834 typename GenericMultiComponent3d<Block>::reverse_component_slice_iterator
6835 GenericMultiComponent3d<Block>::slice_rbegin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row, const typename GenericMultiComponent3d<Block>::size_type col)
6836 {
6837  return typename GenericMultiComponent3d<Block>::reverse_component_slice_iterator(this->slice_end(component,row,col));
6838 }
6839 
6840 template<typename Block>
6841 inline
6842 typename GenericMultiComponent3d<Block>::const_reverse_component_slice_iterator
6843 GenericMultiComponent3d<Block>::slice_rbegin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row, const typename GenericMultiComponent3d<Block>::size_type col) const
6844 {
6845  return typename GenericMultiComponent3d<Block>::const_reverse_component_slice_iterator(this->slice_end(component,row,col));
6846 }
6847 
6848 template<typename Block>
6849 inline
6850 typename GenericMultiComponent3d<Block>::reverse_component_slice_iterator
6851 GenericMultiComponent3d<Block>::slice_rend(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row, const typename GenericMultiComponent3d<Block>::size_type col)
6852 {
6853  return typename GenericMultiComponent3d<Block>::reverse_component_slice_iterator(this->slice_begin(component,row,col));
6854 }
6855 
6856 template<typename Block>
6857 inline
6858 typename GenericMultiComponent3d<Block>::const_reverse_component_slice_iterator
6859 GenericMultiComponent3d<Block>::slice_rend(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row, const typename GenericMultiComponent3d<Block>::size_type col) const
6860 {
6861  return typename GenericMultiComponent3d<Block>::const_reverse_component_slice_iterator(this->slice_begin(component,row,col));
6862 }
6863 
6864 
6865 //-------------------row component iterators----------
6866 
6867 template<typename Block>
6868 inline
6869 typename GenericMultiComponent3d<Block>::component_row_iterator
6870 GenericMultiComponent3d<Block>::row_begin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
6871  const typename GenericMultiComponent3d<Block>::size_type row)
6872  {
6873  return typename GenericMultiComponent3d<Block>::component_row_iterator((typename Block::pointer)this->row_begin(slice,row) + component);
6874  }
6875 
6876 template<typename Block>
6877 inline
6878 typename GenericMultiComponent3d<Block>::const_component_row_iterator
6879 GenericMultiComponent3d<Block>::row_begin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
6880  const typename GenericMultiComponent3d<Block>::size_type row) const
6881  {
6882  return typename GenericMultiComponent3d<Block>::const_component_row_iterator((typename Block::const_pointer)this->row_begin(slice,row) + component);
6883  }
6884 
6885 template<typename Block>
6886 inline
6887 typename GenericMultiComponent3d<Block>::component_row_iterator
6888 GenericMultiComponent3d<Block>::row_end(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
6889  const typename GenericMultiComponent3d<Block>::size_type row)
6890  {
6891  return typename GenericMultiComponent3d<Block>::component_row_iterator((typename Block::pointer)this->row_end(slice,row) + component);
6892  }
6893 
6894 template<typename Block>
6895 inline
6896 typename GenericMultiComponent3d<Block>::const_component_row_iterator
6897 GenericMultiComponent3d<Block>::row_end(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
6898  const typename GenericMultiComponent3d<Block>::size_type row) const
6899  {
6900  return typename GenericMultiComponent3d<Block>::const_component_row_iterator((typename Block::const_pointer)this->row_end(slice,row) + component);
6901  }
6902 
6903 template<typename Block>
6904 inline
6905 typename GenericMultiComponent3d<Block>::reverse_component_row_iterator
6906 GenericMultiComponent3d<Block>::row_rbegin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
6907  const typename GenericMultiComponent3d<Block>::size_type row)
6908  {
6909  return typename GenericMultiComponent3d<Block>::reverse_component_row_iterator(this->row_end(component,slice,row));
6910  }
6911 
6912 template<typename Block>
6913 inline
6914 typename GenericMultiComponent3d<Block>::const_reverse_component_row_iterator
6915 GenericMultiComponent3d<Block>::row_rbegin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
6916  const typename GenericMultiComponent3d<Block>::size_type row) const
6917  {
6918  return typename GenericMultiComponent3d<Block>::const_reverse_component_row_iterator(this->row_end(component,slice,row));
6919  }
6920 
6921 template<typename Block>
6922 inline
6923 typename GenericMultiComponent3d<Block>::reverse_component_row_iterator
6924 GenericMultiComponent3d<Block>::row_rend(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
6925  const typename GenericMultiComponent3d<Block>::size_type row)
6926  {
6927  return typename GenericMultiComponent3d<Block>::reverse_component_row_iterator(this->row_begin(component,slice,row));
6928  }
6929 
6930 template<typename Block>
6931 inline
6932 typename GenericMultiComponent3d<Block>::const_reverse_component_row_iterator
6933 GenericMultiComponent3d<Block>::row_rend(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
6934  const typename GenericMultiComponent3d<Block>::size_type row) const
6935  {
6936  return typename GenericMultiComponent3d<Block>::const_reverse_component_row_iterator(this->row_begin(component,slice,row));
6937  }
6938 
6939 //-------------------Constant component col iterators----------
6940 
6941 
6942 template<typename Block>
6943 inline
6944 typename GenericMultiComponent3d<Block>::component_col_iterator
6945 GenericMultiComponent3d<Block>::col_begin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
6946  const typename GenericMultiComponent3d<Block>::size_type col)
6947  {
6948  return slip::stride_iterator<typename GenericMultiComponent3d<Block>::block_pointer>(&((*this)[slice][0][col][component]), Block::SIZE * this->dim3());
6949  }
6950 
6951 template<typename Block>
6952 inline
6953 typename GenericMultiComponent3d<Block>::const_component_col_iterator
6954 GenericMultiComponent3d<Block>::col_begin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
6955  const typename GenericMultiComponent3d<Block>::size_type col) const
6956  {
6957  return slip::stride_iterator<typename GenericMultiComponent3d<Block>::const_block_pointer>(&((*this)[slice][0][col][component]), Block::SIZE * this->dim3());
6958  }
6959 
6960 template<typename Block>
6961 inline
6962 typename GenericMultiComponent3d<Block>::component_col_iterator
6963 GenericMultiComponent3d<Block>::col_end(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
6964  const typename GenericMultiComponent3d<Block>::size_type col)
6965  {
6966  return ++(slip::stride_iterator<typename GenericMultiComponent3d<Block>::block_pointer>(&((*this)[slice][this->dim2()-1][col][component]), Block::SIZE * this->dim3()));
6967  }
6968 
6969 template<typename Block>
6970 inline
6971 typename GenericMultiComponent3d<Block>::const_component_col_iterator
6972 GenericMultiComponent3d<Block>::col_end(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
6973  const typename GenericMultiComponent3d<Block>::size_type col) const
6974  {
6975  return ++(slip::stride_iterator<typename GenericMultiComponent3d<Block>::const_block_pointer>(&((*this)[slice][this->dim2()-1][col][component]), Block::SIZE * this->dim3()));
6976  }
6977 
6978 template<typename Block>
6979 inline
6980 typename GenericMultiComponent3d<Block>::reverse_component_col_iterator
6981 GenericMultiComponent3d<Block>::col_rbegin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
6982  const typename GenericMultiComponent3d<Block>::size_type col)
6983  {
6984  return typename GenericMultiComponent3d<Block>::reverse_component_col_iterator(this->col_end(component,slice,col));
6985  }
6986 
6987 template<typename Block>
6988 inline
6989 typename GenericMultiComponent3d<Block>::const_reverse_component_col_iterator
6990 GenericMultiComponent3d<Block>::col_rbegin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
6991  const typename GenericMultiComponent3d<Block>::size_type col) const
6992  {
6993  return typename GenericMultiComponent3d<Block>::const_reverse_component_col_iterator(this->col_end(component,slice,col));
6994  }
6995 
6996 template<typename Block>
6997 inline
6998 typename GenericMultiComponent3d<Block>::reverse_component_col_iterator
6999 GenericMultiComponent3d<Block>::col_rend(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
7000  const typename GenericMultiComponent3d<Block>::size_type col)
7001  {
7002  return typename GenericMultiComponent3d<Block>::reverse_component_col_iterator(this->col_begin(component,slice,col));
7003  }
7004 
7005 template<typename Block>
7006 inline
7007 typename GenericMultiComponent3d<Block>::const_reverse_component_col_iterator
7008 GenericMultiComponent3d<Block>::col_rend(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,
7009  const typename GenericMultiComponent3d<Block>::size_type col) const
7010  {
7011  return typename GenericMultiComponent3d<Block>::const_reverse_component_col_iterator(this->col_begin(component,slice,col));
7012  }
7013 
7014 //------------------------component slice range iterators -----------------------
7015 
7016 template<typename Block>
7017 inline
7018 typename GenericMultiComponent3d<Block>::component_slice_range_iterator
7019 GenericMultiComponent3d<Block>::slice_begin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row,const typename GenericMultiComponent3d<Block>::size_type col,
7020  const slip::Range<int>& range)
7021  {
7022  return slip::stride_iterator<typename GenericMultiComponent3d<Block>::block_pointer>(&((*this)[range.start()][row][col][component]), Block::SIZE * this->dim2() * this->dim3() * range.stride());
7023  }
7024 
7025 template<typename Block>
7026 inline
7027 typename GenericMultiComponent3d<Block>::component_slice_range_iterator
7028 GenericMultiComponent3d<Block>::slice_end(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row,const typename GenericMultiComponent3d<Block>::size_type col,
7029  const slip::Range<int>& range)
7030  {
7031  return ++(slip::stride_iterator<typename GenericMultiComponent3d<Block>::block_pointer>(&((*this)[range.start() + range.iterations() * range.stride()][row][col][component]), Block::SIZE * this->dim2() * this->dim3() * range.stride()));
7032  }
7033 
7034 template<typename Block>
7035 inline
7036 typename GenericMultiComponent3d<Block>::const_component_slice_range_iterator
7037 GenericMultiComponent3d<Block>::slice_begin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row,const typename GenericMultiComponent3d<Block>::size_type col,
7038  const slip::Range<int>& range) const
7039  {
7040  return slip::stride_iterator<typename GenericMultiComponent3d<Block>::const_block_pointer>(&((*this)[range.start()][row][col][component]), Block::SIZE * this->dim2() * this->dim3() * range.stride());
7041  }
7042 
7043 template<typename Block>
7044 inline
7045 typename GenericMultiComponent3d<Block>::const_component_slice_range_iterator
7046 GenericMultiComponent3d<Block>::slice_end(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row,const typename GenericMultiComponent3d<Block>::size_type col,
7047  const slip::Range<int>& range) const
7048  {
7049  return ++(slip::stride_iterator<typename GenericMultiComponent3d<Block>::const_block_pointer>(&((*this)[range.start() + range.iterations() * range.stride()][row][col][component]), Block::SIZE * this->dim2() * this->dim3() * range.stride()));
7050  }
7051 
7052 template<typename Block>
7053 inline
7054 typename GenericMultiComponent3d<Block>::reverse_component_slice_range_iterator
7055 GenericMultiComponent3d<Block>::slice_rbegin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row,const typename GenericMultiComponent3d<Block>::size_type col,
7056  const slip::Range<int>& range)
7057  {
7058  return typename GenericMultiComponent3d<Block>::reverse_component_slice_range_iterator(this->slice_end(component,row,col,range));
7059  }
7060 
7061 template<typename Block>
7062 inline
7063 typename GenericMultiComponent3d<Block>::reverse_component_slice_range_iterator
7064 GenericMultiComponent3d<Block>::slice_rend(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row,const typename GenericMultiComponent3d<Block>::size_type col,
7065  const slip::Range<int>& range)
7066  {
7067  return typename GenericMultiComponent3d<Block>::reverse_component_slice_range_iterator(this->slice_begin(component,row,col,range));
7068  }
7069 
7070 template<typename Block>
7071 inline
7072 typename GenericMultiComponent3d<Block>::const_reverse_component_slice_range_iterator
7073 GenericMultiComponent3d<Block>::slice_rbegin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row,const typename GenericMultiComponent3d<Block>::size_type col,
7074  const slip::Range<int>& range) const
7075  {
7076  return typename GenericMultiComponent3d<Block>::const_reverse_component_slice_range_iterator(this->slice_end(component,row,col,range));
7077  }
7078 
7079 template<typename Block>
7080 inline
7081 typename GenericMultiComponent3d<Block>::const_reverse_component_slice_range_iterator
7082 GenericMultiComponent3d<Block>::slice_rend(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type row,const typename GenericMultiComponent3d<Block>::size_type col,
7083  const slip::Range<int>& range) const
7084  {
7085  return typename GenericMultiComponent3d<Block>::const_reverse_component_slice_range_iterator(this->slice_begin(component,row,col,range));
7086  }
7087 
7088 //------------------------component row range iterators -----------------------
7089 
7090 template<typename Block>
7091 inline
7092 typename GenericMultiComponent3d<Block>::component_row_range_iterator
7093 GenericMultiComponent3d<Block>::row_begin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type row,
7094  const slip::Range<int>& range)
7095  {
7096  return slip::stride_iterator<typename GenericMultiComponent3d<Block>::block_pointer>(&((*this)[slice][row][range.start()][component]), Block::SIZE * range.stride());
7097  }
7098 
7099 template<typename Block>
7100 inline
7101 typename GenericMultiComponent3d<Block>::component_row_range_iterator
7102 GenericMultiComponent3d<Block>::row_end(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type row,
7103  const slip::Range<int>& range)
7104  {
7105  return ++(slip::stride_iterator<typename GenericMultiComponent3d<Block>::block_pointer>(&((*this)[slice][row][range.start()+ range.iterations() * range.stride()][component]), Block::SIZE * range.stride()));
7106  }
7107 
7108 template<typename Block>
7109 inline
7110 typename GenericMultiComponent3d<Block>::const_component_row_range_iterator
7111 GenericMultiComponent3d<Block>::row_begin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type row,
7112  const slip::Range<int>& range) const
7113  {
7114  return slip::stride_iterator<typename GenericMultiComponent3d<Block>::const_block_pointer>(&((*this)[slice][row][range.start()][component]), Block::SIZE * range.stride());
7115  }
7116 
7117 template<typename Block>
7118 inline
7119 typename GenericMultiComponent3d<Block>::const_component_row_range_iterator
7120 GenericMultiComponent3d<Block>::row_end(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type row,
7121  const slip::Range<int>& range) const
7122  {
7123  return ++(slip::stride_iterator<typename GenericMultiComponent3d<Block>::const_block_pointer>(&((*this)[slice][row][range.start()+ range.iterations() * range.stride()][component]), Block::SIZE * range.stride()));
7124  }
7125 
7126 template<typename Block>
7127 inline
7128 typename GenericMultiComponent3d<Block>::reverse_component_row_range_iterator
7129 GenericMultiComponent3d<Block>::row_rbegin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type row,
7130  const slip::Range<int>& range)
7131  {
7132  return typename GenericMultiComponent3d<Block>::reverse_component_row_range_iterator(this->row_end(component,slice,row,range));
7133  }
7134 
7135 template<typename Block>
7136 inline
7137 typename GenericMultiComponent3d<Block>::reverse_component_row_range_iterator
7138 GenericMultiComponent3d<Block>::row_rend(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type row,
7139  const slip::Range<int>& range)
7140  {
7141  return typename GenericMultiComponent3d<Block>::reverse_component_row_range_iterator(this->row_begin(component,slice,row,range));
7142  }
7143 
7144 template<typename Block>
7145 inline
7146 typename GenericMultiComponent3d<Block>::const_reverse_component_row_range_iterator
7147 GenericMultiComponent3d<Block>::row_rbegin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type row,
7148  const slip::Range<int>& range) const
7149  {
7150  return typename GenericMultiComponent3d<Block>::const_reverse_component_row_range_iterator(this->row_end(component,slice,row,range));
7151  }
7152 
7153 template<typename Block>
7154 inline
7155 typename GenericMultiComponent3d<Block>::const_reverse_component_row_range_iterator
7156 GenericMultiComponent3d<Block>::row_rend(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type row,
7157  const slip::Range<int>& range) const
7158  {
7159  return typename GenericMultiComponent3d<Block>::const_reverse_component_row_range_iterator(this->row_begin(component,slice,row,range));
7160  }
7161 
7162 //------------------------component col range iterators -----------------------
7163 
7164 template<typename Block>
7165 inline
7166 typename GenericMultiComponent3d<Block>::component_col_range_iterator
7167 GenericMultiComponent3d<Block>::col_begin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type col,
7168  const slip::Range<int>& range)
7169  {
7170  return slip::stride_iterator<typename GenericMultiComponent3d<Block>::block_pointer>(&((*this)[slice][range.start()][col][component]), Block::SIZE * this->dim3() * range.stride());
7171  }
7172 
7173 template<typename Block>
7174 inline
7175 typename GenericMultiComponent3d<Block>::component_col_range_iterator
7176 GenericMultiComponent3d<Block>::col_end(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type col,
7177  const slip::Range<int>& range)
7178  {
7179  return ++(slip::stride_iterator<typename GenericMultiComponent3d<Block>::block_pointer>(&((*this)[slice][range.start() + range.iterations() * range.stride()][col][component]), Block::SIZE * this->dim3() * range.stride()));
7180  }
7181 
7182 template<typename Block>
7183 inline
7184 typename GenericMultiComponent3d<Block>::const_component_col_range_iterator
7185 GenericMultiComponent3d<Block>::col_begin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type col,
7186  const slip::Range<int>& range) const
7187  {
7188  return slip::stride_iterator<typename GenericMultiComponent3d<Block>::const_block_pointer>(&((*this)[slice][range.start()][col][component]), Block::SIZE * this->dim3() * range.stride());
7189  }
7190 
7191 template<typename Block>
7192 inline
7193 typename GenericMultiComponent3d<Block>::const_component_col_range_iterator
7194 GenericMultiComponent3d<Block>::col_end(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type col,
7195  const slip::Range<int>& range) const
7196  {
7197  return ++(slip::stride_iterator<typename GenericMultiComponent3d<Block>::const_block_pointer>(&((*this)[slice][range.start() + range.iterations() * range.stride()][col][component]), Block::SIZE * this->dim3() * range.stride()));
7198  }
7199 
7200 template<typename Block>
7201 inline
7202 typename GenericMultiComponent3d<Block>::reverse_component_col_range_iterator
7203 GenericMultiComponent3d<Block>::col_rbegin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type col,
7204  const slip::Range<int>& range)
7205  {
7206  return typename GenericMultiComponent3d<Block>::reverse_component_col_range_iterator(this->col_end(component,slice,col,range));
7207  }
7208 
7209 template<typename Block>
7210 inline
7211 typename GenericMultiComponent3d<Block>::reverse_component_col_range_iterator
7212 GenericMultiComponent3d<Block>::col_rend(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type col,
7213  const slip::Range<int>& range)
7214  {
7215  return typename GenericMultiComponent3d<Block>::reverse_component_col_range_iterator(this->col_begin(component,slice,col,range));
7216  }
7217 
7218 template<typename Block>
7219 inline
7220 typename GenericMultiComponent3d<Block>::const_reverse_component_col_range_iterator
7221 GenericMultiComponent3d<Block>::col_rbegin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type col,
7222  const slip::Range<int>& range) const
7223  {
7224  return typename GenericMultiComponent3d<Block>::const_reverse_component_col_range_iterator(this->col_end(component,slice,col,range));
7225  }
7226 
7227 template<typename Block>
7228 inline
7229 typename GenericMultiComponent3d<Block>::const_reverse_component_col_range_iterator
7230 GenericMultiComponent3d<Block>::col_rend(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice,const typename GenericMultiComponent3d<Block>::size_type col,
7231  const slip::Range<int>& range) const
7232  {
7233  return typename GenericMultiComponent3d<Block>::const_reverse_component_col_range_iterator(this->col_begin(component,slice,col,range));
7234  }
7235 
7236 //------------------------component global plane iterators -----------------------
7237 
7238 template<typename Block>
7239 inline
7240 typename GenericMultiComponent3d<Block>::component_iterator
7241 GenericMultiComponent3d<Block>::plane_begin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice)
7242 {
7243  return typename GenericMultiComponent3d<Block>::component_iterator((typename Block::pointer)this->plane_begin(slice) + component);
7244 }
7245 
7246 template<typename Block>
7247 inline
7248 typename GenericMultiComponent3d<Block>::const_component_iterator
7249 GenericMultiComponent3d<Block>::plane_begin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice) const
7250 {
7251  return typename GenericMultiComponent3d<Block>::const_component_iterator((typename Block::const_pointer)this->plane_begin(slice) + component);
7252 }
7253 
7254 template<typename Block>
7255 inline
7256 typename GenericMultiComponent3d<Block>::component_iterator
7257 GenericMultiComponent3d<Block>::plane_end(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice)
7258 {
7259  return typename GenericMultiComponent3d<Block>::component_iterator((typename Block::pointer)this->plane_end(slice) + component);
7260 }
7261 
7262 template<typename Block>
7263 inline
7264 typename GenericMultiComponent3d<Block>::const_component_iterator
7265 GenericMultiComponent3d<Block>::plane_end(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice) const
7266 {
7267  return typename GenericMultiComponent3d<Block>::const_component_iterator((typename Block::const_pointer)this->plane_end(slice) + component);
7268 }
7269 
7270 template<typename Block>
7271 inline
7272 typename GenericMultiComponent3d<Block>::reverse_component_iterator
7273 GenericMultiComponent3d<Block>::plane_rbegin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice)
7274 {
7275  return typename GenericMultiComponent3d<Block>::reverse_component_iterator(this->plane_end(component,slice));
7276 }
7277 
7278 template<typename Block>
7279 inline
7280 typename GenericMultiComponent3d<Block>::reverse_component_iterator
7281 GenericMultiComponent3d<Block>::plane_rend(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice)
7282 {
7283  return typename GenericMultiComponent3d<Block>::reverse_component_iterator(this->plane_begin(component,slice));
7284 }
7285 
7286 template<typename Block>
7287 inline
7288 typename GenericMultiComponent3d<Block>::const_reverse_component_iterator
7289 GenericMultiComponent3d<Block>::plane_rbegin(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice) const
7290 {
7291  return typename GenericMultiComponent3d<Block>::const_reverse_component_iterator(this->plane_end(component,slice));
7292 }
7293 
7294 template<typename Block>
7295 inline
7296 typename GenericMultiComponent3d<Block>::const_reverse_component_iterator
7297 GenericMultiComponent3d<Block>::plane_rend(const std::size_t component, const typename GenericMultiComponent3d<Block>::size_type slice) const
7298 {
7299  return typename GenericMultiComponent3d<Block>::const_reverse_component_iterator(this->plane_begin(component,slice));
7300 }
7301 
7302 //****************************************************************************
7303 // Three dimensional component iterators
7304 //****************************************************************************
7305 
7306 //------------------------ Global component iterators------------------------------------
7307 
7308 template<typename Block>
7309 inline
7310 typename GenericMultiComponent3d<Block>::component_iterator3d
7313  (this,component,Box3d<int>(0,0,0,this->dim1()-1,this->dim2()-1,this->dim3()-1));
7314 }
7315 
7316 
7317 template<typename Block>
7318 inline
7321  DPoint3d<int> dp(this->dim1(),this->dim2(),this->dim3());
7323  (*this).front_upper_left(component) + dp;
7324  return it;
7325 }
7326 
7327 template<typename Block>
7328 inline
7330 GenericMultiComponent3d<Block>::front_upper_left(const std::size_t component) const{
7332  (this,component,Box3d<int>(0,0,0,this->dim1()-1,this->dim2()-1,this->dim3()-1));
7333 }
7334 
7335 
7336 template<typename Block>
7337 inline
7339 GenericMultiComponent3d<Block>::back_bottom_right(const std::size_t component) const{
7340  DPoint3d<int> dp(this->dim1(),this->dim2(),this->dim3());
7342  (*this).front_upper_left(component) + dp;
7343  return it;
7344 }
7345 
7346 
7347 template<typename Block>
7348 inline
7351  DPoint3d<int> dp(1,1,0);
7353  (this->back_bottom_right(component) - dp);
7354 }
7355 
7356 
7357 template<typename Block>
7358 inline
7362  (this->front_upper_left(component));
7363 }
7364 
7365 template<typename Block>
7366 inline
7368 GenericMultiComponent3d<Block>::rfront_upper_left(const std::size_t component) const{
7369  DPoint3d<int> dp(1,1,0);
7371  (this->back_bottom_right(component) - dp);
7372 }
7373 
7374 template<typename Block>
7375 inline
7377 GenericMultiComponent3d<Block>::rback_bottom_right(const std::size_t component) const{
7379  (this->front_upper_left(component));
7380 }
7381 
7382 //------------------------ Box component iterators------------------------------------
7383 
7384 template<typename Block>
7385 inline
7388  const Box3d<int>& box){
7389  return typename GenericMultiComponent3d<Block>::component_iterator3d(this,component,box);
7390 }
7391 
7392 template<typename Block>
7393 inline
7396  const Box3d<int>& box){
7397  DPoint3d<int> dp(box.depth(),box.height(),box.width());
7399  ((*this).front_upper_left(component,box) + dp));
7400 }
7401 
7402 template<typename Block>
7403 inline
7406  const Box3d<int>& box) const{
7407  return typename GenericMultiComponent3d<Block>::const_component_iterator3d(this,component,box);
7408 }
7409 
7410 template<typename Block>
7411 inline
7414  const Box3d<int>& box) const{
7415  DPoint3d<int> dp(box.depth(),box.height(),box.width());
7417  ((*this).front_upper_left(component,box) + dp));
7418 }
7419 
7420 template<typename Block>
7421 inline
7424  const slip::Box3d<int>& box)
7425  {
7427  (this->front_upper_left(component,box));
7428  }
7429 
7430 template<typename Block>
7431 inline
7434  const slip::Box3d<int>& box)
7435  {
7436  slip::DPoint3d<int> dp(1,1,0);
7438  (this->back_bottom_right(component,box) - dp);
7439  }
7440 
7441 template<typename Block>
7442 inline
7445  const slip::Box3d<int>& box) const
7446  {
7448  (this->front_upper_left(component,box));
7449  }
7450 
7451 template<typename Block>
7452 inline
7455  const slip::Box3d<int>& box) const
7456  {
7457  slip::DPoint3d<int> dp(1,1,0);
7459  (this->back_bottom_right(component,box) - dp);
7460  }
7461 
7462 //------------------------ Range component iterators------------------------------------
7463 
7464 template<typename Block>
7465 inline
7468  const Range<int>& slice_range, const Range<int>& row_range,
7469  const Range<int>& col_range){
7471  (this,component,slice_range,row_range,col_range);
7472 }
7473 
7474 template<typename Block>
7475 inline
7478  const Range<int>& slice_range, const Range<int>& row_range,
7479  const Range<int>& col_range){
7480  DPoint3d<int> dp(slice_range.iterations()+1,row_range.iterations()+1,col_range.iterations()+1);
7482  ((*this).front_upper_left(component,slice_range,row_range,col_range) + dp);
7483 }
7484 
7485 template<typename Block>
7486 inline
7489  const Range<int>& slice_range, const Range<int>& row_range,
7490  const Range<int>& col_range) const{
7492  (this,component,slice_range,row_range,col_range);
7493 }
7494 
7495 template<typename Block>
7496 inline
7499  const Range<int>& slice_range, const Range<int>& row_range,
7500  const Range<int>& col_range) const{
7501  DPoint3d<int> dp(slice_range.iterations()+1,row_range.iterations()+1,col_range.iterations()+1);
7503  ((*this).front_upper_left(component,slice_range,row_range,col_range) + dp);
7504 }
7505 
7506 template<typename Block>
7507 inline
7510  const Range<int>& slice_range, const Range<int>& row_range,
7511  const Range<int>& col_range){
7512  slip::DPoint3d<int> dp(1,1,0);
7514  (this->back_bottom_right(component,slice_range,row_range,col_range) - dp);
7515 }
7516 
7517 template<typename Block>
7518 inline
7521  const Range<int>& slice_range, const Range<int>& row_range,
7522  const Range<int>& col_range){
7524  (this->front_upper_left(component,slice_range,row_range,col_range));
7525 }
7526 
7527 template<typename Block>
7528 inline
7531  const Range<int>& slice_range, const Range<int>& row_range,
7532  const Range<int>& col_range) const{
7533  slip::DPoint3d<int> dp(1,1,0);
7535  (this->back_bottom_right(component,slice_range,row_range,col_range) - dp);
7536 }
7537 
7538 template<typename Block>
7539 inline
7542  const Range<int>& slice_range, const Range<int>& row_range,
7543  const Range<int>& col_range) const{
7545  (this->front_upper_left(component,slice_range,row_range,col_range));
7546 }
7548 
7549 
7550 template <typename Block>
7551 inline
7552 std::ostream& operator<<(std::ostream & out,
7554 {
7555  out << *(a.matrix_) << std::endl;
7556  return out;
7557 }
7558 
7559 template<typename Block>
7560 inline
7561 typename GenericMultiComponent3d<Block>::pointer* GenericMultiComponent3d<Block>::operator[](const typename GenericMultiComponent3d<Block>::size_type k)
7562 {
7563  return (*matrix_)[k];
7564 }
7565 
7566 template<typename Block>
7567 inline
7568 typename GenericMultiComponent3d<Block>::const_pointer const* GenericMultiComponent3d<Block>::operator[](const typename GenericMultiComponent3d<Block>::size_type k) const
7569 {
7570  Matrix3d<Block> const *tp(matrix_);
7571  return (*tp)[k];
7572 }
7573 
7574 template<typename Block>
7575 inline
7576 typename GenericMultiComponent3d<Block>::reference GenericMultiComponent3d<Block>::operator()(const typename GenericMultiComponent3d<Block>::size_type k,
7577  const typename GenericMultiComponent3d<Block>::size_type i,
7578  const typename GenericMultiComponent3d<Block>::size_type j)
7579 {
7580  return (*matrix_)[k][i][j];
7581 }
7582 
7583 template<typename Block>
7584 inline
7585 typename GenericMultiComponent3d<Block>::const_reference GenericMultiComponent3d<Block>::operator()(const typename GenericMultiComponent3d<Block>::size_type k,
7586  const typename GenericMultiComponent3d<Block>::size_type i,
7587  const typename GenericMultiComponent3d<Block>::size_type j) const
7588 {
7589  return (*matrix_)[k][i][j];
7590 }
7591 
7592 
7593 template<typename Block>
7594 inline
7596 
7597 template<typename Block>
7598 inline
7600 
7601 template<typename Block>
7602 inline
7604 
7605 template<typename Block>
7606 inline
7608 
7609 template<typename Block>
7610 inline
7612 
7613 template<typename Block>
7614 inline
7616 
7617 template<typename Block>
7618 inline
7620 
7621 template<typename Block>
7622 inline
7624 
7625 template<typename Block>
7626 inline
7628 
7629 template<typename Block>
7630 inline
7632 
7633 template<typename Block>
7634 inline
7635 bool GenericMultiComponent3d<Block>::empty()const {return matrix_->empty();}
7636 
7637 template<typename Block>
7638 inline
7640 {
7641  matrix_->swap(*(M.matrix_));
7642 }
7643 
7644 template<typename Block>
7645 inline
7647 {
7648  Block tmp;
7649  for(typename GenericMultiComponent3d<Block>::size_type component = 0; component < Block::SIZE; ++component)
7650  {
7651  typename Block::value_type min = *std::min_element(this->begin(component),this->end(component));
7652  tmp[component] = min;
7653  }
7654  return tmp;
7655 }
7656 
7657 template<typename Block>
7658 inline
7660 {
7661  Block tmp;
7662  for(typename GenericMultiComponent3d<Block>::size_type component = 0; component < Block::SIZE; ++component)
7663  {
7664  typename Block::value_type max = *std::max_element(this->begin(component),this->end(component));
7665  tmp[component] = max;
7666  }
7667  return tmp;
7668 }
7669 
7670 template<typename Block>
7671 inline
7673 {
7674  matrix_->apply(fun);
7675  return *this;
7676 }
7677 
7678 template<typename Block>
7679 inline
7681 {
7682  matrix_->apply(fun);
7683  return *this;
7684 }
7685 
7686 template<typename Block>
7687 inline
7690  {
7691  return ( x.size() == y.size()
7692  && std::equal(x.begin(),x.end(),y.begin()));
7693  }
7694 
7695 template<typename Block>
7696 inline
7699  {
7700  return !(x == y);
7701  }
7702 
7703 
7704 // template<typename Block>
7705 // inline
7706 // bool operator<(const GenericMultiComponent3d<Block>& x,
7707 // const GenericMultiComponent3d<Block>& y)
7708 // {
7709 // return std::lexicographical_compare(x.begin(), x.end(),
7710 // y.begin(), y.end());
7711 // }
7712 
7713 // template<typename Block>
7714 // inline
7715 // bool operator>(const GenericMultiComponent3d<Block>& x,
7716 // const GenericMultiComponent3d<Block>& y)
7717 // {
7718 // return (y < x);
7719 // }
7720 
7721 
7722 // template<typename Block>
7723 // inline
7724 // bool operator<=(const GenericMultiComponent3d<Block>& x,
7725 // const GenericMultiComponent3d<Block>& y)
7726 // {
7727 // return !(y < x);
7728 // }
7729 
7730 
7731 // template<typename Block>
7732 // inline
7733 // bool operator>=(const GenericMultiComponent3d<Block>& x,
7734 // const GenericMultiComponent3d<Block>& y)
7735 // {
7736 // return !(x < y);
7737 // }
7738 template <typename Block>
7739 struct L2_dist<typename Block::value_type, slip::GenericMultiComponent3d<Block> >
7740 {
7741  typename Block::value_type
7743  const slip::GenericMultiComponent3d<Block>& __y) const
7744 
7745  {
7746  typename Block::value_type dist = slip::L22_distance<Block>(__x.begin(),__x.end(),__y.begin());
7747  return std::sqrt(dist);
7748  }
7749 };
7750 }//slip::
7751 
7752 #endif //SLIP_GENERICMULTICOMPONENT3D_HPP
pointer iterator
Definition: Matrix3d.hpp:171
size_type max_size() const
Returns the maximal size (number of elements) in the GenericMultiComponent3d.
std::reverse_iterator< component_row_range_iterator > reverse_component_row_range_iterator
bool operator!=(const Array< T > &x, const Array< T > &y)
Definition: Array.hpp:1448
std::size_t iterations() const
Rerturns the number of iterations of the range.
Definition: Range.hpp:305
const GenericMultiComponent3d< Block > const_self
std::reverse_iterator< const_slice_iterator > const_reverse_slice_iterator
std::reverse_iterator< const_col_iterator > const_reverse_col_iterator
This is some iterator to iterate a 3d container into a plane area defined by the subscripts of the 3d...
std::reverse_iterator< col_range_iterator > reverse_col_range_iterator
slip::stride_iterator< const_block_pointer > const_component_slice_iterator
slip::stride_iterator< pointer > slice_iterator
std::reverse_iterator< iterator > reverse_iterator
CoordType width() const
compute the width of the Box3d.
Definition: Box3d.hpp:408
void fill(const typename Block::pointer value)
Fills the container range [begin(),begin()+size()) with a copy of the value array.
std::reverse_iterator< const_component_iterator > const_reverse_component_iterator
Difference of Point3D class, specialization of DPoint<CoordType,DIM> with DIM = 3.
std::reverse_iterator< component_slice_iterator > reverse_component_slice_iterator
slip::const_component_iterator3d_box< const_self, Block::SIZE > const_component_iterator3d
std::reverse_iterator< const_component_col_iterator > const_reverse_component_col_iterator
slip::stride_iterator< const_col_iterator > const_col_range_iterator
iterator2d plane_upper_left(PLANE_ORIENTATION P, const size_type plane_coordinate)
Returns a read/write iterator that points to the first element of the plane in the GenericMultiCompon...
slip::Array3d< Block >::const_iterator3d_range const_iterator3d_range
std::reverse_iterator< const_slice_range_iterator > const_reverse_slice_range_iterator
const block_value_type const_block_reference
std::reverse_iterator< iterator2d > reverse_iterator2d
std::reverse_iterator< const_component_iterator3d > const_reverse_component_iterator3d
slip::component_iterator3d_box< self, Block::SIZE > component_iterator3d
size_type columns() const
Returns the number of columns (third dimension size) in the GenericMultiComponent3d.
virtual ~GenericMultiComponent3d()
Destructor of the GenericMultiComponent3d.
This is some iterator to iterate a 3d container into two Range defined by the indices and strides of ...
size_type dim3() const
Returns the number of columns (third dimension size) in the GenericMultiComponent3d.
size_type rows() const
Returns the number of rows (first dimension size) in the GenericMultiComponent3d. ...
This is a Vector3d struct. It is a specialization of kvector. It implements some specific 3d operatio...
Definition: Vector3d.hpp:96
slip::stride_iterator< block_pointer > component_slice_range_iterator
T & min(const GrayscaleImage< T > &M1)
Returns the min element of a GrayscaleImage.
iterator begin()
Returns a read/write iterator that points to the first element in the GenericMultiComponent3d. Iteration is done in ordinary element order.
slip::stride_iterator< pointer > col_iterator
slip::stride_iterator< const_pointer > const_col_iterator
iterator3d back_bottom_right()
Returns a read/write iterator3d that points to the past the end element of the GenericMultiComponent3...
size_type size() const
Returns the number of elements in the GenericMultiComponent3d.
row_iterator row_begin(const size_type slice, const size_type row)
Returns a read/write iterator that points to the first element of the row row of the slice slice in t...
pointer * operator[](const size_type k)
Subscript access to the slice datas contained in the GenericMultiComponent3d.
reverse_row_iterator row_rend(const size_type slice, const size_type row)
Returns a read/write reverse iterator that points to the first element of the row row of the slice sl...
std::reverse_iterator< slice_iterator > reverse_slice_iterator
Provides a class to manipulate iterator2d within a slip::Box2d. It is used to iterate throw 2d contai...
slip::stride_iterator< block_pointer > component_col_iterator
reverse_iterator rbegin()
Returns a read/write reverse iterator that points to the last element in the GenericMultiComponent3d...
const_component_iterator const_component_row_iterator
size_type dim2() const
Returns the number of rows (second dimension size) in the GenericMultiComponent3d.
reverse_iterator plane_rbegin(const size_type slice)
Returns a read/write reverse iterator that points to the last element in the slice plane of the Gener...
void swap(self &M)
Swaps data with another GenericMultiComponent3d.
std::reverse_iterator< const_component_iterator3d_range > const_reverse_component_iterator3d_range
std::reverse_iterator< row_range_iterator > reverse_row_range_iterator
slip::stride_iterator< const_slice_iterator > const_slice_range_iterator
GenericMultiComponent3d< Block > & apply(Block(*fun)(Block))
Returns the sums of the elements of the GenericMultiComponent3d.
std::reverse_iterator< component_slice_range_iterator > reverse_component_slice_range_iterator
std::reverse_iterator< iterator3d_range > reverse_iterator3d_range
const_iterator begin() const
Returns a read-only (constant) iterator that points to the first element in the Matrix3d. Iteration is done in ordinary element order.
Definition: Matrix3d.hpp:3953
size_type slices() const
Returns the number of slices (first dimension size) in the GenericMultiComponent3d.
Provides a class to iterate a 1d range according to a constant step.
slip::stride_iterator< const_block_pointer > const_component_row_range_iterator
slip::kstride_iterator< typename Block::pointer, Block::SIZE > component_iterator
PLANE_ORIENTATION
Choose between different plane orientations.
std::reverse_iterator< component_col_range_iterator > reverse_component_col_range_iterator
Provides a class to manipulate iterator3d within a slip::Range. It is used to iterate throw 3d contai...
std::reverse_iterator< slice_range_iterator > reverse_slice_range_iterator
iterator3d front_upper_left()
Returns a read/write iterator3d that points to the first element of the GenericMultiComponent3d. It points to the front upper left element of the GenericMultiComponent3d.
slip::stride_iterator< block_pointer > component_slice_iterator
This is some iterator to iterate a 3d container into two Range defined by the indices and strides of ...
std::reverse_iterator< const_iterator3d_range > const_reverse_iterator3d_range
col_iterator col_end(const size_type slice, const size_type col)
Returns a read/write iterator that points to the past-the-end element of the column column of the sli...
std::reverse_iterator< const_component_slice_iterator > const_reverse_component_slice_iterator
slip::stride_iterator< const_block_pointer > const_component_col_range_iterator
slip::stride_iterator< const_pointer > const_slice_iterator
reverse_col_iterator col_rbegin(const size_type slice, const size_type col)
Returns a read/write reverse iterator that points to the last element of the column column of the sli...
slice_iterator slice_begin(const size_type row, const size_type col)
Returns a read/write iterator that points to the first element of the line (row,col) threw the slices...
std::reverse_iterator< const_iterator > const_reverse_iterator
std::reverse_iterator< const_col_range_iterator > const_reverse_col_range_iterator
void fill(InputIterator first, InputIterator last)
Fills the container range [begin(),begin()+size()) with a copy of the range [first,last)
col_iterator col_begin(const size_type slice, const size_type col)
Returns a read/write iterator that points to the first element of the column column of the slice slic...
size_type slice_size() const
Returns the number of elements in a slice of the GenericMultiComponent3d.
slip::stride_iterator< slice_iterator > slice_range_iterator
slice_iterator slice_end(const size_type row, const size_type col)
Returns a read/write iterator that points to the one past the end element of the line (row...
This is some iterator to iterate a 3d MultiComponentContainer into a Box area defined by the indices ...
Block::value_type operator()(const slip::GenericMultiComponent3d< Block > &__x, const slip::GenericMultiComponent3d< Block > &__y) const
reference operator()(const size_type k, const size_type i, const size_type j)
Subscript access to the data contained in the GenericMultiComponent3d.
row_iterator row_end(const size_type slice, const size_type row)
Returns a read/write iterator that points to the past-the-end element of the row row of the slice sli...
reverse_iterator rend()
Returns a read/write reverse iterator that points to one before the first element in the GenericMulti...
std::reverse_iterator< const_iterator3d > const_reverse_iterator3d
slip::Array3d< Block >::iterator3d_range iterator3d_range
iterator plane_end(const size_type slice)
Returns a read/write iterator that points one past the last element in the slice plane of the Generic...
slip::stride_iterator< col_iterator > col_range_iterator
This is a GenericMultiComponent3d class. This container statisfies the BidirectionnalContainer concep...
Numerical matrix3d class. This container statisfies the RandomAccessContainer concepts of the STL exc...
slip::stride_iterator< block_pointer > component_row_range_iterator
reverse_iterator3d rfront_upper_left()
Returns a read/write reverse iterator3d. It points to the back bottom right element of the Matrix3d...
Definition: Matrix3d.hpp:5078
std::reverse_iterator< iterator > reverse_row_iterator
void copy(_II first, _II last, _OI output_first)
Copy algorithm optimized for slip iterators.
Definition: copy_ext.hpp:177
SubType start() const
Accessor of the start subscript of the Range.
Definition: Range.hpp:284
reverse_col_iterator col_rend(const size_type slice, const size_type col)
Returns a read/write reverse iterator that points to the first element of the column column of the sl...
Provides a class to manipulate iterator2d within a slip::Box3d. It is used to iterate throw 3d contai...
slip::Array3d< Block >::const_iterator2d const_iterator2d
reverse_iterator2d plane_rbottom_right(PLANE_ORIENTATION P, const size_type plane_coordinate)
Returns a read/write reverse_iterator that points to the upper left element of the plane in the Gener...
void fill(std::vector< InputIterator > first_iterators_list, InputIterator last)
Fills the container range [begin(),begin()+size()) with a copy of the range [first,last)
slip::kstride_iterator< typename Block::const_pointer, Block::SIZE > const_component_iterator
self & operator=(const self &rhs)
Assign a GenericMultiComponent3d.
HyperVolume< T > sqrt(const HyperVolume< T > &M)
slip::stride_iterator< const_block_pointer > const_component_slice_range_iterator
std::reverse_iterator< component_row_iterator > reverse_component_row_iterator
Provides a class to iterate a 3d MultiComponentContainer into a slip::Box3d.
reverse_iterator3d rback_bottom_right()
Returns a read/write reverse iterator3d. It points to past the front upper left element of the Matrix...
Definition: Matrix3d.hpp:5061
std::reverse_iterator< const_iterator2d > const_reverse_iterator2d
This is some iterator to iterate a 3d MultiComponentContainer into a Box area defined by the indices ...
slip::component_iterator3d_range< self, Block::SIZE > component_iterator3d_range
slip::Array3d< Block >::iterator3d iterator3d
slip::const_component_iterator3d_range< const_self, Block::SIZE > const_component_iterator3d_range
CoordType depth() const
compute the depth of the Box3d.
Definition: Box3d.hpp:416
void resize(const size_type slices, const size_type rows, const size_type cols, const Block &val=Block())
Resizes a GenericMultiComponent3d.
slip::stride_iterator< pointer > row_range_iterator
reverse_iterator2d plane_rupper_left(PLANE_ORIENTATION P, const size_type plane_coordinate)
Returns a read/write reverse_iterator that points to the bottom right element of the plane in the Gen...
reverse_iterator3d rback_bottom_right()
Returns a read/write reverse iterator3d. It points to past the front upper left element of the Generi...
std::reverse_iterator< const_component_row_range_iterator > const_reverse_component_row_range_iterator
Provides a class to iterate 3d containers throw a planes.
This is some iterator to iterate a 3d container into a Box area defined by the subscripts of the 3d c...
Provides a class to iterate a 3d multicomponent container into three Ranges.
GenericMultiComponent3d()
Constructs a GenericMultiComponent3d.
slip::Array3d< Block >::iterator2d iterator2d
std::reverse_iterator< const_component_slice_range_iterator > const_reverse_component_slice_range_iterator
const block_value_type * const_block_pointer
Provides a class to manipulate Matrix3d.
std::ostream & operator<<(std::ostream &out, const Array< T > &a)
Definition: Array.hpp:1282
This is some iterator to iterate a 3d container into two Range defined by the indices and strides of ...
void fill(const Block &value)
Fills the container range [begin(),begin()+size()) with copies of value.
iterator2d plane_bottom_right(PLANE_ORIENTATION P, const size_type plane_coordinate)
Returns a read/write iterator that points to the last element of the plane in the GenericMultiCompone...
std::reverse_iterator< col_iterator > reverse_col_iterator
iterator plane_begin(const size_type slice)
Returns a read/write iterator that points to the first element in the in the slice plane of the Gener...
reverse_slice_iterator slice_rend(const size_type row, const size_type col)
Returns a read/write iterator that points to the one before the first element of the line (row...
std::reverse_iterator< const_component_row_iterator > const_reverse_component_row_iterator
std::reverse_iterator< const_component_col_range_iterator > const_reverse_component_col_range_iterator
This is some iterator to iterate a 3d container into two Range defined by the indices and strides of ...
iterator end()
Returns a read/write iterator that points one past the last element in the GenericMultiComponent3d. Iteration is done in ordinary element order.
slip::stride_iterator< block_pointer > component_col_range_iterator
reverse_row_iterator row_rbegin(const size_type slice, const size_type row)
Returns a read/write reverse iterator that points to the last element of the row row of the slice sli...
int stride() const
Accessor of the stride of the Range.
Definition: Range.hpp:298
std::reverse_iterator< iterator3d > reverse_iterator3d
reverse_iterator plane_rend(const size_type slice)
Returns a read/write reverse iterator that points to one before the first element in the slice plane ...
Provides a class to manipulate Numerical Matrix.
This is some iterator to iterate a 3d container into a plane area defined by the subscripts of the 3d...
Provides some algorithms to apply C like functions to ranges.
std::reverse_iterator< const_row_range_iterator > const_reverse_row_range_iterator
Computes the L2 distance between two values x and y: .
Definition: compare.hpp:2425
std::reverse_iterator< component_col_iterator > reverse_component_col_iterator
Provides a class to iterate a 1d range according to a step.
std::reverse_iterator< component_iterator > reverse_component_iterator
std::reverse_iterator< component_iterator3d > reverse_component_iterator3d
bool operator==(const Array< T > &x, const Array< T > &y)
Definition: Array.hpp:1439
slip::stride_iterator< const_pointer > const_row_range_iterator
reverse_slice_iterator slice_rbegin(const size_type row, const size_type col)
Returns a read/write iterator that points to the last element of the line (row,col) threw the slices ...
std::reverse_iterator< const_iterator > const_reverse_row_iterator
slip::stride_iterator< const_block_pointer > const_component_col_iterator
bool empty() const
Returns true if the GenericMultiComponent3d is empty. (Thus size() == 0)
reverse_iterator3d rfront_upper_left()
Returns a read/write reverse iterator3d. It points to the back bottom right element of the GenericMul...
GenericMultiComponent3d(const size_type slices, const size_type rows, const size_type cols, InputIterator first, InputIterator last)
Contructs a GenericMultiComponent3d from a range.
slip::Array3d< Block >::const_iterator3d const_iterator3d
iterator end()
Returns a read/write iterator that points one past the last element in the Matrix3d. Iteration is done in ordinary element order.
Definition: Matrix3d.hpp:3946
CoordType height() const
compute the height of the Box3d.
Definition: Box3d.hpp:412
void fill(const Block *value)
Fills the container range [begin(),begin()+size()) with a copy of the value array.
std::reverse_iterator< component_iterator3d_range > reverse_component_iterator3d_range
T & max(const GrayscaleImage< T > &M1)
Returns the max element of a GrayscaleImage.
void fill(std::size_t component, InputIterator first, InputIterator last)
Fills the container range [begin(),begin()+size()) with a copy of the range [first,last)
size_type cols() const
Returns the number of columns (third dimension size) in the GenericMultiComponent3d.
GenericMultiComponent3d(const size_type slices, const size_type rows, const size_type cols, std::vector< InputIterator > first_iterators_list, InputIterator last)
Contructs a GenericMultiComponent3d from a 3 ranges.
iterator3d front_upper_left()
Returns a read/write iterator3d that points to the first element of the Matrix3d. It points to the fr...
Definition: Matrix3d.hpp:5030
iterator3d back_bottom_right()
Returns a read/write iterator3d that points to the past the end element of the Matrix3d. It points to past the end element of the back bottom right element of the Matrix3d.
Definition: Matrix3d.hpp:5045
Block max() const
Returns the max elements of the GenericMultiComponent3d according to the operator <...
size_type dim1() const
Returns the number of slices (first dimension size) in the GenericMultiComponent3d.
Block min() const
Returns the min elements of the GenericMultiComponent3d according to the operator <...
This is some iterator to iterate a 3d container into a Box area defined by the subscripts of the 3d c...