MatrixView<T>.CloneData Method

Gives this instance its own copy of its elements.

Definition

Namespace: Numerics.NET.LinearAlgebra
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
public override void CloneData()

Remarks

When a MatrixView<T> is first created, it reflects the data of the underlying matrix. Changing an element in the matrix view changes the corresponding element in the underlying matrix.

This method ensures that this instance has its own copy of the data. After a call to this method, any changes to the elements of this MatrixView<T> will only affect this instance. Moreover, the elements are guaranteed to be in one contiguous block of memory.

Use of CloneData() is not recommended for MatrixView<T> objects. Use the ToDenseMatrix() method instead.

See Also