picos.expressions.exp_sumxtr¶
Implements SumExtremes
.
Classes
- class picos.expressions.exp_sumxtr.SumExtremes(x, k, largest, eigenvalues=False)[source]¶
Bases:
Expression
Sum of the
largest or smallest elements or eigenvalues.
- Definition
Let
.
If
is an
-dimensional real vector or matrix and
eigenvalues == False
, then this is the sum of thelargest or smallest scalar elements of
, depending on the truth value of
largest
.Special cases:
If
, this is either the largest element
or the smallest element
of
.
If
, this is the sum of all elements
of
.
If
is an
hermitian matrix and
eigenvalues == True
, then this is the sum of thelargest or smallest eigenvalues of
, depending on the truth value of
largest
. Recall that the eigenvalues of a hermitian matrix are real.Special cases:
If
, this is either the largest eigenvalue
or the smallest eigenvalue
of
.
If
, this equals the trace
.
If the given
exceeds the
of either case, then
is silently clipped to
.
- __init__(x, k, largest, eigenvalues=False)[source]¶
Construct a
SumExtremes
.- Parameters
x (ComplexAffineExpression) – The affine expression to take a sum over.
k (int) – Number of summands.
largest (bool) – Whether to sum over the largest (eigen)values as opposed to the smallest.
eigenvalues (bool) – Whether to sum eigenvalues instead of elements.
- property eigenvalues¶
Whether the sum concerns eigenvalues as opposed to elements.
- property full¶
Whether the sum concerns all (eigen)values of the expression.
- property k¶
Number of (eigen)values to sum.
- property largest¶
Whether the sum concerns largest values as opposed to smallest.
- property x¶
The expression under the sum.