Hello Andrew,

currently

glp_set_mat_col()
glp_set_mat_row()
glp_load_matrix()

may be used to place zero valued coefficients in the sparse matrix
stored as structure GLPAIJ.

These zero values are not needed in any way by GLPK.

It is left to the calling problem to avoid passing zeros.

I suggest to change above functions to check the value of coefficients
and to simply ignore any zero values.

A simple

if (0 == val[k])
   continue;

will be sufficient.

Best regards

Heinrich Schuchardt

_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to