Generated on Mon Aug 25 11:35:34 2008 for Gecode by doxygen 1.5.6

cpltset.icc

Go to the documentation of this file.
00001 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
00002 /*
00003  *  Main authors:
00004  *     Patrick Pekczynski <pekczynski@ps.uni-sb.de>
00005  *
00006  *  Copyright:
00007  *     Patrick Pekczynski, 2006
00008  *
00009  *  Last modified:
00010  *     $Date: 2008-01-24 13:05:13 +0100 (Thu, 24 Jan 2008) $ by $Author: tack $
00011  *     $Revision: 5974 $
00012  *
00013  *  This file is part of Gecode, the generic constraint
00014  *  development environment:
00015  *     http://www.gecode.org
00016  *
00017  *  Permission is hereby granted, free of charge, to any person obtaining
00018  *  a copy of this software and associated documentation files (the
00019  *  "Software"), to deal in the Software without restriction, including
00020  *  without limitation the rights to use, copy, modify, merge, publish,
00021  *  distribute, sublicense, and/or sell copies of the Software, and to
00022  *  permit persons to whom the Software is furnished to do so, subject to
00023  *  the following conditions:
00024  *
00025  *  The above copyright notice and this permission notice shall be
00026  *  included in all copies or substantial portions of the Software.
00027  *
00028  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00029  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00030  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00031  *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00032  *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00033  *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00034  *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00035  *
00036  */
00037 
00038 
00039 namespace Gecode { namespace CpltSet {
00040 
00041   /*
00042    * Constructors and access
00043    *
00044    */
00045 
00046   forceinline
00047   CpltSetView::CpltSetView(void) {}
00048 
00049   forceinline
00050   CpltSetView::CpltSetView(const CpltSetVar& y)
00051     : VarViewBase<CpltSetVarImp>(y.var()) { }
00052 
00053   /*
00054    * Set information
00055    *
00056    */
00057 
00058 
00059   forceinline unsigned int
00060   CpltSetView::glbSize(void) const { return varimp->glbSize(); }
00061 
00062   forceinline unsigned int
00063   CpltSetView::lubSize(void) const { return varimp->lubSize(); }
00064 
00065   forceinline unsigned int
00066   CpltSetView::unknownSize(void) const { return varimp->unknownSize(); }
00067   
00068   forceinline unsigned int
00069   CpltSetView::cardMin(void) const { return varimp->cardMin(); }
00070 
00071   forceinline unsigned int
00072   CpltSetView::cardMax(void) const { return varimp->cardMax(); }
00073 
00074   forceinline int
00075   CpltSetView::lubMin(void) const { return varimp->lubMin(); }
00076 
00077   forceinline int
00078   CpltSetView::lubMax(void) const { return varimp->lubMax(); }
00079 
00080   forceinline int
00081   CpltSetView::lubMinN(int n) const { return varimp->lubMinN(n); }
00082 
00083   forceinline int
00084   CpltSetView::lubMaxN(int n) const { return varimp->lubMaxN(n); }
00085 
00086   forceinline int
00087   CpltSetView::glbMin(void) const { return varimp->glbMin(); }
00088 
00089   forceinline int
00090   CpltSetView::glbMax(void) const { return varimp->glbMax(); }
00091 
00092 
00093 
00094   /*
00095    * Bdd information
00096    *
00097    */
00098 
00099 
00100   forceinline unsigned int
00101   CpltSetView::offset(void)  const { return varimp->offset(); }
00102 
00103   forceinline unsigned int
00104   CpltSetView::tableWidth(void)  const { return varimp->tableWidth(); }
00105 
00106   forceinline bdd
00107   CpltSetView::element(int i)  const { return varimp->element(i); }
00108 
00109   forceinline bdd
00110   CpltSetView::elementNeg(int i)  const { return varimp->elementNeg(i); }
00111 
00112   forceinline int
00113   CpltSetView::initialLubMin(void)  const { return varimp->initialLubMin(); }
00114 
00115   forceinline int
00116   CpltSetView::initialLubMax(void)  const { return varimp->initialLubMax(); }
00117   
00118   forceinline bdd 
00119   CpltSetView::dom(void) const {  return varimp->dom(); };
00120 
00121 
00122   /*
00123    * Domain tests
00124    *
00125    */
00126 
00127   forceinline bool
00128   CpltSetView::assigned(void)  const { return varimp->assigned(); }
00129 
00130   forceinline bool
00131   CpltSetView::contains(int i) const { return (varimp->knownIn(i)); }
00132   
00133   forceinline bool
00134   CpltSetView::notContains(int i) const { return (varimp->knownOut(i)); }
00135 
00136   /*
00137    * Tells
00138    *
00139    */
00140 
00141   forceinline ModEvent 
00142   CpltSetView::cardinality(Space* home, int l, int u) {
00143     return varimp->cardinality(home, l, u);
00144   }
00145 
00146   forceinline ModEvent
00147   CpltSetView::cardMin(Space* home, unsigned int m) {
00148     return varimp->cardMin(home, m);
00149   }
00150 
00151   forceinline ModEvent
00152   CpltSetView::cardMax(Space* home, unsigned int m) {
00153     return varimp->cardMax(home, m);
00154   }
00155 
00156   forceinline ModEvent
00157   CpltSetView::include(Space* home, int from, int to) { 
00158     return varimp->include(home, from, to);
00159   }
00160 
00161   forceinline ModEvent
00162   CpltSetView::include(Space* home, int n) { return varimp->include(home, n); }
00163 
00164   template <class I> ModEvent
00165   CpltSetView::includeI(Space* home, I& iter) { return varimp->includeI(home, iter); }
00166 
00167   forceinline ModEvent
00168   CpltSetView::exclude(Space* home, int from, int to) { 
00169     return varimp->exclude(home, from, to);
00170   }
00171 
00172   forceinline ModEvent
00173   CpltSetView::exclude(Space* home, int n) { return varimp->exclude(home, n); }
00174 
00175   template <class I> ModEvent
00176   CpltSetView::excludeI(Space* home, I& iter) { return varimp->excludeI(home, iter); }
00177 
00178   forceinline ModEvent
00179   CpltSetView::intersect(Space* home,int from, int to) {
00180     return varimp->intersect(home,from,to);
00181   }
00182 
00183   forceinline ModEvent
00184   CpltSetView::intersect(Space* home,int n) { return varimp->intersect(home,n); }
00185 
00186   template <class I> ModEvent
00187   CpltSetView::intersectI(Space* home, I& iter) { 
00188     return varimp->intersectI(home, iter);
00189   }
00190 
00191   forceinline ModEvent
00192   CpltSetView::nq(Space* home, int v) { return varimp->nq(home, v); }
00193 
00194   forceinline ModEvent
00195   CpltSetView::nq(Space* home, int a, int b) { return varimp->nq(home, a, b); }
00196 
00197   template <class I>
00198   forceinline ModEvent
00199   CpltSetView::nqI(Space* home, I& i) { return varimp->nqI(home, i); }
00200 
00201   forceinline ModEvent
00202   CpltSetView::eq(Space* home, int v) { return varimp->eq(home, v); }
00203 
00204   forceinline ModEvent
00205   CpltSetView::eq(Space* home, int a, int b) { return varimp->eq(home, a, b); }
00206   
00207   template <class I>
00208   forceinline ModEvent
00209   CpltSetView::eqI(Space* home, I& i) { return varimp->eqI(home, i); }
00210 
00211   forceinline ModEvent 
00212   CpltSetView::intersect(Space* home, bdd& d) {
00213     return varimp->intersect(home, d);
00214   }
00215 
00216   /*
00217    * Cloning
00218    *
00219    */
00220 
00221   forceinline void
00222   CpltSetView::update(Space* home, bool share, CpltSetView& y) {
00223     varimp = y.varimp->copy(home,share);
00224   }
00225 
00226   /*
00227    * Serialization
00228    *
00229    */
00230   forceinline Reflection::Arg*
00231   CpltSetView::spec(const Space* home, Reflection::VarMap& m) const {
00232     return varimp->spec(home, m);
00233   }
00234   inline Support::Symbol
00235   CpltSetView::type(void) {
00236     return Support::Symbol("CpltSet::CpltSetView");
00237   }
00238 
00239   /*
00240    * Delta information for advisors
00241    *
00242    */
00243 
00244   forceinline ModEvent
00245   CpltSetView::modevent(const Delta* d) { return CpltSetVarImp::modevent(d); }
00246 
00248   template <>
00249   class GlbValues<CpltSetView> : public GlbValues<CpltSetVarImp*> {
00250   public:
00252 
00253 
00254     GlbValues(void);
00256     GlbValues(const CpltSetView& x);
00258     void init(const CpltSetView& x);
00260   };
00261 
00262   forceinline
00263   GlbValues<CpltSetView>::GlbValues(void) {}
00264 
00265   forceinline
00266   GlbValues<CpltSetView>::GlbValues(const CpltSetView& x) 
00267     : GlbValues<CpltSetVarImp*>(x.var()) {}
00268 
00269   forceinline void
00270   GlbValues<CpltSetView>::init(const CpltSetView& x) {
00271     GlbValues<CpltSetVarImp*>::init(x.var());
00272   }
00273 }
00274   namespace Set {
00276   template <>
00277   class GlbRanges<CpltSet::CpltSetView> : public Set::GlbRanges<CpltSet::CpltSetVarImp*> {
00278   public:
00280 
00281 
00282     GlbRanges(void);
00284     GlbRanges(const CpltSet::CpltSetView& x);
00286     void init(const CpltSet::CpltSetView& x);
00288   };
00289 
00290   forceinline
00291   GlbRanges<CpltSet::CpltSetView>::GlbRanges(void) {}
00292 
00293   forceinline
00294   GlbRanges<CpltSet::CpltSetView>::GlbRanges(const CpltSet::CpltSetView& x) 
00295     : GlbRanges<CpltSet::CpltSetVarImp*>(x.var()) {}
00296 
00297   forceinline void
00298   GlbRanges<CpltSet::CpltSetView>::init(const CpltSet::CpltSetView& x) {
00299     GlbRanges<CpltSet::CpltSetVarImp*>::init(x.var());
00300   }
00301 
00303   template <>
00304   class LubRanges<CpltSet::CpltSetView> : public Set::LubRanges<CpltSet::CpltSetVarImp*> {
00305   public:
00307 
00308 
00309     LubRanges(void);
00311     LubRanges(const CpltSet::CpltSetView& x);
00313     void init(const CpltSet::CpltSetView& x);
00315   };
00316 
00317   forceinline
00318   LubRanges<CpltSet::CpltSetView>::LubRanges(void) {}
00319 
00320   forceinline
00321   LubRanges<CpltSet::CpltSetView>::LubRanges(const CpltSet::CpltSetView& x) 
00322     : Set::LubRanges<CpltSet::CpltSetVarImp*>(x.var()) {}
00323 
00324   forceinline void
00325   LubRanges<CpltSet::CpltSetView>::init(const CpltSet::CpltSetView& x) {
00326     Set::LubRanges<CpltSet::CpltSetVarImp*>::init(x.var());
00327   }
00328   }
00329   namespace CpltSet {
00334   template <>
00335   class LubValues<CpltSetView> : public LubValues<CpltSetVarImp*> {
00336   public:
00338 
00339 
00340     LubValues(void);
00342     LubValues(const CpltSetView& x);
00344     void init(const CpltSetView& x);
00346   };
00347 
00348   forceinline
00349   LubValues<CpltSetView>::LubValues(void) {}
00350 
00351   forceinline
00352   LubValues<CpltSetView>::LubValues(const CpltSetView& x) 
00353   : LubValues<CpltSetVarImp*>(x.var()) {}
00354 
00355   forceinline void
00356   LubValues<CpltSetView>::init(const CpltSetView& x) {
00357     LubValues<CpltSetVarImp*>::init(x.var());
00358   }
00359 
00360 
00362   template <>
00363   class UnknownValues<CpltSetView> : public UnknownValues<CpltSetVarImp*> {
00364   public:
00366 
00367 
00368     UnknownValues(void);
00370     UnknownValues(const CpltSetView& x);
00372     void init(const CpltSetView& x);
00374   };
00375 
00376   forceinline
00377   UnknownValues<CpltSetView>::UnknownValues(void) {}
00378 
00379   forceinline
00380   UnknownValues<CpltSetView>::UnknownValues(const CpltSetView& x) 
00381     : UnknownValues<CpltSetVarImp*>(x.var()) {}
00382 
00383   forceinline void
00384   UnknownValues<CpltSetView>::init(const CpltSetView& x) {
00385     UnknownValues<CpltSetVarImp*>::init(x.var());
00386   }
00387   }
00388   namespace Set {
00390   template <>
00391   class UnknownRanges<CpltSet::CpltSetView> : public Set::UnknownRanges<CpltSet::CpltSetVarImp*> {
00392   public:
00394 
00395 
00396     UnknownRanges(void);
00398     UnknownRanges(const CpltSet::CpltSetView& x);
00400     void init(const CpltSet::CpltSetView& x);
00402   };
00403 
00404   forceinline
00405   UnknownRanges<CpltSet::CpltSetView>::UnknownRanges(void) {}
00406 
00407   forceinline
00408   UnknownRanges<CpltSet::CpltSetView>::UnknownRanges(const CpltSet::CpltSetView& x) 
00409     : Set::UnknownRanges<CpltSet::CpltSetVarImp*>(x.var()) {}
00410 
00411   forceinline void
00412   UnknownRanges<CpltSet::CpltSetView>::init(const CpltSet::CpltSetView& x) {
00413     Set::UnknownRanges<CpltSet::CpltSetVarImp*>::init(x.var());
00414   }
00415   }
00416 
00417 }
00418 
00419 
00420 // STATISTICS: cpltset-var