Liking cljdoc? Tell your friends :D

emmy.numerical.quadrature.riemann


geometric-estimate-seqclj/s

(geometric-estimate-seq S-fn next-S-fn factor n0)

Accepts:

  • S-fn: a function of n that generates a numerical integral estimate from n slices of some region, and
  • next-S-fn: a function of (previous estimate, previous n) => new estimate
  • factor: the factor by which n increases for successive estimates
  • n0: the initial n to pass to S-fn

The new estimate returned b next-S-fn should be of factor * n slices.

Accepts:

- `S-fn`: a function of `n` that generates a numerical integral estimate from
`n` slices of some region, and
- `next-S-fn`: a function of (previous estimate, previous `n`) => new estimate
- `factor`: the factor by which `n` increases for successive estimates
- `n0`: the initial `n` to pass to `S-fn`

The new estimate returned b `next-S-fn` should be of `factor * n` slices.
sourceraw docstring

incrementalizeclj/s

(incrementalize S-fn next-S-fn factor n)

Function that generalizes the ability to create successively-refined estimates of an integral, given:

  • S-fn: a function of n that generates a numerical integral estimate from n slices of some region, and
  • next-S-fn: a function of (previous estimate, previous n) => new estimate
  • factor: the factor by which next-S-fn increases n in its returned estimate
  • n: EITHER a number, or a monotonically increasing sequence of n slices to use.

If n is a sequence, returns a (lazy) sequence of estimates generated for each entry in n.

If n is a number, returns a lazy sequence of estimates generated for each entry in a geometrically increasing series of inputs $n, n(factor), n(factor^2), ....$

Internally decides whether or not to use S-fn or next-S-fn to generate successive estimates.

Function that generalizes the ability to create successively-refined estimates
of an integral, given:

- `S-fn`: a function of `n` that generates a numerical integral estimate from
`n` slices of some region, and
- `next-S-fn`: a function of (previous estimate, previous `n`) => new estimate
- `factor`: the factor by which `next-S-fn` increases `n` in its returned estimate
- `n`: EITHER a number, or a monotonically increasing sequence of `n` slices to use.

If `n` is a sequence, returns a (lazy) sequence of estimates generated for
each entry in `n`.

If `n` is a number, returns a lazy sequence of estimates generated for each
entry in a geometrically increasing series of inputs $n, n(factor),
n(factor^2), ....$

Internally decides whether or not to use `S-fn` or `next-S-fn` to generate
successive estimates.
sourceraw docstring

left-integralclj/s

(left-integral f a b)
(left-integral f a b opts)

Returns an estimate of the integral of f across the closed-open interval $a, b$ using a left-Riemann sum with $1, 2, 4 ... 2^n$ windows for each estimate.

Optionally accepts opts, a dict of optional arguments. All of these get passed on to us/seq-limit to configure convergence checking.

See left-sequence for information on the optional args in opts that customize this function's behavior.

Returns an estimate of the integral of `f` across the closed-open interval $a,
b$ using a left-Riemann sum with $1, 2, 4 ... 2^n$ windows for each estimate.

Optionally accepts `opts`, a dict of optional arguments. All of these get
passed on to `us/seq-limit` to configure convergence checking.

See `left-sequence` for information on the optional args in `opts` that
customize this function's behavior.
sourceraw docstring

left-sequenceclj/s

(left-sequence f a b)
(left-sequence f a b opts)

Returns a (lazy) sequence of successively refined estimates of the integral of f over the closed-open interval $a, b$ by taking left-Riemann sums.

Optional Arguments

:n: If n is a number, returns estimates with $n, 2n, 4n, ...$ slices, geometrically increasing by a factor of 2 with each estimate.

If n is a sequence, the resulting sequence will hold an estimate for each integer number of slices in that sequence.

:accelerate?: if supplied (and n is a number), attempts to accelerate convergence using Richardson extrapolation. If n is a sequence this option is ignored.

Returns a (lazy) sequence of successively refined estimates of the integral of
`f` over the closed-open interval $a, b$ by taking left-Riemann sums.

### Optional Arguments

`:n`: If `n` is a number, returns estimates with $n, 2n, 4n, ...$ slices,
geometrically increasing by a factor of 2 with each estimate.

If `n` is a sequence, the resulting sequence will hold an estimate for each
integer number of slices in that sequence.

`:accelerate?`: if supplied (and `n` is a number), attempts to accelerate
convergence using Richardson extrapolation. If `n` is a sequence this option
is ignored.
sourceraw docstring

lower-integralclj/s

(lower-integral f a b)
(lower-integral f a b opts)

Returns an estimate of the integral of f across the closed-open interval $a, b$ using a lower-Riemann sum with $1, 2, 4 ... 2^n$ windows for each estimate.

Optionally accepts opts, a dict of optional arguments. All of these get passed on to us/seq-limit to configure convergence checking.

See lower-sequence for information on the optional args in opts that customize this function's behavior.

Returns an estimate of the integral of `f` across the closed-open interval $a,
b$ using a lower-Riemann sum with $1, 2, 4 ... 2^n$ windows for each estimate.

Optionally accepts `opts`, a dict of optional arguments. All of these get
passed on to `us/seq-limit` to configure convergence checking.

See `lower-sequence` for information on the optional args in `opts` that
customize this function's behavior.
sourceraw docstring

lower-sequenceclj/s

(lower-sequence f a b)
(lower-sequence f a b {:keys [n] :or {n 1} :as opts})

Returns a (lazy) sequence of successively refined estimates of the integral of f over the closed interval $(a, b)$ by taking lower-Riemann sums.

Optional Arguments

:n: If n is a number, returns estimates with $n, 2n, 4n, ...$ slices, geometrically increasing by a factor of 2 with each estimate.

If n is a sequence, the resulting sequence will hold an estimate for each integer number of slices in that sequence.

:accelerate?: if supplied (and n is a number), attempts to accelerate convergence using Richardson extrapolation. If n is a sequence this option is ignored.

Returns a (lazy) sequence of successively refined estimates of the integral of
`f` over the closed interval $(a, b)$ by taking lower-Riemann sums.

### Optional Arguments

`:n`: If `n` is a number, returns estimates with $n, 2n, 4n, ...$ slices,
geometrically increasing by a factor of 2 with each estimate.

If `n` is a sequence, the resulting sequence will hold an estimate for each
integer number of slices in that sequence.

`:accelerate?`: if supplied (and `n` is a number), attempts to accelerate
convergence using Richardson extrapolation. If `n` is a sequence this option
is ignored.
sourceraw docstring

midpoint-sumclj/s

(midpoint-sum f a b)

Returns a function of n, some number of slices of the total integration range, that returns an estimate for the definite integral of $f$ over the range $(a, b)$ using midpoint estimates.

Returns a function of `n`, some number of slices of the total integration
range, that returns an estimate for the definite integral of $f$ over the
range $(a, b)$ using midpoint estimates.
sourceraw docstring

right-integralclj/s

(right-integral f a b)
(right-integral f a b opts)

Returns an estimate of the integral of f across the closed-open interval $a, b$ using a right-Riemann sum with $1, 2, 4 ... 2^n$ windows for each estimate.

Optionally accepts opts, a dict of optional arguments. All of these get passed on to us/seq-limit to configure convergence checking.

See right-sequence for information on the optional args in opts that customize this function's behavior.

Returns an estimate of the integral of `f` across the closed-open interval $a,
b$ using a right-Riemann sum with $1, 2, 4 ... 2^n$ windows for each estimate.

Optionally accepts `opts`, a dict of optional arguments. All of these get
passed on to `us/seq-limit` to configure convergence checking.

See `right-sequence` for information on the optional args in `opts` that
customize this function's behavior.
sourceraw docstring

right-sequenceclj/s

(right-sequence f a b)
(right-sequence f a b opts)

Returns a (lazy) sequence of successively refined estimates of the integral of f over the closed-open interval $a, b$ by taking right-Riemann sums.

Optional Arguments

:n: If n is a number, returns estimates with $n, 2n, 4n, ...$ slices, geometrically increasing by a factor of 2 with each estimate.

If n is a sequence, the resulting sequence will hold an estimate for each integer number of slices in that sequence.

