1 package JSci.maths.algebras; 2 3 import JSci.maths.*; 4 import JSci.maths.matrices.AbstractComplexMatrix; 5 import JSci.maths.matrices.AbstractComplexSquareMatrix; 6 import JSci.maths.matrices.ComplexSquareMatrix; 7 import JSci.maths.matrices.AbstractDoubleSquareMatrix; 8 import JSci.maths.matrices.DoubleSquareMatrix; 9 import JSci.maths.vectors.AbstractDoubleVector; 10 import JSci.maths.vectors.Double3Vector; 11 import JSci.maths.vectors.VectorDimensionException; 12 import JSci.maths.fields.ComplexField; 13 14 21 public final class su2Dim3 extends LieAlgebra { 22 25 private final static Complex t1[][]={ 26 {Complex.ZERO,ComplexField.SQRT_HALF,Complex.ZERO}, 27 {ComplexField.SQRT_HALF,Complex.ZERO,ComplexField.SQRT_HALF}, 28 {Complex.ZERO,ComplexField.SQRT_HALF,Complex.ZERO} 29 }; 30 private final static Complex t2[][]={ 31 {Complex.ZERO,ComplexField.MINUS_SQRT_HALF_I,Complex.ZERO}, 32 {ComplexField.SQRT_HALF_I,Complex.ZERO,ComplexField.MINUS_SQRT_HALF_I}, 33 {Complex.ZERO,ComplexField.SQRT_HALF_I,Complex.ZERO} 34 }; 35 private final static Complex t3[][]={ 36 {Complex.ONE,Complex.ZERO,Complex.ZERO}, 37 {Complex.ZERO,Complex.ZERO,Complex.ZERO}, 38 {Complex.ZERO,Complex.ZERO,ComplexField.MINUS_ONE} 39 }; 40 43 private final static AbstractComplexSquareMatrix basisMatrices[]={ 44 new ComplexSquareMatrix(t1), 45 new ComplexSquareMatrix(t2), 46 new ComplexSquareMatrix(t3) 47 }; 48 51 private final static double g[][]={ 52 {-2.0,0.0,0.0}, 53 {0.0,-2.0,0.0}, 54 {0.0,0.0,-2.0} 55 }; 56 59 private final static AbstractDoubleSquareMatrix metricMatrix=new DoubleSquareMatrix(g); 60 61 private final static su2Dim3 _instance = new su2Dim3(); 62 65 private su2Dim3() { 66 super("su(2) [3]"); 67 } 68 71 public static final su2Dim3 getInstance() { 72 return _instance; 73 } 74 77 public AbstractComplexSquareMatrix getElement(final AbstractDoubleVector v) { 78 AbstractComplexMatrix m=basisMatrices[0].scalarMultiply(v.getComponent(0)); 79 m=m.add(basisMatrices[1].scalarMultiply(v.getComponent(1))); 80 m=m.add(basisMatrices[2].scalarMultiply(v.getComponent(2))); 81 return (AbstractComplexSquareMatrix)m.scalarMultiply(Complex.I); 82 } 83 87 public AbstractDoubleVector multiply(final AbstractDoubleVector a, final AbstractDoubleVector b) { 88 if(!(a instanceof Double3Vector) || !(b instanceof Double3Vector)) 89 throw new VectorDimensionException("Vectors must be 3-vectors."); 90 return ((Double3Vector)b).multiply((Double3Vector)a); 91 } 92 95 public double killingForm(final AbstractDoubleVector a, final AbstractDoubleVector b) { 96 return a.scalarProduct(metricMatrix.multiply(b)); 97 } 98 101 public AbstractComplexSquareMatrix[] basis() { 102 return basisMatrices; 103 } 104 107 public AbstractDoubleSquareMatrix cartanMetric() { 108 return metricMatrix; 109 } 110 } 111 112
| Popular Tags
|