coin-or / Clp.old

This a mirror of the subversion repository on COIN-OR.
https://projects.coin-or.org/Clp
Other
36 stars 20 forks source link

[TRAC] ClpPackedMatrix::transposeTimes() code and specification mismatch #50

Closed qtothec closed 5 years ago

qtothec commented 5 years ago

Moved from TRAC as part of COIN fORgery: https://projects.coin-or.org/Clp/ticket/35

Hi,

I have CBC 2.4. I wanted to use the function ClpPackedMatrix::transposeTimes(const ClpSimplex? * model, double scalar,

const CoinIndexedVector? * rowArray, CoinIndexedVector? * y, CoinIndexedVector? * columnArray) const

The specification says:

/* Return <code>x * A + y</code> in <code>z</code>.`

Squashes small elements and knows about ClpSimplex? */

However, in the body of this function at line 575 there is the following check:

assert (!y->getNumElements());

In other word, y must be empty. Then, it seems that this function is able to compute only x A, contrary to the specification. Or, have I misunderstood something?

Thank you for providing feedback,

Tamas Kis

jjhforrest commented 5 years ago

Thanks - code has changed - should be empty - changed comments