The smx.iface package contains interfaces representing matrices for different number types. The matrix classes use generics and support high interoperability between matrices of different number types.

For highest possible consistency in combination with interoperability, a matrix is split into a {@link ch.javasoft.smx.iface.ReadableMatrix readable} and a {@link ch.javasoft.smx.iface.WritableMatrix writable} part; a concrete matrix typically implements both the readable and writable part. The inheritance structure, however, is reverted for readable and writable.

To illustrate this, assume two different matrix types, one for integer values and the other for double precision numbers. If some method expects a double precision matrix as input, you can always pass an integer matrix instead of the double precision matrix, since every integer value is also a double precision value. However, if another function stores values in a matrix, you cannot submit an integer matrix instead of a double matrix, since storing double values would not be possible for the integer matrix. But the reverse is true for the writable part: if the function wants to store integer values, you can also submit a matrix which is capable of storing double values, since also integer values can be stored in a double matrix. Consequently, the read- and write matrix inheritance structures are reverted.