|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.studentsct.OnlineSectProof.Sequence
public static class OnlineSectProof.Sequence
A representation of a long number of given base.
Constructor Summary | |
---|---|
OnlineSectProof.Sequence(int length,
int base)
Constructor |
Method Summary | |
---|---|
int |
base()
Base of the sequence |
String |
cat()
Category of a sequence, i.e., a string representation of the count of each number in the sequence. |
int |
count(int i)
Count number of occurrences of given number in the sequence |
boolean |
inc()
Increment vector by 1, returns false it flips from the highest possible number to zero |
double |
progress()
If a sequence of all zeros is considered as 0, and the highest possible sequence (sequence of all base-1) is 1, this returns the position of the current sequence between these two bounds. |
int |
seq(int i)
Return number on the given position, zero is the number of the least significant value, size()-1 is the highest one |
void |
set(String seq)
Set the sequence from a string representation (A..0, B..1, C..2, etc.) |
int |
size()
Size of the sequence |
String |
toString()
String representation (A..0, B..1, C..2, etc.) going from the least significant value to the highest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OnlineSectProof.Sequence(int length, int base)
length
- size of the vectorbase
- base (e.g., 2 for a binary vector)Method Detail |
---|
public boolean inc()
public int base()
public int count(int i)
public int size()
public int seq(int i)
public void set(String seq)
public String toString()
toString
in class Object
public double progress()
public String cat()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |