FileDocCategorySizeDatePackage
Counting5.javaAPI DocExample760Sat Sep 12 03:01:00 BST 1998None

Counting5

public class Counting5 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)

    Array array = new Array();
    for ( long i = 1; i <= 10; ++i )
      array.add( new Long( i ) );
    System.out.println( array );

    Array result = new Array();
    Counting.adjacentDifference
      (
      array,
      result,
      new TimesNumber( Long.class )
      );
    System.out.println( result );