# picos.expressions.set_ball¶

Implements Ball.

Classes

class picos.expressions.set_ball.Ball(radius=<1×1 Real Constant: 1>, p=2, denominator_limit=1000)[source]

A ball of radius according to a (generalized) -norm.

Definition

In the following, refers to the vector -norm or to the entrywise matrix -norm, depending on the argument. See Norm for definitions.

Let .

1. For or (input as float("inf")), this is the convex set

for any

2. For a generalized -norm with , this is the convex set

for any

Note that may not be complex if due to the implicit constraint in this case, which is not meaningful on the complex field.

Note further that may be any scalar affine expression, it does not need to be constant.

Note

Due to significant differences in scope, Ball is not a subclass of Ellipsoid even though both classes can represent Euclidean balls around the origin.

__init__(radius=<1×1 Real Constant: 1>, p=2, denominator_limit=1000)[source]

Construct a -norm ball of given radius.

Parameters

• p (float) – The value for , which is cast to a limited precision fraction.

• denominator_limit (int) – The largest allowed denominator when casting to a fraction. Higher values can yield a greater precision at reduced performance.

property p

The value defining the -norm used.

This is a limited precision version of the parameter used when the ball was constructed.

property r