Go to the first, previous, next, last section, table of contents.


Basic Vector Functions

A fract_vector object can be constructed from an integer_row (see section Row Manipulation) or another fract_vector. A constructor is also available that takes the number of elements and creates an empty fract_vector (the elements are initialized to 0).

The n method returns the number of elements in the vector. The elt method and [] operator take an element number as an argument and return a reference to the fraction at that position in the vector. The is_zero method returns TRUE if all elements of the vector are 0. Also, equality, inequality and assignment operators are available.


Go to the first, previous, next, last section, table of contents.