picos.expressions.exp_powtrace¶
Implements PowerTrace
.
Classes¶
PowerTrace¶
-
class
picos.expressions.exp_powtrace.
PowerTrace
(x, p, m=None, denominator_limit=1000)[source]¶ Bases:
picos.expressions.expression.Expression
The trace of the
-th power of a hermitian matrix.
- Definition
Let
.
If the base expressions is a real scalar
and no additional constant
is given, then this is the power
.
If the base expressions is a real scalar
,
, and a positive scalar constant
is given, then this is the scaled power
.
If the base expression is a hermitian matrix
and no additional constant
is given, then this is the trace of power
.
If the base expression is a hermitian matrix
,
, and a hermitian positive semidefinite constant matrix
of same shape as
is given, then this is the trace of a scaled power
.
No other case is supported. In particular, if
, then
/
must be undefined (
None
).Warning
For a constraint of the form
with
and
, PICOS enforces
during solution search.
For a constraint of the form
or
with
and
, PICOS enforces
during solution search.
For a constraint of the form
or
with
, PICOS enforces
during solution search.
-
__init__
(x, p, m=None, denominator_limit=1000)[source]¶ Construct a
PowerTrace
.- Parameters
x (AffineExpression) – The scalar or symmetric matrix to form a power of.
p (float) – The value for
, which is cast to a limited precision fraction.
m (
AffineExpression
or anything recognized byload_data
) – An additional positive semidefinite constant to multiply the power with.denominator_limit (int) – The largest allowed denominator when casting
to a fraction. Higher values can yield a greater precision at reduced performance.
-
property
den
¶ The limited precision fraction denominator of
.
-
property
m
¶ An additional factor to multiply the power with.
-
property
num
¶ The limited precision fraction numerator of
.
-
property
p
¶ The parameter
.
This is a limited precision version of the parameter used when the expression was constructed.
-
property
x
¶ The matrix concerned.