lima.mathematical.utilities
Class PermutingSet

java.lang.Object
  |
  +--lima.mathematical.utilities.PermutingSet

public class PermutingSet
extends java.lang.Object

A class to provide sucessive choices of a given number of objects from a set


Constructor Summary
PermutingSet(int n, int k)
          Construct a new Permuting Set object
 
Method Summary
 int[] getPermutation()
          Return an array with the selected set elements, indexed at zero
 boolean nextKofN()
          Make the next choice of elements from the set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermutingSet

public PermutingSet(int n,
                    int k)
Construct a new Permuting Set object

Parameters:
n - - size of the set from which we wish to choose objects
k - - the number of objects we wish to pick from this set
Method Detail

nextKofN

public boolean nextKofN()
Make the next choice of elements from the set.


getPermutation

public int[] getPermutation()
Return an array with the selected set elements, indexed at zero