vendor/scs/src/normalize.c in scs-0.3.1 vs vendor/scs/src/normalize.c in scs-0.3.2

- old
+ new

@@ -2,50 +2,50 @@ #include "linalg.h" #include "scs.h" /* needed for normalizing the warm-start */ -void SCS(normalize_sol)(ScsWork *w, ScsSolution *sol) { +void SCS(normalize_sol)(ScsScaling *scal, ScsSolution *sol) { scs_int i; - scs_float *D = w->scal->D; - scs_float *E = w->scal->E; - for (i = 0; i < w->n; ++i) { - sol->x[i] /= (E[i] / w->scal->dual_scale); + scs_float *D = scal->D; + scs_float *E = scal->E; + for (i = 0; i < scal->n; ++i) { + sol->x[i] /= (E[i] / scal->dual_scale); } - for (i = 0; i < w->m; ++i) { - sol->y[i] /= (D[i] / w->scal->primal_scale); + for (i = 0; i < scal->m; ++i) { + sol->y[i] /= (D[i] / scal->primal_scale); } - for (i = 0; i < w->m; ++i) { - sol->s[i] *= (D[i] * w->scal->dual_scale); + for (i = 0; i < scal->m; ++i) { + sol->s[i] *= (D[i] * scal->dual_scale); } } -void SCS(un_normalize_sol)(ScsWork *w, ScsSolution *sol) { +void SCS(un_normalize_sol)(ScsScaling *scal, ScsSolution *sol) { scs_int i; - scs_float *D = w->scal->D; - scs_float *E = w->scal->E; - for (i = 0; i < w->n; ++i) { - sol->x[i] *= (E[i] / w->scal->dual_scale); + scs_float *D = scal->D; + scs_float *E = scal->E; + for (i = 0; i < scal->n; ++i) { + sol->x[i] *= (E[i] / scal->dual_scale); } - for (i = 0; i < w->m; ++i) { - sol->y[i] *= (D[i] / w->scal->primal_scale); + for (i = 0; i < scal->m; ++i) { + sol->y[i] *= (D[i] / scal->primal_scale); } - for (i = 0; i < w->m; ++i) { - sol->s[i] /= (D[i] * w->scal->dual_scale); + for (i = 0; i < scal->m; ++i) { + sol->s[i] /= (D[i] * scal->dual_scale); } } -void SCS(un_normalize_primal)(ScsWork *w, scs_float *r) { +void SCS(un_normalize_primal)(ScsScaling *scal, scs_float *r) { scs_int i; - scs_float *D = w->scal->D; - for (i = 0; i < w->m; ++i) { - r[i] /= (D[i] * w->scal->dual_scale); + scs_float *D = scal->D; + for (i = 0; i < scal->m; ++i) { + r[i] /= (D[i] * scal->dual_scale); } } -void SCS(un_normalize_dual)(ScsWork *w, scs_float *r) { +void SCS(un_normalize_dual)(ScsScaling *scal, scs_float *r) { scs_int i; - scs_float *E = w->scal->E; - for (i = 0; i < w->n; ++i) { - r[i] /= (E[i] * w->scal->primal_scale); + scs_float *E = scal->E; + for (i = 0; i < scal->n; ++i) { + r[i] /= (E[i] * scal->primal_scale); } }