|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JSci.maths.matrices.Matrix JSci.maths.matrices.RingMatrix
public class RingMatrix
The RingMatrix class provides an object for encapsulating matrices over an arbitrary ring.
Field Summary | |
---|---|
protected Ring.Member[][] |
matrix
Array containing the elements of the matrix. |
Fields inherited from class JSci.maths.matrices.Matrix |
---|
numCols, numRows |
Constructor Summary | |
---|---|
protected |
RingMatrix(int rows,
int cols)
Constructs a matrix. |
|
RingMatrix(Ring.Member[][] array)
Constructs a matrix by wrapping an array. |
Method Summary | |
---|---|
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. |
Ring.Member |
getElement(int i,
int j)
Returns an element of the matrix. |
java.lang.Object |
getSet()
|
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 |
tensor(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. |
Methods inherited from class JSci.maths.matrices.Matrix |
---|
columns, getInvalidElementMsg, rows |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Ring.Member[][] matrix
Constructor Detail |
---|
protected RingMatrix(int rows, int cols)
public RingMatrix(Ring.Member[][] array)
array
- an assigned valueMethod Detail |
---|
public boolean equals(java.lang.Object m)
equals
in class java.lang.Object
m
- a matrixpublic java.lang.String toString()
toString
in class java.lang.Object
public Ring.Member getElement(int i, int j)
i
- row index of the elementj
- column index of the element
MatrixDimensionException
- 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 element
MatrixDimensionException
- If attempting to access an invalid element.public java.lang.Object getSet()
public AbelianGroup.Member negate()
public final AbelianGroup.Member add(AbelianGroup.Member m)
m
- a group memberpublic RingMatrix add(RingMatrix m)
m
- a matrix
MatrixDimensionException
- If the matrices are different sizes.public final AbelianGroup.Member subtract(AbelianGroup.Member m)
m
- a group memberpublic RingMatrix subtract(RingMatrix m)
m
- a matrix
MatrixDimensionException
- 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 final Ring.Member multiply(Ring.Member m)
m
- a ring memberpublic RingMatrix multiply(RingMatrix m)
m
- a matrix
MatrixDimensionException
- If the matrices are incompatible.public RingMatrix directSum(RingMatrix m)
public RingMatrix tensor(RingMatrix m)
public Matrix transpose()
transpose
in class Matrix
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |