[gecode-users] ViewArray::drop_lst(int i) ... not equal to ViewArray::size(i+1) !?!?!

Martin Mann mmann at informatik.uni-freiburg.de
Tue Oct 10 17:24:25 CEST 2006


Hi,

reading the ViewArray documentation for 'drop_lst(int i)' I expected 
that it skips all elements after index i.
Therefore it should be equal to 'size(i+1)'.

But unfortunatly it doesn't do anything like that!

The implementation I found is:

=====================================
template <class View>
forceinline void
ViewArray<View>::drop_lst(int i) {
   // Drop elements from i+1..n-1
   assert(i<n);
   n = i+i;
}
=====================================

Think it's a typing error and it should be:

    n = i+1;

Hope that's correct,

Martin





More information about the gecode-users mailing list