Click or drag to resize

MatrixTMapIndexedTU(FuncInt32, Int32, T, TU, Zeros) Method

Applies a function to each value of this matrix and returns the results as a new matrix. The index of each value (zero-based) is passed as first argument to the function. If forceMapZero is not set to true, zero values may or may not be skipped depending on the actual data storage implementation (relevant mostly for sparse matrices).

Namespace: Altaxo.Calc.LinearAlgebra
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
public Matrix<TU> MapIndexed<TU>(
	Func<int, int, T, TU> f,
	Zeros zeros = Zeros.AllowSkip
)
where TU : struct, new(), IEquatable<TU>, IFormattable

Parameters

f  FuncInt32, Int32, T, TU
The mapping function to apply to each indexed value.
zeros  Zeros  (Optional)
Controls whether zero values may be skipped.

Type Parameters

TU
The target element type.

Return Value

MatrixTU
A new matrix containing the mapped values.
See Also