Skip to content

Commit

Permalink
Format all remaining docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-caron authored and Stéphane Caron committed Feb 2, 2023
1 parent 4d17ca5 commit 32c9545
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 75 deletions.
18 changes: 9 additions & 9 deletions qpsolvers/solvers/mosek_.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,20 @@ def mosek_solve_qp(
verbose: bool = False,
**kwargs,
) -> Optional[np.ndarray]:
"""Solve a quadratic program using MOSEK.
r"""Solve a quadratic program using MOSEK.
The quadratic program is defined as:
.. math::
\\begin{split}\\begin{array}{ll}
\\underset{x}{\\mbox{minimize}} &
\\frac{1}{2} x^T P x + q^T x \\\\
\\mbox{subject to}
& G x \\leq h \\\\
& A x = b \\\\
& lb \\leq x \\leq ub
\\end{array}\\end{split}
\begin{split}\begin{array}{ll}
\underset{x}{\mbox{minimize}} &
\frac{1}{2} x^T P x + q^T x \\
\mbox{subject to}
& G x \leq h \\
& A x = b \\
& lb \leq x \leq ub
\end{array}\end{split}
It is solved using the `MOSEK interface from CVXOPT
<https://cvxopt.org/userguide/coneprog.html#optional-solvers>`_.
Expand Down
18 changes: 9 additions & 9 deletions qpsolvers/solvers/osqp_.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,20 +192,20 @@ def osqp_solve_qp(
verbose: bool = False,
**kwargs,
) -> Optional[np.ndarray]:
"""Solve a quadratic program using OSQP.
r"""Solve a quadratic program using OSQP.
The quadratic program is defined as:
.. math::
\\begin{split}\\begin{array}{ll}
\\underset{x}{\\mbox{minimize}} &
\\frac{1}{2} x^T P x + q^T x \\\\
\\mbox{subject to}
& G x \\leq h \\\\
& A x = b \\\\
& lb \\leq x \\leq ub
\\end{array}\\end{split}
\begin{split}\begin{array}{ll}
\underset{x}{\mbox{minimize}} &
\frac{1}{2} x^T P x + q^T x \\
\mbox{subject to}
& G x \leq h \\
& A x = b \\
& lb \leq x \leq ub
\end{array}\end{split}
It is solved using `OSQP <https://github.com/oxfordcontrol/osqp>`__.
Expand Down
18 changes: 9 additions & 9 deletions qpsolvers/solvers/proxqp_.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,20 +234,20 @@ def proxqp_solve_qp(
backend: Optional[str] = None,
**kwargs,
) -> Optional[np.ndarray]:
"""Solve a quadratic program using ProxQP.
r"""Solve a quadratic program using ProxQP.
The quadratic program is defined as:
.. math::
\\begin{split}\\begin{array}{ll}
\\underset{\\mbox{minimize}}{x} &
\\frac{1}{2} x^T P x + q^T x \\\\
\\mbox{subject to}
& G x \\leq h \\\\
& A x = b \\\\
& lb \\leq x \\leq ub
\\end{array}\\end{split}
\begin{split}\begin{array}{ll}
\underset{\mbox{minimize}}{x} &
\frac{1}{2} x^T P x + q^T x \\
\mbox{subject to}
& G x \leq h \\
& A x = b \\
& lb \leq x \leq ub
\end{array}\end{split}
It is solved using `ProxQP
<https://github.com/Simple-Robotics/proxsuite#proxqp>`__.
Expand Down
18 changes: 9 additions & 9 deletions qpsolvers/solvers/qpoases_.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,20 +314,20 @@ def qpoases_solve_qp(
predefined_options: Optional[str] = None,
**kwargs,
) -> Optional[np.ndarray]:
"""Solve a quadratic program using qpOASES.
r"""Solve a quadratic program using qpOASES.
The quadratic program is defined as:
.. math::
\\begin{split}\\begin{array}{ll}
\\underset{x}{\\mbox{minimize}} &
\\frac{1}{2} x^T P x + q^T x \\\\
\\mbox{subject to}
& G x \\leq h \\\\
& A x = b \\\\
& lb \\leq x \\leq ub
\\end{array}\\end{split}
\begin{split}\begin{array}{ll}
\underset{x}{\mbox{minimize}} &
\frac{1}{2} x^T P x + q^T x \\
\mbox{subject to}
& G x \leq h \\
& A x = b \\
& lb \leq x \leq ub
\end{array}\end{split}
It is solved using `qpOASES <https://github.com/coin-or/qpOASES>`__.
Expand Down
42 changes: 21 additions & 21 deletions qpsolvers/solvers/qpswift_.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def qpswift_solve_problem(
verbose: bool = False,
**kwargs,
) -> Solution:
"""Solve a quadratic program using qpSWIFT.
r"""Solve a quadratic program using qpSWIFT.
Note
----
Expand Down Expand Up @@ -78,11 +78,11 @@ def qpswift_solve_problem(
.. math::
\\begin{split}\\begin{array}{cc}
\\mathrm{rank}(A) = p
\begin{split}\begin{array}{cc}
\mathrm{rank}(A) = p
&
\\mathrm{rank}([P\\ A^T\\ G^T]) = n
\\end{array}\\end{split}
\mathrm{rank}([P\ A^T\ G^T]) = n
\end{array}\end{split}
where :math:`p` is the number of rows of :math:`A` and :math:`n` is the
number of optimization variables. This is the same requirement as
Expand Down Expand Up @@ -183,20 +183,20 @@ def qpswift_solve_qp(
verbose: bool = False,
**kwargs,
) -> Optional[np.ndarray]:
"""Solve a quadratic program using qpSWIFT.
r"""Solve a quadratic program using qpSWIFT.
The quadratic program is defined as:
.. math::
\\begin{split}\\begin{array}{ll}
\\underset{x}{\\mbox{minimize}} &
\\frac{1}{2} x^T P x + q^T x \\\\
\\mbox{subject to}
& G x \\leq h \\\\
& A x = b \\\\
& lb \\leq x \\leq ub
\\end{array}\\end{split}
\begin{split}\begin{array}{ll}
\underset{x}{\mbox{minimize}} &
\frac{1}{2} x^T P x + q^T x \\
\mbox{subject to}
& G x \leq h \\
& A x = b \\
& lb \leq x \leq ub
\end{array}\end{split}
It is solved using `qpSWIFT <https://github.com/qpSWIFT/qpSWIFT>`__.
Expand All @@ -208,20 +208,20 @@ def qpswift_solve_qp(
----------
P :
Symmetric cost matrix. Together with :math:`A` and :math:`G`, it should
satisfy :math:`\\mathrm{rank}([P\\ A^T\\ G^T]) = n`, see the rank
satisfy :math:`\mathrm{rank}([P\ A^T\ G^T]) = n`, see the rank
assumptions below.
q :
Cost vector.
G :
Linear inequality constraint matrix. Together with :math:`P` and
:math:`A`, it should satisfy :math:`\\mathrm{rank}([P\\ A^T\\ G^T]) =
:math:`A`, it should satisfy :math:`\mathrm{rank}([P\ A^T\ G^T]) =
n`, see the rank assumptions below.
h :
Linear inequality constraint vector.
A :
Linear equality constraint matrix. It needs to be full row rank, and
together with :math:`P` and :math:`G` satisfy
:math:`\\mathrm{rank}([P\\ A^T\\ G^T]) = n`. See the rank assumptions
:math:`\mathrm{rank}([P\ A^T\ G^T]) = n`. See the rank assumptions
below.
b :
Linear equality constraint vector.
Expand Down Expand Up @@ -253,11 +253,11 @@ def qpswift_solve_qp(
.. math::
\\begin{split}\\begin{array}{cc}
\\mathrm{rank}(A) = p
\begin{split}\begin{array}{cc}
\mathrm{rank}(A) = p
&
\\mathrm{rank}([P\\ A^T\\ G^T]) = n
\\end{array}\\end{split}
\mathrm{rank}([P\ A^T\ G^T]) = n
\end{array}\end{split}
where :math:`p` is the number of rows of :math:`A` and :math:`n` is the
number of optimization variables. This is the same requirement as
Expand Down
18 changes: 9 additions & 9 deletions qpsolvers/solvers/quadprog_.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,20 +189,20 @@ def quadprog_solve_qp(
verbose: bool = False,
**kwargs,
) -> Optional[np.ndarray]:
"""Solve a quadratic program using quadprog.
r"""Solve a quadratic program using quadprog.
The quadratic program is defined as:
.. math::
\\begin{split}\\begin{array}{ll}
\\underset{x}{\\mbox{minimize}} &
\\frac{1}{2} x^T P x + q^T x \\\\
\\mbox{subject to}
& G x \\leq h \\\\
& A x = b \\\\
& lb \\leq x \\leq ub
\\end{array}\\end{split}
\begin{split}\begin{array}{ll}
\underset{x}{\mbox{minimize}} &
\frac{1}{2} x^T P x + q^T x \\
\mbox{subject to}
& G x \leq h \\
& A x = b \\
& lb \leq x \leq ub
\end{array}\end{split}
It is solved using `quadprog <https://pypi.python.org/pypi/quadprog/>`__.
Expand Down
18 changes: 9 additions & 9 deletions qpsolvers/solvers/scs_.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,20 +265,20 @@ def scs_solve_qp(
verbose: bool = False,
**kwargs,
) -> Optional[ndarray]:
"""Solve a quadratic program using SCS.
r"""Solve a quadratic program using SCS.
The quadratic program is defined as:
.. math::
\\begin{split}\\begin{array}{ll}
\\underset{x}{\\mbox{minimize}} &
\\frac{1}{2} x^T P x + q^T x \\\\
\\mbox{subject to}
& G x \\leq h \\\\
& A x = b \\\\
& lb \\leq x \\leq ub
\\end{array}\\end{split}
\begin{split}\begin{array}{ll}
\underset{x}{\mbox{minimize}} &
\frac{1}{2} x^T P x + q^T x \\
\mbox{subject to}
& G x \leq h \\
& A x = b \\
& lb \leq x \leq ub
\end{array}\end{split}
It is solved using `SCS <https://github.com/cvxgrp/scs>`__.
Expand Down

0 comments on commit 32c9545

Please sign in to comment.