Primitives#

simple_terms#

class AbsValue(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the absolute value function \(|x|\).

Parameters:

operand (scalar UFL expression) – optimization variable \(x\)

class LinearTerm(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the linear function \(x\).

Parameters:

operand (scalar UFL expression) – optimization variable \(x\)

class QuadOverLin(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the quadratic over linear function \((t,x) \to x^T x/t\).

Parameters:

operand (UFL expression) – block optimization variable operand = (t, x)

class QuadraticTerm(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the quadratic function \(\frac{1}{2}x^T x\).

Parameters:

operand (UFL expression) – optimization variable \(x\)

norms#

class L1Ball(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the L1-norm ball constraint \(||x||_1 \leq 1\).

class L1Norm(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the L1-norm function \(||x||_1\).

class L2Ball(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the L2-norm ball constraint \(||x||_2 \leq 1\).

class L2Norm(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the L2-norm function \(||x||_2\).

class LinfBall(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the Linf-norm ball constraint \(||x||_\infty \leq 1\).

class LinfNorm(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the Linf-norm function \(||x||_\infty\).

class LpNorm(operand, deg_quad, p)[source]#

Define the Lp-norm function \(||x||_p\).

eigenvalues#

class FrobeniusNorm(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the Froebenius norm function \(\boldsymbol{X}\in \mathcal{S}_n \to \sqrt{\text{tr}(\boldsymbol{X}^T\boldsymbol{X})}\).

class LambdaMax(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the maximum eigenvalue function \(\boldsymbol{X}\in \mathcal{S}_n \to \lambda_{max}(\boldsymbol{X})\).

class NuclearNorm(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the nuclear norm function \(\boldsymbol{X}\in \mathcal{S}_n \to \text{tr}(\sqrt{\boldsymbol{X}^T\boldsymbol{X}})\).

class SpectralNorm(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the spectral norm function \(\boldsymbol{X}\in \mathcal{S}_n \to \sqrt{\lambda_{max}(\boldsymbol{X}^T\boldsymbol{X})}\).

class SpectralRadius(operand, deg_quad, quadrature_scheme='default', parameters=None)[source]#

Define the spectral radius function \(\boldsymbol{X}\in \mathcal{S}_n \to \max_i\{{|\lambda_i(\boldsymbol{X})|\}}\).