public final class SequenceGenerator
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
SequenceGenerator() |
Modifier and Type | Method and Description |
---|---|
static ArrayIncrementor |
increasingSequenceIncrementor(int[] a,
int max)
This increments an array in place through all strictly increasing sequences
whose entries lie between 0 and max, inclusive.
|
static ArrayIncrementor |
increasingSequenceIncrementorOld(int[] a,
int max)
This increments an array in place through all strictly increasing sequences
whose entries lie between 0 and max, inclusive.
|
static int[] |
initialPartition(int size,
int numBlocks)
This returns the initial partition on size with
numBlocks blocks in JB form.
|
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 restriction that last coordinate is at
least lastMin (useful when the first part of a list is
known to be closed).
|
static ArrayIncrementor |
partitionArrayIncrementor(int[] a,
int numBlocks)
This returns an ArrayIncrementor that increments through
all partitions with numBlocks blocks in JB form.
|
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[] maxs)
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 . |
public static ArrayIncrementor nondecreasingSequenceIncrementor(int[] a, int max)
public static ArrayIncrementor nondecreasingSequenceIncrementor(int[] a, int max, int lastMin)
public static ArrayIncrementor increasingSequenceIncrementorOld(int[] a, int max)
a
- max
- 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[] maxs)
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 int[] initialPartition(int size, int numBlocks)
partitionArrayIncrementor
.size
- numBlocks
- public static ArrayIncrementor partitionArrayIncrementor(int[] a, int numBlocks)
initialPartition
.a
- numBlocks
- public static void main(java.lang.String[] args)
Copyright 2003 Ralph Freese. All Rights Reserved.