[Top][All Lists]

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

Re: [Help-glpk] Got a wrong order of column by lpx_get_mat_row(lp, j, nd

From: Michael Hennebry
Subject: Re: [Help-glpk] Got a wrong order of column by lpx_get_mat_row(lp, j, ndx, val)?
Date: Wed, 19 Jan 2005 09:31:24 -0600 (CST)

On Wed, 19 Jan 2005, [iso-2022-jp] ロ コクユウ瘢雹 wrote:

> Dose anyone meet this problem:
> for example  in jth row :  a*x-y+b*z=0;
> by len=lpx_get_mat_row(lp, j, ndx, val), I found val=[-1,a,b], that mean the
> order of column is y,x,z.
> I added two new columns to this row like:
> ndx[len+1]=w, ndx[len+2]=v, val[len+1]=d, val[len+2]=e, len+=2
> lpx_set_mat_row(lp,j,len,ndx,val)
> then I thought the jth row should be a*x-y+b*z+d*w+e*v=0, but when I tried
> len=lpx_get_mat_row(lp, j, ndx, val) again,
> I found it's d*w+e*v+a*x-y+b*z=0.
> I wonder whether the order of columns in row is fixed and how the order of
> columns in a row is arranged there.

My recollection is that there is nothing in the documentation
that says lpx_get_mat_row will always return columns in the same order.
Not even if you don't edit the problem.

Mike   address@hidden
"Our gods are dead.  Ancient Klingon warriors slew them
... they were more trouble than they were worth."          --  Worf

reply via email to

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