Function vector_copy (o2scl)¶
- 
template<class vec_t, class vec2_t>
 void o2scl::vector_copy(const vec_t &src, vec2_t &dest)¶
- Simple vector copy. - Copy - srcto- dest, resizing- destonly if it is too small to hold- src.size()elements.- This function will work for any classes - vec_tand- vec2_twhich have suitably defined- operator[],- size(), and- resize()methods.
- 
template<class vec_t, class vec2_t>
 void o2scl::vector_copy(size_t N, const vec_t &src, vec2_t &dest)¶
- Simple vector copy of the first N elements. - Copy the first - Nelements of- srcto- dest. It is assumed that the memory allocation for- desthas already been performed.- This function will work for any class - vec2_twhich has an operator[] which returns a reference to the corresponding element and class- vec_twith an operator[] which returns either a reference or the value of the corresponding element.