There is a rectangular array interface, which would allow multiple implementations. |
Class doubleArray implements part of the interface by providing get and set methods for indexing elements. |
Classes doubleArray1D, doubleArray2D, . . . implement the various ranks |
One of the constructors: new doubleArray2D ( a ); takes a Java array a of type double[ ] [ ] and makes a rectangular array of the same shape and values. |
Various get methods allow to select elements, rows, columns, or various slices. The implementation may store the array as a 1D object and can thus optimize these operations. |