public class GenMatrixRing<C extends RingElem<C>> extends java.lang.Object implements AlgebraFactory<GenMatrix<C>,C>
Modifier and Type | Field and Description |
---|---|
int |
blocksize |
RingFactory<C> |
coFac |
int |
cols |
static int |
DEFAULT_BSIZE |
static float |
DEFAULT_DENSITY |
GenMatrix<C> |
ONE |
int |
rows |
GenMatrix<C> |
ZERO |
Constructor and Description |
---|
GenMatrixRing(RingFactory<C> b,
int r,
int c)
Constructors for GenMatrixRing.
|
GenMatrixRing(RingFactory<C> b,
int r,
int c,
int s)
Constructors for GenMatrixRing.
|
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
characteristic()
Characteristic of this ring.
|
GenMatrix<C> |
copy(GenMatrix<C> c)
Copy matrix.
|
boolean |
equals(java.lang.Object other)
Comparison with any other object.
|
GenMatrix<C> |
fromInteger(java.math.BigInteger a)
Get the matrix for a.
|
GenMatrix<C> |
fromInteger(long a)
Get the matrix for a.
|
GenMatrix<C> |
fromList(java.util.List<java.util.List<C>> om)
From List of coefficients.
|
GenMatrix<C> |
generate(java.util.function.BiFunction<java.lang.Integer,java.lang.Integer,C> gener)
Generate matrix via lambda expression.
|
java.util.List<GenMatrix<C>> |
generators()
Get a list of the generating elements.
|
GenMatrix<C> |
getONE()
Get the constant one for the GenMatrix.
|
GenMatrix<C> |
getZERO()
Get the constant one for the GenMatrix.
|
int |
hashCode()
Hash code for this matrix ring.
|
boolean |
isAssociative()
Query if this ring is associative.
|
boolean |
isCommutative()
Query if this monoid is commutative.
|
boolean |
isField()
Query if this ring is a field.
|
boolean |
isFinite()
Is this structure finite or infinite.
|
GenMatrix<C> |
parse(java.io.Reader r)
Parse a matrix from a Reader.
|
GenMatrix<C> |
parse(java.lang.String s)
Parse a matrix from a String.
|
GenMatrixRing<C> |
product(GenMatrixRing<C> other)
Product matrix ring for multiplication.
|
GenMatrix<C> |
random(int k)
Random matrix.
|
GenMatrix<C> |
random(int k,
float q)
Random matrix.
|
GenMatrix<C> |
random(int k,
float q,
java.util.Random random)
Random matrix.
|
GenMatrix<C> |
random(int k,
java.util.Random random)
Random matrix.
|
GenMatrix<C> |
randomLower(int k,
float q)
Random lower triangular matrix.
|
GenMatrix<C> |
randomLower(int k,
float q,
java.util.Random random)
Random lower triangular matrix.
|
GenMatrix<C> |
randomUpper(int k,
float q)
Random upper triangular matrix.
|
GenMatrix<C> |
randomUpper(int k,
float q,
java.util.Random random)
Random upper triangular matrix.
|
java.lang.String |
toScript()
Get a scripting compatible string representation.
|
java.lang.String |
toString()
Get the String representation as RingElem.
|
GenMatrixRing<C> |
transpose()
Transposed matrix ring.
|
public final RingFactory<C extends RingElem<C>> coFac
public final int rows
public final int cols
public final int blocksize
public static final int DEFAULT_BSIZE
public static final float DEFAULT_DENSITY
public GenMatrixRing(RingFactory<C> b, int r, int c)
b
- coefficient factory.r
- number of rows.c
- number of colums.public GenMatrixRing(RingFactory<C> b, int r, int c, int s)
b
- coefficient factory.r
- number of rows.c
- number of colums.s
- block size for blocked operations.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.String toScript()
toScript
in interface ElemFactory<GenMatrix<C extends RingElem<C>>>
ElemFactory.toScript()
public java.util.List<GenMatrix<C>> generators()
generators
in interface ElemFactory<GenMatrix<C extends RingElem<C>>>
ElemFactory.generators()
public boolean isFinite()
isFinite
in interface ElemFactory<GenMatrix<C extends RingElem<C>>>
ElemFactory.isFinite()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean isField()
public boolean isCommutative()
isCommutative
in interface MonoidFactory<GenMatrix<C extends RingElem<C>>>
public boolean isAssociative()
isAssociative
in interface MonoidFactory<GenMatrix<C extends RingElem<C>>>
public java.math.BigInteger characteristic()
characteristic
in interface RingFactory<GenMatrix<C extends RingElem<C>>>
public GenMatrixRing<C> transpose()
public GenMatrixRing<C> product(GenMatrixRing<C> other)
other
- matrix ring factory.public GenMatrix<C> fromInteger(long a)
fromInteger
in interface ElemFactory<GenMatrix<C extends RingElem<C>>>
a
- longpublic GenMatrix<C> fromInteger(java.math.BigInteger a)
fromInteger
in interface ElemFactory<GenMatrix<C extends RingElem<C>>>
a
- longpublic GenMatrix<C> fromList(java.util.List<java.util.List<C>> om)
public GenMatrix<C> random(int k, float q, java.util.Random random)
k
- size of random coefficients.q
- density of nozero coefficients.random
- is a source for random bits.public GenMatrix<C> randomUpper(int k, float q)
k
- size of random coefficients.q
- density of nozero coefficients.public GenMatrix<C> randomUpper(int k, float q, java.util.Random random)
k
- size of random coefficients.q
- density of nozero coefficients.random
- is a source for random bits.public GenMatrix<C> randomLower(int k, float q)
k
- size of random coefficients.q
- density of nozero coefficients.public GenMatrix<C> randomLower(int k, float q, java.util.Random random)
k
- size of random coefficients.q
- density of nozero coefficients.random
- is a source for random bits.public GenMatrix<C> generate(java.util.function.BiFunction<java.lang.Integer,java.lang.Integer,C> gener)
gener
- lambda expression.public GenMatrix<C> parse(java.lang.String s)