picos.expressions.exp_sqnorm

Implements SquaredNorm.

Outline

Classes

SquaredNorm

A squared Euclidean or Frobenius norm.

Classes

SquaredNorm

class picos.expressions.exp_sqnorm.SquaredNorm(x)[source]

Bases: picos.expressions.exp_quadratic.QuadraticExpression

A squared Euclidean or Frobenius norm.

This is a lightweight wrapper around QuadraticExpression that can handle common constraint formulations more efficiently.

__init__(x)[source]

Create a squared Euclidean or Frobenius norm.

Parameters

x – The (complex) affine expression under the squared norm.

property argdim

Number of nonzero elements of the expression under the norm.

property fullroot

Affine expression whose squared norm equals the expression.

Overrides fullroot of QuadraticExpression.

property is0

Whether the expression is zero.

Overrides is0 of QuadraticExpression.

property is_squared_norm

Always True for squared norm instances.

Overrides is_squared_norm of QuadraticExpression.