public abstract class ContinuedFraction extends Object
Constructor and Description |
---|
ContinuedFraction() |
Modifier and Type | Method and Description |
---|---|
double |
backwardNaive(int n,
double... args)
Approximates the continued fraction using a naive approximation
|
abstract double |
getA(int pos,
double... args)
The a term of a continued fraction is the value that occurs as one of the
numerators, an its depth starts at 1.
|
abstract double |
getB(int pos,
double... args)
The b term of a continued fraction is the value that is added to the
continuing fraction, its depth starts at 0.
|
double |
lentz(double... args)
Uses Thompson and Barnett's modified Lentz's algorithm create an
approximation that should be accurate to full precision.
|
public abstract double getA(int pos, double... args)
pos
- the depth of the continued fraction to evaluate atargs
- the values for the variables of the continued fractionpublic abstract double getB(int pos, double... args)
pos
- the depth of the continued fraction to evaluate atargs
- the values for the variables of the continued fractionpublic double backwardNaive(int n, double... args)
n
- the number of iterations to performargs
- the values to input for the variables of the continued fractionpublic double lentz(double... args)
args
- the numeric inputs to the continued fractionCopyright © 2017. All rights reserved.