|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apfloat.samples.Pi.AbstractBinarySplittingPiCalculator
public abstract static class Pi.AbstractBinarySplittingPiCalculator
Abstract base class for binary splitting algorithms.
Field Summary | |
---|---|
protected long |
precision
Target precision. |
protected int |
radix
Radix to be used. |
Constructor Summary | |
---|---|
protected |
Pi.AbstractBinarySplittingPiCalculator(long precision,
int radix)
Construct a pi calculator with the specified precision and radix. |
Method Summary | |
---|---|
protected abstract Apfloat |
a(long n)
Binary splitting term. |
protected abstract Apfloat |
p(long n)
Binary splitting term. |
protected abstract Apfloat |
q(long n)
Binary splitting term. |
protected 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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apfloat.samples.Operation |
---|
execute |
Field Detail |
---|
protected long precision
protected int radix
Constructor Detail |
---|
protected Pi.AbstractBinarySplittingPiCalculator(long precision, int radix)
precision
- The target precision.radix
- The radix to be used.Method Detail |
---|
protected abstract Apfloat a(long n) throws ApfloatRuntimeException
n
- The term.
ApfloatRuntimeException
protected abstract Apfloat p(long n) throws ApfloatRuntimeException
n
- The term.
ApfloatRuntimeException
protected abstract Apfloat q(long n) throws ApfloatRuntimeException
n
- The term.
ApfloatRuntimeException
protected void r(long n1, long n2, ApfloatHolder T, ApfloatHolder Q, ApfloatHolder P, Pi.BinarySplittingProgressIndicator progressIndicator) throws ApfloatRuntimeException
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.
ApfloatRuntimeException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |