Adds a scalar to each element of a vector.
Adds a scalar to each element of a vector.
Performs element-wise addition of two vectors.
Performs element-wise addition of two vectors.
Performs a shallow copy of the vector's contents.
Performs a shallow copy of the vector's contents. Each element is copied to a newly allocated vector of type V[N]. If N is a primitive or other value type, then this will be a deep copy. Otherwise, the reference will be copied.
Divides each vector element by a scalar.
Divides each vector element by a scalar.
Performs element-wise division between two vectors.
Performs element-wise division between two vectors.
Performs a dot product operation between two vectors, which results in a scalar.
Performs a dot product operation between two vectors, which results in a scalar.
Create a new vector of the input size where each element has the value v.
Create a new vector of the input size where each element has the value v.
From the starting value, zero, applies the function combine to elements of the input vector v.
From the starting value, zero, applies the function combine to elements of the input vector v. This method evaluates to the final accumulated value of this operation across all elements of the vector. Execution order is not guaranteed, so combine must be side-effect free, associative, and communicative.
Change every element of a vector V using the function f.
Change every element of a vector V using the function f. No side effects.
Multiplies each vector element by a scalar.
Multiplies each vector element by a scalar.
Performs element-wise multiplication between two vectors.
Performs element-wise multiplication between two vectors.
Creates a new vector of the input size where each element has value 1.
Creates a new vector of the input size where each element has value 1.
Apply a binary combination operator, r, to pairs of elements from the input vector, v.
Apply a binary combination operator, r, to pairs of elements from the input vector, v. Note that the output of r shall be applied to both vector elements as well as other, previous outputs from r. The order of execution is not guaranteed. Therefore, it is important that r is associative and communiative.
Subtracts a scalar from each element of a vector.
Subtracts a scalar from each element of a vector.
Performs element-wise subtraction of two vectors.
Performs element-wise subtraction of two vectors.
Creates a new vector of the input size where each element has value 0.
Creates a new vector of the input size where each element has value 0.
Implementation for SparseVector[Double].