Package org.ojalgo.matrix
Class MatrixFactory<N extends Comparable<N>,M extends BasicMatrix<N,M>,DR extends Mutate2D.ModifiableReceiver<N> & Factory2D.Builder<M>,SR extends Factory2D.Builder<M>>
java.lang.Object
org.ojalgo.matrix.MatrixFactory<N,M,DR,SR>
- All Implemented Interfaces:
Factory2D<M>
,Factory2D.MayBeSparse<M,
,DR, SR> Factory2D.TwoStep<M,
,DR> FactorySupplement
- Direct Known Subclasses:
MatrixC128.Factory
,MatrixH256.Factory
,MatrixQ128.Factory
,MatrixR032.Factory
,MatrixR064.Factory
,MatrixR128.Factory
public abstract class MatrixFactory<N extends Comparable<N>,M extends BasicMatrix<N,M>,DR extends Mutate2D.ModifiableReceiver<N> & Factory2D.Builder<M>,SR extends Factory2D.Builder<M>>
extends Object
implements Factory2D.MayBeSparse<M,DR,SR>
MatrixFactory creates instances of classes that implement the BasicMatrix
interface and have a constructor that takes a MatrixStore as input.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ojalgo.structure.Factory2D
Factory2D.Builder<I extends Structure2D>, Factory2D.MayBeSparse<I extends Structure2D,
DENSE extends Factory2D.Builder<I>, SPARSE extends Factory2D.Builder<I>>, Factory2D.TwoStep<I extends Structure2D, B extends Factory2D.Builder<I>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Constructor
<M> private final PhysicalStore.Factory
<N, ?> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) abstract DR
dense
(PhysicalStore<N> delegate) function()
private static Constructor
<? extends BasicMatrix<?, ?>> getConstructor
(Class<? extends BasicMatrix<?, ?>> template) (package private) final PhysicalStore.Factory
<N, ?> (package private) M
instantiate
(ElementsSupplier<N> supplier) This method is for internal use only - YOU should NOT use it!make
(int nbRows, int nbCols) make
(long nbRows, long nbCols) makeDense
(int count) makeDiagonal
(double... diagonal) makeDiagonal
(Access1D<?> diagonal) makeEye
(int rows, int columns) makeEye
(Structure2D shape) makeFilled
(long rows, long columns, NullaryFunction<?> supplier) makeIdentity
(int dimension) makeSingle
(N element) makeWrapper
(Access2D<?> elements) newDenseBuilder
(long nbRows, long nbCols) newSparseBuilder
(long nbRows, long nbCols) scalar()
(package private) abstract SR
sparse
(SparseStore.Builder<N> delegate) tensor1D()
tensor2D()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ojalgo.structure.Factory2D
asFactory1D, make
Methods inherited from interface org.ojalgo.structure.Factory2D.MayBeSparse
newBuilder
-
Field Details
-
myConstructor
-
myPhysicalFactory
-
-
Constructor Details
-
MatrixFactory
MatrixFactory(Class<M> template, PhysicalStore.Factory<N, ?> factory)
-
-
Method Details
-
getConstructor
private static Constructor<? extends BasicMatrix<?,?>> getConstructor(Class<? extends BasicMatrix<?, ?>> template) -
copy
- Specified by:
copy
in interfaceFactory2D.TwoStep<N extends Comparable<N>,
M extends BasicMatrix<N, M>>
-
function
- Specified by:
function
in interfaceFactorySupplement
-
getMathType
- Specified by:
getMathType
in interfaceFactorySupplement
-
make
- Specified by:
make
in interfaceFactory2D<N extends Comparable<N>>
- Specified by:
make
in interfaceFactory2D.TwoStep<N extends Comparable<N>,
M extends BasicMatrix<N, M>>
-
make
- Specified by:
make
in interfaceFactory2D<N extends Comparable<N>>
- Specified by:
make
in interfaceFactory2D.TwoStep<N extends Comparable<N>,
M extends BasicMatrix<N, M>>
-
makeDense
-
makeDiagonal
-
makeDiagonal
-
makeEye
-
makeEye
-
makeFilled
- Specified by:
makeFilled
in interfaceFactory2D.TwoStep<N extends Comparable<N>,
M extends BasicMatrix<N, M>>
-
makeIdentity
-
makeSingle
-
makeWrapper
-
newDenseBuilder
- Specified by:
newDenseBuilder
in interfaceFactory2D.MayBeSparse<N extends Comparable<N>,
M extends BasicMatrix<N, M>, DR extends Mutate2D.ModifiableReceiver<N> & Factory2D.Builder<M>>
-
newSparseBuilder
- Specified by:
newSparseBuilder
in interfaceFactory2D.MayBeSparse<N extends Comparable<N>,
M extends BasicMatrix<N, M>, DR extends Mutate2D.ModifiableReceiver<N> & Factory2D.Builder<M>>
-
scalar
- Specified by:
scalar
in interfaceFactorySupplement
-
tensor1D
-
tensor2D
-
dense
-
getPhysicalFactory
-
instantiate
This method is for internal use only - YOU should NOT use it! -
sparse
-