help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] glp_transform_row/col: len' <= len or other means of sel


From: Andrew Makhorin
Subject: Re: [Help-glpk] glp_transform_row/col: len' <= len or other means of selecting ind/val array lengths?
Date: Wed, 30 Apr 2014 04:08:42 +0400

> When using glp_transform_row/col, is there a guarantee that len' <= len 

No, len' can be greater than len.

> or is there another means of selecting an appropriate length to use for 
> allocating memory for the arrays ind and val?

Glp_transform_row guarantees that 0 <= len' <= n, where n is the current
number of columns in the glp_prob object, and glp_transform_col
guarantees that 0 <= len' <= m, where m is the current number of rows.
So you should reserve 1+n or 1+m locations for ind and val (since
location 0 is not used).

For more details please consult the glpk reference manual.





reply via email to

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