Skip to content

Commit

Permalink
docs tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bodono committed Jan 11, 2022
1 parent ff8ebc7 commit b70c886
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions docs/src/examples/c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ C code to solve this is below.
:language: c

After following the CMake :ref:`install instructions <c_install>`, we can
compile the code using (assuming the library was installed in
:code:`/usr/local/`):
compile the code (assuming the library was installed in
:code:`/usr/local/`) using:

.. code::
gcc -I/usr/local/include/scs -L/usr/local/lib/ -lscsdir qp.c -o qp.out
.. ./qp.out > qp.c.out
Then running the binary yields output
Then running the binary yields output:

.. literalinclude:: qp.c.out
:language: none
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/matlab.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Python code to solve this is below.
:language: matlab

After following the matlab :ref:`install instructions <matlab_install>`, we can
run the code yielding output
run the code yielding output:

.. matlab -r "run ~/git/scs/docs/src/examples/qp.m;exit"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Python code to solve this is below.
:language: python

After following the python :ref:`install instructions <python_install>`, we can
run the code yielding output
run the code yielding output:

.. python qp.py > qp.py.out
Expand Down
10 changes: 5 additions & 5 deletions docs/src/examples/qp.prob
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ In this example we shall solve the following small quadratic program:

.. math::
\begin{array}{ll}
\mbox{minimize} & \frac{1}{2} x^T \begin{bmatrix}3 & -1\\ -1 & 2 \end{bmatrix}
\mbox{minimize} & (1/2) x^T \begin{bmatrix}3 & -1\\ -1 & 2 \end{bmatrix}
x + \begin{bmatrix}-1 \\ -1\end{bmatrix}^T x \\
\mbox{subject to} & \begin{bmatrix} -1 & 1\\ 1 & 0\\ 0 & 1\end{bmatrix} x \leq \begin{bmatrix}-1 \\ 0.3 \\ -0.5\end{bmatrix}
\end{array}
Expand All @@ -12,11 +12,11 @@ over variable :math:`x \in \mathbf{R}^2`. This problem corresponds to data:

.. math::
\begin{array}{cccc}
P = \begin{bmatrix}3 & -1\\ -1 & 2 \end{bmatrix}, &
A = \begin{bmatrix}-1 & 1\\ 1 & 0\\ 0 & 1\end{bmatrix}, &
P = \begin{bmatrix}3 & -1\\ -1 & 2 \end{bmatrix}, &
A = \begin{bmatrix}-1 & 1\\ 1 & 0\\ 0 & 1\end{bmatrix}, &
b = \begin{bmatrix}-1 \\ 0.3 \\ -0.5\end{bmatrix}, &
c = \begin{bmatrix}-1 \\ -1\end{bmatrix}
c = \begin{bmatrix}-1 \\ -1\end{bmatrix}.
\end{array}

The cone :math:`\mathcal{K}` is simply the positive orthant :code:`l` of
And the cone :math:`\mathcal{K}` is the positive orthant :code:`l` of
dimension 3.
18 changes: 9 additions & 9 deletions docs/src/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ over variables
:header-rows: 0

* - :math:`x \in \mathbf{R}^n`
- primal variable

* - :math:`s \in \mathbf{R}^m`
- slack variable
- primal variable

* - :math:`y \in \mathbf{R}^m`
- dual variable
- dual variable

* - :math:`s \in \mathbf{R}^m`
- slack variable

with data

Expand All @@ -56,13 +56,13 @@ with data
:header-rows: 0

* - :math:`A \in \mathbf{R}^{m \times n}`
- sparse data matrix
- sparse data matrix, see :ref:`matrices`
* - :math:`P \in \mathbf{S}_+^{n}`
- sparse **symmetric positive semidefinite** matrix
- sparse, symmetric positive semidefinite matrix
* - :math:`c \in \mathbf{R}^n`
- dense primal cost vector
- dense primal cost vector
* - :math:`b \in \mathbf{R}^m`
- dense dual cost vector
- dense dual cost vector
* - :math:`\mathcal{K} \subseteq \mathbf{R}^m`
- nonempty, closed, convex cone, see :ref:`cones`
* - :math:`\mathcal{K}^* \subseteq \mathbf{R}^m`
Expand Down

0 comments on commit b70c886

Please sign in to comment.