Class PermutationGenerator

java.lang.Object
edu.cmu.tetrad.util.PermutationGenerator

public final class PermutationGenerator extends Object
Generates all of the permutations of [0,..., numObjects - 1], where numObjects is numObjects nonnegative integer. The values of numObjects is given in the constructor, and the sequence of choices is obtained by repeatedly calling the next() method. When the sequence is finished, null is returned.

A valid combination for the sequence of combinations for numObjects choose b generated by this class is an array x[] of b integers representing the above permutation.

To see what this class does, try calling PermutationGenerator.testPrint(5), for instance.

Version:
$Id: $Id
Author:
josephramsey