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)

To access elements:

  • #[](i)

To enumerate the elements:

  • #each2(v)

  • #collect2(v)

Properties of vectors:

Vector arithmetic:

  • #*(x) “is matrix or number”

  • #+(v)

  • #-(v)

  • #/(v)

  • #+@

  • #-@

Vector functions:

Conversion to other data types:

String representations:

Show files where this class is defined (1 file)
Register or log in to add new notes.