VectorTMapIndexedTU(FuncInt32, T, TU, Zeros) Method |
Applies a function to each value of this vector and returns the results as a new vector.
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 vectors).
Namespace: Altaxo.Calc.LinearAlgebraAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntaxpublic Vector<TU> MapIndexed<TU>(
Func<int, T, TU> f,
Zeros zeros = Zeros.AllowSkip
)
where TU : struct, new(), IEquatable<TU>, IFormattable
Parameters
- f FuncInt32, T, TU
- The indexed conversion function.
- zeros Zeros (Optional)
- Specifies whether zero values may be skipped.
Type Parameters
- TU
- The target element type.
Return Value
VectorTUA new vector containing the mapped values.
See Also