1 | There is a rectangular array interface, which would allow multiple implementations. |
2 | Class doubleArray implements part of the interface by providing get and set methods for indexing elements. |
3 | Classes doubleArray1D, doubleArray2D, . . . implement the various ranks |
4 | 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. |
5 | 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. |