Click or drag to resize

DoubleSparseVector Class

Class DoubleSparseVector encapsulates a general sparse vector.
Inheritance Hierarchy
SystemObject
  CenterSpace.NMath.CoreSparseVectorDataDouble
    CenterSpace.NMath.CoreDoubleSparseVector

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 7.4
Syntax
[SerializableAttribute]
public class DoubleSparseVector : SparseVectorData<double>

The DoubleSparseVector type exposes the following members.

Constructors
  NameDescription
Public methodDoubleSparseVector(Int32)
Constructs a DoubleSparseVector instance sized for the given number of non-zero entries. The resulting instance will not be useable until the
Entries
and
Indices
arrays are populated.
Public methodDoubleSparseVector(Double, IndexArray)
Constructs a DoubleSparseVector instance from the given data.
Public methodDoubleSparseVector(DoubleVector, IndexArray)
Constructs a DoubleSparseVector instance from the given data.
Public methodDoubleSparseVector(Double, IndexArray, Int32)
Constructs a DoubleSparseVector instance from the given data.
Public methodDoubleSparseVector(DoubleVector, IndexArray, Int32)
Constructs a DoubleSparseVector instance from the given data.
Public methodDoubleSparseVector(Double, IndexArray, Int32, Boolean)
Constructs a DoubleSparseVector instance from the given data.
Top
Properties
Methods
  NameDescription
Public methodStatic memberAdd(DoubleSparseVector, DoubleVector)
Adds a dense vector to a sparse vector. The result is a dense vector.
Public methodStatic memberAdd(DoubleVector, DoubleSparseVector)
Adds a dense vector to a sparse vector. The result is a dense vector.
Public methodClone
Creates a deep copy of this sparse vector.
(Overrides SparseVectorDataTClone.)
Public methodStatic memberDivide
Divides a sparse vector by a scalar.
Public methodEquals(Object)
Equality of sparse vectors. Sparse vectors objects are equal if they have the same nonzero elements.
(Overrides SparseVectorDataTEquals(Object).)
Public methodEquals(SparseVectorDataT)
Equality of sparse vector data. Sparse vector data objects are equal if they have the same nonzero elements.
(Inherited from SparseVectorDataT.)
Public methodGetHashCode
Gets the hash code for this instance.
(Overrides SparseVectorDataTGetHashCode.)
Public methodStatic memberMultiply(Double, DoubleSparseVector)
Multiplies a sparse vector by a scalar.
Public methodStatic memberMultiply(DoubleSparseVector, Double)
Multiplies a sparse vector by a scalar.
Public methodScale
Scales each element in the sparse vector by the specified value.
Protected methodSetData
Sets the sparse vector data of self to the given values.
(Inherited from SparseVectorDataT.)
Public methodStatic memberSubtract
Subtracts a sparse vector from a dense vector. The result is a dense vector.
Public methodToString
String representation.
(Overrides ObjectToString.)
Public methodToString(String)
String representation with desired numeric formatting.
Public methodTwoNorm
Computes the Euclidean norm of the element of self.
Top
Operators
  NameDescription
Public operatorStatic memberAddition(DoubleSparseVector, DoubleVector)
Adds a dense vector to a sparse vector. The result is a dense vector.
Public operatorStatic memberAddition(DoubleVector, DoubleSparseVector)
Adds a dense vector to a sparse vector. The result is a dense vector.
Public operatorStatic memberDivision
Divides a sparse vector by a scalar.
Public operatorStatic memberMultiply(Double, DoubleSparseVector)
Multiplies a sparse vector by a scalar.
Public operatorStatic memberMultiply(DoubleSparseVector, Double)
Multiplies a sparse vector by a scalar.
Public operatorStatic memberSubtraction
Subtracts a sparse vector from a dense vector. The result is a dense vector.
Top
Fields
Remarks
Only nonzero values are stored.
See Also