[CoinUtils-tickets] [COIN-OR Common Utilities] #23: CoinPackedVector::append duplicate index test fails

COIN-OR Common Utilities coin-trac at coin-or.org
Tue Mar 6 10:57:20 EST 2007


#23: CoinPackedVector::append duplicate index test fails
------------------------+---------------------------------------------------
 Reporter:  stefan      |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  major       |   Milestone:          
Component:  component1  |     Version:  1.0     
 Keywords:              |  
------------------------+---------------------------------------------------
 Hi,

 in the method CoinPackedVector::append(const !CoinPackedVectorBase &
 caboose),
 first the vector caboose is appended to *this, and then a check for
 duplicate indices is performed. In this test, it is checked whether any
 index from caboose exists also in *this. Since caboose was just appended
 to *this before, this will always fail (unless caboose was empty or
 _indexSetPtr was set before).

 I guess, that the check for a duplicate index should come before, or since
 the method CoinPackedVectorBase::indexSet already does a check for
 duplicate indices, it suffices to remove the old indexSetPtr_ and call
 indexSet() after appending caboose to *this.

 I'm using !CoinUtils 1.0.4.

 Stefan

-- 
Ticket URL: <https://projects.coin-or.org/CoinUtils/ticket/23>
COIN-OR Common Utilities <http://projects.coin-or.org/CoinUtils>
Common data structures and linear algebra functions for COIN-OR projects



More information about the CoinUtils-tickets mailing list