|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.colossus.util.PermGen
class PermGen
This class is a permutation generator. The permutations are generated using Dershowitz's method, meaning that a permutation only differs by the previous permutation by a single interchange of two adjacent elements. In many problem domains this allows a efficient dynamic update of a permutation function.
Field Summary | |
---|---|
(package private) int[] |
m_d
|
(package private) int[] |
m_l
|
(package private) int[] |
m_p
|
(package private) int |
m_size
|
(package private) int[] |
m_t
|
Constructor Summary | |
---|---|
PermGen(int size)
|
Method Summary | |
---|---|
int[] |
getCurrent()
get the current permutation |
int |
getNext()
generates the next permutation. |
static void |
main(java.lang.String[] args)
Unit test for PermGen. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
int[] m_p
int[] m_l
int[] m_t
int[] m_d
int m_size
Constructor Detail |
---|
PermGen(int size)
Method Detail |
---|
public int getNext()
public int[] getCurrent()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |