org.apfloat.samples
Class Pi.ChudnovskyProgressIndicator

java.lang.Object
  |
  +--org.apfloat.samples.Pi.ChudnovskyProgressIndicator
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
Pi

public static class Pi.ChudnovskyProgressIndicator
extends java.lang.Object
implements java.io.Serializable

Indicates progress of the pi calculation using the Chudnovskys' binary splitting algorithm.

See Also:
Serialized Form

Constructor Summary
Pi.ChudnovskyProgressIndicator(long terms)
          Construct a progress indicator with the specified number of terms of the series.
 
Method Summary
 void progress(long n1, long n2)
          Advances the progress.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pi.ChudnovskyProgressIndicator

public Pi.ChudnovskyProgressIndicator(long terms)
Construct a progress indicator with the specified number of terms of the series.

Parameters:
terms - Total number of terms to be calculated.
Method Detail

progress

public void progress(long n1,
                     long n2)
Advances the progress.

Parameters:
n1 - First term that has been calculated.
n2 - Last term that has been calculated, minus one.