logoalt Hacker News

mzllast Saturday at 3:26 PM2 repliesview on HN

Adding to wavemode, the Sudoku example is a good starting point: https://github.com/Gecode/gecode/blob/master/examples/sudoku...

In the documentation (https://www.gecode.org/doc-latest/MPG.pdf) there are a lot of worked examples as well.


Replies

CamperBob2last Saturday at 6:25 PM

    for (int i=0; i<nn; i++) {
      distinct(*this, m.row(i), opt.ipl());
      distinct(*this, m.col(i), opt.ipl());
    }
Weird way to use C++, passing *this to everything explicitly, but maybe they have a reason.
show 1 reply
ur-whalelast Saturday at 4:03 PM

Yes, I found those.

The point is to make the example front and center on the homepage so as to very quickly show what this is about to the casual passer-by.