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,java.io.Serializable
public class RationalMatrixFactory extends GenericMatrixFactory<Rational>
A MatrixFactory where the matrices have elements of type Rational. and calculations are performed using theRationalField. Here the matrices are actually an arrayRational[][]rather than arrayObject[][]where the elements are all rationals.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classRationalMatrixFactory.RationalMatrixclassRationalMatrixFactory.RationalVector
-
Field Summary
-
Fields inherited from class com.singularsys.extensions.matrix.genericmat.GenericMatrixFactory
ONE, ZERO
-
-
Constructor Summary
Constructors Constructor Description RationalMatrixFactory(RationalField base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Rational[]buildDataArray(int len)Build a data array.protected Rational[][]buildDataArray(int rows, int cols)Build a data array.protected RationalMatrixFactory.RationalMatrixcast(MatrixI m)A typical implementation will just usereturn (GenericMatrix<E>) m;protected RationalMatrixFactory.RationalVectorcast(VectorI m)A typical implementation will just usereturn (V) v;RationalMatrixFactory.RationalMatrixnewMatrixUnchecked(java.lang.Object[][] data)RationalMatrixFactory.RationalVectornewVectorUnchecked(java.lang.Object[] data)-
Methods inherited from class com.singularsys.extensions.matrix.genericmat.GenericMatrixFactory
elementValue, getLightWeightInstance, getONE, identity, identity, init, newMatrix, newVector, zeroEement, zeroMat, zeroMat, zeroMat, zeroVec
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.singularsys.extensions.matrix.MatrixFactoryI
zeroVec
-
-
-
-
Constructor Detail
-
RationalMatrixFactory
public RationalMatrixFactory(RationalField base)
-
-
Method Detail
-
cast
protected RationalMatrixFactory.RationalMatrix cast(MatrixI m)
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
protected RationalMatrixFactory.RationalVector cast(VectorI m)
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
protected Rational[][] buildDataArray(int rows, int cols)
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
protected Rational[] buildDataArray(int len)
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
public RationalMatrixFactory.RationalMatrix newMatrixUnchecked(java.lang.Object[][] data)
- Overrides:
newMatrixUncheckedin classGenericMatrixFactory<Rational>
-
newVectorUnchecked
public RationalMatrixFactory.RationalVector newVectorUnchecked(java.lang.Object[] data)
- Overrides:
newVectorUncheckedin classGenericMatrixFactory<Rational>
-
-