Skip to main content

Module constraints

Module constraints 

Source
Expand description

Constraints and projections

This module defines the trait Constraint, which specifies an abstract projection method, and a collection of simple sets, such as norm-balls, finite sets, second-order cones and their Cartesian products.

Structs§

AffineSpace
An affine space here is defined as the set of solutions of a linear equation, $Ax = b$, that is, $E=\{x\in\mathbb{R}^n: Ax = b\}$, which is an affine space. It is assumed that the matrix $AA^\intercal$ is full-rank.
Ball1
A norm-1 ball, that is, a set given by $B_1^r = \{x \in \mathbb{R}^n {}:{} \Vert{}x{}\Vert_1 \leq r\}$ or a ball-1 centered at a point $x_c$, that is, $B_1^{x_c, r} = \{x \in \mathbb{R}^n {}:{} \Vert{}x-x_c{}\Vert_1 \leq r\}$
Ball2
A Euclidean ball, that is, a set given by $B_2^r = \{x \in \mathbb{R}^n {}:{} \Vert{}x{}\Vert \leq r\}$ or a Euclidean ball centered at a point $x_c$, that is, $B_2^{x_c, r} = \{x \in \mathbb{R}^n {}:{} \Vert{}x-x_c{}\Vert \leq r\}$
BallInf
An infinity ball defined as $B_\infty^r = \{x\in\mathbb{R}^n {}:{} \Vert{}x{}\Vert_{\infty} \leq r\}$, where $\Vert{}\cdot{}\Vert_{\infty}$ is the infinity norm. The infinity ball centered at a point $x_c$ is defined as $B_\infty^{x_c,r} = \{x\in\mathbb{R}^n {}:{} \Vert{}x-x_c{}\Vert_{\infty} \leq r\}$.
BallP
An $\ell_p$ ball, that is, $$B_p^r = \{ x \in R^n : \Vert x \Vert_p \leq r \}$$ or a translated ball $$B_p^{x_c, r} = \{ x \in \mathbb{R}^n : \Vert x - x_c \Vert_p \leq r \},$$ with $1 < p < \infty$.
CartesianProduct
Cartesian product of constraints.
EpigraphSquaredNorm
The epigraph of the squared Euclidean norm, that is, $$ X = \{x = (z, t) \in \mathbb{R}^{n}\times \mathbb{R} : \Vert z\Vert_2^2 \leq t \}. $$
FiniteSet
A finite set, $X = \{x_1, x_2, \ldots, x_n\}\subseteq\mathbb{R}^n$, given vectors $x_i\in\mathbb{R}^n$
Halfspace
A halfspace is a set given by $H = \{x \in \mathbb{R}^n {}:{} \langle c, x\rangle \leq b\}$.
Hyperplane
A hyperplane is a set given by $H = \{x \in \mathbb{R}^n {}:{} \langle c, x\rangle = b\}$.
NoConstraints
The whole space, no constraints
Rectangle
A rectangle, $R = \{x \in \mathbb{R}^n {}:{} x_{\min} {}\leq{} x {}\leq{} x_{\max}\}$
SecondOrderCone
A second-order cone (SOC)
Simplex
A simplex with level $\alpha$ is a set of the form $\Delta_\alpha^n = \{x \in \mathbb{R}^n {}:{} x \geq 0, \sum_i x_i = \alpha\}$, where $\alpha$ is a positive constant.
Sphere2
A Euclidean sphere, that is, a set given by $S_2^r = \{x \in \mathbb{R}^n {}:{} \Vert{}x{}\Vert = r\}$ or a Euclidean sphere centered at a point $x_c$, that is, $S_2^{x_c, r} = \{x \in \mathbb{R}^n {}:{} \Vert{}x-x_c{}\Vert = r\}$
Zero
Set Zero, $\{0\}$

Enums§

AffineSpaceError
Errors that can arise when constructing an AffineSpace.

Traits§

Constraint
A set which can be used as a constraint