Class GenMatrixRing<C extends RingElem<C>>
java.lang.Object
edu.jas.vector.GenMatrixRing<C>
- All Implemented Interfaces:
AbelianGroupFactory<GenMatrix<C>>, AlgebraFactory<GenMatrix<C>, C>, ElemFactory<GenMatrix<C>>, MonoidFactory<GenMatrix<C>>, RingFactory<GenMatrix<C>>, Serializable
public class GenMatrixRing<C extends RingElem<C>>
extends Object
implements AlgebraFactory<GenMatrix<C>, C>
GenMatrixRing implements a generic matrix algebra factory with RingFactory.
Matrices of n rows and m columns over C.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intfinal RingFactory<C> final intstatic final intstatic final floatprivate final floatprivate static final org.apache.logging.log4j.Loggerprivate static final Randomfinal int -
Constructor Summary
ConstructorsConstructorDescriptionGenMatrixRing(RingFactory<C> b, int r, int c) Constructors for GenMatrixRing.GenMatrixRing(RingFactory<C> b, int r, int c, int s) Constructors for GenMatrixRing. -
Method Summary
Modifier and TypeMethodDescriptionCharacteristic of this ring.concat(GenMatrixRing<C> other) Concat matrix ring.Copy matrix.booleanComparison with any other object.fromInteger(long a) Get the matrix for a.Get the matrix for a.From List of coefficients.fromVectors(List<GenVector<C>> om) From List of GenVectors.generate(BiFunction<Integer, Integer, C> gener) Generate matrix via lambda expression.Get a list of the generating elements.getONE()Get the constant one for the GenMatrix.getZERO()Get the constant one for the GenMatrix.inthashCode()Hash code for this matrix ring.booleanQuery if this ring is associative.booleanQuery if this monoid is commutative.booleanisField()Query if this ring is a field.booleanisFinite()Is this structure finite or infinite.Parse a matrix from a Reader.Parse a matrix from a String.product(GenMatrixRing<C> other) Product matrix ring for multiplication.random(int k) Random matrix.random(int k, float q) Random matrix.Random matrix.Random matrix.randomLower(int k, float q) Random lower triangular matrix.randomLower(int k, float q, Random random) Random lower triangular matrix.randomUpper(int k, float q) Random upper triangular matrix.randomUpper(int k, float q, Random random) Random upper triangular matrix.stack(GenMatrixRing<C> other) Stack matrix ring.toScript()Get a scripting compatible string representation.toString()Get the String representation as RingElem.Transposed matrix ring.Methods inherited from interface ElemFactory
valueOf
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
coFac
-
rows
public final int rows -
cols
public final int cols -
blocksize
public final int blocksize -
DEFAULT_BSIZE
public static final int DEFAULT_BSIZE- See Also:
-
ZERO
-
ONE
-
random
-
DEFAULT_DENSITY
public static final float DEFAULT_DENSITY- See Also:
-
density
private final float density- See Also:
-
-
Constructor Details
-
GenMatrixRing
Constructors for GenMatrixRing.- Parameters:
b- coefficient factory.r- number of rows.c- number of columns.
-
GenMatrixRing
Constructors for GenMatrixRing.- Parameters:
b- coefficient factory.r- number of rows.c- number of columns.s- block size for blocked operations.
-
-
Method Details
-
toString
-
toScript
-
getZERO
-
getONE
-
generators
Get a list of the generating elements.- Specified by:
generatorsin interfaceElemFactory<C extends RingElem<C>>- Returns:
- list of generators for the algebraic structure.
- See Also:
-
isFinite
public boolean isFinite()Is this structure finite or infinite.- Specified by:
isFinitein interfaceElemFactory<C extends RingElem<C>>- Returns:
- true if this structure is finite, else false.
- See Also:
-
equals
-
hashCode
-
isField
public boolean isField()Query if this ring is a field. May return false if it is to hard to determine if this ring is a field.- Specified by:
isFieldin interfaceRingFactory<C extends RingElem<C>>- Returns:
- true if it is known that this ring is a field, else false.
-
isCommutative
public boolean isCommutative()Query if this monoid is commutative.- Specified by:
isCommutativein interfaceMonoidFactory<C extends RingElem<C>>- Returns:
- true if this monoid is commutative, else false.
-
isAssociative
public boolean isAssociative()Query if this ring is associative.- Specified by:
isAssociativein interfaceMonoidFactory<C extends RingElem<C>>- Returns:
- true if this monoid is associative, else false.
-
characteristic
Characteristic of this ring.- Specified by:
characteristicin interfaceRingFactory<C extends RingElem<C>>- Returns:
- characteristic of this ring.
-
transpose
-
product
Product matrix ring for multiplication.- Parameters:
other- matrix ring factory.- Returns:
- product ring factory.
-
stack
Stack matrix ring. this on top of other.- Parameters:
other- matrix ring factory.- Returns:
- stack ring factory.
-
concat
Concat matrix ring. this before of other.- Parameters:
other- matrix ring factory.- Returns:
- concat ring factory.
-
fromInteger
Get the matrix for a.- Specified by:
fromIntegerin interfaceElemFactory<C extends RingElem<C>>- Parameters:
a- long- Returns:
- matrix corresponding to a.
-
fromInteger
Get the matrix for a.- Specified by:
fromIntegerin interfaceElemFactory<C extends RingElem<C>>- Parameters:
a- long- Returns:
- matrix corresponding to a.
-
fromList
-
fromVectors
-
random
-
random
-
random
-
random
-
randomUpper
-
randomUpper
-
randomLower
-
randomLower
-
copy
-
generate
-
parse
-
parse
-