def ball_radius(self, point):
- """
+ r"""
Return the radius of a ball around ``point`` in this cone.
Since a radius cannot be negative, the ``point`` must be
The minimum distance from ``point`` to the complement of this
cone will always occur at its projection onto that set. It is
not hard to see that the projection is at a "down and out" angle
- of ``pi/4`` towards the outside of the cone. If one draws a
+ of :math:`\pi/4` towards the outside of the cone. If one draws a
right triangle involving the ``point`` and that projection, it
becomes clear that the distance between ``point`` and its
- projection is a factor of ``1/sqrt(2)`` times the "horizontal"
+ projection is a factor of :math:`1/\sqrt(2)` times the "horizontal"
distance from ``point`` to boundary of this cone. For simplicity
- we take ``1/2`` instead.
+ we take :math:`1/2` instead.
Parameters
----------
Examples
--------
- The height of ``x`` is one (its first coordinate), and so the
- radius of the circle obtained from a height-one cross section is
- also one. Note that the last two coordinates of ``x`` are half
- of the way to the boundary of the cone, and in the direction of
- a 30-60-90 triangle. If one follows those coordinates, they hit
- at ``(1, sqrt(3)/2, 1/2)`` having unit norm. Thus the
- "horizontal" distance to the boundary of the cone is ``1 -
- norm(x)``, which simplifies to ``1/2``. And rather than involve
- a square root, we divide by two for a final safe radius of
- ``1/4``.
+ The height of ``x`` below is one (its first coordinate), and so
+ the radius of the circle obtained from a height-one cross
+ section is also one. Note that the last two coordinates of ``x``
+ are half of the way to the boundary of the cone, and in the
+ direction of a 30-60-90 triangle. If one follows those
+ coordinates, they hit at :math:`\left(1, \frac{\sqrt(3)}{2},
+ \frac{1}{2}\right)` having unit norm. Thus the "horizontal"
+ distance to the boundary of the cone is :math:`1 - \left\lVert x
+ \right\rVert`, which simplifies to :math:`1/2`. And rather than
+ involve a square root, we divide by two for a final safe radius
+ of :math:`1/4`.
>>> from math import sqrt
>>> K = IceCream(3)
def cvxopt_dims(self):
"""
- Return a dictionary of dimensions corresponding to the factors
- of this cartesian product. The format of this dictionary is
- described in the CVXOPT user's guide:
-
- http://cvxopt.org/userguide/coneprog.html#linear-cone-programs
+ Return a dictionary of dimensions corresponding to the
+ factors of this cartesian product. The format of this dictionary
+ is described in the `CVXOPT user's guide
+ <http://cvxopt.org/userguide/coneprog.html#linear-cone-programs>`_.
Returns
-------