Click or drag to resize

FloatSparseVector(Single, IndexArray, Int32) Constructor

Constructs a FloatSparseVector instance from the given data.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public FloatSparseVector(
	float[] nonZeroEntries,
	IndexArray indices,
	int numberNonZero
)

Parameters

nonZeroEntries  Single
The non-zero entries of the sparse vector.
indices  IndexArray
The indices of the non-zero entries such that the index of ith entry of
C#
nonZeroEntries
is
C#
indices[i]
numberNonZero  Int32
The number of non-zero entries in the sparse vector. Must be less than or equal to the number of elements in
C#
nonZeroEntries
and
C#
indices
.
Exceptions
ExceptionCondition
ArgumentExceptionThrown if the length of either
C#
nonZeroEntries
or
C#
indices
is less than
C#
numberNonZero
.
Remarks
The input data is copied.
See Also