> I allocate my matrix with the size I need (and not with something like > ia[1000+1], ja[1000+1], as shown in the first example of the doc).
> But, later in my algorithm, I add some more columns: > glp_add_cols() and glp_set_mat_col() > Should I have allocated my matrix with a larger size? No, you should not. Once glp_load_matrix has loaded the constraint matrix, the arrays ia, ja, and ar are no longer needed (and can be deallocated), because the constraint matrix itself is stored in the glp_prob program object. Note that you could load the constraint matrix elements by rows or by columns with routines glp_set_mat_row and glp_set_mat_col rather than use glp_load_matrix. _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
