|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.perisic.ring.Ring com.perisic.ring.Matrix2x2Ring
public class Matrix2x2Ring
The ring of 2 x 2 matrices {{a,b},{c,d}} with a,b,c and d in B, where B is any Ring.
Field Summary |
---|
Fields inherited from class com.perisic.ring.Ring |
---|
C, F2, Q, R, Z |
Constructor Summary | |
---|---|
Matrix2x2Ring(Ring BaseRing)
construction of a new Matrix2x2Ring over B. |
Method Summary | |
---|---|
RingElt |
a(RingElt m)
Returns the first coefficient (element) of the matrix as an element of the base ring. |
RingElt |
add(RingElt m1,
RingElt m2)
Returns the sum of a 2*2 matrix, m1 + m2. |
RingElt |
b(RingElt m)
Returns the second element of the matrix as an element of the base ring. |
RingElt |
c(RingElt m)
Returns the third element of the matrix as an element of the base ring. |
RingElt |
construct(RingElt a,
RingElt b,
RingElt c,
RingElt d)
constructs the elements of a 2*2 matrix, a, b, c, and d. |
RingElt |
d(RingElt m)
Returns the fourth element of the matrix as an element of the base ring. |
RingElt |
det(RingElt m1)
Returns the determinant of m. |
java.lang.String |
eltToString(RingElt m)
Returns the matrix m as a String. |
boolean |
equalZero(RingElt m1)
Returns true if the matrix m1 == 0. |
Ring |
getbaseRing()
Returns the ring of coefficients of the matrix. |
java.lang.String[] |
getMatrixFormat()
returns the format of the matrices. |
RingElt |
inv(RingElt m1)
Returns the inverse of a matrix m1. |
boolean |
isField()
Returns false. |
static void |
main(java.lang.String[] args)
A simple test method. |
RingElt |
map(RingElt m)
Maps a 2x2 matrix m into this. |
RingElt |
map(java.lang.String str)
Maps a matrix of the form { { xxx, yyy } { uuu, vvv } } into this ring. |
RingElt |
mult(RingElt m1,
RingElt m2)
Return the product of two 2*2 matrices, m1 * m2. |
RingElt |
neg(RingElt m1)
Returns the negation of a matrix, -m1. |
RingElt |
one()
Returns the Identity matrix, I = {{ 1, 0 } { 0, 1}}. |
void |
setMatrixFormat(java.lang.String outerLeftDelimiter,
java.lang.String innerLeftDelimiter,
java.lang.String elementSeparator,
java.lang.String innerRightDelimiter,
java.lang.String outerRightDelimiter)
Sets the format that is used to read and write matrices. |
java.lang.String |
toString()
Returns M22(B) where B is the coefficient ring. |
RingElt |
trace(RingElt m1)
Returns the trace of m. |
RingElt |
zero()
Returns the zero matrix { { 0, 0 } { 0, 0 }}. |
Methods inherited from class com.perisic.ring.Ring |
---|
div, ediv, equal, evaluatePolynomial, gcd, isEuclidian, isUFD, map, map, map, mod, pow, pow, sub, tdiv |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Matrix2x2Ring(Ring BaseRing)
BaseRing
- is the base ringMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isField()
isField
in class Ring
public Ring getbaseRing()
public RingElt a(RingElt m)
public RingElt b(RingElt m)
public RingElt c(RingElt m)
public RingElt d(RingElt m)
public RingElt add(RingElt m1, RingElt m2)
add
in class Ring
public RingElt mult(RingElt m1, RingElt m2)
mult
in class Ring
public RingElt det(RingElt m1)
public RingElt trace(RingElt m1)
public RingElt inv(RingElt m1)
inv
in class Ring
public RingElt one()
one
in class Ring
public RingElt zero()
zero
in class Ring
public RingElt neg(RingElt m1)
neg
in class Ring
public boolean equalZero(RingElt m1)
equalZero
in class Ring
public RingElt construct(RingElt a, RingElt b, RingElt c, RingElt d)
public void setMatrixFormat(java.lang.String outerLeftDelimiter, java.lang.String innerLeftDelimiter, java.lang.String elementSeparator, java.lang.String innerRightDelimiter, java.lang.String outerRightDelimiter)
public java.lang.String[] getMatrixFormat()
public RingElt map(RingElt m)
map
in class Ring
public RingElt map(java.lang.String str)
map
in class Ring
public java.lang.String eltToString(RingElt m)
eltToString
in class Ring
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |