Class IntegralEvaluator


  • public class IntegralEvaluator
    extends java.lang.Object
    The IntegralEvaluator determines the integral of a Function using Romberg's method.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected double epsilon
      The allowed error / epsilon for Romberg's method.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double evaluate​(Function f, double a, double b)
      Calculates the integral from a to b.
      • Methods inherited from class java.lang.Object

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

      • epsilon

        protected final double epsilon
        The allowed error / epsilon for Romberg's method.
    • Constructor Detail

      • IntegralEvaluator

        public IntegralEvaluator()
        Constructs the IntegralEvaluator with the epsilon value 1.0E-8.
      • IntegralEvaluator

        public IntegralEvaluator​(double epsilon)
        Constructs the IntegralEvaluator.
        Parameters:
        epsilon - the allowed error for Romberg's method.
    • Method Detail

      • evaluate

        public double evaluate​(Function f,
                               double a,
                               double b)
        Calculates the integral from a to b.
        Parameters:
        f - the function to be integrated
        a - the lower bound
        b - the upper bound
        Returns:
        the value of the integral from a to b