Package com.singularsys.exttests.matrix
Class RationalMatrixFactory
java.lang.Object
com.singularsys.extensions.matrix.genericmat.GenericMatrixFactory<Rational>
com.singularsys.exttests.matrix.RationalMatrixFactory
- All Implemented Interfaces:
MatrixFactoryI,JepComponent,Serializable
A MatrixFactory where the matrices have elements of type Rational.
and calculations are performed using the
RationalField.
Here the matrices are actually an array Rational[][]
rather than array Object[][] where the elements are all rationals.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA matrix with rational elementsstatic classA vector with rational elements -
Field Summary
Fields inherited from class com.singularsys.extensions.matrix.genericmat.GenericMatrixFactory
ONE, ZERO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Rational[]buildDataArray(int len) Build a data array.protected Rational[][]buildDataArray(int rows, int cols) Build a data array.protected RationalMatrixFactory.RationalMatrixA typical implementation will just usereturn (GenericMatrix<E>) m;protected RationalMatrixFactory.RationalVectorA typical implementation will just usereturn (V) v;newMatrixUnchecked(Object[][] data) newVectorUnchecked(Object[] data) Methods inherited from class com.singularsys.extensions.matrix.genericmat.GenericMatrixFactory
duplicate, duplicate, duplicateGM, duplicateGV, elementValue, getLightWeightInstance, getONE, identity, identity, init, newMatrix, newVector, newVector, zeroElement, zeroMat, zeroMat, zeroMat, zeroVecMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.singularsys.extensions.matrix.MatrixFactoryI
zeroVec
-
Constructor Details
-
RationalMatrixFactory
-
-
Method Details
-
cast
Description copied from class:GenericMatrixFactoryA typical implementation will just usereturn (GenericMatrix<E>) m;- Overrides:
castin classGenericMatrixFactory<Rational>- Parameters:
m- the matrix to cast- Returns:
- a matrix of type GenericMatrix<E> = GenericMatrix<E>
-
cast
Description copied from class:GenericMatrixFactoryA typical implementation will just usereturn (V) v;- Overrides:
castin classGenericMatrixFactory<Rational>- Parameters:
m- the vector to cast- Returns:
- a vector of type V = GenericVector<E>
-
buildDataArray
Description copied from class:GenericMatrixFactoryBuild a data array. A typical concrete implementation will just usereturn new E[rows][cols].- Overrides:
buildDataArrayin classGenericMatrixFactory<Rational>- Parameters:
rows- number of rowscols- number of cols- Returns:
- the array.
-
buildDataArray
Description copied from class:GenericMatrixFactoryBuild a data array. A typical concrete implementation will just usereturn new E[rows][len].- Overrides:
buildDataArrayin classGenericMatrixFactory<Rational>- Parameters:
len- number of elements- Returns:
- the array.
-
newMatrixUnchecked
- Overrides:
newMatrixUncheckedin classGenericMatrixFactory<Rational>
-
newVectorUnchecked
- Overrides:
newVectorUncheckedin classGenericMatrixFactory<Rational>
-