FileDocCategorySizeDatePackage
Counting3.javaAPI DocExample839Sat Sep 12 03:01:00 BST 1998None

Counting3

public class Counting3 extends Object
Calculate and sum the difference between adjacent pairs of values.
see
com.objectspace.jgl.algorithms.Counting
version
3.0.0
author
ObjectSpace, Inc.

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

    // create sample array
    int intArray[] = { 1, 2, 4, 8, 16 };
    IntIterator begin = IntIterator.begin( intArray );
    IntIterator end = IntIterator.end( intArray );
    Printing.println( begin, end );

    // make sure destination hase enough space allocated
    Array array = new Array( 5 );

    Counting.adjacentDifference( begin, end, array.start() );
    Printing.println( array );