The simplest case of a vector is probably a single Real number.
The Real class is useful since its objects represent the range of
any functional, . Functionals are
formulated in many (but not all) minimization problems.
A Real object contains a single Java float number and
implements all mathematical vector operations.
In Juice, all Real numbers have the same vector space.
Alternatively, an author can implement a Real number class
with physical dimensions
as an Rsf with a single element and an Rsf space with a single axis.
Additionally, we implemented n-dimensional real vectors, Rn. Our Rn vectors can have a shape and are not necessarily a one-dimensional array of floats. We mostly use Rn for testing within the Juice part of Jag.
Jag also includes an experimental version of an Irregularly Sampled Function, Isf. The Isf class is best thought of as an array of vectors which themselves can be of Isf, Rsf, or any other vector type. The Isf handles most vector operations by invoking the corresponding methods of its elements. The parameters that describe each individual vector element are stored in a two dimensional table, a sort of object-oriented relational data base. The implementation of the parameter table permits a programmer to allocate additional keys and vector elements easily.