package jsci.maths.groups;
import jsci.maths.*;
import jsci.maths.matrices.AbstractComplexMatrix;
import jsci.maths.matrices.AbstractComplexSquareMatrix;
import jsci.maths.matrices.ComplexDiagonalMatrix;
import jsci.maths.vectors.AbstractDoubleVector;
/**
* The LieGroup class provides an encapsulation for Lie groups.
* Elements are represented by complex matrices, and are limited
* to being near the identity.
* @jsci.planetmath LieGroup
* @version 1.3
* @author Mark Hale
*/
public class LieGroup extends Object {
private AbstractComplexSquareMatrix generators[];
private AbstractComplexSquareMatrix identityMatrix;
/**
* Constructs a Lie group from a Lie algebra.
* @param gens the group generators
*/
public LieGroup(AbstractComplexSquareMatrix gens[]) {
generators=gens;
identityMatrix=ComplexDiagonalMatrix.identity(generators[0].rows());
}
/**
* Returns the dimension of the group.
*/
public final int dimension() {
return generators.length;
}
/**
* Returns an element near the identity.
* @param v a small element from the Lie algebra
*/
public AbstractComplexSquareMatrix getElement(AbstractDoubleVector v) {
if(generators.length!=v.dimension())
throw new IllegalArgumentException("The vector should match the generators.");
AbstractComplexMatrix phase=generators[0].scalarMultiply(v.getComponent(0));
for(int i=1;i
Ads help maintain this website.