help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Zero valued coefficients


From: Heinrich Schuchardt
Subject: [Help-glpk] Zero valued coefficients
Date: Tue, 25 Aug 2015 19:37:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0

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

Attachment: Attached Message Part
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]