@TypeInfo(value=SparseVectorTypeInfoFactory.class) public class SparseVector extends Object implements Vector
Constructor and Description |
---|
SparseVector(int n,
int[] indices,
double[] values) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
double |
get(int i)
Gets the value of the ith element.
|
int |
hashCode() |
int |
size()
Gets the size of the vector.
|
double[] |
toArray()
Converts the instance to a double array.
|
String |
toString() |
public final int n
public final int[] indices
public final double[] values
public int size()
Vector
public double get(int i)
Vector
public double[] toArray()
Vector
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.