Flowdock

The Vector class represents a mathematical vector, which is useful in its own right, and also constitutes a row or column of a Matrix.

<a href="/ruby/Method">Method</a> Catalogue

To create a Vector:

  • Vector.[](*array)
  • Vector.elements(array, copy = true)

To access elements:

  • [](i)

To enumerate the elements:

  • #each2(v)
  • #collect2(v)

Vector arithmetic:

  • *(x) "is matrix or number"
  • +(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.