[gecode-users] Queens without using post

Mauricio Toro mauriciotorob at gmail.com
Wed Feb 20 16:16:32 CET 2008


Hello,
Can somebody help to rewrite this code without using post

  Queens(const SizeOptions& opt)

    : q(this,opt.size(),0,opt.size()-1) {

    const int n = q.size();

    switch (opt.propagation()) {

    case PROP_BINARY:

      for (int i = 0; i<n; i++)

        for (int j = i+1; j<n; j++) {

          post(this, q[i] != q[j]);

          post(this, q[i]+i != q[j]+j);

          post(this, q[i]-i != q[j]-j);

        }


It is taken from the queens example.

It will be used for the Common Lisp port examples.

We have not ported "post" for Common Lisp yet.


Thanks

-- 
Mauricio Toro Bermudez
Estudiante de Ingeniería de Sistemas
Pontificia Universidad Javeriana, Colombia

Stagiare à l'Ircam
1, place Igor-Stravinsky 75004 Paris,
France de 2008 à 2009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20080220/6be4958c/attachment.htm>


More information about the gecode-users mailing list