[Coin-osi-devel] OsiRowCut question
Francois Margot
fmargot at andrew.cmu.edu
Tue Apr 11 18:35:15 EDT 2006
>From what I understand, it seems that to create an OsiRowCut,
I have to create a CoinPackedVector or arrays with the coefficients and
indices. Then these objects are copied when the OsiRowCut is created.
This seems to be a waste when the CoinPackedVector (or arrays)
is constructed only to create the OsiRowCut (something that happens
constantly with cut generators). Am I overlooking something?
If not, I would like to have a method
OsiRowCut::OsiRowCut(double lb, double ub,
int size, int *colIndices, double *elements);
that creates an OsiRowCut using colIndices and elements as they are,
without copying them, assuming ownership of the memory,
and setting the two parameters to NULL on return. A similar method
for CoinPackedVector parameter might be useful too.
As I understand the code, this might imply to modify CoinPackedVector
by adding a constructor there too.
Francois
More information about the Osi
mailing list