Click or drag to resize

CreateVectorSparseT(Int32, FuncInt32, T) Method

Create a new sparse vector and initialize each value using the provided init function.

Namespace: Altaxo.Calc.LinearAlgebra
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
public static Vector<T> Sparse<T>(
	int length,
	Func<int, T> init
)
where T : struct, new(), IEquatable<T>, IFormattable

Parameters

length  Int32
The length of the vector to create.
init  FuncInt32, T
The initializer used to populate each entry.

Type Parameters

T
The element type of the vector.

Return Value

VectorT
The created vector.
See Also