Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0
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 * Contributing authors:
7 * Samuel Gagnon <samuel.gagnon92@gmail.com>
8
9 * Copyright:
10 * Christian Schulte, 2012
11 * Samuel Gagnon, 2018
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
47
48namespace Gecode { namespace Int { namespace Branch {
49
61
68 template<class View>
69 class MeritMin : public MeritBase<View,int> {
70 public:
71 using typename MeritBase<View,int>::Var;
73 MeritMin(Space& home, const VarBranch<Var>& vb);
75 MeritMin(Space& home, MeritMin& m);
77 int operator ()(const Space& home, View x, int i);
78 };
79
86 template<class View>
87 class MeritMax : public MeritBase<View,int> {
88 public:
89 using typename MeritBase<View,int>::Var;
91 MeritMax(Space& home, const VarBranch<Var>& vb);
93 MeritMax(Space& home, MeritMax& m);
95 int operator ()(const Space& home, View x, int i);
96 };
97
104 template<class View>
105 class MeritSize : public MeritBase<View,unsigned int> {
106 public:
109 MeritSize(Space& home, const VarBranch<Var>& vb);
111 MeritSize(Space& home, MeritSize& m);
113 unsigned int operator ()(const Space& home, View x, int i);
114 };
115
122 template<class View>
123 class MeritDegreeSize : public MeritBase<View,double> {
124 public:
125 using typename MeritBase<View,double>::Var;
131 double operator ()(const Space& home, View x, int i);
132 };
133
140 template<class View>
141 class MeritAFCSize : public MeritBase<View,double> {
142 using typename MeritBase<View,double>::Var;
143 protected:
146 public:
152 double operator ()(const Space& home, View x, int i);
154 bool notice(void) const;
156 void dispose(Space& home);
157 };
158
165 template<class View>
166 class MeritActionSize : public MeritBase<View,double> {
167 using typename MeritBase<View,double>::Var;
168 protected:
171 public:
177 double operator ()(const Space& home, View x, int i);
179 bool notice(void) const;
181 void dispose(Space& home);
182 };
183
190 template<class View>
191 class MeritCHBSize : public MeritBase<View,double> {
192 using typename MeritBase<View,double>::Var;
193 protected:
196 public:
202 double operator ()(const Space& home, View x, int i);
204 bool notice(void) const;
206 void dispose(Space& home);
207 };
208
215 template<class View>
216 class MeritRegretMin : public MeritBase<View,unsigned int> {
217 public:
224 unsigned int operator ()(const Space& home, View x, int i);
225 };
226
233 template<class View>
234 class MeritRegretMax : public MeritBase<View,unsigned int> {
235 public:
242 unsigned int operator ()(const Space& home, View x, int i);
243 };
244
245}}}
246
248
249namespace Gecode { namespace Int { namespace Branch {
250
253 ViewSel<IntView>* viewsel(Space& home, const IntVarBranch& ivb);
256 ViewSel<BoolView>* viewsel(Space& home, const BoolVarBranch& bvb);
257
258}}}
259
260namespace Gecode { namespace Int { namespace Branch {
261
273
280 template<class View>
281 class ValSelMin : public ValSel<View,int> {
282 public:
283 using typename ValSel<View,int>::Var;
285 ValSelMin(Space& home, const ValBranch<Var>& vb);
287 ValSelMin(Space& home, ValSelMin& vs);
289 int val(const Space& home, View x, int i);
290 };
291
298 template<class View>
299 class ValSelMax : public ValSel<View,int> {
300 public:
301 using typename ValSel<View,int>::Var;
303 ValSelMax(Space& home, const ValBranch<Var>& vb);
305 ValSelMax(Space& home, ValSelMax& vs);
307 int val(const Space& home, View x, int i);
308 };
309
316 template<class View>
317 class ValSelMed : public ValSel<View,int> {
318 public:
319 using typename ValSel<View,int>::Var;
321 ValSelMed(Space& home, const ValBranch<Var>& vb);
323 ValSelMed(Space& home, ValSelMed& vs);
325 int val(const Space& home, View x, int i);
326 };
327
334 template<class View>
335 class ValSelAvg : public ValSel<View,int> {
336 public:
337 using typename ValSel<View,int>::Var;
339 ValSelAvg(Space& home, const ValBranch<Var>& vb);
341 ValSelAvg(Space& home, ValSelAvg& vs);
343 int val(const Space& home, View x, int i);
344 };
345
352 template<class View>
353 class ValSelRnd : public ValSel<View,int> {
354 using typename ValSel<View,int>::Var;
355 protected:
358 public:
360 ValSelRnd(Space& home, const ValBranch<Var>& vb);
362 ValSelRnd(Space& home, ValSelRnd& vs);
364 int val(const Space& home, View x, int i);
366 bool notice(void) const;
368 void dispose(Space& home);
369 };
370
377 class ValSelRangeMin : public ValSel<IntView,int> {
378 public:
380 ValSelRangeMin(Space& home, const ValBranch<IntVar>& vb);
384 int val(const Space& home, IntView x, int i);
385 };
386
393 class ValSelRangeMax : public ValSel<IntView,int> {
394 public:
396 ValSelRangeMax(Space& home, const ValBranch<IntVar>& vb);
400 int val(const Space& home, IntView x, int i);
401 };
402
403}}}
404
406
407namespace Gecode { namespace Int { namespace Branch {
408
410 template<class View>
411 class EqNGL : public ViewValNGL<View,int,PC_INT_VAL> {
412 using ViewValNGL<View,int,PC_INT_VAL>::x;
413 using ViewValNGL<View,int,PC_INT_VAL>::n;
414 public:
416 EqNGL(Space& home, View x, int n);
418 EqNGL(Space& home, EqNGL& ngl);
420 virtual NGL::Status status(const Space& home) const;
422 virtual ExecStatus prune(Space& home);
424 virtual NGL* copy(Space& home);
425 };
426
428 template<class View>
429 class NqNGL : public ViewValNGL<View,int,PC_INT_DOM> {
430 using ViewValNGL<View,int,PC_INT_DOM>::x;
431 using ViewValNGL<View,int,PC_INT_DOM>::n;
432 public:
434 NqNGL(Space& home, View x, int n);
436 NqNGL(Space& home, NqNGL& ngl);
438 virtual NGL::Status status(const Space& home) const;
440 virtual ExecStatus prune(Space& home);
442 virtual NGL* copy(Space& home);
443 };
444
446 template<class View>
447 class LqNGL : public ViewValNGL<View,int,PC_INT_BND> {
448 using ViewValNGL<View,int,PC_INT_BND>::x;
449 using ViewValNGL<View,int,PC_INT_BND>::n;
450 public:
452 LqNGL(Space& home, View x, int n);
454 LqNGL(Space& home, LqNGL& ngl);
456 virtual NGL::Status status(const Space& home) const;
458 virtual ExecStatus prune(Space& home);
460 virtual NGL* copy(Space& home);
461 };
462
464 template<class View>
465 class GqNGL : public ViewValNGL<View,int,PC_INT_BND> {
466 using ViewValNGL<View,int,PC_INT_BND>::x;
467 using ViewValNGL<View,int,PC_INT_BND>::n;
468 public:
470 GqNGL(Space& home, View x, int n);
472 GqNGL(Space& home, GqNGL& ngl);
474 virtual NGL::Status status(const Space& home) const;
476 virtual ExecStatus prune(Space& home);
478 virtual NGL* copy(Space& home);
479 };
480
481}}}
482
484
485namespace Gecode { namespace Int { namespace Branch {
486
498
505 template<class View>
506 class ValCommitEq : public ValCommit<View,int> {
507 public:
508 using typename ValCommit<View,int>::Var;
512 ValCommitEq(Space& home, ValCommitEq& vc);
514 ModEvent commit(Space& home, unsigned int a, View x, int i, int n);
516 NGL* ngl(Space& home, unsigned int a, View x, int n) const;
518 void print(const Space& home, unsigned int a, View x, int i, int n,
519 std::ostream& o) const;
520 };
521
528 template<class View>
529 class ValCommitLq : public ValCommit<View,int> {
530 public:
531 using typename ValCommit<View,int>::Var;
535 ValCommitLq(Space& home, ValCommitLq& vc);
537 ModEvent commit(Space& home, unsigned int a, View x, int i, int n);
539 NGL* ngl(Space& home, unsigned int a, View x, int n) const;
541 void print(const Space& home, unsigned int a, View x, int i, int n,
542 std::ostream& o) const;
543 };
544
551 template<class View>
552 class ValCommitGq : public ValCommit<View,int> {
553 public:
554 using typename ValCommit<View,int>::Var;
558 ValCommitGq(Space& home, ValCommitGq& vc);
560 ModEvent commit(Space& home, unsigned int a, View x, int i, int n);
562 NGL* ngl(Space& home, unsigned int a, View x, int n) const;
564 void print(const Space& home, unsigned int a, View x, int i, int n,
565 std::ostream& o) const;
566 };
567
574 template<class View>
575 class ValCommitGr : public ValCommit<View,int> {
576 public:
577 using typename ValCommit<View,int>::Var;
581 ValCommitGr(Space& home, ValCommitGr& vc);
583 ModEvent commit(Space& home, unsigned int a, View x, int i, int n);
585 NGL* ngl(Space& home, unsigned int a, View x, int n) const;
587 void print(const Space& home, unsigned int a, View x, int i, int n,
588 std::ostream& o) const;
589 };
590
591}}}
592
594
595namespace Gecode { namespace Int { namespace Branch {
596
599 ValSelCommitBase<IntView,int>*
600 valselcommit(Space& home, const IntValBranch& ivb);
601
604 ValSelCommitBase<BoolView,int>*
605 valselcommit(Space& home, const BoolValBranch& bvb);
606
609 ValSelCommitBase<IntView,int>*
610 valselcommit(Space& home, const IntAssign& ia);
611
614 ValSelCommitBase<BoolView,int>*
615 valselcommit(Space& home, const BoolAssign& ba);
616
617}}}
618
619namespace Gecode { namespace Int { namespace Branch {
620
625 template<int n, bool min, class Filter, class Print>
626 class ViewValuesBrancher : public ViewBrancher<IntView,Filter,n> {
627 protected:
628 using ViewBrancher<IntView,Filter,n>::x;
629 using ViewBrancher<IntView,Filter,n>::f;
631 Print p;
638 IntVarValPrint vvp);
639 public:
641 virtual const Choice* choice(Space& home);
643 virtual const Choice* choice(const Space& home, Archive& e);
645 virtual ExecStatus commit(Space& home, const Choice& c, unsigned int a);
647 virtual NGL* ngl(Space& home, const Choice& c, unsigned int a) const;
655 virtual void print(const Space& home, const Choice& c, unsigned int a,
656 std::ostream& o) const;
658 virtual Actor* copy(Space& home);
660 static void post(Home home, ViewArray<IntView>& x,
663 IntVarValPrint vvp);
665 virtual size_t dispose(Space& home);
666 };
667
669 template<int n, bool min>
671 ViewSel<IntView>* vs[n],
673 IntVarValPrint vvp);
674
675}}}
676
678
679#ifdef GECODE_HAS_CBS
680
681namespace Gecode { namespace Int { namespace Branch {
682
687 template<class View>
688 class CBSBrancher : public Brancher {
689 private:
691 ViewArray<View> x;
692
700 class VarIdToPos : public SharedHandle {
701 protected:
702 class VarIdToPosO : public SharedHandle::Object {
703 public:
705 std::unordered_map<unsigned int, unsigned int> _varIdToPos;
706 public:
708 VarIdToPosO(void) = default;
710 virtual ~VarIdToPosO(void) = default;
711 };
712 public:
714 VarIdToPos(void) = default;
716 void init(void);
718 bool isIn(unsigned int var_id) const;
720 int operator[](unsigned int var_id) const;
722 void insert(unsigned int var_id, unsigned int pos);
723 } varIdToPos;
724
733 struct PropInfo {
735 unsigned int domsum;
737 unsigned int var_id;
739 int val;
741 double dens;
743 bool visited;
744 };
745
756 std::unordered_map<unsigned int, PropInfo,
757 std::hash<unsigned int>,
758 std::equal_to<unsigned int>,
759 space_allocator<std::pair<const unsigned int, PropInfo>>>
760 logProp;
761
762 public:
764 CBSBrancher(Home home, ViewArray<View>& x0);
766 CBSBrancher(Space& home, CBSBrancher& b);
768 static void post(Home home, ViewArray<View>& x);
770 virtual Actor* copy(Space& home);
772 virtual size_t dispose(Space& home);
774 virtual bool status(const Space& home) const;
776 virtual const Choice* choice(Space& home);
778 virtual const Choice* choice(const Space&, Archive& e);
780 virtual ExecStatus commit(Space& home, const Choice& c, unsigned int a);
782 virtual void print(const Space& home, const Choice& c, unsigned int a,
783 std::ostream& o) const;
784 private:
786 bool inbrancher(unsigned int varId) const;
787 };
788
789}}}
790
792
793#endif
794
795#endif
796
797// STATISTICS: int-branch
Class for AFC (accumulated failure count) management.
Definition afc.hpp:40
Class for action management.
Definition action.hpp:42
Archive representation
Definition archive.hpp:42
friend class Space
Definition core.hpp:1446
friend class Choice
Definition core.hpp:1447
Class for CHB management.
Definition chb.hpp:46
Home class for posting propagators
Definition core.hpp:856
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
Definition ngl.hpp:51
virtual NGL * copy(Space &home)
Create copy.
Definition ngl.hpp:46
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
Definition ngl.hpp:59
EqNGL(Space &home, View x, int n)
Constructor for creation.
Definition ngl.hpp:38
virtual NGL * copy(Space &home)
Create copy.
Definition ngl.hpp:132
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
Definition ngl.hpp:137
GqNGL(Space &home, View x, int n)
Constructor for creation.
Definition ngl.hpp:124
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
Definition ngl.hpp:147
virtual NGL * copy(Space &home)
Create copy.
Definition ngl.hpp:102
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
Definition ngl.hpp:107
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
Definition ngl.hpp:117
LqNGL(Space &home, View x, int n)
Constructor for creation.
Definition ngl.hpp:94
void dispose(Space &home)
Dispose view selection.
Definition merit.hpp:122
AFC afc
AFC information.
Definition branch.hh:145
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
Definition merit.hpp:117
double operator()(const Space &home, View x, int i)
Return AFC over size as merit for view x at position i.
Definition merit.hpp:112
MeritAFCSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
Action action
Action information.
Definition branch.hh:170
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
Definition merit.hpp:144
MeritActionSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
double operator()(const Space &home, View x, int i)
Return action over size as merit for view x at position i.
Definition merit.hpp:139
void dispose(Space &home)
Dispose view selection.
Definition merit.hpp:149
void dispose(Space &home)
Dispose view selection.
Definition merit.hpp:175
double operator()(const Space &home, View x, int i)
Return size over action as merit for view x at position i.
Definition merit.hpp:165
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
Definition merit.hpp:170
CHB chb
CHB information.
Definition branch.hh:195
MeritCHBSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
double operator()(const Space &home, View x, int i)
Return degree over size as merit for view x at position i.
Definition merit.hpp:96
MeritDegreeSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
MeritMax(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
int operator()(const Space &home, View x, int i)
Return maximum as merit for view x at position i.
Definition merit.hpp:64
MeritMin(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
int operator()(const Space &home, View x, int i)
Return minimum as merit for view x at position i.
Definition merit.hpp:48
MeritRegretMax(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
unsigned int operator()(const Space &home, View x, int i)
Return maximum regret as merit for view x at position i.
Definition merit.hpp:207
MeritRegretMin(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
unsigned int operator()(const Space &home, View x, int i)
Return minimum regret as merit for view x at position i.
Definition merit.hpp:191
MeritSize(Space &home, const VarBranch< Var > &vb)
Constructor for initialization.
unsigned int operator()(const Space &home, View x, int i)
Return size as merit for view x at position i.
Definition merit.hpp:80
NqNGL(Space &home, View x, int n)
Constructor for creation.
Definition ngl.hpp:66
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
Definition ngl.hpp:87
virtual NGL * copy(Space &home)
Create copy.
Definition ngl.hpp:74
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
Definition ngl.hpp:79
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
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.
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.
ValCommitEq(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
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.
ValCommitGq(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
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.
ValCommitGr(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
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.
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.
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
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.
NGL * ngl(Space &home, unsigned int a, View x, int n) const
Create no-good literal for alternative a.
ValCommitLq(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
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.
ValSelAvg(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
int val(const Space &home, View x, int i)
Return value of view x at position i.
Definition val-sel.hpp:92
int val(const Space &home, View x, int i)
Return value of view x at position i.
Definition val-sel.hpp:62
ValSelMax(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
ValSelMed(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
int val(const Space &home, View x, int i)
Return value of view x at position i.
Definition val-sel.hpp:77
ValSelMin(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
int val(const Space &home, View x, int i)
Return value of view x at position i.
Definition val-sel.hpp:47
int val(const Space &home, IntView x, int i)
Return value of integer view x at position i.
Definition val-sel.hpp:153
ValSelRangeMax(Space &home, const ValBranch< IntVar > &vb)
Constructor for initialization.
Definition val-sel.hpp:147
int val(const Space &home, IntView x, int i)
Return value of integer view x at position i.
Definition val-sel.hpp:137
ValSelRangeMin(Space &home, const ValBranch< IntVar > &vb)
Constructor for initialization.
Definition val-sel.hpp:131
int val(const Space &home, View x, int i)
Return value of view x at position i.
Definition val-sel.hpp:108
bool notice(void) const
Whether dispose must always be called (that is, notice is needed)
Definition val-sel.hpp:120
Rnd r
The used random number generator.
Definition branch.hh:357
ValSelRnd(Space &home, const ValBranch< Var > &vb)
Constructor for initialization.
void dispose(Space &home)
Delete value selection.
Definition val-sel.hpp:125
virtual void print(const Space &home, const Choice &c, unsigned int a, std::ostream &o) const
Print branch for choice c and alternative a.
ViewValuesBrancher(Space &home, ViewValuesBrancher &b)
Constructor for cloning b.
virtual Actor * copy(Space &home)
Perform cloning.
static void post(Home home, ViewArray< IntView > &x, ViewSel< IntView > *vs[n], IntBranchFilter bf, IntVarValPrint vvp)
Post function for creation.
virtual ExecStatus commit(Space &home, const Choice &c, unsigned int a)
Perform commit for choice c and alternative a.
virtual const Choice * choice(Space &home)
Return choice.
virtual size_t dispose(Space &home)
Delete brancher and return its size.
virtual NGL * ngl(Space &home, const Choice &c, unsigned int a) const
Create no-good literal for choice c and alternative a.
Integer view for integer variables.
Definition view.hpp:129
View::VarType Var
Corresponding variable type.
Definition merit.hpp:51
MeritBase(Space &home, const VarBranch< Var > &vb)
Definition merit.hpp:176
No-good literal recorded during search.
Definition core.hpp:1342
NGL(void)
Constructor for creation.
Definition core.hpp:3819
Status
The status of a no-good literal.
Definition core.hpp:1348
Random number generator.
Definition rnd.hpp:42
Computation spaces.
Definition core.hpp:1744
Value branching information.
Definition val.hpp:41
ValCommit(Space &home, const ValBranch< Var > &vb)
View::VarType Var
Corresponding variable type.
ValSel(Space &home, const ValBranch< Var > &vb)
Definition val-sel.hpp:98
View::VarType Var
Corresponding variable type.
Definition val-sel.hpp:49
Variable branching information.
Definition var.hpp:55
View arrays.
Definition array.hpp:253
ViewBrancher(Space &home, ViewBrancher< IntView, Filter, n > &b)
Definition view.hpp:152
Abstract class for view selection.
Definition view-sel.hpp:44
ViewValNGL(Space &home, View x, int n)
Definition view-val.hpp:183
#define GECODE_INT_EXPORT
Definition int.hh:81
void post(Home home, Term *t, int n, FloatRelType frt, FloatVal c)
Post propagator for linear constraint over floats.
Definition post.cpp:238
std::function< bool(const Space &home, IntVar x, int i)> IntBranchFilter
Branch filter function type for integer variables.
Definition int.hh:4191
void print(const Search::Statistics &stat, bool restart)
Print statistics.
Definition job-shop.cpp:606
Integer branchers.
ViewSel< IntView > * viewsel(Space &home, const IntVarBranch &ivb)
Return view selectors for integer views.
Definition view-sel.cpp:39
void postviewvaluesbrancher(Home home, ViewArray< IntView > &x, ViewSel< IntView > *vs[n], IntBranchFilter bf, IntVarValPrint vvp)
Post brancher for view and values.
ValSelCommitBase< IntView, int > * valselcommit(Space &home, const IntValBranch &ivb)
Return value and commit for integer views.
Finite domain integers.
const Gecode::PropCond PC_INT_VAL
Propagate when a view becomes assigned (single value)
Definition var-type.hpp:82
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
Definition var-type.hpp:91
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
Definition var-type.hpp:100
Gecode toplevel namespace
IntPropLevel ba(IntPropLevel ipl)
Extract basic or advanced from propagation level.
Definition ipl.hpp:43
std::function< void(const Space &home, const Brancher &b, unsigned int a, IntVar x, int i, const int &n, std::ostream &o)> IntVarValPrint
Function type for printing branching alternatives for integer variables.
Definition int.hh:4567
ExecStatus
Definition core.hpp:472
Post propagator for SetVar x
Definition set.hh:773
int ModEvent
Type for modification events.
Definition core.hpp:62