IResizableMatrix<T>.ReplaceColumns Method

Inserts zero or more columns into a matrix in place of zero or more other columns.

Definition

Namespace: Numerics.NET.LinearAlgebra
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
C#
void ReplaceColumns(
	int index,
	int count,
	Matrix<T> data
)

Parameters

index  Int32
The index of the first column that will be replaced.
count  Int32
The number of columns to replace.
data  Matrix<T>
A Matrix<T> containing the data for the columns.

Remarks

index becomes the index of the first new column in the matrix. To insert columns after the last column, use a value of ColumnCount. If count is zero, the columns are inserted at the specified index. If data is null, the specified columns are deleted.

The number of columns is decreased by count and increased by the number of columns of data.

Exceptions

ArgumentOutOfRangeException

index is less than zero or greater than the number of columns.

-or-

count is less than zero or greater than the number of columns from index to the end.

DimensionMismatchException

The number of rows of data does not equal the number of rows of the matrix.

See Also