Scythe-1.0.3
template<typename T_type = double, matrix_order ORDER = Col, matrix_style STYLE = Concrete>
void scythe::Matrix< T_type, ORDER, STYLE >::swap ( Matrix< T_type, ORDER, STYLE > &  M) [inline]

Swap this Matrix with another.

This modifier is much like a dual copy constructor and is part of the Standard Template Library (STL) interface for container objects. It is only possible to swap two matrices of the same matrix_order and matrix_style. When two matrices are swapped, they trade their underlying DataBlock and dimensions. This behavior is perfectly natural for views, but my seem somewhat surprising for concrete matrices. When two concrete matrices are swapped, any views that referenced either matrices' DataBlock will reference the other matrices' DataBlock after the swap.

Parameters:
M- The Matrix to swap with.