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
_______________________________________________
Gecode users mailing list
us...@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to