MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / lu_clear_lhs

Function lu_clear_lhs

highs/ipm/basiclu/basiclu_object.c:102–118  ·  view source on GitHub ↗

* lu_clear_lhs() - reset contents of lhs to zero */

Source from the content-addressed store, hash-verified

100 * lu_clear_lhs() - reset contents of lhs to zero
101 */
102static void lu_clear_lhs(struct basiclu_object *obj)
103{
104 lu_int m = obj->xstore[BASICLU_DIM];
105 lu_int nzsparse = obj->xstore[BASICLU_SPARSE_THRESHOLD] * m;
106 lu_int nz = obj->nzlhs;
107 lu_int p;
108
109 if (nz)
110 {
111 if (nz <= nzsparse)
112 for (p = 0; p < nz; p++)
113 obj->lhs[obj->ilhs[p]] = 0;
114 else
115 memset(obj->lhs, 0, m*sizeof(double));
116 obj->nzlhs = 0;
117 }
118}
119
120/*
121 * basiclu_obj_initialize()

Callers 2

basiclu_obj_solve_sparseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected