Matrix<T>.CopyToOrClone Method

Copies the elements of this vector to another matrix, if it exists; otherwise clones the matrix using the specified method.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
public Matrix<T> CopyToOrClone(
	Matrix<T>? destination,
	CloningMethod method
)

Parameters

destination  Matrix<T>
A matrix whose elements are to be set.
method  CloningMethod
A CloningMethod that specifies how the matrix should be cloned if destination is null.

Return Value

Matrix<T>
A reference to the destination matrix.

Exceptions

ArgumentException

The length of destination is less than the length of this instance.

See Also