diff --git a/dev/index.html b/dev/index.html index a6cc339..a6662cc 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,32 +1,30 @@ -Introduction · MultivariateBases

MultivariateBases

MultivariateBases.jl is a standardized API for multivariate polynomial bases based on the MultivariatePolynomials API.

MultivariateBases.AbstractPolynomialBasisType
abstract type AbstractPolynomialBasis end

Polynomial basis of a subspace of the polynomials [Section~3.1.5, BPT12].

[BPT12] Blekherman, G.; Parrilo, P. A. & Thomas, R. R. Semidefinite Optimization and Convex Algebraic Geometry. Society for Industrial and Applied Mathematics, 2012.

source
MultivariateBases.maxdegree_basisFunction
maxdegree_basis(B::Type{<:AbstractPolynomialBasis}, variables, maxdegree::Int)

Return the basis of type B generating all polynomials of degree up to maxdegree with variables variables.

source
MultivariateBases.basis_covering_monomialsFunction
basis_covering_monomials(B::Type{<:AbstractPolynomialBasis}, monos::AbstractVector{<:AbstractMonomial})

Return the minimal basis of type B that can generate all polynomials of the monomial basis generated by monos.

Examples

For example, to generate all the polynomials with nonzero coefficients for the monomials x^4 and x^2, we need three polynomials as otherwise, we generate polynomials with nonzero constant term.

julia> using DynamicPolynomials
+Introduction · MultivariateBases

MultivariateBases

MultivariateBases.jl is a standardized API for multivariate polynomial bases based on the MultivariatePolynomials API.

MultivariateBases.AbstractPolynomialBasisType
abstract type AbstractPolynomialBasis end

Polynomial basis of a subspace of the polynomials [Section~3.1.5, BPT12].

[BPT12] Blekherman, G.; Parrilo, P. A. & Thomas, R. R. Semidefinite Optimization and Convex Algebraic Geometry. Society for Industrial and Applied Mathematics, 2012.

source
MultivariateBases.maxdegree_basisFunction
maxdegree_basis(B::Type{<:AbstractPolynomialBasis}, variables, maxdegree::Int)

Return the basis of type B generating all polynomials of degree up to maxdegree with variables variables.

source
MultivariateBases.basis_covering_monomialsFunction
basis_covering_monomials(B::Type{<:AbstractPolynomialBasis}, monos::AbstractVector{<:AbstractMonomial})

Return the minimal basis of type B that can generate all polynomials of the monomial basis generated by monos.

Examples

For example, to generate all the polynomials with nonzero coefficients for the monomials x^4 and x^2, we need three polynomials as otherwise, we generate polynomials with nonzero constant term.

julia> using DynamicPolynomials
 
 julia> @polyvar x
 (x,)
 
 julia> basis_covering_monomials(ChebyshevBasis, [x^2, x^4])
-ChebyshevBasisFirstKind([1.0, -1.0 + 2.0x², 1.0 - 8.0x² + 8.0x⁴])
source
MultivariateBases.FixedPolynomialBasisType
struct FixedPolynomialBasis{PT<:MP.AbstractPolynomialLike, PV<:AbstractVector{PT}} <: AbstractPolynomialBasis
+ChebyshevBasisFirstKind([1.0, -1.0 + 2.0x², 1.0 - 8.0x² + 8.0x⁴])
source
MultivariateBases.FixedPolynomialBasisType
struct FixedPolynomialBasis{PT<:MP.AbstractPolynomialLike, PV<:AbstractVector{PT}} <: AbstractPolynomialBasis
     polynomials::PV
-end

Polynomial basis with the polynomials of the vector polynomials. For instance, FixedPolynomialBasis([1, x, 2x^2-1, 4x^3-3x]) is the Chebyshev polynomial basis for cubic polynomials in the variable x.

source
MultivariateBases.OrthonormalCoefficientsBasisType
struct OrthonormalCoefficientsBasis{PT<:MP.AbstractPolynomialLike, PV<:AbstractVector{PT}} <: AbstractPolynomialBasis
-    polynomials::PV
-end

Polynomial basis with the polynomials of the vector polynomials that are orthonormal with respect to the inner produce derived from the inner product of their coefficients. For instance, FixedPolynomialBasis([1, x, 2x^2-1, 4x^3-3x]) is the Chebyshev polynomial basis for cubic polynomials in the variable x.

source

Monomial basis

MultivariateBases.MonomialBasisType
struct MonomialBasis{MT<:MP.AbstractMonomial, MV<:AbstractVector{MT}} <: AbstractPolynomialBasis
+end

Polynomial basis with the polynomials of the vector polynomials. For instance, FixedPolynomialBasis([1, x, 2x^2-1, 4x^3-3x]) is the Chebyshev polynomial basis for cubic polynomials in the variable x.

source

Monomial basis

MultivariateBases.MonomialBasisType
struct MonomialBasis{MT<:MP.AbstractMonomial, MV<:AbstractVector{MT}} <: AbstractPolynomialBasis
     monomials::MV
-end

Monomial basis with the monomials of the vector monomials. For instance, MonomialBasis([1, x, y, x^2, x*y, y^2]) is the monomial basis for the subspace of quadratic polynomials in the variables x, y.

This basis is orthogonal under a scalar product defined with the complex Gaussian measure as density. Once normalized so as to be orthonormal with this scalar product, one get ths ScaledMonomialBasis.

source
MultivariateBases.ScaledMonomialBasisType
struct ScaledMonomialBasis{MT<:MP.AbstractMonomial, MV<:AbstractVector{MT}} <: AbstractPolynomialBasis
+end

Monomial basis with the monomials of the vector monomials. For instance, MonomialBasis([1, x, y, x^2, x*y, y^2]) is the monomial basis for the subspace of quadratic polynomials in the variables x, y.

This basis is orthogonal under a scalar product defined with the complex Gaussian measure as density. Once normalized so as to be orthonormal with this scalar product, one get ths ScaledMonomialBasis.

source
MultivariateBases.ScaledMonomialBasisType
struct ScaledMonomialBasis{MT<:MP.AbstractMonomial, MV<:AbstractVector{MT}} <: AbstractPolynomialBasis
     monomials::MV
 end

Scaled monomial basis (see [Section 3.1.5, BPT12]) with the monomials of the vector monomials. Given a monomial $x^\alpha = x_1^{\alpha_1} \cdots x_n^{\alpha_n}$ of degree $d = \sum_{i=1}^n \alpha_i$, the corresponding polynomial of the basis is

\[{d \choose \alpha}^{\frac{1}{2}} x^{\alpha} \quad \text{ where } \quad -{d \choose \alpha} = \frac{d!}{\alpha_1! \alpha_2! \cdots \alpha_n!}.\]

For instance, create a polynomial with the basis $[xy^2, xy]$ creates the polynomial $\sqrt{3} a xy^2 + \sqrt{2} b xy$ where a and b are new JuMP decision variables. Constraining the polynomial $axy^2 + bxy$ to be zero with the scaled monomial basis constrains a/√3 and b/√2 to be zero.

This basis is orthonormal under the scalar product:

\[\langle f, g \rangle = \int_{\mathcal{C}^n} f(z) \overline{g(z)} d\nu_n\]

where $\nu_n$ is the Gaussian measure on $\mathcal{C}^n$ with the density $\pi^{-n} \exp(-\lVert z \rVert^2)$. See [Section 4; B07] for more details.

[BPT12] Blekherman, G.; Parrilo, P. A. & Thomas, R. R. Semidefinite Optimization and Convex Algebraic Geometry. Society for Industrial and Applied Mathematics (2012).

[B07] Barvinok, Alexander. Integration and optimization of multivariate polynomials by restriction onto a random subspace. Foundations of Computational Mathematics 7.2 (2007): 229-244.

source

Orthogonal basis

MultivariateBases.AbstractMultipleOrthogonalBasisType
abstract type AbstractMultipleOrthogonalBasis{P} <: AbstractPolynomialVectorBasis{P, Vector{P}} end

Polynomial basis such that $\langle p_i(x), p_j(x) \rangle = 0$ if $i \neq j$ where

\[\langle p(x), q(x) \rangle = \int p(x)q(x) w(x) dx\]

where the weight is a product of weight functions $w(x) = w_1(x_1)w_2(x_2) \cdots w_n(x_n)$ in each variable. The polynomial of the basis are product of univariate polynomials: $p(x) = p_1(x_1)p_2(x_2) \cdots p_n(x_n)$. where the univariate polynomials of variable x_i form an univariate orthogonal basis for the weight function w_i(x_i). Therefore, they satisfy the recurrence relation

\[d_k p_k(x_i) = (a_k x_i + b_k) p_{k-1}(x_i) + c_k p_{k-2}(x_i)\]

where reccurence_first_coef gives a_k, reccurence_second_coef gives b_k, reccurence_third_coef gives c_k and reccurence_deno_coef gives d_k.

source
MultivariateBases.univariate_orthogonal_basisFunction
univariate_orthogonal_basis(B::Type{<:AbstractMultipleOrthogonalBasis},
-                            variable::MP.AbstractVariable, degree::Integer)

Return the vector of univariate polynomials of the basis B up to degree with variable variable.

source
MultivariateBases.reccurence_first_coefFunction
reccurence_first_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)

Return a_{degree} in recurrence equation

\[d_k p_k(x_i) = (a_k x_i + b_k) p_{k-1}(x_i) + c_k p_{k-2}(x_i)\]

source
MultivariateBases.reccurence_second_coefFunction
reccurence_second_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)

Return b_{degree} in recurrence equation

\[d_k p_k(x_i) = (a_k x_i + b_k) p_{k-1}(x_i) + c_k p_{k-2}(x_i)\]

source
MultivariateBases.reccurence_third_coefFunction
reccurence_third_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)

Return c_{degree} in recurrence equation

\[d_k p_k(x_i) = (a_k x_i + b_k) p_{k-1}(x_i) + c_k p_{k-2}(x_i)\]

source
MultivariateBases.reccurence_deno_coefFunction
reccurence_deno_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)

Return d_{degree} in recurrence equation

\[d_k p_k(x_i) = (a_k x_i + b_k) p_{k-1}(x_i) + c_k p_{k-2}(x_i)\]

source
MultivariateBases.ProbabilistsHermiteBasisType
struct ProbabilistsHermiteBasis{P} <: AbstractHermiteBasis{P}
+{d \choose \alpha} = \frac{d!}{\alpha_1! \alpha_2! \cdots \alpha_n!}.\]

For instance, create a polynomial with the basis $[xy^2, xy]$ creates the polynomial $\sqrt{3} a xy^2 + \sqrt{2} b xy$ where a and b are new JuMP decision variables. Constraining the polynomial $axy^2 + bxy$ to be zero with the scaled monomial basis constrains a/√3 and b/√2 to be zero.

This basis is orthonormal under the scalar product:

\[\langle f, g \rangle = \int_{\mathcal{C}^n} f(z) \overline{g(z)} d\nu_n\]

where $\nu_n$ is the Gaussian measure on $\mathcal{C}^n$ with the density $\pi^{-n} \exp(-\lVert z \rVert^2)$. See [Section 4; B07] for more details.

[BPT12] Blekherman, G.; Parrilo, P. A. & Thomas, R. R. Semidefinite Optimization and Convex Algebraic Geometry. Society for Industrial and Applied Mathematics (2012).

[B07] Barvinok, Alexander. Integration and optimization of multivariate polynomials by restriction onto a random subspace. Foundations of Computational Mathematics 7.2 (2007): 229-244.

source

Orthogonal basis

MultivariateBases.AbstractMultipleOrthogonalBasisType
abstract type AbstractMultipleOrthogonalBasis{P} <: AbstractPolynomialVectorBasis{P, Vector{P}} end

Polynomial basis such that $\langle p_i(x), p_j(x) \rangle = 0$ if $i \neq j$ where

\[\langle p(x), q(x) \rangle = \int p(x)q(x) w(x) dx\]

where the weight is a product of weight functions $w(x) = w_1(x_1)w_2(x_2) \cdots w_n(x_n)$ in each variable. The polynomial of the basis are product of univariate polynomials: $p(x) = p_1(x_1)p_2(x_2) \cdots p_n(x_n)$. where the univariate polynomials of variable x_i form an univariate orthogonal basis for the weight function w_i(x_i). Therefore, they satisfy the recurrence relation

\[d_k p_k(x_i) = (a_k x_i + b_k) p_{k-1}(x_i) + c_k p_{k-2}(x_i)\]

where reccurence_first_coef gives a_k, reccurence_second_coef gives b_k, reccurence_third_coef gives c_k and reccurence_deno_coef gives d_k.

source
MultivariateBases.univariate_orthogonal_basisFunction
univariate_orthogonal_basis(B::Type{<:AbstractMultipleOrthogonalBasis},
+                            variable::MP.AbstractVariable, degree::Integer)

Return the vector of univariate polynomials of the basis B up to degree with variable variable.

source
MultivariateBases.reccurence_first_coefFunction
reccurence_first_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)

Return a_{degree} in recurrence equation

\[d_k p_k(x_i) = (a_k x_i + b_k) p_{k-1}(x_i) + c_k p_{k-2}(x_i)\]

source
MultivariateBases.reccurence_second_coefFunction
reccurence_second_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)

Return b_{degree} in recurrence equation

\[d_k p_k(x_i) = (a_k x_i + b_k) p_{k-1}(x_i) + c_k p_{k-2}(x_i)\]

source
MultivariateBases.reccurence_third_coefFunction
reccurence_third_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)

Return c_{degree} in recurrence equation

\[d_k p_k(x_i) = (a_k x_i + b_k) p_{k-1}(x_i) + c_k p_{k-2}(x_i)\]

source
MultivariateBases.reccurence_deno_coefFunction
reccurence_deno_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)

Return d_{degree} in recurrence equation

\[d_k p_k(x_i) = (a_k x_i + b_k) p_{k-1}(x_i) + c_k p_{k-2}(x_i)\]

source
MultivariateBases.ProbabilistsHermiteBasisType
struct ProbabilistsHermiteBasis{P} <: AbstractHermiteBasis{P}
     polynomials::Vector{P}
-end

Orthogonal polynomial with respect to the univariate weight function $w(x) = \exp(-x^2/2)$ over the interval $[-\infty, \infty]$.

source
MultivariateBases.PhysicistsHermiteBasisType
struct PhysicistsHermiteBasis{P} <: AbstractHermiteBasis{P}
+end

Orthogonal polynomial with respect to the univariate weight function $w(x) = \exp(-x^2/2)$ over the interval $[-\infty, \infty]$.

source
MultivariateBases.PhysicistsHermiteBasisType
struct PhysicistsHermiteBasis{P} <: AbstractHermiteBasis{P}
     polynomials::Vector{P}
-end

Orthogonal polynomial with respect to the univariate weight function $w(x) = \exp(-x^2)$ over the interval $[-\infty, \infty]$.

source
MultivariateBases.LaguerreBasisType
struct LaguerreBasis{P} <: AbstractMultipleOrthogonalBasis{P}
+end

Orthogonal polynomial with respect to the univariate weight function $w(x) = \exp(-x^2)$ over the interval $[-\infty, \infty]$.

source
MultivariateBases.LaguerreBasisType
struct LaguerreBasis{P} <: AbstractMultipleOrthogonalBasis{P}
     polynomials::Vector{P}
-end

Orthogonal polynomial with respect to the univariate weight function $w(x) = \exp(-x)$ over the interval $[0, \infty]$.

source
MultivariateBases.AbstractGegenbauerBasisType
struct AbstractGegenbauerBasis{P} <: AbstractMultipleOrthogonalBasis{P}
+end

Orthogonal polynomial with respect to the univariate weight function $w(x) = \exp(-x)$ over the interval $[0, \infty]$.

source
MultivariateBases.AbstractGegenbauerBasisType
struct AbstractGegenbauerBasis{P} <: AbstractMultipleOrthogonalBasis{P}
     polynomials::Vector{P}
-end

Orthogonal polynomial with respect to the univariate weight function $w(x) = (1 - x^2)^{\alpha - 1/2}$ over the interval $[-1, 1]$.

source
MultivariateBases.LegendreBasisType
struct LegendreBasis{P} <: AbstractGegenbauerBasis{P}
+end

Orthogonal polynomial with respect to the univariate weight function $w(x) = (1 - x^2)^{\alpha - 1/2}$ over the interval $[-1, 1]$.

source
MultivariateBases.LegendreBasisType
struct LegendreBasis{P} <: AbstractGegenbauerBasis{P}
     polynomials::Vector{P}
-end

Orthogonal polynomial with respect to the univariate weight function $w(x) = 1$ over the interval $[-1, 1]$.

source
MultivariateBases.ChebyshevBasisFirstKindType
struct ChebyshevBasisFirstKind{P} <: AbstractChebyshevBasis{P}
     polynomials::Vector{P}
-end

Orthogonal polynomial with respect to the univariate weight function $w(x) = \frac{1}{\sqrt{1 - x^2}}$ over the interval $[-1, 1]$.

source
MultivariateBases.ChebyshevBasisSecondKindType
struct ChebyshevBasisSecondKind{P} <: AbstractChebyshevBasis{P}
+end

Orthogonal polynomial with respect to the univariate weight function $w(x) = \frac{1}{\sqrt{1 - x^2}}$ over the interval $[-1, 1]$.

source
MultivariateBases.ChebyshevBasisSecondKindType
struct ChebyshevBasisSecondKind{P} <: AbstractChebyshevBasis{P}
     polynomials::Vector{P}
-end

Orthogonal polynomial with respect to the univariate weight function $w(x) = \sqrt{1 - x^2}$ over the interval $[-1, 1]$.

source
+end

Orthogonal polynomial with respect to the univariate weight function $w(x) = \sqrt{1 - x^2}$ over the interval $[-1, 1]$.

source
diff --git a/dev/search/index.html b/dev/search/index.html index 5733f1c..5318df6 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · MultivariateBases

