Creates a dense vector from a double array.
Creates a dense vector from a double array.
Creates a dense vector from its values.
Creates a dense vector from its values.
Returns the p-norm of this vector.
Returns the p-norm of this vector.
input vector.
norm.
norm in Lp space.
Creates a sparse vector using unordered (index, value) pairs in a Java friendly way.
Creates a sparse vector using unordered (index, value) pairs in a Java friendly way.
vector size.
vector elements in (index, value) pairs.
Creates a sparse vector using unordered (index, value) pairs.
Creates a sparse vector using unordered (index, value) pairs.
vector size.
vector elements in (index, value) pairs.
Creates a sparse vector providing its index array and value array.
Creates a sparse vector providing its index array and value array.
vector size.
index array, must be strictly increasing.
value array, must have the same length as indices.
Returns the squared distance between two Vectors.
Returns the squared distance between two Vectors.
first Vector.
second Vector.
squared distance between two Vectors.
Creates a vector of all zeros.
Creates a vector of all zeros.
vector size
a zero vector
Factory methods for org.apache.spark.ml.linalg.Vector. We don't use the name
Vector
because Scala importsscala.collection.immutable.Vector
by default.