Click or drag to resize

MatrixMathMapIndexedT, T1(IROMatrixT, T1, FuncInt32, Int32, T, T1, T, IMatrixT, Zeros) Method

Applies the specified function to each element of the matrix, providing the element's row and column indices as well as an additional parameter.

Namespace: Altaxo.Calc.LinearAlgebra
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
public static void MapIndexed<T, T1>(
	this IROMatrix<T> src1,
	T1 parameter1,
	Func<int, int, T, T1, T> function,
	IMatrix<T> result,
	Zeros zeros = Zeros.AllowSkip
)
where T : struct, new()

Parameters

src1  IROMatrixT
The source matrix.
parameter1  T1
The additional parameter to pass to the function.
function  FuncInt32, Int32, T, T1, T
The function to apply to each matrix element. It receives the row index, column index, element value, and the additional parameter.
result  IMatrixT
The matrix to store the result. Must have the same dimensions as src1.
zeros  Zeros  (Optional)
Specifies how to handle zero elements. Default is to allow skipping zeros.

Type Parameters

T
The matrix element type.
T1
The type of the additional parameter.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IROMatrixT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also