|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apfloat.samples.Pi.BinarySplittingPiCalculator
org.apfloat.samples.PiParallel.ParallelBinarySplittingPiCalculator
org.apfloat.samples.PiDistributed.DistributedBinarySplittingPiCalculator
protected static class PiDistributed.DistributedBinarySplittingPiCalculator
Distributed version of the binary splitting algorithm. Uses multiple computers to calculate pi in parallel.
Constructor Summary | |
---|---|
PiDistributed.DistributedBinarySplittingPiCalculator(Pi.BinarySplittingSeries series)
Construct a distributed pi calculator with the specified precision and radix. |
Method Summary | |
---|---|
OperationExecutor[] |
getNodes()
Get the available set of operation executor nodes. |
void |
r(long n1,
long n2,
ApfloatHolder T,
ApfloatHolder Q,
ApfloatHolder P,
ApfloatHolder F,
OperationExecutor[] nodes,
Pi.BinarySplittingProgressIndicator progressIndicator)
Entry point for the parallel binary splitting algorithm. |
OperationExecutor[] |
recombineNodes(OperationExecutor[] nodes,
int numberNeeded)
Attempt to combine or split nodes to form the needed number of nodes. |
Methods inherited from class org.apfloat.samples.Pi.BinarySplittingPiCalculator |
---|
r |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PiDistributed.DistributedBinarySplittingPiCalculator(Pi.BinarySplittingSeries series)
series
- The binary splitting series to be used.Method Detail |
---|
public void r(long n1, long n2, ApfloatHolder T, ApfloatHolder Q, ApfloatHolder P, ApfloatHolder F, OperationExecutor[] nodes, Pi.BinarySplittingProgressIndicator progressIndicator) throws ApfloatRuntimeException
PiParallel.ParallelBinarySplittingPiCalculator
r
in class PiParallel.ParallelBinarySplittingPiCalculator
n1
- Start term.n2
- End term.T
- Algorithm parameter.Q
- Algorithm parameter.P
- Algorithm parameter.F
- Pointer to inverse square root parameter.nodes
- The operation executors to be used for the calculation.progressIndicator
- Class to print out the progress of the calculation.
ApfloatRuntimeException
public OperationExecutor[] getNodes()
RemoteOperationExecutor
s,
which execute operations on the cluster's nodes.
getNodes
in class PiParallel.ParallelBinarySplittingPiCalculator
public OperationExecutor[] recombineNodes(OperationExecutor[] nodes, int numberNeeded)
PiParallel.ParallelBinarySplittingPiCalculator
recombineNodes
in class PiParallel.ParallelBinarySplittingPiCalculator
nodes
- The operation executors to recombine.numberNeeded
- The requested number of operation executors.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |