The Vector class represents a mathematical vector, which is useful in its own right, and also constitutes a row or column of a Matrix.
Method Catalogue
To create a Vector:
-
Vector.[](*array)
-
Vector.elements(array, copy = true)
-
Vector.basis(size: n, index: k)
-
Vector.zero(n)
To access elements:
-
#[](i)
To enumerate the elements:
-
#each2(v)
-
#collect2(v)
Properties of vectors:
-
#angle_with(v)
-
Vector.independent?(*vs)
-
#independent?(*vs)
Vector arithmetic:
Vector functions:
Conversion to other data types:
String representations: