SparseVector
Namespace: Semagle.Numerics.Vectors
Sparse vector stores non-zero values and non-zero values indices
Constructors
Constructor | Description |
new(indices, values)
Signature: (indices:int [] * values:float32 []) -> SparseVector
|
CompiledName: .ctor
|
Instance members
Instance member | Description |
x.GetSlice(a, b)
Signature: (a:int option * b:int option) -> SparseVector
|
Returns vector slice
|
x.Indices
Signature: int []
|
Returns underlying indices array
CompiledName: get_Indices
|
[i]
Signature: i:int -> float32
|
Gets vector element value
|
x.Values
Signature: float32 []
|
Returns underlying values array
CompiledName: get_Values
|
Static members
Static member | Description |
SparseVector.( - )(a, b)
Signature: (a:SparseVector * b:SparseVector) -> SparseVector
|
Element-wise substraction
CompiledName: op_Subtraction
|
SparseVector.( .* )(a, b)
Signature: (a:SparseVector * b:SparseVector) -> float32
|
Scalar product
CompiledName: op_DotMultiply
|
SparseVector.( * )(a, c)
Signature: (a:SparseVector * c:float32) -> SparseVector
|
Mutiply each element of vector by scalar
CompiledName: op_Multiply
|
SparseVector.( * )(a, b)
Signature: (a:SparseVector * b:SparseVector) -> SparseVector
|
Element-wise multiplication
CompiledName: op_Multiply
|
SparseVector.( / )(a, c)
Signature: (a:SparseVector * c:float32) -> SparseVector
|
Divide each element of vector by scalar
CompiledName: op_Division
|
SparseVector.( + )(a, b)
Signature: (a:SparseVector * b:SparseVector) -> SparseVector
|
Element-wise addition
CompiledName: op_Addition
|
SparseVector.( ||-|| )(a, b)
Signature: (a:SparseVector * b:SparseVector) -> float32
|
Squared Euclidean distance \(||a-b||^2\)
CompiledName: op_BarBarMinusBarBar
|
SparseVector.( ~- )(a)
Signature: a:SparseVector -> SparseVector
|
Negation of vector
CompiledName: op_UnaryNegation
|
SparseVector.Zero
Signature: SparseVector
|
Zero sparse vector
CompiledName: get_Zero
|