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.
In the documentation (https://www.gecode.org/doc-latest/MPG.pdf) there are a lot of worked examples as well.
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.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.