set.icc
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 namespace Gecode { namespace Set {
00029
00030
00031
00032
00033
00034
00035 forceinline
00036 SetView::SetView(void) {}
00037 forceinline
00038 SetView::SetView(const SetVar& y)
00039 : VariableViewBase<SetVarImp>(y.variable()) {}
00040
00041
00042
00043
00044
00045
00046
00047 forceinline bool
00048 SetView::assigned(void) const { return var->assigned(); }
00049
00050 forceinline unsigned int
00051 SetView::glbSize(void) const { return var->glbSize(); }
00052
00053 forceinline unsigned int
00054 SetView::lubSize(void) const { return var->lubSize(); }
00055
00056 forceinline unsigned int
00057 SetView::unknownSize(void) const { return var->lubSize() - var->glbSize(); }
00058
00059 forceinline bool
00060 SetView::contains(int i) const { return (var->knownIn(i)); }
00061
00062 forceinline bool
00063 SetView::notContains(int i) const { return (var->knownOut(i)); }
00064
00065 forceinline unsigned int
00066 SetView::cardMin(void) const { return var->cardMin(); }
00067
00068 forceinline unsigned int
00069 SetView::cardMax(void) const { return var->cardMax(); }
00070
00071 forceinline int
00072 SetView::lubMin(void) const { return var->lubMin(); }
00073
00074 forceinline int
00075 SetView::lubMax(void) const { return var->lubMax(); }
00076
00077 forceinline int
00078 SetView::lubMinN(int n) const { return var->lubMinN(n); }
00079
00080 forceinline int
00081 SetView::lubMaxN(int n) const { return var->lubMaxN(n); }
00082
00083 forceinline int
00084 SetView::glbMin(void) const { return var->glbMin(); }
00085
00086 forceinline int
00087 SetView::glbMax(void) const { return var->glbMax(); }
00088
00089
00090
00091
00092
00093
00094 forceinline ModEvent
00095 SetView::cardMin(Space* home, unsigned int m) {
00096 return var-> cardMin(home, m);
00097 }
00098
00099 forceinline ModEvent
00100 SetView::cardMax(Space* home, unsigned int m) {
00101 return var-> cardMax(home, m);
00102 }
00103
00104 forceinline ModEvent
00105 SetView::include (Space* home,int from, int to)
00106 { return (var->include(home,from,to)); }
00107
00108 forceinline ModEvent
00109 SetView::include (Space* home,int n)
00110 { return (var->include(home,n)); }
00111
00112 forceinline ModEvent
00113 SetView::exclude (Space* home,int n)
00114 { return (var->exclude(home, n)); }
00115
00116 forceinline ModEvent
00117 SetView::intersect (Space* home,int from, int to)
00118 { return (var->intersect(home,from,to)); }
00119
00120 forceinline ModEvent
00121 SetView::intersect (Space* home,int n)
00122 { return (var->intersect(home,n)); }
00123
00124 template <class I> ModEvent
00125 SetView::includeI (Space* home, I& iter)
00126 { return (var->includeI(home, iter)); }
00127
00128 forceinline ModEvent
00129 SetView::exclude (Space* home,int from, int to)
00130 { return (var->exclude(home,from,to)); }
00131
00132 template <class I> ModEvent
00133 SetView::excludeI(Space* home, I& iter) {
00134 return var->excludeI(home, iter);
00135 }
00136
00137 template <class I> ModEvent
00138 SetView::intersectI(Space* home, I& iter) {
00139 return var->intersectI(home, iter);
00140 }
00141
00142
00143
00144
00145
00146
00147
00148
00149 forceinline void
00150 SetView::update(Space* home, bool share, SetView& y) {
00151 var = y.var->copy(home,share);
00152 }
00153
00154 forceinline bool
00155 SetView::destruct(void) { return false; }
00156
00161 template <>
00162 class LubRanges<SetView> : public LubRanges<SetVarImp*> {
00163 public:
00165
00166
00167 LubRanges(void);
00169 LubRanges(const SetView& x);
00171 void init(const SetView& x);
00173 };
00174
00175 forceinline
00176 LubRanges<SetView>::LubRanges(void) {}
00177
00178 forceinline
00179 LubRanges<SetView>::LubRanges(const SetView& x)
00180 : LubRanges<SetVarImp*>(x.variable()) {}
00181
00182 forceinline void
00183 LubRanges<SetView>::init(const SetView& x) {
00184 LubRanges<SetVarImp*>::init(x.variable());
00185 }
00186
00187
00192 template <>
00193 class GlbRanges<SetView> : public GlbRanges<SetVarImp*> {
00194 public:
00196
00197
00198 GlbRanges(void);
00200 GlbRanges(const SetView& x);
00202 void init(const SetView& x);
00203 };
00204
00205 forceinline
00206 GlbRanges<SetView>::GlbRanges(void) {}
00207
00208 forceinline
00209 GlbRanges<SetView>::GlbRanges(const SetView& x)
00210 : GlbRanges<SetVarImp*>(x.variable()) {}
00211
00212 forceinline void
00213 GlbRanges<SetView>::init(const SetView& x) {
00214 GlbRanges<SetVarImp*>::init(x.variable());
00215 }
00216
00217 }}
00218
00219
00220