Click or drag to resize

VectorTFold2TOther, TState Method

Applies a function to update the status with each value pair of two vectors 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,
	Vector<TOther> other,
	Zeros zeros = Zeros.AllowSkip
)
where TOther : struct, new(), IEquatable<TOther>, IFormattable

Parameters

f  FuncTState, T, TOther, TState
The folding function.
state  TState
The initial state.
other  VectorTOther
The other vector.
zeros  Zeros  (Optional)
Specifies whether zero values may be skipped.

Type Parameters

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

Return Value

TState
The final accumulated state.
See Also