74 #ifndef SLIP_COPY_EXT_HPP
75 #define SLIP_COPY_EXT_HPP
96 template <
typename _II,
typename _OI>
98 void copy(_II first, _II last, _OI output_first)
105 struct __copy<std::random_access_iterator_tag>
107 template <
typename _II,
typename _OI>
109 void copy(_II first, _II last, _OI output_first)
117 struct __copy<std::random_access_iterator2d_tag>
119 template <
typename _II,
typename _OI>
121 void copy(_II first, _II last, _OI output_first)
123 const size_t rows =
static_cast<size_t>((last-first)[0]);
124 for(
size_t i = 0; i < rows; ++i)
128 output_first.row_begin(i));
135 struct __copy<std::random_access_iterator3d_tag>
137 template <
typename _II,
typename _OI>
139 void copy(_II first, _II last, _OI output_first)
141 const size_t slices =
static_cast<size_t>((last-first)[0]);
142 const size_t rows =
static_cast<size_t>((last-first)[1]);
144 for(
size_t k = 0; k < slices; ++k)
146 for(
size_t i = 0; i < rows; ++i)
150 output_first.row_begin(k,i));
176 template <
typename _II,
typename _OI>
177 void copy(_II first, _II last, _OI output_first)
179 typedef typename std::iterator_traits<_II>::iterator_category _Category
188 #endif //SLIP_COPY_EXT
Provides a class to tag SLIP iterators.
Provides a class to manipulate iterator2d within a slip::Box2d. It is used to iterate throw 2d contai...
Provides a class to manipulate iterator3d within a slip::Range. It is used to iterate throw 3d contai...
void copy(_II first, _II last, _OI output_first)
Copy algorithm optimized for slip iterators.
Provides a class to manipulate iterator2d within a slip::Box3d. It is used to iterate throw 3d contai...
Provides a class to iterate 3d containers throw a planes.
Provides a class to manipulate iterator2d within a slip::Range. It is used to iterate throw 2d contai...