Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-797

Single step integrators

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 3.0
    • 3.1
    • None
    • None

    Description

      CM assumes that the user wants to integrate a complex function on a large interval, so the large interval has to be subdivided into many subintervals. CM does the partition, and performs convergence checks, using an iterative approach.

      However, if the function is smooth enough, no subdivision of the integration interval is required. Those use-cases could benefit from the efficiency gain of not performing a convergence check.

      The proposal is to provide a new interface "UnivariateSingleStepIntegrator":

      interface SingleIntervalIntegrator {
          /**
           * Method for implementing a single interval integration.
           * There is no convergence checks because it is not iterative.
           *
           * @param f Function to integrate.
           * @param lower Lower bound of the interval over which to integrate.
           * @param upper Upper bound of the interval over which to integrate.
           * @return the integrated value.
           */
          double integrate(UnivariateFunction f,
                           double lower,
                           double upper);
      }
      

      In effect, the implementation of the above "integrate" method of a new "LegendreGaussIntegratorSingleStepIntegrator" would the equivalent of "stage(1)" in the current "LegendreGaussIntegrator".

      Attachments

        Issue Links

          Activity

            People

              erans Gilles Sadowski
              erans Gilles Sadowski
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: