Construction | Use idioms like DoubleFactory2D.dense.make(4,4) to construct dense matrices, DoubleFactory2D.sparse.make(4,4) to construct sparse matrices. |
Construction with initial values | Use other make methods to construct matrices with given initial values. |
Appending rows and columns | Use methods {@link #appendColumns(DoubleMatrix2D,DoubleMatrix2D) appendColumns}, {@link #appendColumns(DoubleMatrix2D,DoubleMatrix2D) appendRows} and {@link #repeat(DoubleMatrix2D,int,int) repeat} to append rows and columns. |
General block matrices | Use methods {@link #compose(DoubleMatrix2D[][]) compose} and {@link #decompose(DoubleMatrix2D[][],DoubleMatrix2D) decompose} to work with general block matrices. |
Diagonal matrices | Use methods {@link #diagonal(DoubleMatrix1D) diagonal(vector)}, {@link #diagonal(DoubleMatrix2D) diagonal(matrix)} and {@link #identity(int) identity} to work with diagonal matrices. |
Diagonal block matrices | Use method {@link #composeDiagonal(DoubleMatrix2D,DoubleMatrix2D,DoubleMatrix2D) composeDiagonal} to work with diagonal block matrices. |
Random | Use methods {@link #random(int,int) random} and {@link #sample(int,int,double,double) sample} to construct random matrices. |
If the factory is used frequently it might be useful to streamline the notation. For example by aliasing:
DoubleFactory2D F = DoubleFactory2D.dense; F.make(4,4); F.descending(10,20); F.random(4,4); ... |
|
|