mfc.matrix
Class HermitianComplex2By2

java.lang.Object
  extended bymfc.matrix.AbstractComplex2By2
      extended bymfc.matrix.HermitianComplex2By2
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
HermitianCircle

public class HermitianComplex2By2
extends AbstractComplex2By2
implements java.io.Serializable, java.lang.Cloneable

A class to represent Hermitian complex 2×2-matrices.

A complex 2×2-matrix is Hermitian if the diagonal entries are real and the off diagonal entries are complex conjugate to each other.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class mfc.matrix.AbstractComplex2By2
aIm, aRe, bIm, bRe, cIm, cRe, dIm, dRe, EPS, EPSILON, EPSSQR
 
Constructor Summary
HermitianComplex2By2()
          Create the identity matrix.
HermitianComplex2By2(double a, Complex b, double d)
          Create a hermitian matrix with given diagonal elements and given upper right element.
HermitianComplex2By2(double theA, double theBRe, double theBIm, double theD)
          Create a hermitian matrix with given diagonal elements and given upper right element.
HermitianComplex2By2(HermitianComplex2By2 m)
          Create a matrix with the same data as m.
 
Method Summary
 void assign(double a, Complex b, double d)
          Assign hermitian matrix by diagonal and upper right elements.
 void assign(double newA, double newBRe, double newBIm, double newD)
          Assign hermitian matrix by diagonal and upper right elements.
 void assign(HermitianComplex2By2 s)
          assigns this with the prescribed matrix
 void assignAdjoinedWith(AbstractComplex2By2 t)
          Assign this with t this t*.
 void assignConjugateWith(AbstractComplex2By2 t)
          Assign this with t this t-1.
 void assignLorentzVector(double x0, double x1, double x2, double x3)
          Assign hermitian matrix by a Lorentz vector.
 double getARe()
          Get the value of aRe.
 double getDRe()
          Get the value of dRe.
 double lorentzVectorX0()
          Return the x0-component of the Lorentz vector corresponding to this.
 double lorentzVectorX1()
          Return the x1-component of the Lorentz vector corresponding to this.
 double lorentzVectorX2()
          Return the x2-component of the Lorentz vector corresponding to this.
 double lorentzVectorX3()
          Return the x3-component of the Lorentz vector corresponding to this.
 double realDeterminant()
          Return the real determinant of this.
 void setARe(double v)
          Set the value of aRe.
 void setB(Complex b)
          Set the value of the upper right element.
 void setC(Complex c)
          Set the value of the lower left element.
 void setDRe(double v)
          Set the value of dRe.
 
Methods inherited from class mfc.matrix.AbstractComplex2By2
abs, absSqr, assign, assign, assign, assignAdjoined, assignAdjoined, assignAdjugate, assignAdjugate, assignByColumn, assignByEigenvectors, assignByEigenvectors, assignConjugate, assignConjugate, assignDivide, assignDivide, assignDivide, assignDivide, assignDivide, assignDivide, assignDivide, assignDivide, assignIdentity, assignInvert, assignInvert, assignMinus, assignMinus, assignMinus, assignMinus, assignMinus, assignMinus, assignMinus, assignMinus, assignNeg, assignNeg, assignNormalizeDeterminant, assignNormalizeDeterminant, assignPlus, assignPlus, assignPlus, assignPlus, assignPlus, assignPlus, assignPlus, assignPlus, assignStar, assignStar, assignTimes, assignTimes, assignTimes, assignTimes, assignTimes, assignTimes, assignTimes, assignTimes, assignTranspose, assignTranspose, assignZero, determinant, determinant, dist, distSqr, divide, equals, getA, getA, getB, getB, getC, getC, getD, getD, getEigenValues, getEigenValues, getEigenValues, minus, norm, normSqr, plus, setA, setD, times, times, toString, trace, trace
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HermitianComplex2By2

public HermitianComplex2By2()
Create the identity matrix.


HermitianComplex2By2

public HermitianComplex2By2(HermitianComplex2By2 m)
Create a matrix with the same data as m.


HermitianComplex2By2

