Generated on Sat Feb 7 2015 02:01:15 for Gecode by doxygen 1.8.9.1
branch.hh
Go to the documentation of this file.
1 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2 /*
3  * Main authors:
4  * Christian Schulte <schulte@gecode.org>
5  *
6  * Copyright:
7  * Christian Schulte, 2012
8  *
9  * Last modified:
10  * $Date: 2013-07-08 19:23:25 +0200 (Mon, 08 Jul 2013) $ by $Author: schulte $
11  * $Revision: 13827 $
12  *
13  * This file is part of Gecode, the generic constraint
14  * development environment:
15  * http://www.gecode.org
16  *
17  * Permission is hereby granted, free of charge, to any person obtaining
18  * a copy of this software and associated documentation files (the
19  * "Software"), to deal in the Software without restriction, including
20  * without limitation the rights to use, copy, modify, merge, publish,
21  * distribute, sublicense, and/or sell copies of the Software, and to
22  * permit persons to whom the Software is furnished to do so, subject to
23  * the following conditions:
24  *
25  * The above copyright notice and this permission notice shall be
26  * included in all copies or substantial portions of the Software.
27  *
28  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
33  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
34  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35  *
36  */
37 
38 #ifndef __GECODE_INT_BRANCH_HH__
39 #define __GECODE_INT_BRANCH_HH__
40 
41 #include <gecode/int.hh>
42 
48 namespace Gecode { namespace Int { namespace Branch {
49 
68  template<class View>
69  class MeritMin : public MeritBase<View,int> {
70  public:
72  MeritMin(Space& home, const VarBranch& vb);
74  MeritMin(Space& home, bool shared, MeritMin& m);
76  int operator ()(const Space& home, View x, int i);
77  };
78 
85  template<class View>
86  class MeritMax : public MeritBase<View,int> {
87  public:
89  MeritMax(Space& home, const VarBranch& vb);
91  MeritMax(Space& home, bool shared, MeritMax& m);
93  int operator ()(const Space& home, View x, int i);
94  };
95 
102  template<class View>
103  class MeritSize : public MeritBase<View,unsigned int> {
104  public:
106  MeritSize(Space& home, const VarBranch& vb);
108  MeritSize(Space& home, bool shared, MeritSize& m);
110  unsigned int operator ()(const Space& home, View x, int i);
111  };
112 
119  template<class View>
120  class MeritDegreeSize : public MeritBase<View,double> {
121  public:
123  MeritDegreeSize(Space& home, const VarBranch& vb);
125  MeritDegreeSize(Space& home, bool shared, MeritDegreeSize& m);
127  double operator ()(const Space& home, View x, int i);
128  };
129 
136  template<class View>
137  class MeritAFCSize : public MeritBase<View,double> {
138  protected:
141  public:
143  MeritAFCSize(Space& home, const VarBranch& vb);
145  MeritAFCSize(Space& home, bool shared, MeritAFCSize& m);
147  double operator ()(const Space& home, View x, int i);
149  bool notice(void) const;
151  void dispose(Space& home);
152  };
153 
160  template<class View>
161  class MeritActivitySize : public MeritBase<View,double> {
162  protected:
165  public:
167  MeritActivitySize(Space& home, const VarBranch& vb);
171  double operator ()(const Space& home, View x, int i);
173  bool notice(void) const;
175  void dispose(Space& home);
176  };
177 
184  template<class View>
185  class MeritRegretMin : public MeritBase<View,unsigned int> {
186  public:
188  MeritRegretMin(Space& home, const VarBranch& vb);
190  MeritRegretMin(Space& home, bool shared, MeritRegretMin& m);
192  unsigned int operator ()(const Space& home, View x, int i);
193  };
194 
201  template<class View>
202  class MeritRegretMax : public MeritBase<View,unsigned int> {
203  public:
205  MeritRegretMax(Space& home, const VarBranch& vb);
207  MeritRegretMax(Space& home, bool shared, MeritRegretMax& m);
209  unsigned int operator ()(const Space& home, View x, int i);
210  };
211 
212 }}}
213 
215 
216 namespace Gecode { namespace Int { namespace Branch {
217 
220  ViewSel<IntView>* viewselint(Space& home, const IntVarBranch& ivb);
223  ViewSel<BoolView>* viewselbool(Space& home, const IntVarBranch& ivb);
224 
225 }}}
226 
227 namespace Gecode { namespace Int { namespace Branch {
228 
247  template<class View>
248  class ValSelMin : public ValSel<View,int> {
249  public:
251  ValSelMin(Space& home, const ValBranch& vb);
253  ValSelMin(Space& home, bool shared, ValSelMin& vs);
255  int val(const Space& home, View x, int i);
256  };
257 
264  template<class View>
265  class ValSelMax : public ValSel<View,int> {
266  public:
268  ValSelMax(Space& home, const ValBranch& vb);
270  ValSelMax(Space& home, bool shared, ValSelMax& vs);
272  int val(const Space& home, View x, int i);
273  };
274 
281  template<class View>
282  class ValSelMed : public ValSel<View,int> {
283  public:
285  ValSelMed(Space& home, const ValBranch& vb);
287  ValSelMed(Space& home, bool shared, ValSelMed& vs);
289  int val(const Space& home, View x, int i);
290  };
291 
298  template<class View>
299  class ValSelAvg : public ValSel<View,int> {
300  public:
302  ValSelAvg(Space& home, const ValBranch& vb);
304  ValSelAvg(Space& home, bool shared, ValSelAvg& vs);
306  int val(const Space& home, View x, int i);
307  };
308 
315  template<class View>
316  class ValSelRnd : public ValSel<View,int> {
317  protected:
320  public:
322  ValSelRnd(Space& home, const ValBranch& vb);
324  ValSelRnd(Space& home, bool shared, ValSelRnd& vs);
326  int val(const Space& home, View x, int i);
328  bool notice(void) const;
330  void dispose(Space& home);
331  };
332 
339  class ValSelRangeMin : public ValSel<IntView,int> {
340  public:
342  ValSelRangeMin(Space& home, const ValBranch& vb);
344  ValSelRangeMin(Space& home, bool shared, ValSelRangeMin& vs);
346  int val(const Space& home, IntView x, int i);
347  };
348 
355  class ValSelRangeMax : public ValSel<IntView,int> {
356  public:
358  ValSelRangeMax(Space& home, const ValBranch& vb);
360  ValSelRangeMax(Space& home, bool shared, ValSelRangeMax& vs);
362  int val(const Space& home, IntView x, int i);
363  };
364 
371  template<class View, bool min>
372  class ValSelNearMinMax : public ValSel<View,int> {
373  protected:
376  public:
378  ValSelNearMinMax(Space& home, const ValBranch& vb);
380  ValSelNearMinMax(Space& home, bool shared, ValSelNearMinMax& vs);
382  int val(const Space& home, View x, int i);
384  bool notice(void) const;
386  void dispose(Space& home);
387  };
388 
395  template<class View, bool inc>
396  class ValSelNearIncDec : public ValSel<View,int> {
397  protected:
400  public:
402  ValSelNearIncDec(Space& home, const ValBranch& vb);
404  ValSelNearIncDec(Space& home, bool shared, ValSelNearIncDec& vs);
406  int val(const Space& home, View x, int i);
408  bool notice(void) const;
410  void dispose(Space& home);
411  };
412 
413 }}}
414 
416 
417 namespace Gecode { namespace Int { namespace Branch {
418 
420  template<class View>
421  class EqNGL : public ViewValNGL<View,int,PC_INT_VAL> {
424  public:
426  EqNGL(Space& home, View x, int n);
428  EqNGL(Space& home, bool share, EqNGL& ngl);
430  virtual NGL::Status status(const Space& home) const;
432  virtual ExecStatus prune(Space& home);
434  virtual NGL* copy(Space& home, bool share);
435  };
436 
438  template<class View>
439  class NqNGL : public ViewValNGL<View,int,PC_INT_DOM> {
442  public:
444  NqNGL(Space& home, View x, int n);
446  NqNGL(Space& home, bool share, NqNGL& ngl);
448  virtual NGL::Status status(const Space& home) const;
450  virtual ExecStatus prune(Space& home);
452  virtual NGL* copy(Space& home, bool share);
453  };
454 
456  template<class View>
457  class LqNGL : public ViewValNGL<View,int,PC_INT_BND> {
460  public:
462  LqNGL(Space& home, View x, int n);
464  LqNGL(Space& home, bool share, LqNGL& ngl);
466  virtual NGL::Status status(const Space& home) const;
468  virtual ExecStatus prune(Space& home);
470  virtual NGL* copy(Space& home, bool share);
471  };
472 
474  template<class View>
475  class GqNGL : public ViewValNGL<View,int,PC_INT_BND> {
478  public:
480  GqNGL(Space& home, View x, int n);
482  GqNGL(Space& home, bool share, GqNGL& ngl);
484  virtual NGL::Status status(const Space& home) const;
486  virtual ExecStatus prune(Space& home);
488  virtual NGL* copy(Space& home, bool share);
489  };
490 
491 }}}
492 
493 #include <gecode/int/branch/ngl.hpp>
494 
495 namespace Gecode { namespace Int { namespace Branch {
496 
515  template<class View>
516  class ValCommitEq : public ValCommit<View,int> {
517  public:
519  ValCommitEq(Space& home, const ValBranch& vb);
521  ValCommitEq(Space& home, bool shared, ValCommitEq& vc);
523  ModEvent commit(Space& home, unsigned int a, View x, int i, int n);
525  NGL* ngl(Space& home, unsigned int a, View x, int n) const;
527  void print(const Space& home, unsigned int a, View x, int i, int n,
528  std::ostream& o) const;
529  };
530 
537  template<class View>
538  class ValCommitLq : public ValCommit<View,int> {
539  public:
541  ValCommitLq(Space& home, const ValBranch& vb);
543  ValCommitLq(Space& home, bool shared, ValCommitLq& vc);
545  ModEvent commit(Space& home, unsigned int a, View x, int i, int n);
547  NGL* ngl(Space& home, unsigned int a, View x, int n) const;
549  void print(const Space& home, unsigned int a, View x, int i, int n,
550  std::ostream& o) const;
551  };
552 
559  template<class View>
560  class ValCommitGq : public ValCommit<View,int> {
561  public:
563  ValCommitGq(Space& home, const ValBranch& vb);
565  ValCommitGq(Space& home, bool shared, ValCommitGq& vc);
567  ModEvent commit(Space& home, unsigned int a, View x, int i, int n);
569  NGL* ngl(Space& home, unsigned int a, View x, int n) const;
571  void print(const Space& home, unsigned int a, View x, int i, int n,
572  std::ostream& o) const;
573  };
574 
581  template<class View>
582  class ValCommitGr : public ValCommit<View,int> {
583  public:
585  ValCommitGr(Space& home, const ValBranch& vb);
587  ValCommitGr(Space& home, bool shared, ValCommitGr& vc);
589  ModEvent commit(Space& home, unsigned int a, View x, int i, int n);
591  NGL* ngl(Space& home, unsigned int a, View x, int n) const;
593  void print(const Space& home, unsigned int a, View x, int i, int n,
594  std::ostream& o) const;
595  };
596 
597 }}}
598 
600 
601 namespace Gecode { namespace Int { namespace Branch {
602 
605  ValSelCommitBase<IntView,int>*
606  valselcommitint(Space& home, int n, const IntValBranch& ivb);
607 
610  ValSelCommitBase<BoolView,int>*
611  valselcommitbool(Space& home, int n, const IntValBranch& ivb);
612 
615  ValSelCommitBase<IntView,int>*
616  valselcommitint(Space& home, const IntAssign& ia);
617 
620  ValSelCommitBase<BoolView,int>*
621  valselcommitbool(Space& home, const IntAssign& ia);
622 
623 }}}
624 
625 namespace Gecode { namespace Int { namespace Branch {
626 
631  template<int n, bool min>
632  class ViewValuesBrancher : public ViewBrancher<IntView,n> {
633  typedef typename ViewBrancher<IntView,n>::BranchFilter BranchFilter;
634  protected:
642  ViewSel<IntView>* vs[n],
643  BranchFilter bf, IntVarValPrint vvp);
644  public:
646  virtual const Choice* choice(Space& home);
648  virtual const Choice* choice(const Space& home, Archive& e);
650  virtual ExecStatus commit(Space& home, const Choice& c, unsigned int a);
652  virtual NGL* ngl(Space& home, const Choice& c, unsigned int a) const;
660  virtual void print(const Space& home, const Choice& c, unsigned int a,
661  std::ostream& o) const;
663  virtual Actor* copy(Space& home, bool share);
666  ViewSel<IntView>* vs[n],
667  BranchFilter bf, IntVarValPrint vvp);
668  };
669 
670 }}}
671 
673 
674 #endif
675 
676 // STATISTICS: int-branch
int val(const Space &home, View x, int i)
Return value of view x at position i.
Definition: val-sel.hpp:92
static BrancherHandle post(Home home, ViewArray< IntView > &x, ViewSel< IntView > *vs[n], BranchFilter bf, IntVarValPrint vvp)
Constructor for creation.
double operator()(const Space &home, View x, int i)
Return size over activity as merit for view x at position i.
Definition: merit.hpp:143
BranchFilter bf
Branch filter function.
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
Definition: ngl.hpp:63
No-good literal for less or equal.
Definition: branch.hh:457
ValSelRnd(Space &home, const ValBranch &vb)
Constructor for initialization.
Definition: val-sel.hpp:98
void dispose(Space &home)
Delete value selection.
Definition: val-sel.hpp:125
ValCommitEq(Space &home, const ValBranch &vb)
Constructor for initialization.
Definition: val-commit.hpp:42
No-good literal for greater or equal.
Definition: branch.hh:475
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
Definition: merit.hpp:148
MeritMin(Space &home, const VarBranch &vb)
Constructor for initialization.
Definition: merit.hpp:43
Value selection class for nearest value.
Definition: branch.hh:396
Handle for brancher.
Definition: core.hpp:1157
Generic brancher by view selection.
Activity activity
Activity information.
Definition: branch.hh:164
int val(const Space &home, View x, int i)
Return value of view x at position i.
Definition: val-sel.hpp:180
MeritMax(Space &home, const VarBranch &vb)
Constructor for initialization.
Definition: merit.hpp:58
NqNGL(Space &home, View x, int n)
Constructor for creation.
Definition: ngl.hpp:70
Rnd r
The used random number generator.
Definition: branch.hh:319
Status
The status of a no-good literal.
Definition: core.hpp:977
int ModEvent
Type for modification events.
Definition: core.hpp:146
MeritAFCSize(Space &home, const VarBranch &vb)
Constructor for initialization.
Definition: merit.hpp:104
unsigned int operator()(const Space &home, View x, int i)
Return size as merit for view x at position i.
Definition: merit.hpp:81
Base-class for merit class.
ModEvent commit(Space &home, unsigned int a, View x, int i, int n)
Commit view x at position i to value n for alternative a.
Definition: val-commit.hpp:108
Merit class for size over degree.
Definition: branch.hh:120
Merit class for size over activity.
Definition: branch.hh:161
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
Definition: val-commit.hpp:55
ViewSel< IntView > * viewselint(Space &home, const IntVarBranch &ivb)
Return view selectors for integer views.
Definition: view-sel.cpp:43
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
Definition: val-commit.hpp:142
AFC afc
AFC information.
Definition: branch.hh:140
void print(const Space &home, unsigned int a, View x, int i, int n, std::ostream &o) const
Print on o the alternative with view x at position i and value n.
Definition: val-commit.hpp:63
Value commit class for less or equal.
Definition: branch.hh:538
Computation spaces.
Definition: core.hpp:1362
No-good literal for equality.
Definition: branch.hh:421
virtual NGL * ngl(Space &home, const Choice &c, unsigned int a) const
Create no-good literal for choice c and alternative a.
ValSelMed(Space &home, const ValBranch &vb)
Constructor for initialization.
Definition: val-sel.hpp:70
Brancher by view and values selection
Definition: branch.hh:632
Base-class for both propagators and branchers.
Definition: core.hpp:666
IntSharedArray c
The used values.
Definition: branch.hh:399
Value commit class for greater.
Definition: branch.hh:582
Value selection class for mimimum of view.
Definition: branch.hh:248
void dispose(Space &home)
Dispose view selection.
Definition: merit.hpp:124
Value selection class for average of view.
Definition: branch.hh:299
Value selection class for random value of view.
Definition: branch.hh:316
Base class for value commit.
Gecode::FloatVal c(-8, 8)
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
Definition: val-commit.hpp:84
Gecode::IntArgs i(4, 1, 2, 3, 4)
Class for AFC (accumulated failure count) management.
Definition: afc.hpp:44
ViewValuesBrancher(Space &home, bool shared, ViewValuesBrancher &b)
Constructor for cloning b.
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:238
int val(const Space &home, View x, int i)
Return value of view x at position i.
Definition: val-sel.hpp:50
Value selection class for minimum range of integer view.
Definition: branch.hh:339
IntVarValPrint vvp
Print function.
Definition: branch.hh:637
double operator()(const Space &home, View x, int i)
Return size over degree as merit for view x at position i.
Definition: merit.hpp:97
Value selection class for maximum of view.
Definition: branch.hh:265
ViewSel< IntView > * vs[n]
View selection objects.
void print(const Space &home, unsigned int a, View x, int i, int n, std::ostream &o) const
Print on o the alternative with view x at position i and value n.
Definition: val-commit.hpp:92
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
Definition: ngl.hpp:91
Merit class for mimimum of integer views.
Definition: branch.hh:69
virtual Actor * copy(Space &home, bool share)
Perform cloning.
EqNGL(Space &home, View x, int n)
Constructor for creation.
Definition: ngl.hpp:42
ViewSel< BoolView > * viewselbool(Space &home, const IntVarBranch &ivb)
Return view selectors for Boolean views.
Definition: view-sel.cpp:163
void dispose(Space &home)
Delete value selection.
Definition: val-sel.hpp:210
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
Definition: val-sel.hpp:120
ValSelRangeMin(Space &home, const ValBranch &vb)
Constructor for initialization.
Definition: val-sel.hpp:130
virtual NGL * copy(Space &home, bool share)
Create copy.
Definition: ngl.hpp:78
double operator()(const Space &home, View x, int i)
Return size over AFC as merit for view x at position i.
Definition: merit.hpp:114
Merit class for minimum regret.
Definition: branch.hh:185
Value commit class for greater or equal.
Definition: branch.hh:560
virtual NGL * copy(Space &home, bool share)
Create copy.
Definition: ngl.hpp:106
int val(const Space &home, View x, int i)
Return value of view x at position i.
Definition: val-sel.hpp:78
ValSelMin(Space &home, const ValBranch &vb)
Constructor for initialization.
Definition: val-sel.hpp:42
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
Definition: ngl.hpp:151
virtual const Choice * choice(Space &home)
Return choice.
MeritActivitySize(Space &home, const VarBranch &vb)
Constructor for initialization.
Definition: merit.hpp:131
Merit class for size over afc.
Definition: branch.hh:137
int val(const Space &home, View x, int i)
Return value of view x at position i.
Definition: val-sel.hpp:229
void print(const Space &home, unsigned int a, View x, int i, int n, std::ostream &o) const
Print on o the alternative with view x at position i and value n.
Definition: val-commit.hpp:121
MeritDegreeSize(Space &home, const VarBranch &vb)
Constructor for initialization.
Definition: merit.hpp:88
No-good literal for disequality.
Definition: branch.hh:439
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
Definition: val-commit.hpp:113
ValCommitLq(Space &home, const ValBranch &vb)
Constructor for initialization.
Definition: val-commit.hpp:71
GqNGL(Space &home, View x, int n)
Constructor for creation.
Definition: ngl.hpp:128
virtual void print(const Space &home, const Choice &c, unsigned int a, std::ostream &o) const
Print branch for choice c and alternative a.
MeritRegretMax(Space &home, const VarBranch &vb)
Constructor for initialization.
Definition: merit.hpp:175
Value commit class for equality.
Definition: branch.hh:516
Integer view for integer variables.
Definition: view.hpp:129
int val(const Space &home, View x, int i)
Return value of view x at position i.
Definition: val-sel.hpp:64
virtual NGL * copy(Space &home, bool share)
Create copy.
Definition: ngl.hpp:136
Value branching information.
Definition: branch-val.hpp:44
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
Definition: ngl.hpp:55
ModEvent commit(Space &home, unsigned int a, View x, int i, int n)
Commit view x at position i to value n for alternative a.
Definition: val-commit.hpp:137
Merit class for size.
Definition: branch.hh:103
Variable branching information.
Definition: branch-var.hpp:55
Node * x
Pointer to corresponding Boolean expression node.
Definition: bool-expr.cpp:253
ValSelRangeMax(Space &home, const ValBranch &vb)
Constructor for initialization.
Definition: val-sel.hpp:146
ModEvent commit(Space &home, unsigned int a, View x, int i, int n)
Commit view x at position i to value n for alternative a.
Definition: val-commit.hpp:50
IntSharedArray c
The used values.
Definition: branch.hh:375
Value selection class for median of view.
Definition: branch.hh:282
ValSelCommitBase< IntView, int > * valselcommitint(Space &home, int n, const IntValBranch &ivb)
Return value and commit for integer views.
Choice for performing commit
Definition: core.hpp:1036
int val(const Space &home, IntView x, int i)
Return value of integer view x at position i.
Definition: val-sel.hpp:152
void dispose(Space &home)
Delete value selection.
Definition: val-sel.hpp:257
ValSelNearMinMax(Space &home, const ValBranch &vb)
Constructor for initialization.
Definition: val-sel.hpp:167
ValSelNearIncDec(Space &home, const ValBranch &vb)
Constructor for initialization.
Definition: val-sel.hpp:216
Archive representation
Definition: archive.hpp:45
LqNGL(Space &home, View x, int n)
Constructor for creation.
Definition: ngl.hpp:98
ExecStatus
Definition: core.hpp:523
int operator()(const Space &home, View x, int i)
Return maximum as merit for view x at position i.
Definition: merit.hpp:66
void(* IntVarValPrint)(const Space &home, const BrancherHandle &bh, unsigned int a, IntVar x, int i, const int &n, std::ostream &o)
Function type for printing branching alternatives for integer variables.
Definition: int.hh:3778
unsigned int operator()(const Space &home, View x, int i)
Return maximum regret as merit for view x at position i.
Definition: merit.hpp:183
ValSelCommitBase< BoolView, int > * valselcommitbool(Space &home, int n, const IntValBranch &ivb)
Return value and commit for Boolean views.
Merit class for maximum regret.
Definition: branch.hh:202
int val(const Space &home, View x, int i)
Return value of view x at position i.
Definition: val-sel.hpp:108
Merit class for maximum.
Definition: branch.hh:86
View-value no-good literal.
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
Definition: ngl.hpp:121
ValCommitGq(Space &home, const ValBranch &vb)
Constructor for initialization.
Definition: val-commit.hpp:100
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
Definition: view.hpp:662
Value selection class for nearest value.
Definition: branch.hh:372
void dispose(Space &home)
Dispose view selection.
Definition: merit.hpp:153
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
void print(const Space &home, unsigned int a, View x, int i, int n, std::ostream &o) const
Print on o the alternative with view x at position i and value n.
Definition: val-commit.hpp:150
unsigned int operator()(const Space &home, View x, int i)
Return minimum regret as merit for view x at position i.
Definition: merit.hpp:168
Random number generator.
Definition: rnd.hpp:46
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
Definition: ngl.hpp:141
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
Definition: val-sel.hpp:205
Class for activity management.
Definition: activity.hpp:44
#define GECODE_INT_EXPORT
Definition: int.hh:78
Value selection class for maximum range of integer view.
Definition: branch.hh:355
ModEvent commit(Space &home, unsigned int a, View x, int i, int n)
Commit view x at position i to value n for alternative a.
Definition: val-commit.hpp:79
ValSelMax(Space &home, const ValBranch &vb)
Constructor for initialization.
Definition: val-sel.hpp:56
ValSelAvg(Space &home, const ValBranch &vb)
Constructor for initialization.
Definition: val-sel.hpp:84
ViewArray< IntView > x
Views to branch on.
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
Definition: val-sel.hpp:252
Home class for posting propagators
Definition: core.hpp:717
ValCommitGr(Space &home, const ValBranch &vb)
Constructor for initialization.
Definition: val-commit.hpp:129
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
Definition: merit.hpp:119
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
Definition: ngl.hpp:83
MeritSize(Space &home, const VarBranch &vb)
Constructor for initialization.
Definition: merit.hpp:73
virtual ExecStatus commit(Space &home, const Choice &c, unsigned int a)
Perform commit for choice c and alternative a.
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
int operator()(const Space &home, View x, int i)
Return minimum as merit for view x at position i.
Definition: merit.hpp:51
Base class for value selection.
int val(const Space &home, IntView x, int i)
Return value of integer view x at position i.
Definition: val-sel.hpp:136
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
Definition: ngl.hpp:111
MeritRegretMin(Space &home, const VarBranch &vb)
Constructor for initialization.
Definition: merit.hpp:160
virtual NGL * copy(Space &home, bool share)
Create copy.
Definition: ngl.hpp:50
No-good literal recorded during search.
Definition: core.hpp:971