52 #ifndef __PCL_Memory_h
53 #define __PCL_Memory_h
74 template <
class FI,
class T>
inline
75 void Fill( FI i, FI j,
const T& v )
83 template <
class FI,
class T,
class F>
inline
84 void Fill( FI i, FI j,
const T& v, F f )
92 template <
class FI1,
class FI2>
inline
93 FI1 Copy( FI1 i1, FI2 i2, FI2 j2 )
95 for ( ; i2 != j2; ++i1, ++i2 )
102 template <
class FI1,
class FI2,
class F>
inline
103 FI1 Copy( FI1 i1, FI2 i2, FI2 j2, F f )
105 for ( ; i2 != j2; ++i1, ++i2 )
112 template <
class BI1,
class BI2>
inline
113 BI1 CopyBackward( BI1 j1, BI2 i2, BI2 j2 )
122 template <
class BI1,
class BI2,
class F>
inline
123 BI1 CopyBackward( BI1 j1, BI2 i2, BI2 j2, F f )
132 template <
class BI1,
class FI2>
inline
133 BI1 CopyReversed( BI1 j1, FI2 i2, FI2 j2 )
135 for ( ; i2 != j2; ++i2 )
142 template <
class BI1,
class FI2,
class F>
inline
143 BI1 CopyReversed( BI1 j1, FI2 i2, FI2 j2, F f )
145 for ( ; i2 != j2; ++i2 )
152 template <
class RI1,
class RI2>
inline
153 RI1 Move( RI1 i1, RI2 i2, RI2 j2 )
157 j1 = Copy( i1, i2, j2 );
161 CopyBackward( j1, i2, j2 );
168 template <
class RI1,
class RI2,
class F>
inline
169 RI1 Move( RI1 i1, RI2 i2, RI2 j2, F f )
173 j1 = Copy( i1, i2, j2, f );
177 CopyBackward( j1, i2, j2, f );
184 template <
class RI1,
class RI2>
inline
189 i1 = CopyBackward( j1, i2, j2 );
200 template <
class RI1,
class RI2,
class F>
inline
205 i1 = CopyBackward( j1, i2, j2, f );
209 Copy( i1, i2, j2, f );
216 template <
class FI,
class T1,
class T2>
inline
217 void Replace( FI i, FI j,
const T1& v1,
const T2& v2 )
219 for ( ; i != j; ++i )
226 template <
class FI,
class T1,
class T2,
class BP>
inline
227 void Replace( FI i, FI j,
const T1& v1,
const T2& v2, BP p )
229 for ( ; i != j; ++i )
void MoveBackward(BI &i, size_type n)