Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicator documentation notation #353

Merged
merged 5 commits into from
Oct 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scico/functional/_indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ def prox(
r"""The scaled proximal operator of the non-negative indicator.

Evaluate the scaled proximal operator of the indicator over
the non-negative orthant, :math:`I_{>= 0}`,
the non-negative orthant, :math:`I`,

.. math::
[\mathrm{prox}_{\lambda I_{>=0}}(\mb{v})]_i =
[\mathrm{prox}_{\lambda I}(\mb{v})]_i =
\begin{cases}
v_i\, & \text{ if } v_i \geq 0 \\
0\, & \text{ otherwise} \;.
Expand Down Expand Up @@ -104,10 +104,10 @@ def prox(
r"""The scaled proximal operator of the :math:`\ell_2` ball indicator.
a :math:`\ell_2` ball

Evaluate the scaled proximal operator of the indicator, :math:`I_r`,
Evaluate the scaled proximal operator of the indicator, :math:`I`,
of the :math:`\ell_2` ball with radius :math:`r`

.. math::
\mathrm{prox}_{\lambda I_r}(\mb{v}) = r \frac{\mb{v}}{\norm{\mb{v}}_2}\;.
\mathrm{prox}_{\lambda I}(\mb{v}) = r \frac{\mb{v}}{\norm{\mb{v}}_2}\;.
"""
return self.radius * v / norm(v)