@@ -58,9 +58,9 @@ class ExpCone(Cone):
5858
5959 def __init__ (self , x : Expression , y : Expression , z : Expression , constr_id = None ) -> None :
6060 Expression = cvxtypes .expression ()
61- self .x = Expression .cast_to_const (x )
62- self .y = Expression .cast_to_const (y )
63- self .z = Expression .cast_to_const (z )
61+ self .x = Expression .cast (x )
62+ self .y = Expression .cast (y )
63+ self .z = Expression .cast (z )
6464 args = [self .x , self .y , self .z ]
6565 for val in args :
6666 if not (val .is_affine () and val .is_real ()):
@@ -163,19 +163,15 @@ def _dual_cone(self, *args):
163163
164164
165165class RelEntrConeQuad (Cone ):
166- """An approximate construction of the scalar relative entropy cone
167-
168- Definition:
166+ """An approximation of the scalar relative entropy cone,
169167
170168 .. math::
171169
172170 K_{re}=\\ text{cl}\\ {(x,y,z)\\ in\\ mathbb{R}_{++}\\ times
173- \\ mathbb{R}_{++}\\ times\\ mathbb{R}_{++}\\ :x\\ log(x/y)\\ leq z\\ }
174-
175- Since the above definition is very similar to the ExpCone, we provide a conversion method.
171+ \\ mathbb{R}_{++}\\ times\\ mathbb{R}_{++}\\ :x\\ log(x/y)\\ leq z\\ },
176172
177- More details on the approximation can be found in Theorem-3 on page-10 in the paper:
178- Semidefinite Approximations of the Matrix Logarithm .
173+ in terms of second order cones. The approximation uses a numerical quadrature scheme
174+ described in https://arxiv.org/abs/1705.00812 .
179175
180176 Parameters
181177 ----------
@@ -185,17 +181,18 @@ class RelEntrConeQuad(Cone):
185181 y in the (approximate) scalar relative entropy cone
186182 z : Expression
187183 z in the (approximate) scalar relative entropy cone
188- m: Parameter directly related to the number of generated nodes for the quadrature
189- approximation used in the algorithm
190- k: Another parameter controlling the approximation
184+ m : int
185+ Number of quadrature points in the approximation.
186+ k: int
187+ Number of scaling points in the approximation.
191188 """
192189
193190 def __init__ (self , x : Expression , y : Expression , z : Expression ,
194191 m : int , k : int , constr_id = None ) -> None :
195192 Expression = cvxtypes .expression ()
196- self .x = Expression .cast_to_const (x )
197- self .y = Expression .cast_to_const (y )
198- self .z = Expression .cast_to_const (z )
193+ self .x = Expression .cast (x )
194+ self .y = Expression .cast (y )
195+ self .z = Expression .cast (z )
199196 args = [self .x , self .y , self .z ]
200197 for val in args :
201198 if not (val .is_affine () and val .is_real ()):
@@ -281,17 +278,15 @@ def save_dual_value(self, value) -> None:
281278
282279
283280class OpRelEntrConeQuad (Cone ):
284- """An approximate construction of the operator relative entropy cone
285-
286- Definition:
281+ """An approximate construction of the operator relative entropy cone,
287282
288283 .. math::
289284
290- K_{re}^n= \\ text{cl}\\ {(X,Y,T)\\ in\\ mathbb{H}^n_{++}\\ times
291- \\ mathbb{H}^n_{++}\\ times\\ mathbb{H}^n_{++}\\ :D_{\\ text{op}}\\ succeq T\\ }
285+ K_{re}^n = \\ text{cl}\\ {(X,Y,T)\\ in\\ mathbb{H}^n_{++}\\ times
286+ \\ mathbb{H}^n_{++}\\ times\\ mathbb{H}^n_{++}\\ :D_{\\ text{op}}(X,Y) \\ succeq T\\ }.
292287
293- More details on the approximation can be found in Theorem-3 on page-10 in the paper:
294- Semidefinite Approximations of the Matrix Logarithm .
288+ Details on the approximation can be found in Theorem-3 on page-10 of
289+ https://arxiv.org/abs/1705.00812 .
295290
296291 Parameters
297292 ----------
@@ -317,9 +312,9 @@ class OpRelEntrConeQuad(Cone):
317312 def __init__ (self , X : Expression , Y : Expression , Z : Expression ,
318313 m : int , k : int , constr_id = None ) -> None :
319314 Expression = cvxtypes .expression ()
320- self .X = Expression .cast_to_const (X )
321- self .Y = Expression .cast_to_const (Y )
322- self .Z = Expression .cast_to_const (Z )
315+ self .X = Expression .cast (X )
316+ self .Y = Expression .cast (Y )
317+ self .Z = Expression .cast (Z )
323318 if (not X .is_hermitian ()) or (not Y .is_hermitian ()) or (not Z .is_hermitian ()):
324319 msg = ("One of the input matrices has not explicitly been declared as symmetric or"
325320 "Hermitian. If the inputs are Variable objects, try declaring them with the"
0 commit comments