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

Copy the contents of this Matrix to a new DataBlock.

The detach method copies the data viewed by this Matrix to a fresh DataBlock, detaches this Matrix from its old block and attaches it to the new block. The old DataBlock will be deallocated if no other matrices view the block after this one detaches.

This method can be used to ensure that this Matrix is the sole viewer of its DataBlock. It also ensures that the underlying data is stored contiguously in memory.

See also:
copy()
resize(uint, uint, bool)
Exceptions:
scythe_alloc_error(Level 1)