public HermitianComplex2By2(double theA,
                            double theBRe,
                            double theBIm,
                            double theD)
Create a hermitian matrix with given diagonal elements and given upper right element.

Parameters:
theA - the upper left entry
theBRe - the real part of the upper right entry
theBIm - the imaginary part of the upper right left entry
theD - the lower right entry

HermitianComplex2By2

public HermitianComplex2By2(double a,
                            Complex b,
                            double d)
Create a hermitian matrix with given diagonal elements and given upper right element.

Parameters:
a - a double: the real upper left entry
b - a Complex: the complex upper right entry
d - a double: the real lower right entry
Method Detail

getARe

public double getARe()
Get the value of aRe.

Returns:
value of aRe.

setARe

public void setARe(double v)
Set the value of aRe.

Parameters:
v - Value to assign to aRe.

setB

public void setB(Complex b)
Set the value of the upper right element. Also sets the lower left element to the complex conjugate.

Overrides:
setB in class AbstractComplex2By2
Parameters:
b - a Complex

setC

public void setC(Complex c)
Set the value of the lower left element. Also sets the upper right element to the complex conjugate.

Overrides:
setC in class AbstractComplex2By2
Parameters:
c - a Complex.

getDRe

public double getDRe()
Get the value of dRe.

Returns:
value of dRe.

setDRe

public void setDRe(double v)
Set the value of dRe.

Parameters:
v - Value to assign to dRe.

assign

public void assign(double newA,
                   double newBRe,
                   double newBIm,
                   double newD)
Assign hermitian matrix by diagonal and upper right elements.

Parameters:
newA - the upper left entry
newBRe - the real part of the upper right entry
newBIm - the imaginary part of the upper right entry
newD - the lower right entry

assign

public void assign(double a,
                   Complex b,
                   double d)
Assign hermitian matrix by diagonal and upper right elements.

Parameters:
a - a double: the real upper left entry
b - a Complex: the complex upper right entry
d - a double: the real lower right entry

assign

public void assign(HermitianComplex2By2 s)
assigns this with the prescribed matrix


assignConjugateWith

public void assignConjugateWith(AbstractComplex2By2 t)

Assign this with t this t-1.

Simply calls AbstractComplex2By2.assignConjugateWith(AbstractComplex2By2).

Overrides:
assignConjugateWith in class AbstractComplex2By2
Parameters:
t - an AbstractComplex2By2: the matrix with which to conjugate

assignAdjoinedWith

public void assignAdjoinedWith(AbstractComplex2By2 t)

Assign this with t this t*.

Simply calls AbstractComplex2By2.assignAdjoinedWith(AbstractComplex2By2).

Overrides:
assignAdjoinedWith in class AbstractComplex2By2
Parameters:
t - an AbstractComplex2By2: the matrix to adjoin with

assignLorentzVector

public void assignLorentzVector(double x0,
                                double x1,
                                double x2,
                                double x3)

Assign hermitian matrix by a Lorentz vector.

Sets this to

     [ x0 - x3       -x1 - i x2 ]
     [                          ]
     [ -x1 + i x2     x0 + x3   ].
 

Note that the determinant is  x02 - x12 - x22 - x32.


lorentzVectorX0

public final double lorentzVectorX0()
Return the x0-component of the Lorentz vector corresponding to this.

Returns:
x0
See Also:
assignLorentzVector(double, double, double, double)

lorentzVectorX1

public final double lorentzVectorX1()
Return the x1-component of the Lorentz vector corresponding to this.

Returns:
x1
See Also:
assignLorentzVector(double, double, double, double)

lorentzVectorX2

public final double lorentzVectorX2()
Return the x2-component of the Lorentz vector corresponding to this.

Returns:
x2
See Also:
assignLorentzVector(double, double, double, double)

lorentzVectorX3

public final double lorentzVectorX3()
Return the x3-component of the Lorentz vector corresponding to this.

Returns:
x3
See Also:
assignLorentzVector(double, double, double, double)

realDeterminant

public double realDeterminant()

Return the real determinant of this.

The determinant of a hermitian matrix is real.

Returns:
the real determinant ad - bc