jhypercomplex.numbers.cayley_dickson_algebras
Class Octonion

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

public class Octonion
extends CayleyDicksonAlgebra

Author:
Markus Maute (http://www.JHyperComplex.com)

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
Octonion()
           
Octonion(Octonion o)
           
Octonion(java.lang.String components)
           
 
Method Summary
 Octonion add(Hypernumber o)
           
 Octonion calculateBCHWith(Octonion o, int from_order, int to_order)
           
 Octonion conjugate()
           
static void doCayleyDicksonDoubling(java.lang.String signature)
           
static void doCayleyDicksonDoubling(java.lang.String signatures, java.lang.String vector_basis)
           
static void doCayleyDicksonDoubling(java.lang.String signatures, java.lang.String vector_basis, int type)
           
static void doCayleyDicksonProcess(java.lang.String signature)
           
static java.lang.String getAlgebraType()
          The normed multiplication table is compared with a multiplication table of i) a non-split octonion ii) a split octonion
static Octonion getAntiAssociator(Hypernumber h1, Hypernumber h2, Hypernumber h3)
           
 Octonion getAntiCommutatorWith(Hypernumber h)
          Calculates the anti-commutator of the hypernumber h1 with another one h2 which is defined as: {h1, h2} = h1*h2 + h2*h1
static Octonion getAssociationType(int nr, Octonion o1, Octonion o2, Octonion o3, Octonion o4)
           
static Octonion getAssociationTypeCommutator(int nr, Octonion o1, Octonion o2, Octonion o3, Octonion o4)
           
static Octonion getAssociator(Octonion o1, Octonion o2, Octonion o3)
          Calculates the associator of 3 octonions o1, o2, o3 which is defined as {o1, o2, o3} = (o1*o2)*o3 - o1*(o2*o3) The associator is non-trivial as the octonion algebra is non-associative.
 java.lang.String[] getBasis()
           
 java.lang.String[] getBiVectorComponents()
           
static java.lang.String[][] getCayleyDicksonTable(java.lang.String[] signature, int type)
           
static java.lang.String[][] getCayleyDicksonTable(java.lang.String[] signature, java.lang.String[] vector_basis, int type)
           
 Octonion getClone()
           
static Octonion getCommutator(Octonion o1, Octonion o2)
           
static Octonion getCommutatorJacobian(Octonion o1, Octonion o2, Octonion o3)
           
 Octonion getCommutatorWith(Hypernumber o)
          Analysis *
static Octonion getDifference(Octonion o1, Octonion o2)
           
static SevenPointsSTS getFanoPlane()
           
 Octonion getGrade(int grade)
           
static java.util.TreeMap<java.lang.Integer,java.lang.Integer> getGrades()
           
 java.lang.String getGradesOccuring()
           
static Octonion getJacobian(Octonion o1, Octonion o2, Octonion o3)
           
static MultiplicationTable getMultiplicationTable()
           
static java.lang.String[][] getMultiplicationTableAsArray()
           
 java.lang.String[][] getMultTable()
           
static java.lang.String getMultTableAsHtml()
           
static Octonion getNegated(Octonion o)
           
 Hypernumber getNewInstance()
           
static java.lang.String[][] getNormedMultiplicationTable()
           
static java.lang.String getNormedMultiplicationtableAsHtml()
           
 int getNumberOfComponents()
           
 int getNumberOfGrades()
           
static Octonion getNumericalInverse(Hypernumber h)
           
static Octonion getOuterProduct(Octonion o1, Octonion o2)
           
static Octonion getProduct(Octonion o1, Octonion o2)
           
static Octonion getProductWithScalar(Hypernumber h, java.lang.String scalar)
           
static Octonion getScalarProduct(Octonion o1, Octonion o2)
           
static java.util.HashSet<java.lang.String> getSubalgebras(int order)
           
static java.util.HashSet<int[]> getSubalgebrasUnsigned(int order)
           
static Octonion getSum(Octonion o1, Octonion o2)
           
 java.util.Collection<java.lang.String> getTriadSet(int nr)
           
 java.lang.String[] getTriVectorComponents()
           
 java.lang.String[] getVectorComponents()
           
static Octonion getVectorProduct(Octonion o1, Octonion o2)
           
static boolean isSixthRootOfUnity(Octonion o)
           
static boolean isThirdRootOfUnity(Octonion o)
           
 Octonion multiplyWithScalar(java.lang.String scalar)
          Multiplication with a scalar.
 Octonion negate()
          Arithmetics *
 Octonion rightMultiplyWith(Octonion o2)
           
 void setBiVectorComponents(java.lang.String comps)
           
static void setDefaultTable()
           
static void setFanoPlane(int nr)
          Sets a multiplication table based on one of the 30 Fano planes according to the definition in the octonion multiplication table class.
static void setMultiplicationTable(MultiplicationTable mult_table)
           
static void setMultiplicationTable(java.lang.String[][] mult_table)
           
 void setOctonionMultTable(OctonionMultiplicationTable mult_table)
           
 void setTriVectorComponents(java.lang.String comps)
           
static void setType(int nr)
          Sets the n-th multiplication table, according to the definition in the octonion multiplication table class.
 void setVectorComponents(java.lang.String comps)
          Components *
 Octonion subtract(Hypernumber o)
          Subtracts a hypernumber.
 
Methods inherited from class jhypercomplex.numbers.cayley_dickson_algebras.CayleyDicksonAlgebra
getLoopMultiplicationTable, isCayleyDicksonAlgebra, isLoop
 
Methods inherited from class jhypercomplex.numbers.Hypernumber
add, applyLeibnizRule, asString, asString, calculateBCHWith, collectTerms, compressComponents, dual, getAlternator1, getAlternator2, getAntiCommutator, getAssociationType, getAssociationType, getAssociationTypeAsString, getAssociationTypeAsString, getAssociationTypeCommutator, getAssociationTypeCommutator, getAssociationTypeCommutatorAsString, getAssociationTypeCommutatorAsString, getAssociator, getBasisElementsAsString, getCommuAssociator, getCommutator, getCommutator, getCommutatorJacobian, getCommutatorSaglian, 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, getOuterProduct, getProduct, 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Octonion

public Octonion()

Octonion

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

Octonion

public Octonion(Octonion o)
Method Detail

getClone

public Octonion getClone()

getNewInstance

public Hypernumber getNewInstance()

doCayleyDicksonDoubling

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

doCayleyDicksonDoubling

public static void doCayleyDicksonDoubling(java.lang.String signature)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

doCayleyDicksonDoubling

public static void doCayleyDicksonDoubling(java.lang.String signatures,
                                           java.lang.String vector_basis)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

getCayleyDicksonTable

public static java.lang.String[][] getCayleyDicksonTable(java.lang.String[] signature,
                                                         java.lang.String[] vector_basis,
                                                         int type)
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

getCayleyDicksonTable

public static java.lang.String[][] getCayleyDicksonTable(java.lang.String[] signature,
                                                         int type)
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

doCayleyDicksonProcess

public static void doCayleyDicksonProcess(java.lang.String signature)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getBasis

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

setMultiplicationTable

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

setMultiplicationTable

public static void setMultiplicationTable(MultiplicationTable mult_table)

setOctonionMultTable

public void setOctonionMultTable(OctonionMultiplicationTable mult_table)

getMultiplicationTableAsArray

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

getMultiplicationTable

public static MultiplicationTable getMultiplicationTable()

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()

getMultTable

public java.lang.String[][] getMultTable()

setVectorComponents

public void setVectorComponents(java.lang.String comps)
                         throws java.lang.Exception
Components *

Throws:
java.lang.Exception

getVectorComponents

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

setBiVectorComponents

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

getBiVectorComponents

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

setTriVectorComponents

public void setTriVectorComponents(java.lang.String comps)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getTriVectorComponents

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

getNumberOfComponents

public int getNumberOfComponents()

negate

public Octonion negate()
                throws java.lang.Exception
Arithmetics *

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

add

public Octonion add(Hypernumber o)
Overrides:
add in class Hypernumber

subtract

public Octonion subtract(Hypernumber o)
                  throws java.lang.Exception
Description copied from class: Hypernumber
Subtracts a hypernumber.

Overrides:
subtract in class Hypernumber
Parameters:
o - Hypernumber to be subtacted.
Returns:
Result of subtraction.
Throws:
java.lang.Exception

multiplyWithScalar

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

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

conjugate

public Octonion 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

getScalarProduct

public static Octonion getScalarProduct(Octonion o1,
                                        Octonion o2)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getGradesOccuring

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

rightMultiplyWith

public Octonion rightMultiplyWith(Octonion o2)
                           throws java.lang.Exception
Throws:
java.lang.Exception

getCommutatorWith

public Octonion getCommutatorWith(Hypernumber o)
                           throws java.lang.Exception
Description copied from class: Hypernumber
Analysis *

Overrides:
getCommutatorWith in class Hypernumber
Throws:
java.lang.Exception

getSum

public static Octonion getSum(Octonion o1,
                              Octonion o2)
                       throws java.lang.Exception
Throws:
java.lang.Exception

getDifference

public static Octonion getDifference(Octonion o1,
                                     Octonion o2)
                              throws java.lang.Exception
Throws:
java.lang.Exception

getNegated

public static Octonion getNegated(Octonion o)
                           throws java.lang.Exception
