Class GeneralizedContinuedFraction.Coefficient

java.lang.Object
org.apache.commons.numbers.fraction.GeneralizedContinuedFraction.Coefficient
Enclosing class:
GeneralizedContinuedFraction

public static final class GeneralizedContinuedFraction.Coefficient extends Object
Defines the n-th "a" and "b" coefficients of the continued fraction.
Since:
1.1
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final double
    "a" coefficient.
    private final double
    "b" coefficient.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Coefficient(double a, double b)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the n-th "a" coefficient of the continued fraction.
    double
    Returns the n-th "b" coefficient of the continued fraction.
    of(double a, double b)
    Create a new coefficient.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • a

      private final double a
      "a" coefficient.
    • b

      private final double b
      "b" coefficient.
  • Constructor Details

    • Coefficient

      private Coefficient(double a, double b)
      Parameters:
      a - "a" coefficient
      b - "b" coefficient
  • Method Details

    • getA

      public double getA()
      Returns the n-th "a" coefficient of the continued fraction.
      Returns:
      the coefficient an.
    • getB

      public double getB()
      Returns the n-th "b" coefficient of the continued fraction.
      Returns:
      the coefficient bn.
    • of

      public static GeneralizedContinuedFraction.Coefficient of(double a, double b)
      Create a new coefficient.
      Parameters:
      a - "a" coefficient
      b - "b" coefficient
      Returns:
      the coefficient