[gecode-users] A constrain with 3 IntVar

amina kemmar kemmami at hotmail.com
Sat Aug 29 12:22:34 CEST 2009


Hi,

I am writing a new constraint "NewConstraint", which takes 3 IntVar as arguments :

#include <algorithm>
#include <gecode/int.hh>

namespace Gecode {

  using namespace Int;

  void NewConstraint(Space& home, IntVar x0, IntVar x1, IntVar x3) {
    
    if (home.failed()) return;

    //  Creation of an array x, which contains the 3 variables x0,x1,x2;
    //  .....

    // ViewArray<IntView> xv(home,x); 
    // GECODE_ES_FAIL(home, NewConstraint::Diff<IntView>::post(home,xv)); 
  }
}

To post the constraint  i need to create a ViewArray, but i don't understand how to create an IntVarArg  containing these variables ?

Thank you.

Amina

_________________________________________________________________
Avec Windows Live, vous organisez, retouchez et partagez vos photos.
http://www.microsoft.com/northafrica/windows/windowslive/products/photo-gallery-edit.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20090829/aa7a6bb2/attachment.htm>


More information about the gecode-users mailing list