Click or drag to resize
Accord.NET (logo)

SparseT Class

Sparse vector representation (in LibSVM format).
Inheritance Hierarchy
SystemObject
  Accord.MathSparseT

Namespace:  Accord.Math
Assembly:  Accord (in Accord.dll) Version: 3.8.0
Syntax
[SerializableAttribute]
public sealed class Sparse<T> : IEnumerable, 
	ICloneable, IList, ICollection, IFormattable
where T : Object, IEquatable<T>
Request Example View Source

Type Parameters

T
The type for the non-zero elements in this vector.

The SparseT type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyIndices
Gets or sets the vector of indices indicating the location of the non-zero elements contained in this sparse vector.
Public propertyItem
Gets the the value stored at position i.
Public propertyLength
Gets the maximum non-zero element index in the sparse vector.
Public propertyValues
Gets or sets the vector of values indicating which non-zero value happens at each position indicated in Indices.
Top
Methods
  NameDescription
Public methodClone
Creates a new object that is a copy of the current instance.
Public methodCopyTo
Copies the elements of the ICollectionT to an Array, starting at a particular Array index.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsFull
Determines whether this Sparse vector has elements on all indices.
Public methodToDense
Converts this sparse vector to a dense vector of the given length.
Public methodToDense(Int32)
Converts this sparse vector to a dense vector of the given length.
Public methodToSparse
Converts this sparse vector to a sparse representation where the indices are intertwined with their corresponding values.
Public methodToString
Returns a String that represents this instance.
(Overrides ObjectToString.)
Public methodToString(String, IFormatProvider)
Returns a String that represents this instance.
Top
Operators
  NameDescription
Public operatorStatic member(SparseT to Array)
Performs an implicit conversion from SparseT to Array.
Top
Extension Methods
  NameDescription
Public Extension MethodApplyT, TResult(FuncT, TResult)Overloaded.
Applies a function to every element of the array.
(Defined by Matrix.)
Public Extension MethodApplyT, TResult(FuncT, TResult, TResult)Overloaded.
Applies a function to every element of the array.
(Defined by Matrix.)
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodSetEqualsT
Compares two enumerables for set equality. Two enumerables are set equal if they contain the same elements, but not necessarily in the same order.
(Defined by Matrix.)
Public Extension MethodShuffleT
Shuffles a collection.
(Defined by Vector.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
See Also