jhypercomplex.numbers.cayley_dickson_algebras
Class Quaternion

java.lang.Object
  extended by jhypercomplex.numbers.Hypernumber
      extended by jhypercomplex.numbers.cayley_dickson_algebras.CayleyDicksonAlgebra
          extended by jhypercomplex.numbers.cayley_dickson_algebras.Quaternion
All Implemented Interfaces:
CommonMethods
Direct Known Subclasses:
BiQuaternion

public class Quaternion
extends CayleyDicksonAlgebra


Field Summary
 
Fields inherited from class jhypercomplex.numbers.cayley_dickson_algebras.CayleyDicksonAlgebra
_2_N_ON, CLASSICAL, COMPLEX, OCTONION, QUATERNION, SEDENION, TRIGINTADUONION, TWISTED
 
Fields inherited from class jhypercomplex.numbers.Hypernumber
ARG_NUM, CIRCULAR, COMP_NUM, components, HYPERBOLIC, ZERO_PRECISSION
 
Constructor Summary
Quaternion()
           
Quaternion(int type)
           
Quaternion(Quaternion q)
           
Quaternion(java.lang.String components)
           
 
Method Summary
 Quaternion add(Quaternion q)
           
 Quaternion conjugate()
           
static void doCayleyDicksonProcess(java.lang.String[] signatures, java.lang.String[] vector_basis, int type)
           
 Quaternion getAntiCommutatorWith(Quaternion q)
           
 java.lang.String[] getBasis()
           
 Quaternion getClone()
           
static Quaternion getCommutator(Quaternion q1, Quaternion q2)
           
static Quaternion getCommutatorJacobian(Quaternion q1, Quaternion q2, Quaternion q3)
           
 Quaternion getCommutatorWith(Quaternion q)
           
 Quaternion getGrade(int grade)
           
static java.util.TreeMap<java.lang.Integer,java.lang.Integer> getGrades()
           
 java.lang.String getGradesOccuring()
           
static Quaternion getJacobian(Quaternion q1, Quaternion q2, Quaternion q3)
           
static MultiplicationTable getMultiplicationTable()
           
static java.lang.String getMultTableAsHtml()
           
 Hypernumber getNewInstance()
           
static java.lang.String[][] getNormedMultiplicationTable()
           
static java.lang.String getNormedMultiplicationtableAsHtml()
           
 int getNumberOfComponents()
           
 int getNumberOfGrades()
           
static Quaternion getProduct(Quaternion q1, Quaternion q2)
           
static java.lang.String getType()
          The normed multiplication table is compared with a multiplication table of i) a right handed non-split quaternion ii a left handed non-split quaternion iii) a right handed split quaternion iv) a left handed split quaternion
 java.lang.String[] getVectorComponents()
           
 Quaternion multiplyWithScalar(java.lang.String constant)
          Multiplication with a scalar.
 Quaternion negate()
          Negates the hypernumber: h --> -h.
 Quaternion rightMultiplyWith(Quaternion q)
           
 void setBiVectorComponents(java.lang.String bivector)
           
static void setDefaultTable()
           
static void setMultiplicationTable(java.lang.String[][] mult_table)
           
 void setVectorComponents(java.lang.String vector)
           
 
Methods inherited from class jhypercomplex.numbers.cayley_dickson_algebras.CayleyDicksonAlgebra
doCayleyDicksonDoubling, doCayleyDicksonDoubling, getLoopMultiplicationTable, isCayleyDicksonAlgebra, isLoop
 
Methods inherited from class jhypercomplex.numbers.Hypernumber
add, add, applyLeibnizRule, asString, asString, calculateBCHWith, collectTerms, compressComponents, dual, getAlternator1, getAlternator2, getAntiAssociator, getAntiCommutator, getAntiCommutatorWith, getAssociationType, getAssociationType, getAssociationTypeAsString, getAssociationTypeAsString, getAssociationTypeCommutator, getAssociationTypeCommutator, getAssociationTypeCommutatorAsString, getAssociationTypeCommutatorAsString, getAssociator, getBasisElementsAsString, getCommuAssociator, getCommutator, getCommutator, getCommutatorJacobian, getCommutatorSaglian, getCommutatorWith, getCommutatorWith, getComponent, getComponents, getComponentsAsString, getComponentsAsString, getComponentsOfGrade, getConjugate, getDiagonalProducts, getDifference, getDual, getExpressionAsList, getFirstHetztelPeresian, getFormattedMultTable, getGradedInnerProduct, getHermitianConjugate, getImaginaryPart, getInstance, getIntersection, getJacobian, getJordanAssociator, getLeftCovariantDerivative, getMultiplicativeOrder, getMultiplicativeOrder, getMultTableDiagonal, getNegated, getNextBitmap, getNormedMultiplicationTable, getNormSquared, getNormSquaredAsValue, getNumberOfClosedElements, getNumberOfClosedPairs, getNumberOfComponents, getNumberOfNonzeroComponents, getNumericalInverse, getOuterProduct, getProduct, getProductWithScalar, getPseudoScalarComponent, getRandomClosedPair, getRandomNonClosedPair, getScalarComponent, getScalarProduct, getSecondHetztelPeresian, getSignature, getSubalgebras, getSubalgebrasAsString, getSubalgebrasSignatures, getSum, getTrace, getTraceRespDeterminant, getVectorDerivative, getVectorProduct, isAutomorphism, isClosedAlgebra, isCommutative, isComponentZero, isEqual, isLinearlyDependent, isNumerical, isNumericalityDetected, isOrthogonal, isOrthogonalTo, isZero, resetComponents, rightMultiplyWith, rightMultiplyWith, setBasis, setComponent, setComponents, setComponents, setNumerical, setNumerical, setPseudoScalarComponent, setRandomComponents, setRandomComponents, setRandomComponents, setRandomComponentsAll, setScalarComponent, simplifyNumericalFactors, simplifyNumericalSummands, simplifyPlusMinus, square, subtract
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Quaternion

public Quaternion()

Quaternion

public Quaternion(int type)

Quaternion

public Quaternion(java.lang.String components)
           throws java.lang.Exception
Throws:
java.lang.Exception

Quaternion

public Quaternion(Quaternion q)
Method Detail

getType

public static java.lang.String getType()
The normed multiplication table is compared with a multiplication table of i) a right handed non-split quaternion ii a left handed non-split quaternion iii) a right handed split quaternion iv) a left handed split quaternion

Returns:
"right-handed-nonsplit" or "left-handed-nonsplit" or "right-handed-split" or "left-handed-nonsplit" or "unknown"

setVectorComponents

public void setVectorComponents(java.lang.String vector)
                         throws java.lang.Exception
Throws:
java.lang.Exception

setBiVectorComponents

public void setBiVectorComponents(java.lang.String bivector)
                           throws java.lang.Exception
Throws:
java.lang.Exception

rightMultiplyWith

public Quaternion rightMultiplyWith(Quaternion q)
                             throws java.lang.Exception
Throws:
java.lang.Exception

conjugate

public Quaternion conjugate()
                     throws java.lang.Exception
Overrides:
conjugate in class Hypernumber
Returns:
The conjugate of the hypernumber, i.e. reverses the signs of the imaginary hypercomplex components.
Throws:
java.lang.Exception

getProduct

public static Quaternion getProduct(Quaternion q1,
                                    Quaternion q2)
                             throws java.lang.Exception
Throws:
java.lang.Exception

add

public Quaternion add(Quaternion q)

multiplyWithScalar

public Quaternion multiplyWithScalar(java.lang.String constant)
                              throws java.lang.Exception
Description copied from class: Hypernumber
Multiplication with a scalar.

Overrides:
multiplyWithScalar in class Hypernumber
Parameters:
constant - Scalar.
Returns:
Hypernumber multiplied with a scalar.
Throws:
java.lang.Exception

negate

public Quaternion negate()
                  throws java.lang.Exception
Description copied from class: Hypernumber
Negates the hypernumber: h --> -h.

Overrides:
negate in class Hypernumber
Returns:
Negated hypernumber h.
Throws:
java.lang.Exception

getAntiCommutatorWith

public Quaternion getAntiCommutatorWith(Quaternion q)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getCommutatorWith

public Quaternion getCommutatorWith(Quaternion q)
                             throws java.lang.Exception
Throws:
java.lang.Exception

getClone

public Quaternion getClone()

getNewInstance

public Hypernumber getNewInstance()

getBasis

public java.lang.String[] getBasis()
Specified by:
getBasis in class Hypernumber

getNumberOfComponents

public int getNumberOfComponents()

doCayleyDicksonProcess

public static void doCayleyDicksonProcess(java.lang.String[] signatures,
                                          java.lang.String[] vector_basis,
                                          int type)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getMultiplicationTable

public static MultiplicationTable getMultiplicationTable()

setMultiplicationTable

public static void setMultiplicationTable(java.lang.String[][] mult_table)

setDefaultTable

public static void setDefaultTable()

getMultTableAsHtml

public static java.lang.String getMultTableAsHtml()

getNormedMultiplicationTable

public static java.lang.String[][] getNormedMultiplicationTable()

getNormedMultiplicationtableAsHtml

public static java.lang.String getNormedMultiplicationtableAsHtml()

getNumberOfGrades

public int getNumberOfGrades()

getGrade

public Quaternion getGrade(int grade)
                    throws java.lang.Exception
Throws:
java.lang.Exception

getGradesOccuring

public java.lang.String getGradesOccuring()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getVectorComponents

public java.lang.String[] getVectorComponents()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

getCommutator

public static Quaternion getCommutator(Quaternion q1,
                                       Quaternion q2)
                                throws java.lang.Exception
Throws:
java.lang.Exception

getJacobian

public static Quaternion getJacobian(Quaternion q1,
                                     Quaternion q2,
                                     Quaternion q3)
                              throws java.lang.Exception
Throws:
java.lang.Exception

getCommutatorJacobian

public static Quaternion getCommutatorJacobian(Quaternion q1,
                                               Quaternion q2,
                                               Quaternion q3)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

getGrades

public static java.util.TreeMap<java.lang.Integer,java.lang.Integer> getGrades()
                                                                        throws java.lang.Exception
Returns:
Array with the grades.
Throws:
java.lang.Exception