:accelerate?: if supplied (and n is a number), attempts to accelerate convergence using Richardson extrapolation. If n is a sequence this option is ignored.

Returns a (lazy) sequence of successively refined estimates of the integral of
`f` over the closed-open interval $a, b$ by taking right-Riemann sums.

### Optional Arguments

`:n`: If `n` is a number, returns estimates with $n, 2n, 4n, ...$ slices,
geometrically increasing by a factor of 2 with each estimate.

If `n` is a sequence, the resulting sequence will hold an estimate for each
integer number of slices in that sequence.

`:accelerate?`: if supplied (and `n` is a number), attempts to accelerate
convergence using Richardson extrapolation. If `n` is a sequence this option
is ignored.
sourceraw docstring

Sn->S2nclj/s

(Sn->S2n f a b)

Returns a function of:

  • Sn: a sum estimate for n partitions, and
  • n: the number of partitions

And returns a new estimate for $S_{2n}$ by sampling the midpoints of each slice. This incremental update rule is valid for left and right Riemann sums, as well as the midpoint method.

Returns a function of:

- `Sn`: a sum estimate for `n` partitions, and
- `n`: the number of partitions

And returns a new estimate for $S_{2n}$ by sampling the midpoints of each
slice. This incremental update rule is valid for left and right Riemann sums,
as well as the midpoint method.
sourceraw docstring

upper-integralclj/s

(upper-integral f a b)
(upper-integral f a b opts)

Returns an estimate of the integral of f across the closed-open interval $a, b$ using an upper-Riemann sum with $1, 2, 4 ... 2^n$ windows for each estimate.

Optionally accepts opts, a dict of optional arguments. All of these get passed on to us/seq-limit to configure convergence checking.

See upper-sequence for information on the optional args in opts that customize this function's behavior.

Returns an estimate of the integral of `f` across the closed-open interval $a,
b$ using an upper-Riemann sum with $1, 2, 4 ... 2^n$ windows for each estimate.

Optionally accepts `opts`, a dict of optional arguments. All of these get
passed on to `us/seq-limit` to configure convergence checking.

See `upper-sequence` for information on the optional args in `opts` that
customize this function's behavior.
sourceraw docstring

upper-sequenceclj/s

(upper-sequence f a b)
(upper-sequence f a b {:keys [n] :or {n 1} :as opts})

Returns a (lazy) sequence of successively refined estimates of the integral of f over the closed interval $(a, b)$ by taking upper-Riemann sums.

Optional Arguments

:n: If n is a number, returns estimates with $n, 2n, 4n, ...$ slices, geometrically increasing by a factor of 2 with each estimate.

If n is a sequence, the resulting sequence will hold an estimate for each integer number of slices in that sequence.

:accelerate?: if supplied (and n is a number), attempts to accelerate convergence using Richardson extrapolation. If n is a sequence this option is ignored.

Returns a (lazy) sequence of successively refined estimates of the integral of
`f` over the closed interval $(a, b)$ by taking upper-Riemann sums.

### Optional Arguments

`:n`: If `n` is a number, returns estimates with $n, 2n, 4n, ...$ slices,
geometrically increasing by a factor of 2 with each estimate.

If `n` is a sequence, the resulting sequence will hold an estimate for each
integer number of slices in that sequence.

`:accelerate?`: if supplied (and `n` is a number), attempts to accelerate
convergence using Richardson extrapolation. If `n` is a sequence this option
is ignored.
sourceraw docstring

windowed-sumclj/s

(windowed-sum area-fn a b)

Takes:

  • area-fn, a function of the left and right endpoints of some integration slice
  • definite integration bounds a and b

and returns a function of n, the number of slices to use for an integration estimate.

area-fn should return an estimate of the area under some curve between the l and r bounds it receives.

Takes:

- `area-fn`, a function of the left and right endpoints of some integration
slice
- definite integration bounds `a` and `b`

and returns a function of `n`, the number of slices to use for an integration
estimate.

`area-fn` should return an estimate of the area under some curve between the
`l` and `r` bounds it receives.
sourceraw docstring

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

× close