public abstract class ContinuedFraction extends Object
References:
Modifier | Constructor and Description |
---|---|
protected |
ContinuedFraction()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
evaluate(double x)
Evaluates the continued fraction at the value x.
|
double |
evaluate(double x,
double epsilon)
Evaluates the continued fraction at the value x.
|
double |
evaluate(double x,
double epsilon,
int maxIterations)
Evaluates the continued fraction at the value x.
|
double |
evaluate(double x,
int maxIterations)
Evaluates the continued fraction at the value x.
|
protected abstract double |
getA(int n,
double x)
Access the n-th a coefficient of the continued fraction.
|
protected abstract double |
getB(int n,
double x)
Access the n-th b coefficient of the continued fraction.
|
protected abstract double getA(int n, double x)
n
- the coefficient index to retrieve.x
- the evaluation point.protected abstract double getB(int n, double x)
n
- the coefficient index to retrieve.x
- the evaluation point.public double evaluate(double x) throws MathIllegalStateException
x
- the evaluation point.MathIllegalStateException
- if the algorithm fails to converge.public double evaluate(double x, double epsilon) throws MathIllegalStateException
x
- the evaluation point.epsilon
- maximum error allowed.MathIllegalStateException
- if the algorithm fails to converge.public double evaluate(double x, int maxIterations) throws MathIllegalStateException
x
- the evaluation point.maxIterations
- maximum number of convergentsMathIllegalStateException
- if the algorithm fails to converge.MathIllegalStateException
- if maximal number of iterations is reachedpublic double evaluate(double x, double epsilon, int maxIterations) throws MathIllegalStateException
The implementation of this method is based on the modified Lentz algorithm as described on page 18 ff. in:
x
- the evaluation point.epsilon
- maximum error allowed.maxIterations
- maximum number of convergentsMathIllegalStateException
- if the algorithm fails to converge.MathIllegalStateException
- if maximal number of iterations is reachedCopyright © 2016–2019 Hipparchus.org. All rights reserved.