Throws:
java.lang.Exception

getProductWithScalar

public static Octonion getProductWithScalar(Hypernumber h,
                                            java.lang.String scalar)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getProduct

public static Octonion getProduct(Octonion o1,
                                  Octonion o2)
                           throws java.lang.Exception
Throws:
java.lang.Exception

getCommutator

public static Octonion getCommutator(Octonion o1,
                                     Octonion o2)
                              throws java.lang.Exception
Throws:
java.lang.Exception

isThirdRootOfUnity

public static boolean isThirdRootOfUnity(Octonion o)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

isSixthRootOfUnity

public static boolean isSixthRootOfUnity(Octonion o)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

getAntiCommutatorWith

public Octonion getAntiCommutatorWith(Hypernumber h)
                               throws java.lang.Exception
Description copied from class: Hypernumber
Calculates the anti-commutator of the hypernumber h1 with another one h2 which is defined as: {h1, h2} = h1*h2 + h2*h1

Overrides:
getAntiCommutatorWith in class Hypernumber
Parameters:
h - Second hypernumber.
Returns:
The anti-commutator of the hypernumber with another one.
Throws:
java.lang.Exception

getCommutatorJacobian

public static Octonion getCommutatorJacobian(Octonion o1,
                                             Octonion o2,
                                             Octonion o3)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

getJacobian

public static Octonion getJacobian(Octonion o1,
                                   Octonion o2,
                                   Octonion o3)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getAlgebraType

public static java.lang.String getAlgebraType()
                                       throws java.lang.Exception
The normed multiplication table is compared with a multiplication table of i) a non-split octonion ii) a split octonion

Returns:
"nonsplit" or // TODO update commenmt "split" or "unknown"
Throws:
java.lang.Exception

setType

public static void setType(int nr)
                    throws java.lang.Exception
Sets the n-th multiplication table, according to the definition in the octonion multiplication table class.

Parameters:
nr - Number of multiplication table in the range 1,...,480.
Throws:
java.lang.Exception

setFanoPlane

public static void setFanoPlane(int nr)
                         throws java.lang.Exception
Sets a multiplication table based on one of the 30 Fano planes according to the definition in the octonion multiplication table class.

Parameters:
nr - Number of Fano plane in the range 1...30.
Throws:
java.lang.Exception

getAssociator

public static Octonion getAssociator(Octonion o1,
                                     Octonion o2,
                                     Octonion o3)
                              throws java.lang.Exception
Calculates the associator of 3 octonions o1, o2, o3 which is defined as {o1, o2, o3} = (o1*o2)*o3 - o1*(o2*o3) The associator is non-trivial as the octonion algebra is non-associative.

Parameters:
o1 - Octonion 1
o2 - Octonion 2
o3 - Octonion 3
Returns:
The associator of the three octonions.
Throws:
java.lang.Exception

getAntiAssociator

public static Octonion getAntiAssociator(Hypernumber h1,
                                         Hypernumber h2,
                                         Hypernumber h3)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

calculateBCHWith

public Octonion calculateBCHWith(Octonion o,
                                 int from_order,
                                 int to_order)
                          throws java.lang.Exception
Throws:
java.lang.Exception

getVectorProduct

public static Octonion getVectorProduct(Octonion o1,
                                        Octonion o2)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getNumberOfGrades

public int getNumberOfGrades()

getGrade

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

getNumericalInverse

public static Octonion getNumericalInverse(Hypernumber h)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

getOuterProduct

public static Octonion getOuterProduct(Octonion o1,
                                       Octonion o2)
                                throws java.lang.Exception
Throws:
java.lang.Exception

getAssociationType

public static Octonion getAssociationType(int nr,
                                          Octonion o1,
                                          Octonion o2,
                                          Octonion o3,
                                          Octonion o4)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getAssociationTypeCommutator

public static Octonion getAssociationTypeCommutator(int nr,
                                                    Octonion o1,
                                                    Octonion o2,
                                                    Octonion o3,
                                                    Octonion o4)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

getFanoPlane

public static SevenPointsSTS getFanoPlane()
                                   throws java.lang.Exception
Returns:
Fano plane which is equivalent to a Steiner triple system on 7 points.
Throws:
java.lang.Exception

getTriadSet

public java.util.Collection<java.lang.String> getTriadSet(int nr)
                                                   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

getSubalgebras

public static java.util.HashSet<java.lang.String> getSubalgebras(int order)
                                                          throws java.lang.Exception
Throws:
java.lang.Exception

getSubalgebrasUnsigned

public static java.util.HashSet<int[]> getSubalgebrasUnsigned(int order)
                                                       throws java.lang.Exception
Throws:
java.lang.Exception