jhypercomplex
Class MonteCarlo

java.lang.Object
  extended by jhypercomplex.MonteCarlo

public class MonteCarlo
extends java.lang.Object


Constructor Summary
MonteCarlo()
           
 
Method Summary
static void findGeneralOctonionRotation()
          A most general quaternion rotation is given by q --> r*q*r-1.
static java.util.HashSet<Hypernumber> getIdemotents(java.lang.Class class_, int nonzero_elements)
          Idempotents (modulo '-1') are determined.
static java.util.HashSet<java.lang.String> getNonassociativeSpacetimeQuadruples()
           
static java.util.HashSet<java.lang.String> getNonassociativeSpacetimeTriples()
           
 java.util.HashSet<java.lang.String> getNucleus()
          Every component is randomly set to -1,0 or 1.
static int getRandomInteger(int from, int to)
           
static int getRandomInteger(int from, int to, java.util.HashSet<java.lang.String> excluded_elements)
           
static java.util.HashSet<java.lang.String> getTetrads(int n)
          For a given number of elements all possible tetrads (4-sets) are generated.
static java.util.HashSet<java.lang.String> getTriads(int n)
          For a given number of elements all possible triads are generated.
static java.util.HashSet<java.lang.String> getZeroDivisors(int nonzero_elements)
           
static void printQuintIdentities()
           
static void setNumberOfIterations(int n)
           
static void testGeneratePossibleHadamardTables()
          Given a n x n -matrix with n mod 4 = 0, how many different Hadamard matrices can one construct ?
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonteCarlo

public MonteCarlo()
Method Detail

setNumberOfIterations

public static void setNumberOfIterations(int n)

testGeneratePossibleHadamardTables

public static void testGeneratePossibleHadamardTables()
                                               throws java.lang.Exception
Given a n x n -matrix with n mod 4 = 0, how many different Hadamard matrices can one construct ?

Throws:
java.lang.Exception

findGeneralOctonionRotation

public static void findGeneralOctonionRotation()
                                        throws java.lang.Exception
A most general quaternion rotation is given by q --> r*q*r-1. Does this work for octonions as well or do we need more multiplications ?

Throws:
java.lang.Exception

getNucleus

public java.util.HashSet<java.lang.String> getNucleus()
Every component is randomly set to -1,0 or 1. The resulting vector is added to the resulting set if it is contained in the nucleus.

Returns:
Basis elements of the nucleus.

getIdemotents

public static java.util.HashSet<Hypernumber> getIdemotents(java.lang.Class class_,
                                                           int nonzero_elements)
                                                    throws java.lang.Exception
Idempotents (modulo '-1') are determined. I.e. we generate n random components of a hypernumber and multiply it with itself. If the condition h*h = +/-h is satisfied, we return the number.

Parameters:
nonzero_elements - Number of components set to +1 or -1 (randomly).
Returns:
Set of idempotents.
Throws:
java.lang.Exception

getZeroDivisors

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

getTriads

public static java.util.HashSet<java.lang.String> getTriads(int n)
For a given number of elements all possible triads are generated. The overall number is given by the binomial coefficient: Bin(n,3).

Parameters:
n - Number of possible elements in a triad.
Returns:
Set with the triads.

getTetrads

public static java.util.HashSet<java.lang.String> getTetrads(int n)
For a given number of elements all possible tetrads (4-sets) are generated. The overall number is given by the binomial coefficient: Bin(n,4).

Parameters:
n - Number of possible elements in a tetrad.
Returns:
Set with the tetrads.

getNonassociativeSpacetimeTriples

public static java.util.HashSet<java.lang.String> getNonassociativeSpacetimeTriples()
Returns:
Triples of the form x(yz), x(tz), t(zy)

getNonassociativeSpacetimeQuadruples

public static java.util.HashSet<java.lang.String> getNonassociativeSpacetimeQuadruples()
Returns:
Quadruples of the form (x(yz))t, y(x(tz)), t(z(yx))

printQuintIdentities

public static void printQuintIdentities()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getRandomInteger

public static int getRandomInteger(int from,
                                   int to,
                                   java.util.HashSet<java.lang.String> excluded_elements)

getRandomInteger

public static int getRandomInteger(int from,
                                   int to)