Click or drag to resize

DoubleSparseVector(DoubleVector, IndexArray, Int32) Constructor

Constructs a DoubleSparseVector instance from the given data.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public DoubleSparseVector(
	DoubleVector nonZeroEntries,
	IndexArray indices,
	int numberNonZero
)

Parameters

nonZeroEntries  DoubleVector
The non-zero entries of the sparse vector.
indices  IndexArray
The indices of the non-zero entries such that the index of ith non-zero entry of 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