@TypeInfo(value=VectorTypeInfoFactory.class) @PublicEvolving public interface Vector extends Serializable
Modifier and Type | Method and Description |
---|---|
Vector |
clone()
Makes a deep copy of the vector.
|
double |
get(int i)
Gets the value of the ith element.
|
void |
set(int i,
double value)
Sets the value of the ith element.
|
int |
size()
Gets the size of the vector.
|
double[] |
toArray()
Converts the instance to a double array.
|
DenseVector |
toDense()
Converts the instance to a dense vector.
|
SparseVector |
toSparse()
Converts the instance to a sparse vector.
|
int size()
double get(int i)
void set(int i, double value)
double[] toArray()
DenseVector toDense()
SparseVector toSparse()
Vector clone()
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.