|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.uacalc.util.SequenceGenerator
public final class SequenceGenerator
This has utility static methods for sequence generation, including nondecreasing sequences. It also includes an in-place ArrayIncrementor.
| Constructor Summary | |
|---|---|
protected |
SequenceGenerator()
|
| Method Summary | |
|---|---|
static ArrayIncrementor |
increasingSequenceIncrementor(int[] a,
int max)
his increments an array in place through all strictly increasing sequences whose entries lie between 0 and max, inclusive. |
static ArrayIncrementor |
leftSequenceIncrementor(int[] a,
int max)
This just increments the array through all possible tuples with entries between 0 and max from the left. |
static void |
main(java.lang.String[] args)
|
static ArrayIncrementor |
nondecreasingSequenceIncrementor(int[] a,
int max)
This increments an array in place through all nondecreasing sequences whose entries lie between 0 and max, inclusive. |
static ArrayIncrementor |
nondecreasingSequenceIncrementor(int[] a,
int max,
int lastMin)
This increments an array in place through all nondecreasing sequences whose entries lie between 0 and max, inclusive, subject to the restrction that last coordiate is at least lastMin (useful when the first part of a list is known to be closed). |
static ArrayIncrementor |
sequenceIncrementor(int[] a,
int max)
This just increments the array through all possible tuples with entries between 0 and max. |
static ArrayIncrementor |
sequenceIncrementor(int[] a,
int max,
int min)
This just increments the array through all possible tuples with entries between 0 and max and having at
least one entry at least as large as min. |
static ArrayIncrementor |
sequenceIncrementor(int[] a,
int max,
int min,
int jump)
This just increments the array through all possible tuples with entries between 0 and max and having at
least one entry at least as large as min. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected SequenceGenerator()
| Method Detail |
|---|
public static ArrayIncrementor nondecreasingSequenceIncrementor(int[] a,
int max)
public static ArrayIncrementor nondecreasingSequenceIncrementor(int[] a,
int max,
int lastMin)
public static ArrayIncrementor increasingSequenceIncrementor(int[] a,
int max)
a - max -
public static ArrayIncrementor sequenceIncrementor(int[] a,
int max)
public static ArrayIncrementor sequenceIncrementor(int[] a,
int max,
int min)
max and having at
least one entry at least as large as min.
This increments from the right: * [0,0,0], [0,0,1], ...,[max,max,max].
Of course min should be at most max.
public static ArrayIncrementor sequenceIncrementor(int[] a,
int max,
int min,
int jump)
max and having at
least one entry at least as large as min.
This increments from the right: * [0,0,0], [0,0,1], ...,[max,max,max].
Of course min should be at most max.
jump indicates how many times the array will be
incremented by each call to increment(). This is used in
parallel processing.
public static ArrayIncrementor leftSequenceIncrementor(int[] a,
int max)
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||