Liking cljdoc? Tell your friends :D

sicmutils.numerical.quadrature


available-methodsclj/s

source

definite-integralclj/s

(definite-integral f a b)
(definite-integral f
                   a
                   b
                   {:keys [method compile? info?]
                    :or {method :open compile? false info? false}
                    :as opts})

Evaluates the definite integral of integrand f across the interval $a, b$. Optionally accepts a dictionary opts of customizing options; All opts will be passed through to the supplied integrate functions.

If you'd like more control, or to retrieve the integration function directly without looking it up via :method each time, see get-integrator.

All supplied options are passed through to the underlying integrator; see the specific integrator for information on what options are available.

Keyword arguments:

:method: Specifies the integration method used. Must be

  • a keyword naming one of the available methods in available-methods
  • a function with the proper integrator signature
  • a dictionary of integrator options with a :method key

Defaults to :open, which specifies an adaptive bulirsch-stoer quadrature method.

:compile? If true, the generic function will be simplified and compiled before execution. (Clojure only for now.) Defaults to false.

:info? If true, definite-integral will return a map of integration information returned by the underlying integrator. Else, returns an estimate of the definite integral.

Evaluates the definite integral of integrand `f` across the interval $a, b$.
Optionally accepts a dictionary `opts` of customizing options; All `opts` will
be passed through to the supplied `integrate` functions.

If you'd like more control, or to retrieve the integration function directly
without looking it up via `:method` each time, see `get-integrator`.

All supplied options are passed through to the underlying integrator; see the
specific integrator for information on what options are available.

## Keyword arguments:

`:method`: Specifies the integration method used. Must be

- a keyword naming one of the available methods in `available-methods`
- a function with the proper integrator signature
- a dictionary of integrator options with a `:method` key

Defaults to `:open`, which specifies an adaptive bulirsch-stoer quadrature method.

`:compile?` If true, the generic function will be simplified and compiled
before execution. (Clojure only for now.) Defaults to false.

`:info?` If true, `definite-integral` will return a map of integration
information returned by the underlying integrator. Else, returns an estimate
of the definite integral.
sourceraw docstring

get-integratorclj/s

(get-integrator method a b)
(get-integrator method a b m)

Takes:

  • An integration method, specified as either:

    • a keyword naming one of the available methods in available-methods
    • a function with the proper integrator signature
    • a dictionary of integrator options with a :method key
  • a and b integration endpoints

  • an optional dictionary of options m

And returns a pair of an integrator function and a possibly-enhanced options dictionary.

(Some integration functions require extra options, so the returned dictionary may have more entries than the m you pass in.)

If either endpoint is infinite, the returned integrator is wrapped in qi/improper and able to handle infinite endpoints (as well as non-infinite endpoints by passing through directly to the underlying integrator).

Takes:

- An integration method, specified as either:
  - a keyword naming one of the available methods in `available-methods`
  - a function with the proper integrator signature
  - a dictionary of integrator options with a `:method` key

- `a` and `b` integration endpoints
- an optional dictionary of options `m`

And returns a pair of an integrator function and a possibly-enhanced options
dictionary.

(Some integration functions require extra options, so the returned dictionary
may have more entries than the `m` you pass in.)

If either endpoint is infinite, the returned integrator is wrapped in
`qi/improper` and able to handle infinite endpoints (as well as non-infinite
endpoints by passing through directly to the underlying integrator).
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close