| 
Groovy 1.7.9 | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgroovy.util.PermutationGenerator
public class PermutationGenerator extends Object
Systematically generate permutations. Adapted from Java Code by Michael Gilleland (released with no restrictions) using an algorithm described here: Kenneth H. Rosen, Discrete Mathematics and Its Applications, 2nd edition (NY: McGraw-Hill, 1991), pp. 282-284
| Constructor Summary | |
            PermutationGenerator(Collection items)
            WARNING: Don't make n too large.  | 
        |
| Method Summary | |
|---|---|
            BigInteger
         | 
        
            getTotal()
             | 
        
            boolean
         | 
        
            hasNext()
             | 
        
            List
         | 
        
            next()
            Generate next permutation (algorithm from Rosen p. 284)  | 
        
            void
         | 
        
            remove()
             | 
        
            void
         | 
        
            reset()
             | 
        
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll | 
| Constructor Detail | 
|---|
public PermutationGenerator(Collection items)
items -  the items to permute
| Method Detail | 
|---|
public BigInteger getTotal()
public boolean hasNext()
public List next()
public void remove()
public void reset()
Copyright © 2003-2010 The Codehaus. All rights reserved.