~ubuntu-branches/debian/stretch/gecode/stretch

« back to all changes in this revision

Viewing changes to examples/sudoku.cpp

  • Committer: Package Import Robot
  • Author(s): Kari Pahula
  • Date: 2013-05-25 15:57:32 UTC
  • mfrom: (1.1.17)
  • Revision ID: package-import@ubuntu.com-20130525155732-bltd8lu9my9borhk
Tags: 4.0.0-2
Give make check LD_LIBRARY_PATH=. to make test work without gecode
already installed, to fix FTBFS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 *     Christian Schulte, 2005
12
12
 *
13
13
 *  Last modified:
14
 
 *     $Date: 2010-10-07 20:52:01 +1100 (Thu, 07 Oct 2010) $ by $Author: schulte $
15
 
 *     $Revision: 11473 $
 
14
 *     $Date: 2013-02-19 13:26:08 +0100 (Tue, 19 Feb 2013) $ by $Author: schulte $
 
15
 *     $Revision: 13313 $
16
16
 *
17
17
 *  This file is part of Gecode, the generic constraint
18
18
 *  development environment:
173
173
    }
174
174
#endif
175
175
    if (opt.branching() == BRANCH_NONE) {
176
 
      branch(*this, x, INT_VAR_NONE, INT_VAL_SPLIT_MIN);
 
176
      branch(*this, x, INT_VAR_NONE(), INT_VAL_SPLIT_MIN());
177
177
    } else if (opt.branching() == BRANCH_SIZE) {
178
 
      branch(*this, x, INT_VAR_SIZE_MIN, INT_VAL_SPLIT_MIN);
 
178
      branch(*this, x, INT_VAR_SIZE_MIN(), INT_VAL_SPLIT_MIN());
179
179
    } else if (opt.branching() == BRANCH_SIZE_DEGREE) {
180
 
      branch(*this, x, INT_VAR_SIZE_DEGREE_MIN, INT_VAL_SPLIT_MIN);
 
180
      branch(*this, x, INT_VAR_DEGREE_SIZE_MAX(), INT_VAL_SPLIT_MIN());
181
181
    } else if (opt.branching() == BRANCH_SIZE_AFC) {
182
 
      branch(*this, x, INT_VAR_SIZE_AFC_MIN, INT_VAL_SPLIT_MIN);
 
182
      branch(*this, x, INT_VAR_AFC_SIZE_MAX(opt.decay()), INT_VAL_SPLIT_MIN());
183
183
    } else if (opt.branching() == BRANCH_AFC) {
184
 
      branch(*this, x, INT_VAR_AFC_MAX, INT_VAL_SPLIT_MIN);
 
184
      branch(*this, x, INT_VAR_AFC_MAX(opt.decay()), INT_VAL_SPLIT_MIN());
185
185
    }
186
186
  }
187
187
 
309
309
          dom(*this, y[idx-1], SRT_SUP, (i+1)+(j*nn) );
310
310
 
311
311
    if (opt.branching() == BRANCH_NONE) {
312
 
      branch(*this, y, SET_VAR_NONE, SET_VAL_MIN_INC);
 
312
      branch(*this, y, SET_VAR_NONE(), SET_VAL_MIN_INC());
313
313
    } else if (opt.branching() == BRANCH_SIZE) {
314
 
      branch(*this, y, SET_VAR_SIZE_MIN, SET_VAL_MIN_INC);
 
314
      branch(*this, y, SET_VAR_SIZE_MIN(), SET_VAL_MIN_INC());
315
315
    } else if (opt.branching() == BRANCH_SIZE_DEGREE) {
316
 
      branch(*this, y, SET_VAR_SIZE_DEGREE_MIN, SET_VAL_MIN_INC);
 
316
      branch(*this, y, SET_VAR_DEGREE_SIZE_MAX(), SET_VAL_MIN_INC());
317
317
    } else if (opt.branching() == BRANCH_SIZE_AFC) {
318
 
      branch(*this, y, SET_VAR_SIZE_AFC_MIN, SET_VAL_MIN_INC);
 
318
      branch(*this, y, SET_VAR_AFC_SIZE_MAX(opt.decay()), SET_VAL_MIN_INC());
319
319
    } else if (opt.branching() == BRANCH_AFC) {
320
 
      branch(*this, y, SET_VAR_AFC_MAX, SET_VAL_MIN_INC);
 
320
      branch(*this, y, SET_VAR_AFC_MAX(opt.decay()), SET_VAL_MIN_INC());
321
321
    }
322
322
  }
323
323