|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmfc.matrix.AbstractComplex2By2
mfc.matrix.Complex2By2
This class represents a complex 2-by-2 matrix.
[ a b ] [ aRe + i aIm bRe + i bIm ] [ ] = [ ] [ c d ] [ dRe + i dIm dRe + i dIm ]
To minimize the object count its 4 complex entries a,b,c,d
are represented by 8 double values
aRe, aIm, bRe, bIm, cRe, cIm, dRe, dIm.
All methods avoid the creation of temporarily used objects in their
internal computations unless stated in their describtions.
Creation of many temporarily used instances is expensive and stresses
the garabage collector.
This can cause your java program to be slow and should therefore be avoided.
Thus, operations which result in an instance of Complex2By2
can be performed either with or without creating a matrix.
To compute, for example, the product of two matrices you can either use
Complex2By2 m = a.times( b ),or
m.assignTimes( a, b ).This philosophy is applied to operations which result in other instances, as well. In such a case an instance of the resulting type can be prescribed as a parameter which is than filled by the method. To compute the eigenvalues of a matrix, for example,
m you can use either
double[] ev = m.getEigenValues()or
m.getEigenValues( ev )
| Field Summary |
| Fields inherited from class mfc.matrix.AbstractComplex2By2 |
aIm, aRe, bIm, bRe, cIm, cRe, dIm, dRe, EPS, EPSILON, EPSSQR |
| Constructor Summary | |
Complex2By2()
creates an identity matrix |
|
Complex2By2(AbstractComplex2By2 m)
creates a matrix equal to the prescribed one |
|
Complex2By2(Complex a,
Complex b,
Complex c,
Complex d)
creates a matrix with the prescribed entries |
|
Complex2By2(double aRe,
double aIm,
double bRe,
double bIm,
double cRe,
double cIm,
double dRe,
double dIm)
creates a matrix with the prescribed entries |
|
| Method Summary | |
Complex2By2 |
adjoined()
returns the adjoined of this |
Complex2By2 |
adjugate()
returns the adjugate of this |
void |
assign(AbstractComplex2By2 s)
assigns this with the prescribed matrix |
void |
assign(Complex a,
Complex b,
Complex c,
Complex d)
assigns this with the prescribed entries |
void |
assign(double aRe,
double aIm,
double bRe,
double bIm,
double cRe,
double cIm,
double dRe,
double dIm)
assigns this with the prescribed entries |
void |
assignAdjoined()
assigns this with its own adjoined |
void |
assignAdjoined(AbstractComplex2By2 a)
assigns this with the adjoined of a |
void |
assignAdjoinedWith(AbstractComplex2By2 t)
Assign this with t this t*. |
void |
assignAdjugate()
assigns this with its own adjugate |
void |
assignAdjugate(AbstractComplex2By2 a)
assigns this with the adjugate of a |
void |
assignAsEigenvectorMatrixOf(HermitianComplex2By2 m)
|
void |
assignByColumn(Complex2 column1,
Complex2 column2)
Assign this by column. |
void |
assignByEigenvectors(Complex eigenvalue1,
Complex2 eigenvector1,
Complex eigenvalue2,
Complex2 eigenvector2)
Assign this by prescribing eigenvectors and
eigenvalues. |
void |
assignByEigenvectors(double eigenvalue1Re,
double eigenvalue1Im,
Complex2 eigenvector1,
double eigenvalue2Re,
double eigenvalue2Im,
Complex2 eigenvector2)
Assign this by prescribing eigenvectors and
eigenvalues. |
void |
assignConjugate()
assigns this with its own conjugate |
void |
assignConjugate(AbstractComplex2By2 a)
assigns this with the conjugateative of a |
void |
assignDivide(AbstractComplex2By2 m)
assigns this with the product of itself and inverse of m |
void |
assignDivide(AbstractComplex2By2 a,
AbstractComplex2By2 b)
assigns this with the product of a and inverse of b |
void |
assignDivide(AbstractComplex2By2 m,
Complex z)
assigns this with the product of m and 1/z |
void |
assignDivide(AbstractComplex2By2 m,
double r)
assigns this with product of m and 1/r |
void |
assignDivide(AbstractComplex2By2 m,
double x,
double y)
assigns this with the product of m and 1/(x+iy) |
void |
assignDivide(Complex z)
assigns this with the product of itself and 1/z |
void |
assignDivide(double r)
assigns this with product of itself and 1/r |
void |
assignDivide(double x,
double y)
assigns this with the product of itself and 1/(x+iy) |
void |
assignIdentity()
assigns this with the identity matrix |
void |
assignInvert()
assigns this with its own inverse |
void |
assignInvert(AbstractComplex2By2 m)
assigns this with the inverse of m |
void |
assignMinus(AbstractComplex2By2 a)
subtracts a from this |
void |
assignMinus(AbstractComplex2By2 a,
AbstractComplex2By2 b)
subtracts b from a and stores the result it this |
void |
assignMinus(AbstractComplex2By2 m,
Complex z)
subtracts z to all entries of m and
and assigns this with the result. |
void |
assignMinus(AbstractComplex2By2 m,
double x)
subtracts x from all entries of m and
and assigns this with the result. |
void |
assignMinus(AbstractComplex2By2 m,
double x,
double y)
subtracts x+iy to all entries of m and
and assigns this with the result. |
void |
assignMinus(Complex z)
subtracts z from all entries of this |
void |
assignMinus(double x)
subtracts x from all entries of this |
void |
assignMinus(double x,
double y)
subtracts x+iy to all entries of this |
void |
assignNeg()
assigns this with its own negative |
void |
assignNeg(AbstractComplex2By2 a)
assigns this with the negative of a |
void |
assignNormalizeDeterminant()
normalizes (determinant equals 1) this |
void |
assignNormalizeDeterminant(AbstractComplex2By2 m)
assigns this with m and normalizes (determinant equals 1) it |
void |
assignPlus(AbstractComplex2By2 a)
assigns this with the sum of itself and a |
void |
assignPlus(AbstractComplex2By2 a,
AbstractComplex2By2 b)
assigns this with the sum of a and b |
void |
assignPlus(AbstractComplex2By2 m,
Complex z)
adds z to all entries of m and
and assigns this with the result. |
void |
assignPlus(AbstractComplex2By2 m,
double x)
adds x to all entries of m and
and assigns this with the result. |
void |
assignPlus(AbstractComplex2By2 m,
double x,
double y)
adds x+iy to all entries of m and
and assigns this with the result. |
void |
assignPlus(Complex z)
adds z to all entries of this |
void |
assignPlus(double x)
adds x to all entries of this |
void |
assignPlus(double x,
double y)
adds x+iy to all entries of this |
void |
assignStar()
assigns this with its own transposed and conjugated |
void |
assignStar(AbstractComplex2By2 a)
assigns this with the transposed and conjugated of a |
void |
assignTimes(AbstractComplex2By2 a)
assigns this with the product of itself and a |
void |
assignTimes(AbstractComplex2By2 a,
AbstractComplex2By2 b)
assigns this with the product of a and b |
void |
assignTimes(AbstractComplex2By2 m,
Complex z)
assigns this with product of m and z |
void |
assignTimes(AbstractComplex2By2 m,
double r)
assigns this with product of m and r |
void |
assignTimes(AbstractComplex2By2 m,
double x,
double y)
assigns this with the product of m and x+iy |
void |
assignTimes(Complex z)
returns the product of this and z |
void |
assignTimes(double r)
assigns this with the product of itself and r |
void |
assignTimes(double x,
double y)
assigns this with the product of itself and x+iy |
void |
assignTranspose()
assigns this with its own transposed |
void |
assignTranspose(AbstractComplex2By2 a)
assigns this with the transposed of a |
void |
assignZero()
assigns this with the zero matrix |
Complex2By2 |
conjugate()
returns conjugate of this |
Complex2By2 |
copy()
returns copy of this |
Complex2By2 |
divide(AbstractComplex2By2 a)
returns the product of this and inverse of a |
Complex2By2 |
divide(Complex z)
returns the product of this and 1/z |
Complex2By2 |
divide(double r)
returns the product of this and 1/r |
Complex2By2 |
divide(double x,
double y)
returns the product of this and 1/(x+iy) |
Complex2By2 |
invert()
returns inverse of this |
Complex2By2 |
minus(AbstractComplex2By2 a)
subtracts a from this and returns the result |
Complex2By2 |
minus(Complex z)
subtracts z from all entries of this and returns the result |
Complex2By2 |
minus(double x)
subtracts x from all entries of this and returns the result |
Complex2By2 |
minus(double x,
double y)
subtracts x+iy from all entries of this and returns the result |
Complex2By2 |
neg()
returns negative of this |
Complex2By2 |
normalizeDeterminant()
returns a normalized (determiant equals 1) copy of this |
Complex2By2 |
plus(AbstractComplex2By2 a)
returns this with the sum of this and a |
Complex2By2 |
plus(Complex z)
adds z to all entries of this and returns the result |
Complex2By2 |
plus(double x)
adds x to all entries of this and returns the result |
Complex2By2 |
plus(double x,
double y)
adds x+iy to all entries of this and returns the result |
void |
setA(Complex a)
sets entry a of this with a |
void |
setB(Complex b)
sets entry b of this with b |
void |
setC(Complex c)
sets entry c of this with c |
void |
setD(Complex d)
sets entry d of this with d |
Complex2By2 |
star()
returns transposed and conjugated of this |
Complex2By2 |
times(AbstractComplex2By2 a)
returns the product of this and a |
Complex2By2 |
times(Complex z)
returns the product of this and z |
Complex2By2 |
times(double r)
returns the product of this and r |
Complex2By2 |
times(double x,
double y)
returns product of this and x+iy |
Complex2By2 |
transpose()
returns transposed of this |
| Methods inherited from class mfc.matrix.AbstractComplex2By2 |
abs, absSqr, assignConjugateWith, determinant, determinant, dist, distSqr, divide, equals, getA, getA, getB, getB, getC, getC, getD, getD, getEigenValues, getEigenValues, getEigenValues, minus, norm, normSqr, plus, times, times, toString, trace, trace |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Complex2By2()
public Complex2By2(double aRe,
double aIm,
double bRe,
double bIm,
double cRe,
double cIm,
double dRe,
double dIm)
public Complex2By2(Complex a,
Complex b,
Complex c,
Complex d)
public Complex2By2(AbstractComplex2By2 m)
| Method Detail |
public final void setA(Complex a)
a of this with a
setA in class AbstractComplex2By2public final void setB(Complex b)
b of this with b
setB in class AbstractComplex2By2public final void setC(Complex c)
c of this with c
setC in class AbstractComplex2By2public final void setD(Complex d)
d of this with d
setD in class AbstractComplex2By2public final Complex2By2 copy()
public final void assignZero()
assignZero in class AbstractComplex2By2public final void assignIdentity()
assignIdentity in class AbstractComplex2By2
public final void assign(double aRe,
double aIm,
double bRe,
double bIm,
double cRe,
double cIm,
double dRe,
double dIm)
assign in class AbstractComplex2By2
public final void assign(Complex a,
Complex b,
Complex c,
Complex d)
assign in class AbstractComplex2By2public final void assign(AbstractComplex2By2 s)
assign in class AbstractComplex2By2public final void assignTimes(AbstractComplex2By2 a)
assignTimes in class AbstractComplex2By2
public final void assignTimes(AbstractComplex2By2 a,
AbstractComplex2By2 b)
a and b
assignTimes in class AbstractComplex2By2public final Complex2By2 times(AbstractComplex2By2 a)
a
public final void assignTimes(double r)
r
assignTimes in class AbstractComplex2By2
public final void assignTimes(AbstractComplex2By2 m,
double r)
m and r
assignTimes in class AbstractComplex2By2public final Complex2By2 times(double r)
r
public final void assignTimes(double x,
double y)
x+iy
assignTimes in class AbstractComplex2By2
public final void assignTimes(AbstractComplex2By2 m,
double x,
double y)
m and x+iy
assignTimes in class AbstractComplex2By2
public final Complex2By2 times(double x,
double y)
x+iy
public final void assignTimes(Complex z)
z
assignTimes in class AbstractComplex2By2
public final void assignTimes(AbstractComplex2By2 m,
Complex z)
m and z
assignTimes in class AbstractComplex2By2public final Complex2By2 times(Complex z)
z
public final void assignDivide(AbstractComplex2By2 m)
m
assignDivide in class AbstractComplex2By2
public final void assignDivide(AbstractComplex2By2 a,
AbstractComplex2By2 b)
a and inverse of b
assignDivide in class AbstractComplex2By2public final Complex2By2 divide(AbstractComplex2By2 a)
a
public final void assignDivide(double r)
1/r
assignDivide in class AbstractComplex2By2
public final void assignDivide(AbstractComplex2By2 m,
double r)
m and 1/r
assignDivide in class AbstractComplex2By2public final Complex2By2 divide(double r)
1/r
public final void assignDivide(double x,
double y)
1/(x+iy)
assignDivide in class AbstractComplex2By2
public final void assignDivide(AbstractComplex2By2 m,
double x,
double y)
m and 1/(x+iy)
assignDivide in class AbstractComplex2By2
public final Complex2By2 divide(double x,
double y)
1/(x+iy)
public final void assignDivide(Complex z)
1/z
assignDivide in class AbstractComplex2By2
public final void assignDivide(AbstractComplex2By2 m,
Complex z)
m and 1/z
assignDivide in class AbstractComplex2By2public final Complex2By2 divide(Complex z)
1/z
public final Complex2By2 plus(AbstractComplex2By2 a)
public final void assignPlus(AbstractComplex2By2 a)
assignPlus in class AbstractComplex2By2
public final void assignPlus(AbstractComplex2By2 a,
AbstractComplex2By2 b)
a and b
assignPlus in class AbstractComplex2By2public final Complex2By2 plus(double x)
x to all entries of this and returns the result
public final void assignPlus(double x)
x to all entries of this
assignPlus in class AbstractComplex2By2
public final void assignPlus(AbstractComplex2By2 m,
double x)
x to all entries of m and
and assigns this with the result.
assignPlus in class AbstractComplex2By2
public final Complex2By2 plus(double x,
double y)
x+iy to all entries of this and returns the result
public final void assignPlus(double x,
double y)
x+iy to all entries of this
assignPlus in class AbstractComplex2By2
public final void assignPlus(AbstractComplex2By2 m,
double x,
double y)
x+iy to all entries of m and
and assigns this with the result.
assignPlus in class AbstractComplex2By2public final Complex2By2 plus(Complex z)
z to all entries of this and returns the result
public final void assignPlus(Complex z)
z to all entries of this
assignPlus in class AbstractComplex2By2
public final void assignPlus(AbstractComplex2By2 m,
Complex z)
z to all entries of m and
and assigns this with the result.
assignPlus in class AbstractComplex2By2public final Complex2By2 minus(AbstractComplex2By2 a)
a from this and returns the result
public final void assignMinus(AbstractComplex2By2 a)
a from this
assignMinus in class AbstractComplex2By2
public final void assignMinus(AbstractComplex2By2 a,
AbstractComplex2By2 b)
b from a and stores the result it this
assignMinus in class AbstractComplex2By2public final Complex2By2 minus(double x)
x from all entries of this and returns the result
public final void assignMinus(double x)
x from all entries of this
assignMinus in class AbstractComplex2By2
public final void assignMinus(AbstractComplex2By2 m,
double x)
x from all entries of m and
and assigns this with the result.
assignMinus in class AbstractComplex2By2
public final Complex2By2 minus(double x,
double y)
x+iy from all entries of this and returns the result
public final void assignMinus(double x,
double y)
x+iy to all entries of this
assignMinus in class AbstractComplex2By2
public final void assignMinus(AbstractComplex2By2 m,
double x,
double y)
x+iy to all entries of m and
and assigns this with the result.
assignMinus in class AbstractComplex2By2public final Complex2By2 minus(Complex z)
z from all entries of this and returns the result
public final void assignMinus(Complex z)
z from all entries of this
assignMinus in class AbstractComplex2By2
public final void assignMinus(AbstractComplex2By2 m,
Complex z)
z to all entries of m and
and assigns this with the result.
assignMinus in class AbstractComplex2By2public final Complex2By2 neg()
public final void assignNeg(AbstractComplex2By2 a)
a
assignNeg in class AbstractComplex2By2public final void assignNeg()
assignNeg in class AbstractComplex2By2public final Complex2By2 conjugate()
public final void assignConjugate(AbstractComplex2By2 a)
a
assignConjugate in class AbstractComplex2By2public final void assignConjugate()
assignConjugate in class AbstractComplex2By2public final Complex2By2 transpose()
public final void assignTranspose(AbstractComplex2By2 a)
a
assignTranspose in class AbstractComplex2By2public final void assignTranspose()
assignTranspose in class AbstractComplex2By2public final Complex2By2 star()
public final void assignStar(AbstractComplex2By2 a)
a
assignStar in class AbstractComplex2By2public final void assignStar()
assignStar in class AbstractComplex2By2public final void assignAdjugate(AbstractComplex2By2 a)
a
assignAdjugate in class AbstractComplex2By2public final void assignAdjugate()
assignAdjugate in class AbstractComplex2By2public final Complex2By2 adjugate()
public final void assignAdjoined(AbstractComplex2By2 a)
a
assignAdjoined in class AbstractComplex2By2public final void assignAdjoined()
assignAdjoined in class AbstractComplex2By2public final Complex2By2 adjoined()
public void assignAdjoinedWith(AbstractComplex2By2 t)
this with t this t*.
- Overrides:
assignAdjoinedWith in class AbstractComplex2By2
- Parameters:
t - an AbstractComplex2By2: the matrix to adjoin
public final void assignInvert(AbstractComplex2By2 m)
m
assignInvert in class AbstractComplex2By2public final void assignInvert()
assignInvert in class AbstractComplex2By2public final Complex2By2 invert()
public final Complex2By2 normalizeDeterminant()
public final void assignNormalizeDeterminant(AbstractComplex2By2 m)
m and normalizes (determinant equals 1) it
assignNormalizeDeterminant in class AbstractComplex2By2public final void assignNormalizeDeterminant()
assignNormalizeDeterminant in class AbstractComplex2By2
public final void assignByColumn(Complex2 column1,
Complex2 column2)
Assign this by column.
Simply calls AbstractComplex2By2.assignByColumn(Complex2,
Complex2).
assignByColumn in class AbstractComplex2By2column1 - a Complex2: the first column. Must not be
nullcolumn2 - a Complex2: the second column. Must not be
null
public final void assignByEigenvectors(double eigenvalue1Re,
double eigenvalue1Im,
Complex2 eigenvector1,
double eigenvalue2Re,
double eigenvalue2Im,
Complex2 eigenvector2)
Assign this by prescribing eigenvectors and
eigenvalues.
The given eigenvectors must be linearly independent.
Simply calls AbstractComplex2By2.assignByEigenvectors(double, double, Complex2,
double, double, Complex2).
assignByEigenvectors in class AbstractComplex2By2eigenvalue1Re - a double: real part of the first
eigenvalueeigenvalue1Im - a double: imaginary part of the
first eigenvalueeigenvector1 - a Complex2: first eigenvectoreigenvalue2Re - a double: real part of the second
eigenvalueeigenvalue2Im - a double: imaginary part of the
second eigenvalueeigenvector2 - a Complex2: second eigenvector
public final void assignByEigenvectors(Complex eigenvalue1,
Complex2 eigenvector1,
Complex eigenvalue2,
Complex2 eigenvector2)
Assign this by prescribing eigenvectors and
eigenvalues.
The given eigenvectors must be linearly independent.
Simply calls AbstractComplex2By2.assignByEigenvectors(Complex, Complex2, Complex,
Complex2).
assignByEigenvectors in class AbstractComplex2By2eigenvalue1 - a Complex: first eigenvalueeigenvector1 - a Complex2: first eigenvectoreigenvalue2 - a Complex: second eigenvalueeigenvector2 - a Complex2: second eigenvectorpublic void assignAsEigenvectorMatrixOf(HermitianComplex2By2 m)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||