Matrix<T>.ReduceColumns<U> Method

Applies a function to each column in a matrix and returns the result as a vector.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
public DenseVector<U> ReduceColumns<U>(
	Func<Vector<T>, U> function
)

Parameters

function  Func<Vector<T>, U>
A delegate that represents a multivariate function.

Type Parameters

U

Return Value

DenseVector<U>
A DenseVector<T> whose elements are the result of applying function to each column of the matrix.

Remarks

The length of the returned vector equals the number of columns in the matrix.

Exceptions

ArgumentNullException

function is null.

See Also