public class RingMatrix extends Matrix
| Modifier and Type | Field and Description |
|---|---|
protected static int |
ARRAY_2D
Storage format identifier.
|
protected Ring.Member[][] |
matrix
Array containing the elements of the matrix.
|
CLASS_SPECIFIC, numCols, numRows, storageFormat| Modifier | Constructor and Description |
|---|---|
protected |
RingMatrix(int rows,
int cols,
int storeID)
Constructs a matrix.
|
|
RingMatrix(Ring.Member[][] array)
Constructs a matrix by wrapping an array.
|
| Modifier and Type | Method and Description |
|---|---|
AbelianGroup.Member |
add(AbelianGroup.Member m)
Returns the addition of this matrix and another.
|
RingMatrix |
add(RingMatrix m)
Returns the addition of this matrix and another.
|
RingMatrix |
directSum(RingMatrix m)
Returns the direct sum of this matrix and another.
|
boolean |
equals(java.lang.Object m)
Compares two matrices for equality.
|
protected void |
finalize()
Finalize.
|
Ring.Member |
getElement(int i,
int j)
Returns an element of the matrix.
|
Ring.Member |
multiply(Ring.Member m)
Returns the multiplication of this matrix and another.
|
RingMatrix |
multiply(RingMatrix m)
Returns the multiplication of this matrix and another.
|
AbelianGroup.Member |
negate()
Returns the negative of this matrix.
|
VectorSpace.Member |
scalarDivide(Field.Member x)
Returns the division of this matrix by a scalar.
|
Module.Member |
scalarMultiply(Ring.Member r)
Returns the multiplication of this matrix by a scalar.
|
void |
setElement(int i,
int j,
Ring.Member r)
Sets the value of an element of the matrix.
|
AbelianGroup.Member |
subtract(AbelianGroup.Member m)
Returns the subtraction of this matrix and another.
|
RingMatrix |
subtract(RingMatrix m)
Returns the subtraction of this matrix and another.
|
RingMatrix |
tensorProduct(RingMatrix m)
Returns the tensor product of this matrix and another.
|
java.lang.String |
toString()
Returns a string representing this matrix.
|
Matrix |
transpose()
Returns the transpose of this matrix.
|
columns, getInvalidElementMsg, rowsprotected static final int ARRAY_2D
protected Ring.Member[][] matrix
protected RingMatrix(int rows,
int cols,
int storeID)
public RingMatrix(Ring.Member[][] array)
array - an assigned valueprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - Any that occur.public boolean equals(java.lang.Object m)
equals in class java.lang.Objectm - a matrixpublic java.lang.String toString()
toString in class java.lang.Objectpublic Ring.Member getElement(int i, int j)
i - row index of the elementj - column index of the elementMatrixDimensionException - If attempting to access an invalid element.public void setElement(int i,
int j,
Ring.Member r)
i - row index of the elementj - column index of the elementr - a ring elementMatrixDimensionException - If attempting to access an invalid element.public AbelianGroup.Member negate()
public AbelianGroup.Member add(AbelianGroup.Member m)
m - a group memberpublic RingMatrix add(RingMatrix m)
m - a matrixMatrixDimensionException - If the matrices are different sizes.public AbelianGroup.Member subtract(AbelianGroup.Member m)
m - a group memberpublic RingMatrix subtract(RingMatrix m)
m - a matrixMatrixDimensionException - If the matrices are different sizes.public Module.Member scalarMultiply(Ring.Member r)
r - a ring element.public VectorSpace.Member scalarDivide(Field.Member x)
x - a field element.public Ring.Member multiply(Ring.Member m)
m - a ring memberpublic RingMatrix multiply(RingMatrix m)
m - a matrixMatrixDimensionException - If the matrices are incompatible.public RingMatrix directSum(RingMatrix m)
public RingMatrix tensorProduct(RingMatrix m)