Ruby Vector Functions
EditRocket provides the following information on Vector functions in the Ruby source code builder.
clone() - Return a copy of the vector.
coerce(other) - "FIXME: describe Vector#coerce."
collect( {|e| ...} - Like Array#collect.
collect2(v) - Collects (as in Enumerable#collect) over the elements of this vector and v in conjunction.
compare_by(elements) - For internal use.
covector() - Creates a single-row matrix from this vector.
each2(v) - Iterate over the elements of this vector and v in conjunction.
elements(array, copy = true) - Creates a vector from an Array. The optional second argument specifies whether the array itself or a copy is used internally.
eqn?(other) - "Alias for #=="
hash() - Return a hash-code for the vector.
init_elements(array, copy) - For internal use.
inner_product(v) - Returns the inner product of this vector with the other.
inspect() - Overrides Object#inspect
map( - "Alias for #collect"
map2(v) - Like Vector#collect2, but returns a Vector instead of an Array.
new(method, array, copy) - For internal use.
r() - Returns the modulus (Pythagorean distance) of the vector.
size() - Returns the number of elements in the vector.
to_a() - Returns the elements of the vector in an array.
to_s() - Overrides Object#to_s