vendor/scs/include/linsys.h in scs-0.3.1 vs vendor/scs/include/linsys.h in scs-0.3.2
- old
+ new
@@ -3,10 +3,11 @@
#ifdef __cplusplus
extern "C" {
#endif
+#include "glbopts.h"
#include "scs.h"
/* This is the API that any new linear system solver must implement */
/* Struct containing linear system workspace. Implemented by linear solver. */
@@ -14,37 +15,36 @@
/* typedef struct SCS_LIN_SYS_WORK ScsLinSysWork; */
/**
* Initialize `ScsLinSysWork` structure and perform any necessary preprocessing.
*
- * @param A A data matrix.
- * @param P P data matrix.
- * @param rho_y_vec `rho_y > 0` diagonal entries.
- * @param rho_x `rho_x > 0` float.
+ * @param A `A` data matrix, `m x n`.
+ * @param P `P` data matrix, `n x n`.
+ * @param diag_r `R > 0` diagonal entries of length `m + n`.
* @return Linear system solver workspace.
*
*/
ScsLinSysWork *SCS(init_lin_sys_work)(const ScsMatrix *A, const ScsMatrix *P,
- scs_float *rho_y_vec, scs_float rho_x);
+ const scs_float *diag_r);
/**
* Frees `ScsLinSysWork` structure and associated allocated memory.
*
* @param w Linear system private workspace.
*/
void SCS(free_lin_sys_work)(ScsLinSysWork *w);
/**
- * Solves the linear system required by SCS at each iteration:
+ * Solves the linear system as required by SCS at each iteration:
* \f[
* \begin{bmatrix}
- * (\rho_x I + P) & A^\top \\
- * A & -\mathrm{diag}(\rho_y) \\
+ * (R_x + P) & A^\top \\
+ * A & -R_y \\
* \end{bmatrix} x = b
* \f]
*
- * for `x`. Overwrites `b` with result.
+ * for `x`, where `diag(R_x, R_y) = R`. Overwrites `b` with result.
*
* @param w Linear system private workspace.
* @param b Right hand side, contains solution at the end.
* @param s Contains warm-start (may be NULL).
* @param tol Tolerance required for the system solve.
@@ -52,18 +52,18 @@
*
*/
scs_int SCS(solve_lin_sys)(ScsLinSysWork *w, scs_float *b, const scs_float *s,
scs_float tol);
/**
- * Update the linsys workspace when `rho_y_vec` is changed. For example, a
+ * Update the linsys workspace when `R` is changed. For example, a
* direct method for solving the linear system might need to update the
* factorization of the matrix.
*
- * @param w Linear system private workspace.
- * @param rho_y_vec `rho_y` diagonal entries.
+ * @param w Linear system private workspace.
+ * @param new_diag_r Updated `diag_r`, diagonal entries of R.
*
*/
-void SCS(update_lin_sys_rho_y_vec)(ScsLinSysWork *w, scs_float *rho_y_vec);
+void SCS(update_lin_sys_diag_r)(ScsLinSysWork *w, const scs_float *new_diag_r);
/**
* Name of the linear solver.
*
* @return name of method.