|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPermutationGenerator
public class PermutationGenerator
Classe que gera as permutacoes para o backtracking. Esta classe foi adaptada. A classe original pode ser encontrada em: http://www.koders.com/java/fid8F9955893DACC01E6F9CB30A1F266F85B480F425.aspx O autor se chama Michael Gilleland.
Constructor Summary | |
---|---|
PermutationGenerator(int n)
Constri a classe com um parametro n, que o nmero de elementos. |
Method Summary | |
---|---|
int[] |
getNext()
Retorna a prxima permutao. |
java.math.BigInteger |
getNumLeft()
Retorna o nmero de permutaes restante. |
java.math.BigInteger |
getTotal()
Retorna o nmero total de permutaes. |
boolean |
hasMore()
Retorna true se h mais permutaes, false caso contrrio. |
void |
reset()
Faz um reset. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PermutationGenerator(int n)
n
- Method Detail |
---|
public void reset()
public java.math.BigInteger getNumLeft()
public java.math.BigInteger getTotal()
public boolean hasMore()
public int[] getNext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |