PolyUtils module
Hypatia.PolyUtils — Module
Utilities for constructing interpolant-basis polynomial sum-of-squares models.
Real polynomial domains
Hypatia.PolyUtils.Domain — Type
abstract type Domain{T<:Real}Real domains for polynomial constraints.
Hypatia.PolyUtils.dimension — Function
dimension(dom)Dimension of a domain.
Hypatia.PolyUtils.degree — Function
degree(dom)Degree of a polynomial constraints defining a domain.
Hypatia.PolyUtils.sample — Function
sample(dom, npts)Sample npts points from the interior of the domain.
Hypatia.PolyUtils.weights — Function
weights(dom, pts)Evaluations of the polynomial domain constraints at the points.
Hypatia.PolyUtils.ref_pts — Function
ref_pts(::Hypatia.PolyUtils.Domain, pts)Invertible affine map of points sampled from the domain into $[-1, 1]^n$, where the Chebyshev basis is evaluated. Defaults to the identity, for domains that sample from $[-1, 1]^n$.
Hypatia.PolyUtils.EllipsoidDomain — Type
mutable struct EllipsoidDomain{T<:Real} <: Hypatia.PolyUtils.Domain{T}Hyperellipse $(x-c)' Q (x-c) \leq 1$ with center c::Vector{T} and symmetric positive definite scaling/rotation matrix Q::AbstractMatrix{T}.
Hypatia.PolyUtils.BoxDomain — Type
mutable struct BoxDomain{T<:Real} <: Hypatia.PolyUtils.Domain{T}Hyperbox $x ∈ [l, u]$ with lower bounds l::Vector{T} and upper bounds u::Vector{T}.
Hypatia.PolyUtils.BallDomain — Type
mutable struct BallDomain{T<:Real} <: Hypatia.PolyUtils.Domain{T}Euclidean hyperball $\lVert (x-c) \rVert_2 \leq r$ with center c::Vector{T} and positive radius r::T.
Hypatia.PolyUtils.FreeDomain — Type
mutable struct FreeDomain{T<:Real} <: Hypatia.PolyUtils.Domain{T}Real vectors $x ∈ ℝⁿ$ of dimension n::Int.
Interpolation
Hypatia.PolyUtils.interpolate — Function
interpolate(
dom,
d;
calc_V,
get_quadr,
sample,
sample_factor
)Compute interpolation data for a real weighted sum-of-squares conic constraint on a domain. The points pts are in the domain, while Ps and V use the polynomial basis at these points mapped by ref_pts. The quadrature weights w (if get_quadr) integrate over $[-1, 1]^n$ in these reference coordinates, that is, up to a constant factor, over the box for a box domain and over a region containing the domain for a ball or ellipsoid domain.
interpolate(
R,
halfdeg,
n,
gs,
g_halfdegs;
sample_factor,
use_qr
)Compute interpolation data for a complex weighted sum-of-squares conic constraint on a domain.