Methods

This section includes the methods implemented in BernsteinExpansions.jl.

Implicit Form

Functions to compute the implicit Bernstein form of univariate and multivariate monomials.

BernsteinExpansions.univariateFunction
univariate(m::AbstractMonomialLike, l::Integer, dom::Interval)

Compute the Bernstein coefficients of a univariate monomial over an interval.

Input

  • m – monomial in one variable
  • l – degree of the Bernstein polynomial
  • dom – interval domain of the Bernstein expansion

Output

An l+1-dimensional vector that corresponds to the Bernstein expansion of order l of the monomial m.

Notes

For experimental purposes, different variations of the algorithm are available in the internal function _univariate!. By dispatching on any of the following values, you can choose between:

  • fastmath : Uses the @fastmath. This is the fastest implementation.
  • fastpow : Uses fastpow from DiffEqBase.jl. This is the second fastest implementation.
  • base : Uses ^ from Julia. This is the slowest implementation, but it's accuracy is guaranteed to be within an <= 1 ulp for all possible input values.

Algorithm

TODO: add description (ref Smith's PhD thesis).

source
BernsteinExpansions.multivariateFunction
multivariate(m::AbstractMonomialLike, l::AbstractVector{Int}, dom::IntervalBox{N}) where {N}

Compute the Bernstein coefficients of a multivariate monomial.

Input

  • m – monomial in several variables
  • l – vector of degrees of the Bernstein polynomial for each variable
  • dom – multi-dimensional interval domain of the Bernstein expansion

Output

A vector of vectors holding the Bernstein coefficients implicitly.

Algorithm

TODO: add description (ref Smith's PhD thesis). ```

source