public class Lexicographic extends AbstractCollection<int[]>
| Constructor and Description |
|---|
Lexicographic(int n,
int r)
Construct a lexicographic ordering or r items chosen from 0 through n − 1.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
fromCoLexicographic(int n,
int r,
String colex)
Convert a colexicographic chirotope string into a lexicographic one
|
static int |
index(int n,
int[] ix)
In a lexicographic ordering, what position is this index.
|
Iterator<int[]> |
iterator() |
static void |
main(String[] args)
simple test code
|
int |
size() |
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCodepublic Lexicographic(int n,
int r)
n - The number of things to choose fromr - The number of things to choose: greater than 0 and less than npublic Iterator<int[]> iterator()
iterator in interface Iterable<int[]>iterator in interface Collection<int[]>iterator in class AbstractCollection<int[]>public int size()
size in interface Collection<int[]>size in class AbstractCollection<int[]>public static void main(String[] args)
args - n and rpublic static int index(int n,
int[] ix)
n - the number of items being chosen fromix - The increasing list of integers in an orderingpublic static String fromCoLexicographic(int n, int r, String colex)
n - The number of things to choose fromr - The number of things to choosecolex - A colexicographically ordered string (one character per index)