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.
Parses the JSON representation of a vector into a Vector.
Parses the JSON representation of a vector into a Vector.
Returns the p-norm of this vector.
Returns the p-norm of this vector.
input vector.
norm.
norm in Lp space.
Parses a string resulted from Vector.toString into a Vector.
Parses a string resulted from Vector.toString into a Vector.
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.mllib.linalg.Vector. We don't use the name
Vector
because Scala imports scala.collection.immutable.Vector by default.