Scythe-1.0.3
template<matrix_order ORDER1, matrix_order ORDER2, typename T , matrix_order SO, matrix_style SS, matrix_order DO, matrix_style DS>
void scythe::copy_recycle ( const Matrix< T, SO, SS > &  source,
Matrix< T, DO, DS > &  dest 
)

Copy the contents of one Matrix into another.

This function copies the contents of one Matrix into another, traversing each Matrix in the order specified by the template terms ORDER1 and ORDER2. If source is larger than dest, the function only copies as many elements from source as will fit in dest. On the other hand, if source is smaller than dest, the function will start over at the beginning of source, recycling the contents of source as many times as necessary to fill dest. This function requires an explicit template call that specifies ORDER1 and ORDER2.

Parameters:
sourceThe Matrix to copy.
destThe Matrix to copy into.

References copy(), min(), and scythe::Matrix_base< ORDER, STYLE >::size().