# Class PiParallel.ParallelBinarySplittingPiCalculator

java.lang.Object
org.apfloat.samples.Pi.BinarySplittingPiCalculator
org.apfloat.samples.PiParallel.ParallelBinarySplittingPiCalculator

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `PiDistributed.DistributedBinarySplittingPiCalculator`

Enclosing class:
  `PiParallel`

protected static class PiParallel.ParallelBinarySplittingPiCalculator extends Pi.BinarySplittingPiCalculator
Parallel version of the binary splitting algorithm. Uses multiple threads to calculate pi in parallel.

Version:
  1.14.0
Author:
  Mikko Tommila
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ParallelBinarySplittingPiCalculator(Pi.BinarySplittingSeries series)`
  Construct a parallel pi calculator with the specified precision and radix.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `r(long n1, long n2, ApfloatHolder T, ApfloatHolder Q, ApfloatHolder P, Pi.BinarySplittingProgressIndicator progressIndicator)`
  Entry point for the binary splitting algorithm.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ParallelBinarySplittingPiCalculator

    public ParallelBinarySplittingPiCalculator(Pi.BinarySplittingSeries series) throws ApfloatRuntimeException
    Construct a parallel pi calculator with the specified precision and radix.
    Parameters:
      `series` - The binary splitting series to be used.
    Throws:
      `ApfloatRuntimeException`

- ## Method Details

  - ### r

    public void r(long n1, long n2, ApfloatHolder T, ApfloatHolder Q, ApfloatHolder P, Pi.BinarySplittingProgressIndicator progressIndicator) throws ApfloatRuntimeException
    Description copied from class: `Pi.BinarySplittingPiCalculator`
    Entry point for the binary splitting algorithm.
    Overrides:
      `r` in class `Pi.BinarySplittingPiCalculator`
    Parameters:
      `n1` - Start term.
      `n2` - End term.
      `T` - Algorithm parameter.
      `Q` - Algorithm parameter.
      `P` - Algorithm parameter.
      `progressIndicator` - Class to print out the progress of the calculation.
    Throws:
      `ApfloatRuntimeException`