FileDocCategorySizeDatePackage
Permuting1.javaAPI DocExample1015Sat Sep 12 03:01:00 BST 1998None

Permuting1

public class Permuting1 extends Object
Creating permutations of an JGL container and a native array of Objects.
see
com.objectspace.jgl.algorithms.Permuting
version
3.0.0
author
ObjectSpace, Inc.

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    Array array = new Array();
    array.add( new Integer( 0 ) );
    array.add( new Integer( 2 ) );
    array.add( new Integer( 5 ) );
    do
      {
      System.out.println( "array = " + array );
      }
    while ( Permuting.nextPermutation( array, new LessNumber() ) );

    String[] strings = { "gnu", "emu", "dog" };
    ObjectArray strArray = new ObjectArray( strings );
    do
      {
      System.out.println( strArray );
      }
    while ( Permuting.prevPermutation( strArray, new LessString() ) );