Applies a function to each row or column in a matrix and returns the result as a vector.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public DenseVector<U> Reduce<U>(
Func<Vector<T>, U> function,
DimensionType dimension
)
Public Function Reduce(Of U) (
function As Func(Of Vector(Of T), U),
dimension As DimensionType
) As DenseVector(Of U)
public:
generic<typename U>
DenseVector<U>^ Reduce(
Func<Vector<T>^, U>^ function,
DimensionType dimension
)
member Reduce :
function : Func<Vector<'T>, 'U> *
dimension : DimensionType -> DenseVector<'U>
Parameters
- function
- Type: SystemFuncVectorT, U
A delegate that represents a multivariate function. - dimension
- Type: Extreme.MathematicsDimensionType
The dimension that should be reduced.
Type Parameters
- U
Return Value
Type:
DenseVectorUA
DenseVectorT whose elements are the result of applying
function to each row or column of the matrix.
The length of the returned vector equals the number of rows or columns in the matrix.
Reference