org.ojalgo.matrix
Class MatrixFactory<N extends Number>
java.lang.Object
org.ojalgo.matrix.MatrixFactory<N>
- All Implemented Interfaces:
- BasicMatrix.Factory
public final class MatrixFactory<N extends Number>
- extends Object
- implements BasicMatrix.Factory
MatrixFactory creates instances of classes that implement the
BasicMatrix interface and have a
constructor that takes a MatrixStore as input.
MatrixFactory uses reflection to call the constructor.
This takes slightly longer than calling the matrix' constructors directly.
If you need to instantiate a large number of small matrices; using DefaultFactory
may not be your best alternative. In that case you should consider coding
a different MatrixFactory implementation. In the vast majority of cases
you do not need to worry about this.
- Author:
- apete
copy
public BasicMatrix copy(Access2D<? extends Number> aSource)
- Specified by:
copy in interface BasicMatrix.Factory
copy
public BasicMatrix copy(double[][] aSource)
- Specified by:
copy in interface BasicMatrix.Factory
instantiate
public final BasicMatrix instantiate(MatrixStore<N> aStore)
makeColumnVector
public BasicMatrix makeColumnVector(List<? extends Number> aColumn)
- Specified by:
makeColumnVector in interface BasicMatrix.Factory
- See Also:
BasicMatrix.toListOfElements(),
BasicMatrix.Factory.makeRowVector(List)
makeEye
public BasicMatrix makeEye(int aRowDim,
int aColDim)
- Specified by:
makeEye in interface BasicMatrix.Factory
makeRandom
public BasicMatrix makeRandom(int aRowDim,
int aColDim,
RandomNumber aRndm)
- Specified by:
makeRandom in interface BasicMatrix.Factory
makeRowVector
public BasicMatrix makeRowVector(List<? extends Number> aRow)
- Specified by:
makeRowVector in interface BasicMatrix.Factory
- See Also:
BasicMatrix.toListOfElements(),
BasicMatrix.Factory.makeColumnVector(List)
makeZero
public BasicMatrix makeZero(int aRowDim,
int aColDim)
- Specified by:
makeZero in interface BasicMatrix.Factory