Click or drag to resize

SparseVectorDataT Class

Class SparseVectorData stores sparse vector data.
Inheritance Hierarchy

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 7.3
Syntax
[SerializableAttribute]
public class SparseVectorData<T> : ICloneable, 
	IEquatable<SparseVectorData<T>>

Type Parameters

T
The type of the nonzero elements. Either double or DoubleComplex

The SparseVectorDataT type exposes the following members.

Constructors
  NameDescription
Protected methodSparseVectorDataT
Constructs an empty SparseVectorData instance.
Protected methodSparseVectorDataT(Int32)
Constructs a SparseVectorData instance with the given capacity.
Protected methodSparseVectorDataT(T, IndexArray)
Constructs a SparseVectorData instance from the given data.
Protected methodSparseVectorDataT(T, IndexArray, Int32)
Constructs a SparseVectorData instance from the given data.
Protected methodSparseVectorDataT(T, IndexArray, Int32, Boolean)
Constructs a SparseVectorData instance from the given data.
Top
Properties
  NameDescription
Public propertyEntries
Gets and set the non-zero entries.
Public propertyIndices
Gets and sets the non-zero entry's Indices.
Public propertyItem
Gets and sets the value at the given index.
Public propertyNumberNonZero
Gets an sets the number of non-zero elements.
Top
Methods
  NameDescription
Public methodClone
Creates a deep copy of this sparse vector.
Public methodEquals(Object)
Equality of sparse vector data. Sparse vector data objects are equal if they have the same nonzero elements.
(Overrides ObjectEquals(Object).)
Public methodEquals(SparseVectorDataT)
Equality of sparse vector data. Sparse vector data objects are equal if they have the same nonzero elements.
Public methodGetHashCode
Computes the hash code for self.
(Overrides ObjectGetHashCode.)
Protected methodSetData
Sets the sparse vector data of self to the given values.
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Tests for equality of two sparse vector datas. The datas are equal if they have the same nonzero elements.
Public operatorStatic memberInequality
Tests for inequality of two sparse vector datas. The datas are equal if they have the same nonzero elements.
Top
Fields
  NameDescription
Public fieldStatic memberBLOCK_SIZE
Resiziable arrays will be allocated in blocks this size.
Protected fieldentries_
Non-zero entries of the sparse vector.
Protected fieldindices_
Indices of the non-zero entries such that the ith non-zero entry has index indices_[i].
Protected fieldnumNonZero_
Number of non-zero elements in the sparse vector.
Top
Remarks
The nonzero elements of the vector are stored in a resizable array of type T and their corresponding indices are stored in a separate, parallel array of integers.
See Also