Click or drag to resize

MatrixTFold2TOther, TState Method

Applies a function to update the status with each value pair of two matrices and returns the resulting status.

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

Parameters

f  FuncTState, T, TOther, TState
The folding function to apply to each pair of values.
state  TState
The initial accumulator state.
other  MatrixTOther
The other matrix supplying the second value of each pair.
zeros  Zeros  (Optional)
Controls whether zero values may be skipped.

Type Parameters

TOther
The element type of the other matrix.
TState
The accumulator state type.

Return Value

TState
The final accumulator state.
See Also