public interface Vector
extends scala.Serializable
Modifier and Type | Method and Description |
---|---|
double |
apply(int index)
Element wise access function
|
Vector |
copy()
Copies the vector instance
|
double |
dot(Vector other)
Returns the dot product of the recipient and the argument
|
boolean |
equalsVector(Vector vector) |
double |
magnitude()
Magnitude of a vector
|
Matrix |
outer(Vector other)
Returns the outer product of the recipient and the argument
|
int |
size()
Number of elements in a vector
|
void |
update(int index,
double value)
Updates the element at the given index with the provided value
|
int size()
double apply(int index)
index
- index of the accessed elementvoid update(int index, double value)
index
- The index of the element to be updatedvalue
- The new valueVector copy()
double dot(Vector other)
other
- a VectorMatrix outer(Vector other)
other
- a Vectordouble magnitude()
boolean equalsVector(Vector vector)
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.