[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-glpk] bug found in the routines glp_set_mat_row and glp_set_mat_col
From: |
Andrew Makhorin |
Subject: |
[Bug-glpk] bug found in the routines glp_set_mat_row and glp_set_mat_col |
Date: |
Wed, 5 Sep 2007 08:42:44 +0400 |
A bug was found in the api routines glp_set_mat_row and glp_set_mat_col.
The bug appears only if a row/column to be set or changed contains zero
elements.
To fix the bug please insert one line in the routine glp_set_mat_row
(file glpapi01.c) as follows:
709 /* remove the element from the column list */
710 xassert(aij->c_prev == NULL);
711 aij->col->ptr = aij->c_next;
+++>>> if (aij->c_next != NULL) aij->c_next->c_prev = NULL;
712 /* return the element to the memory pool */
and another line in the routine glp_set_mat_col as follows:
814 { /* remove the element from the row list */
815 xassert(aij->r_prev == NULL);
816 aij->row->ptr = aij->r_next;
+++>>> if (aij->r_next != NULL) aij->r_next->r_prev = NULL;
817 /* remove the element from the column list */
Andrew Makhorin
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-glpk] bug found in the routines glp_set_mat_row and glp_set_mat_col,
Andrew Makhorin <=