net.sourceforge.jabm.util
Class Permutator

java.lang.Object
  extended by net.sourceforge.jabm.util.Permutator
All Implemented Interfaces:
java.io.Serializable, java.util.Iterator<int[]>

public class Permutator
extends java.lang.Object
implements java.util.Iterator<int[]>, java.io.Serializable

See Also:
Serialized Form
 

Field Summary
protected  int[] goal
           
protected  int n
           
protected  java.util.Stack<net.sourceforge.jabm.util.PermutatorState> stack
           
 
Constructor Summary
Permutator(int[] goal)
           
 
Method Summary
 boolean hasNext()
           
static void main(java.lang.String[] args)
           
 int[] next()
           
protected  int[] permutate()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

goal

protected int[] goal

n

protected int n

stack

protected java.util.Stack<net.sourceforge.jabm.util.PermutatorState> stack
Constructor Detail

Permutator

public Permutator(int[] goal)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<int[]>

next

public int[] next()
Specified by:
next in interface java.util.Iterator<int[]>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<int[]>

permutate

protected int[] permutate()

main

public static void main(java.lang.String[] args)