Object creation: Use type-specific factory classes which implement IMatrix(Double)Factory (Done)
Algorithms: Individual operations in Algorithm classes, such as Addition.java and Multiplication.java. Executed by standard method name, e.g. Multiplication.exec( IDoubleMatrix A, IDoubleMatrix B ) (Done)
Each algorithm has a default implementation (for dense matrices/vectors) (Done)
Algorithms can have additional more efficient implementations for arbitrary combinations of specific types (e.g. Multiplication.exec( SparseDoubleMatrix A, SparseDoubleVector x )). This requires multi-dispatching or multi-methods, which means, that overloaded methods are called by the dynamical type of arguments instead of static type. Solution possibilities:
Several if-statements and instanceof operator.
Use of double inheritance to "simulate" multi dispatching.
Java reflection API.
Dynamic dispatcher via interfaces ( ← chosen )
(Open) General dispatching mechanism (not only based on dynamic type, but instead uses interface IDispatchable with boolean checkArguments() to select appropiate method)