Loading search...

    +Search · MultivariateBases

    Loading search...

      diff --git a/dev/search_index.js b/dev/search_index.js index 3aa72e0..24c5d77 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"","page":"Introduction","title":"Introduction","text":"CurrentModule = MultivariateBases\nDocTestSetup = quote\n using MultivariateBases\nend","category":"page"},{"location":"#MultivariateBases","page":"Introduction","title":"MultivariateBases","text":"","category":"section"},{"location":"","page":"Introduction","title":"Introduction","text":"MultivariateBases.jl is a standardized API for multivariate polynomial bases based on the MultivariatePolynomials API.","category":"page"},{"location":"","page":"Introduction","title":"Introduction","text":"AbstractPolynomialBasis\nmaxdegree_basis\nbasis_covering_monomials\nFixedPolynomialBasis\nOrthonormalCoefficientsBasis","category":"page"},{"location":"#MultivariateBases.AbstractPolynomialBasis","page":"Introduction","title":"MultivariateBases.AbstractPolynomialBasis","text":"abstract type AbstractPolynomialBasis end\n\nPolynomial basis of a subspace of the polynomials [Section~3.1.5, BPT12].\n\n[BPT12] Blekherman, G.; Parrilo, P. A. & Thomas, R. R. Semidefinite Optimization and Convex Algebraic Geometry. Society for Industrial and Applied Mathematics, 2012.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.maxdegree_basis","page":"Introduction","title":"MultivariateBases.maxdegree_basis","text":"maxdegree_basis(B::Type{<:AbstractPolynomialBasis}, variables, maxdegree::Int)\n\nReturn the basis of type B generating all polynomials of degree up to maxdegree with variables variables.\n\n\n\n\n\n","category":"function"},{"location":"#MultivariateBases.basis_covering_monomials","page":"Introduction","title":"MultivariateBases.basis_covering_monomials","text":"basis_covering_monomials(B::Type{<:AbstractPolynomialBasis}, monos::AbstractVector{<:AbstractMonomial})\n\nReturn the minimal basis of type B that can generate all polynomials of the monomial basis generated by monos.\n\nExamples\n\nFor example, to generate all the polynomials with nonzero coefficients for the monomials x^4 and x^2, we need three polynomials as otherwise, we generate polynomials with nonzero constant term.\n\njulia> using DynamicPolynomials\n\njulia> @polyvar x\n(x,)\n\njulia> basis_covering_monomials(ChebyshevBasis, [x^2, x^4])\nChebyshevBasisFirstKind([1.0, -1.0 + 2.0x², 1.0 - 8.0x² + 8.0x⁴])\n\n\n\n\n\n","category":"function"},{"location":"#MultivariateBases.FixedPolynomialBasis","page":"Introduction","title":"MultivariateBases.FixedPolynomialBasis","text":"struct FixedPolynomialBasis{PT<:MP.AbstractPolynomialLike, PV<:AbstractVector{PT}} <: AbstractPolynomialBasis\n polynomials::PV\nend\n\nPolynomial basis with the polynomials of the vector polynomials. For instance, FixedPolynomialBasis([1, x, 2x^2-1, 4x^3-3x]) is the Chebyshev polynomial basis for cubic polynomials in the variable x.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.OrthonormalCoefficientsBasis","page":"Introduction","title":"MultivariateBases.OrthonormalCoefficientsBasis","text":"struct OrthonormalCoefficientsBasis{PT<:MP.AbstractPolynomialLike, PV<:AbstractVector{PT}} <: AbstractPolynomialBasis\n polynomials::PV\nend\n\nPolynomial basis with the polynomials of the vector polynomials that are orthonormal with respect to the inner produce derived from the inner product of their coefficients. For instance, FixedPolynomialBasis([1, x, 2x^2-1, 4x^3-3x]) is the Chebyshev polynomial basis for cubic polynomials in the variable x.\n\n\n\n\n\n","category":"type"},{"location":"#Monomial-basis","page":"Introduction","title":"Monomial basis","text":"","category":"section"},{"location":"","page":"Introduction","title":"Introduction","text":"MonomialBasis\nScaledMonomialBasis","category":"page"},{"location":"#MultivariateBases.MonomialBasis","page":"Introduction","title":"MultivariateBases.MonomialBasis","text":"struct MonomialBasis{MT<:MP.AbstractMonomial, MV<:AbstractVector{MT}} <: AbstractPolynomialBasis\n monomials::MV\nend\n\nMonomial basis with the monomials of the vector monomials. For instance, MonomialBasis([1, x, y, x^2, x*y, y^2]) is the monomial basis for the subspace of quadratic polynomials in the variables x, y.\n\nThis basis is orthogonal under a scalar product defined with the complex Gaussian measure as density. Once normalized so as to be orthonormal with this scalar product, one get ths ScaledMonomialBasis.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.ScaledMonomialBasis","page":"Introduction","title":"MultivariateBases.ScaledMonomialBasis","text":"struct ScaledMonomialBasis{MT<:MP.AbstractMonomial, MV<:AbstractVector{MT}} <: AbstractPolynomialBasis\n monomials::MV\nend\n\nScaled monomial basis (see [Section 3.1.5, BPT12]) with the monomials of the vector monomials. Given a monomial x^alpha = x_1^alpha_1 cdots x_n^alpha_n of degree d = sum_i=1^n alpha_i, the corresponding polynomial of the basis is\n\nd choose alpha^frac12 x^alpha quad text where quad\nd choose alpha = fracdalpha_1 alpha_2 cdots alpha_n\n\nFor instance, create a polynomial with the basis xy^2 xy creates the polynomial sqrt3 a xy^2 + sqrt2 b xy where a and b are new JuMP decision variables. Constraining the polynomial axy^2 + bxy to be zero with the scaled monomial basis constrains a/√3 and b/√2 to be zero.\n\nThis basis is orthonormal under the scalar product:\n\nlangle f g rangle = int_mathcalC^n f(z) overlineg(z) dnu_n\n\nwhere nu_n is the Gaussian measure on mathcalC^n with the density pi^-n exp(-lVert z rVert^2). See [Section 4; B07] for more details.\n\n[BPT12] Blekherman, G.; Parrilo, P. A. & Thomas, R. R. Semidefinite Optimization and Convex Algebraic Geometry. Society for Industrial and Applied Mathematics (2012).\n\n[B07] Barvinok, Alexander. Integration and optimization of multivariate polynomials by restriction onto a random subspace. Foundations of Computational Mathematics 7.2 (2007): 229-244.\n\n\n\n\n\n","category":"type"},{"location":"#Orthogonal-basis","page":"Introduction","title":"Orthogonal basis","text":"","category":"section"},{"location":"","page":"Introduction","title":"Introduction","text":"AbstractMultipleOrthogonalBasis\nunivariate_orthogonal_basis\nreccurence_first_coef\nreccurence_second_coef\nreccurence_third_coef\nreccurence_deno_coef\nProbabilistsHermiteBasis\nPhysicistsHermiteBasis\nLaguerreBasis\nAbstractGegenbauerBasis\nLegendreBasis\nChebyshevBasisFirstKind\nChebyshevBasisSecondKind","category":"page"},{"location":"#MultivariateBases.AbstractMultipleOrthogonalBasis","page":"Introduction","title":"MultivariateBases.AbstractMultipleOrthogonalBasis","text":"abstract type AbstractMultipleOrthogonalBasis{P} <: AbstractPolynomialVectorBasis{P, Vector{P}} end\n\nPolynomial basis such that langle p_i(x) p_j(x) rangle = 0 if i neq j where\n\nlangle p(x) q(x) rangle = int p(x)q(x) w(x) dx\n\nwhere the weight is a product of weight functions w(x) = w_1(x_1)w_2(x_2) cdots w_n(x_n) in each variable. The polynomial of the basis are product of univariate polynomials: p(x) = p_1(x_1)p_2(x_2) cdots p_n(x_n). where the univariate polynomials of variable x_i form an univariate orthogonal basis for the weight function w_i(x_i). Therefore, they satisfy the recurrence relation\n\nd_k p_k(x_i) = (a_k x_i + b_k) p_k-1(x_i) + c_k p_k-2(x_i)\n\nwhere reccurence_first_coef gives a_k, reccurence_second_coef gives b_k, reccurence_third_coef gives c_k and reccurence_deno_coef gives d_k.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.univariate_orthogonal_basis","page":"Introduction","title":"MultivariateBases.univariate_orthogonal_basis","text":"univariate_orthogonal_basis(B::Type{<:AbstractMultipleOrthogonalBasis},\n variable::MP.AbstractVariable, degree::Integer)\n\nReturn the vector of univariate polynomials of the basis B up to degree with variable variable.\n\n\n\n\n\n","category":"function"},{"location":"#MultivariateBases.reccurence_first_coef","page":"Introduction","title":"MultivariateBases.reccurence_first_coef","text":"reccurence_first_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)\n\nReturn a_{degree} in recurrence equation\n\nd_k p_k(x_i) = (a_k x_i + b_k) p_k-1(x_i) + c_k p_k-2(x_i)\n\n\n\n\n\n","category":"function"},{"location":"#MultivariateBases.reccurence_second_coef","page":"Introduction","title":"MultivariateBases.reccurence_second_coef","text":"reccurence_second_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)\n\nReturn b_{degree} in recurrence equation\n\nd_k p_k(x_i) = (a_k x_i + b_k) p_k-1(x_i) + c_k p_k-2(x_i)\n\n\n\n\n\n","category":"function"},{"location":"#MultivariateBases.reccurence_third_coef","page":"Introduction","title":"MultivariateBases.reccurence_third_coef","text":"reccurence_third_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)\n\nReturn c_{degree} in recurrence equation\n\nd_k p_k(x_i) = (a_k x_i + b_k) p_k-1(x_i) + c_k p_k-2(x_i)\n\n\n\n\n\n","category":"function"},{"location":"#MultivariateBases.reccurence_deno_coef","page":"Introduction","title":"MultivariateBases.reccurence_deno_coef","text":"reccurence_deno_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)\n\nReturn d_{degree} in recurrence equation\n\nd_k p_k(x_i) = (a_k x_i + b_k) p_k-1(x_i) + c_k p_k-2(x_i)\n\n\n\n\n\n","category":"function"},{"location":"#MultivariateBases.ProbabilistsHermiteBasis","page":"Introduction","title":"MultivariateBases.ProbabilistsHermiteBasis","text":"struct ProbabilistsHermiteBasis{P} <: AbstractHermiteBasis{P}\n polynomials::Vector{P}\nend\n\nOrthogonal polynomial with respect to the univariate weight function w(x) = exp(-x^22) over the interval -infty infty.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.PhysicistsHermiteBasis","page":"Introduction","title":"MultivariateBases.PhysicistsHermiteBasis","text":"struct PhysicistsHermiteBasis{P} <: AbstractHermiteBasis{P}\n polynomials::Vector{P}\nend\n\nOrthogonal polynomial with respect to the univariate weight function w(x) = exp(-x^2) over the interval -infty infty.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.LaguerreBasis","page":"Introduction","title":"MultivariateBases.LaguerreBasis","text":"struct LaguerreBasis{P} <: AbstractMultipleOrthogonalBasis{P}\n polynomials::Vector{P}\nend\n\nOrthogonal polynomial with respect to the univariate weight function w(x) = exp(-x) over the interval 0 infty.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.AbstractGegenbauerBasis","page":"Introduction","title":"MultivariateBases.AbstractGegenbauerBasis","text":"struct AbstractGegenbauerBasis{P} <: AbstractMultipleOrthogonalBasis{P}\n polynomials::Vector{P}\nend\n\nOrthogonal polynomial with respect to the univariate weight function w(x) = (1 - x^2)^alpha - 12 over the interval -1 1.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.LegendreBasis","page":"Introduction","title":"MultivariateBases.LegendreBasis","text":"struct LegendreBasis{P} <: AbstractGegenbauerBasis{P}\n polynomials::Vector{P}\nend\n\nOrthogonal polynomial with respect to the univariate weight function w(x) = 1 over the interval -1 1.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.ChebyshevBasisFirstKind","page":"Introduction","title":"MultivariateBases.ChebyshevBasisFirstKind","text":"struct ChebyshevBasisFirstKind{P} <: AbstractChebyshevBasis{P}\n polynomials::Vector{P}\nend\n\nOrthogonal polynomial with respect to the univariate weight function w(x) = frac1sqrt1 - x^2 over the interval -1 1.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.ChebyshevBasisSecondKind","page":"Introduction","title":"MultivariateBases.ChebyshevBasisSecondKind","text":"struct ChebyshevBasisSecondKind{P} <: AbstractChebyshevBasis{P}\n polynomials::Vector{P}\nend\n\nOrthogonal polynomial with respect to the univariate weight function w(x) = sqrt1 - x^2 over the interval -1 1.\n\n\n\n\n\n","category":"type"}] +[{"location":"","page":"Introduction","title":"Introduction","text":"CurrentModule = MultivariateBases\nDocTestSetup = quote\n using MultivariateBases\nend","category":"page"},{"location":"#MultivariateBases","page":"Introduction","title":"MultivariateBases","text":"","category":"section"},{"location":"","page":"Introduction","title":"Introduction","text":"MultivariateBases.jl is a standardized API for multivariate polynomial bases based on the MultivariatePolynomials API.","category":"page"},{"location":"","page":"Introduction","title":"Introduction","text":"AbstractPolynomialBasis\nmaxdegree_basis\nbasis_covering_monomials\nFixedPolynomialBasis","category":"page"},{"location":"#MultivariateBases.AbstractPolynomialBasis","page":"Introduction","title":"MultivariateBases.AbstractPolynomialBasis","text":"abstract type AbstractPolynomialBasis end\n\nPolynomial basis of a subspace of the polynomials [Section~3.1.5, BPT12].\n\n[BPT12] Blekherman, G.; Parrilo, P. A. & Thomas, R. R. Semidefinite Optimization and Convex Algebraic Geometry. Society for Industrial and Applied Mathematics, 2012.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.maxdegree_basis","page":"Introduction","title":"MultivariateBases.maxdegree_basis","text":"maxdegree_basis(B::Type{<:AbstractPolynomialBasis}, variables, maxdegree::Int)\n\nReturn the basis of type B generating all polynomials of degree up to maxdegree with variables variables.\n\n\n\n\n\n","category":"function"},{"location":"#MultivariateBases.basis_covering_monomials","page":"Introduction","title":"MultivariateBases.basis_covering_monomials","text":"basis_covering_monomials(B::Type{<:AbstractPolynomialBasis}, monos::AbstractVector{<:AbstractMonomial})\n\nReturn the minimal basis of type B that can generate all polynomials of the monomial basis generated by monos.\n\nExamples\n\nFor example, to generate all the polynomials with nonzero coefficients for the monomials x^4 and x^2, we need three polynomials as otherwise, we generate polynomials with nonzero constant term.\n\njulia> using DynamicPolynomials\n\njulia> @polyvar x\n(x,)\n\njulia> basis_covering_monomials(ChebyshevBasis, [x^2, x^4])\nChebyshevBasisFirstKind([1.0, -1.0 + 2.0x², 1.0 - 8.0x² + 8.0x⁴])\n\n\n\n\n\n","category":"function"},{"location":"#MultivariateBases.FixedPolynomialBasis","page":"Introduction","title":"MultivariateBases.FixedPolynomialBasis","text":"struct FixedPolynomialBasis{PT<:MP.AbstractPolynomialLike, PV<:AbstractVector{PT}} <: AbstractPolynomialBasis\n polynomials::PV\nend\n\nPolynomial basis with the polynomials of the vector polynomials. For instance, FixedPolynomialBasis([1, x, 2x^2-1, 4x^3-3x]) is the Chebyshev polynomial basis for cubic polynomials in the variable x.\n\n\n\n\n\n","category":"type"},{"location":"#Monomial-basis","page":"Introduction","title":"Monomial basis","text":"","category":"section"},{"location":"","page":"Introduction","title":"Introduction","text":"MonomialBasis\nScaledMonomialBasis","category":"page"},{"location":"#MultivariateBases.MonomialBasis","page":"Introduction","title":"MultivariateBases.MonomialBasis","text":"struct MonomialBasis{MT<:MP.AbstractMonomial, MV<:AbstractVector{MT}} <: AbstractPolynomialBasis\n monomials::MV\nend\n\nMonomial basis with the monomials of the vector monomials. For instance, MonomialBasis([1, x, y, x^2, x*y, y^2]) is the monomial basis for the subspace of quadratic polynomials in the variables x, y.\n\nThis basis is orthogonal under a scalar product defined with the complex Gaussian measure as density. Once normalized so as to be orthonormal with this scalar product, one get ths ScaledMonomialBasis.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.ScaledMonomialBasis","page":"Introduction","title":"MultivariateBases.ScaledMonomialBasis","text":"struct ScaledMonomialBasis{MT<:MP.AbstractMonomial, MV<:AbstractVector{MT}} <: AbstractPolynomialBasis\n monomials::MV\nend\n\nScaled monomial basis (see [Section 3.1.5, BPT12]) with the monomials of the vector monomials. Given a monomial x^alpha = x_1^alpha_1 cdots x_n^alpha_n of degree d = sum_i=1^n alpha_i, the corresponding polynomial of the basis is\n\nd choose alpha^frac12 x^alpha quad text where quad\nd choose alpha = fracdalpha_1 alpha_2 cdots alpha_n\n\nFor instance, create a polynomial with the basis xy^2 xy creates the polynomial sqrt3 a xy^2 + sqrt2 b xy where a and b are new JuMP decision variables. Constraining the polynomial axy^2 + bxy to be zero with the scaled monomial basis constrains a/√3 and b/√2 to be zero.\n\nThis basis is orthonormal under the scalar product:\n\nlangle f g rangle = int_mathcalC^n f(z) overlineg(z) dnu_n\n\nwhere nu_n is the Gaussian measure on mathcalC^n with the density pi^-n exp(-lVert z rVert^2). See [Section 4; B07] for more details.\n\n[BPT12] Blekherman, G.; Parrilo, P. A. & Thomas, R. R. Semidefinite Optimization and Convex Algebraic Geometry. Society for Industrial and Applied Mathematics (2012).\n\n[B07] Barvinok, Alexander. Integration and optimization of multivariate polynomials by restriction onto a random subspace. Foundations of Computational Mathematics 7.2 (2007): 229-244.\n\n\n\n\n\n","category":"type"},{"location":"#Orthogonal-basis","page":"Introduction","title":"Orthogonal basis","text":"","category":"section"},{"location":"","page":"Introduction","title":"Introduction","text":"AbstractMultipleOrthogonalBasis\nunivariate_orthogonal_basis\nreccurence_first_coef\nreccurence_second_coef\nreccurence_third_coef\nreccurence_deno_coef\nProbabilistsHermiteBasis\nPhysicistsHermiteBasis\nLaguerreBasis\nAbstractGegenbauerBasis\nLegendreBasis\nChebyshevBasisFirstKind\nChebyshevBasisSecondKind","category":"page"},{"location":"#MultivariateBases.AbstractMultipleOrthogonalBasis","page":"Introduction","title":"MultivariateBases.AbstractMultipleOrthogonalBasis","text":"abstract type AbstractMultipleOrthogonalBasis{P} <: AbstractPolynomialVectorBasis{P, Vector{P}} end\n\nPolynomial basis such that langle p_i(x) p_j(x) rangle = 0 if i neq j where\n\nlangle p(x) q(x) rangle = int p(x)q(x) w(x) dx\n\nwhere the weight is a product of weight functions w(x) = w_1(x_1)w_2(x_2) cdots w_n(x_n) in each variable. The polynomial of the basis are product of univariate polynomials: p(x) = p_1(x_1)p_2(x_2) cdots p_n(x_n). where the univariate polynomials of variable x_i form an univariate orthogonal basis for the weight function w_i(x_i). Therefore, they satisfy the recurrence relation\n\nd_k p_k(x_i) = (a_k x_i + b_k) p_k-1(x_i) + c_k p_k-2(x_i)\n\nwhere reccurence_first_coef gives a_k, reccurence_second_coef gives b_k, reccurence_third_coef gives c_k and reccurence_deno_coef gives d_k.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.univariate_orthogonal_basis","page":"Introduction","title":"MultivariateBases.univariate_orthogonal_basis","text":"univariate_orthogonal_basis(B::Type{<:AbstractMultipleOrthogonalBasis},\n variable::MP.AbstractVariable, degree::Integer)\n\nReturn the vector of univariate polynomials of the basis B up to degree with variable variable.\n\n\n\n\n\n","category":"function"},{"location":"#MultivariateBases.reccurence_first_coef","page":"Introduction","title":"MultivariateBases.reccurence_first_coef","text":"reccurence_first_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)\n\nReturn a_{degree} in recurrence equation\n\nd_k p_k(x_i) = (a_k x_i + b_k) p_k-1(x_i) + c_k p_k-2(x_i)\n\n\n\n\n\n","category":"function"},{"location":"#MultivariateBases.reccurence_second_coef","page":"Introduction","title":"MultivariateBases.reccurence_second_coef","text":"reccurence_second_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)\n\nReturn b_{degree} in recurrence equation\n\nd_k p_k(x_i) = (a_k x_i + b_k) p_k-1(x_i) + c_k p_k-2(x_i)\n\n\n\n\n\n","category":"function"},{"location":"#MultivariateBases.reccurence_third_coef","page":"Introduction","title":"MultivariateBases.reccurence_third_coef","text":"reccurence_third_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)\n\nReturn c_{degree} in recurrence equation\n\nd_k p_k(x_i) = (a_k x_i + b_k) p_k-1(x_i) + c_k p_k-2(x_i)\n\n\n\n\n\n","category":"function"},{"location":"#MultivariateBases.reccurence_deno_coef","page":"Introduction","title":"MultivariateBases.reccurence_deno_coef","text":"reccurence_deno_coef(B::Type{<:AbstractMultipleOrthogonalBasis}, degree::Integer)\n\nReturn d_{degree} in recurrence equation\n\nd_k p_k(x_i) = (a_k x_i + b_k) p_k-1(x_i) + c_k p_k-2(x_i)\n\n\n\n\n\n","category":"function"},{"location":"#MultivariateBases.ProbabilistsHermiteBasis","page":"Introduction","title":"MultivariateBases.ProbabilistsHermiteBasis","text":"struct ProbabilistsHermiteBasis{P} <: AbstractHermiteBasis{P}\n polynomials::Vector{P}\nend\n\nOrthogonal polynomial with respect to the univariate weight function w(x) = exp(-x^22) over the interval -infty infty.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.PhysicistsHermiteBasis","page":"Introduction","title":"MultivariateBases.PhysicistsHermiteBasis","text":"struct PhysicistsHermiteBasis{P} <: AbstractHermiteBasis{P}\n polynomials::Vector{P}\nend\n\nOrthogonal polynomial with respect to the univariate weight function w(x) = exp(-x^2) over the interval -infty infty.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.LaguerreBasis","page":"Introduction","title":"MultivariateBases.LaguerreBasis","text":"struct LaguerreBasis{P} <: AbstractMultipleOrthogonalBasis{P}\n polynomials::Vector{P}\nend\n\nOrthogonal polynomial with respect to the univariate weight function w(x) = exp(-x) over the interval 0 infty.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.AbstractGegenbauerBasis","page":"Introduction","title":"MultivariateBases.AbstractGegenbauerBasis","text":"struct AbstractGegenbauerBasis{P} <: AbstractMultipleOrthogonalBasis{P}\n polynomials::Vector{P}\nend\n\nOrthogonal polynomial with respect to the univariate weight function w(x) = (1 - x^2)^alpha - 12 over the interval -1 1.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.LegendreBasis","page":"Introduction","title":"MultivariateBases.LegendreBasis","text":"struct LegendreBasis{P} <: AbstractGegenbauerBasis{P}\n polynomials::Vector{P}\nend\n\nOrthogonal polynomial with respect to the univariate weight function w(x) = 1 over the interval -1 1.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.ChebyshevBasisFirstKind","page":"Introduction","title":"MultivariateBases.ChebyshevBasisFirstKind","text":"struct ChebyshevBasisFirstKind{P} <: AbstractChebyshevBasis{P}\n polynomials::Vector{P}\nend\n\nOrthogonal polynomial with respect to the univariate weight function w(x) = frac1sqrt1 - x^2 over the interval -1 1.\n\n\n\n\n\n","category":"type"},{"location":"#MultivariateBases.ChebyshevBasisSecondKind","page":"Introduction","title":"MultivariateBases.ChebyshevBasisSecondKind","text":"struct ChebyshevBasisSecondKind{P} <: AbstractChebyshevBasis{P}\n polynomials::Vector{P}\nend\n\nOrthogonal polynomial with respect to the univariate weight function w(x) = sqrt1 - x^2 over the interval -1 1.\n\n\n\n\n\n","category":"type"}] }