Documentation API of the 'jhplot.math.num.ContinuedFraction' Java class
ContinuedFraction
jhplot.math.num

Class ContinuedFraction



  • public abstract class ContinuedFractionextends IterativeMethod

    This class provides the means to evaluate continued fractions (1). To create a continued fraction, authors subclass this class and provided concrete a and b coefficient methods.

    For example, this is the continued fraction for the exponential function defined by (2):

     ContinuedFraction exponential = new ContinuedFraction() {     public double getA(int n, double x) {         if (n == 0) {             return 1.0;         } else if (n % 2 == 0) { // even             return 2.0;         } else { // odd             return n;         }     }         public double getB(int n, double x) {         if (n % 2 == 0) { // even             return x;         } else { // odd             return -x;         } } 

    References:

    1. Eric W. Weisstein. "Continued Fraction." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/ContinuedFraction.html
    2. Exponential Function: Continued Fraction Representation. http://functions.wolfram.com/01.03.10.0001.01

    • Method Detail

      • evaluate

        public double evaluate(double x)                throws NumericException
        Evaluate this continued fraction at the given value.
        Parameters:
        x - the point of evalutation.
        Returns:
        the value of this continued fraction evaluated at x.
        Throws:
        NumericException - if the continued fraction could not be evaluated.

DMelt 1.2 © DataMelt by jWork.ORG

ContinuedFraction
jhplot.math.num

Class ContinuedFraction



  • public abstract class ContinuedFractionextends IterativeMethod

    This class provides the means to evaluate continued fractions (1). To create a continued fraction, authors subclass this class and provided concrete a and b coefficient methods.

    For example, this is the continued fraction for the exponential function defined by (2):

     ContinuedFraction exponential = new ContinuedFraction() {     public double getA(int n, double x) {         if (n == 0) {             return 1.0;         } else if (n % 2 == 0) { // even             return 2.0;         } else { // odd             return n;         }     }         public double getB(int n, double x) {         if (n % 2 == 0) { // even             return x;         } else { // odd             return -x;         } } 

    References:

    1. Eric W. Weisstein. "Continued Fraction." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/ContinuedFraction.html
    2. Exponential Function: Continued Fraction Representation. http://functions.wolfram.com/01.03.10.0001.01

Warning: You cannot see the full API documentation of this class since the access to the DatMelt documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To view the complete description of this class and its methods, please request the full DataMelt membership.

If you are already a full member, please login to the DataMelt member area before visiting this documentation.