org.dolben.poly
Class P3

java.lang.Object
  extended by org.dolben.poly.P3

public class P3
extends java.lang.Object

Permutations of components and combinations of signs of components for 3D vectors: { even | odd | all } { Permutations | Pluses }.

For completeness there ought to be *Permutations( double[][] ), but they weren't used and so are left out. See evenPluses( double[][] ), e.g., for a template if need be.


Field Summary
static double PHI
           
 
Constructor Summary
P3()
           
 
Method Summary
static double[][] allPermutations(double[] v)
          Generates all the permutations of the components of a 3D vector.
static double[][] allPluses(double[] v)
          Generates all the combinations of signs for the components of a 3D vector.
static double[][] allPluses(double[][] a)
          Generates all the combinations of an even number of plus signs for the components of each 3D vector in an array where no component is zero.
static double[][] concatenate(double[][] a, double[][] b)
          Concatenates two arrays of vectors.
static double[][] evenPermutations(double[] v)
          Generates all the even permutations of the components of a 3D vector.
static double[][] evenPluses(double[] v)
          Generates all the combinations of an even number of plus signs for the components of a 3D vector where no component is zero.
static double[][] evenPluses(double[][] a)
          Generates all the combinations of an even number of plus signs for the components of each 3D vector in an array where no component is zero.
static double[][] oddPermutations(double[] v)
          Generates all the odd permutations of the components of a 3D vector.
static double[][] oddPluses(double[] v)
          Generates all the combinations of an odd number of plus signs for the components of a 3D vector where no component is zero.
static double[][] oddPluses(double[][] a)
          Generates all the combinations of an odd number of plus signs for the components of each 3D vector in an array where no component is zero.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PHI

public static final double PHI
Constructor Detail

P3

public P3()
Method Detail

evenPermutations

public static double[][] evenPermutations(double[] v)
Generates all the even permutations of the components of a 3D vector.

Parameters:
v - the vector
Returns:
an array of 3D vectors

oddPermutations

public static double[][] oddPermutations(double[] v)
Generates all the odd permutations of the components of a 3D vector.

Parameters:
v - the vector
Returns:
an array of 3D vectors

evenPluses

public static double[][] evenPluses(double[] v)
Generates all the combinations of an even number of plus signs for the components of a 3D vector where no component is zero.

Parameters:
v - the vector
Returns:
an array of 3D vectors

oddPluses

public static double[][] oddPluses(double[] v)
Generates all the combinations of an odd number of plus signs for the components of a 3D vector where no component is zero.

Parameters:
v - the vector
Returns:
an array of 3D vectors

allPluses

public static double[][] allPluses(double[] v)
Generates all the combinations of signs for the components of a 3D vector. Handles all the cases of zero components.

Parameters:
v - the vector
Returns:
an array of 3D vectors

allPermutations

public static double[][] allPermutations(double[] v)
Generates all the permutations of the components of a 3D vector.

Parameters:
v - the vector
Returns:
an array of 3D vectors

evenPluses

public static double[][] evenPluses(double[][] a)
Generates all the combinations of an even number of plus signs for the components of each 3D vector in an array where no component is zero.

Parameters:
a - array of 3D vectors
Returns:
an array of 3D vectors

oddPluses

public static double[][] oddPluses(double[][] a)
Generates all the combinations of an odd number of plus signs for the components of each 3D vector in an array where no component is zero.

Parameters:
a - array of 3D vectors
Returns:
an array of 3D vectors

allPluses

public static double[][] allPluses(double[][] a)
Generates all the combinations of an even number of plus signs for the components of each 3D vector in an array where no component is zero.

Parameters:
a - array of 3D vectors
Returns:
an array of 3D vectors

concatenate

public static double[][] concatenate(double[][] a,
                                     double[][] b)
Concatenates two arrays of vectors.

Parameters:
a - one array of vectors
b - another array of vectors
Returns:
an array of vectors which is the concatenation of the two