|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectshared.stat.util.Combinatorics
public class Combinatorics

A collection of useful static methods for combinatorics.
| Field Summary | |
|---|---|
protected static double[] |
GammaLnCoefficients
A lookup table of coefficients in support of gammaLn(double). |
| Method Summary | |
|---|---|
static double |
gamma(double x)
The gamma function. |
static double |
gammaLn(double x)
The log-gamma function. |
protected static void |
orderedPartition(DynamicObjectArray<int[]> acc,
int[] sizes,
int nsizes,
int nremaining)
A helper method in support of orderedPartition(int, int, int). |
static int[][] |
orderedPartition(int n)
A facade for orderedPartition(int, int, int). |
static int[][] |
orderedPartition(int n,
int npartsLower,
int npartsUpper)
Calculates all ordered partitions of an n element set into at least npartsLower parts and at most
(exclusive) npartsUpper parts. |
protected static void |
partition(DynamicObjectArray<int[]> acc,
int[] sizes,
int nsizes,
int currentSize,
int nremaining)
A helper method in support of partition(int, int, int). |
static int[][] |
partition(int n)
A facade for partition(int, int, int). |
static int[][] |
partition(int n,
int npartsLower,
int npartsUpper)
Calculates all partitions of an n element set into at least npartsLower parts and at most
(exclusive) npartsUpper parts. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final double[] GammaLnCoefficients
gammaLn(double).
| Method Detail |
|---|
public static final int[][] partition(int n)
partition(int, int, int).
n - the number of elements.
public static final int[][] partition(int n,
int npartsLower,
int npartsUpper)
n element set into at least npartsLower parts and at most
(exclusive) npartsUpper parts.
n - the number of elements.npartsLower - the lower bound on the number of parts.npartsUpper - the upper bound (exclusive) on the number of parts.
protected static final void partition(DynamicObjectArray<int[]> acc,
int[] sizes,
int nsizes,
int currentSize,
int nremaining)
partition(int, int, int).
acc - the partition accumulator.sizes - the partition sizes.nsizes - the number of parts so far.currentSize - the part size so far.nremaining - the number of remaining elements.public static final int[][] orderedPartition(int n)
orderedPartition(int, int, int).
n - the number of elements.
public static final int[][] orderedPartition(int n,
int npartsLower,
int npartsUpper)
n element set into at least npartsLower parts and at most
(exclusive) npartsUpper parts.
n - the number of elements.npartsLower - the lower bound on the number of parts.npartsUpper - the upper bound (exclusive) on the number of parts.
protected static final void orderedPartition(DynamicObjectArray<int[]> acc,
int[] sizes,
int nsizes,
int nremaining)
orderedPartition(int, int, int).
acc - the ordered partition accumulator.sizes - the ordered partition sizes.nsizes - the number of parts so far.nremaining - the number of remaining elements.public static final double gamma(double x)
x - the input value.
public static final double gammaLn(double x)
x - the input value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||