|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.umd.cfar.lamp.viper.util.Combinator
This class takes in an array of Objects and runs through all possible k-combinations. See Doug Moore's Bit Twiddling.
Permuter| Constructor Summary | |
Combinator(java.lang.Object[] set,
int lengthOfPermutation)
Constructs a new Combinator to iterate through all combinations of the specified length on the given set. |
|
| Method Summary | |
java.lang.Object[] |
getCurrentCombination()
Returns the most recently generated combination. |
java.lang.Object[] |
getNextCombination()
Returns the lexicographically next combination. |
protected java.math.BigInteger |
leastItem(java.math.BigInteger comb)
Returns the least item in a combination. |
java.lang.String |
toString()
Prints out the last combination. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Combinator(java.lang.Object[] set,
int lengthOfPermutation)
set - The data to iterate over.lengthOfPermutation - The length of the sets to generate.| Method Detail |
protected java.math.BigInteger leastItem(java.math.BigInteger comb)
comb - The combination to find the least set bit in.
public java.lang.Object[] getNextCombination()
public java.lang.Object[] getCurrentCombination()
public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||