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

view.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 namespace Gecode { 
00039 
00040   namespace CpltSet {
00041 
00055     class CpltSetView : public VarViewBase<CpltSetVarImp> {
00056     protected:
00057       using VarViewBase<CpltSetVarImp>::varimp;
00058     public:
00060 
00061 
00062       CpltSetView(void);
00064       CpltSetView(const CpltSetVar& x);
00066       CpltSetView(CpltSetVarImp* x);
00068 
00070 
00071 
00072       unsigned int cardMin(void) const;
00074       unsigned int cardMax(void) const;
00076       int lubMin(void) const;
00078       int lubMax(void) const;
00080       int lubMinN(int n) const;
00082       int lubMaxN(int n) const;
00084       int glbMin(void) const;
00086       int glbMax(void) const;
00088       unsigned int glbSize(void) const;
00090       unsigned int lubSize(void) const;
00092       unsigned int unknownSize(void) const;
00094 
00096 
00097 
00098       bool assigned(void) const;
00100       bool contains(int i) const;
00102       bool notContains(int i) const;
00104 
00106 
00107 
00108       int initialLubMin(void) const;
00110       int initialLubMax(void) const;
00113       unsigned int tableWidth(void) const;
00116       unsigned int offset(void) const;
00119       bdd element(int i) const;
00122       bdd elementNeg(int i) const;
00124       bdd dom(void) const;
00126 
00127 
00129 
00130 
00134       ModEvent cardinality(Space* home, int l, int u);
00136       ModEvent cardMin(Space* home, unsigned int m);
00138       ModEvent cardMax(Space* home, unsigned int m);
00139 
00141       ModEvent include(Space* home, int i,int j);
00143       ModEvent include(Space* home, int i); 
00144 
00146       ModEvent exclude(Space* home, int i,int j);
00148       ModEvent exclude(Space* home, int i);
00149 
00151       ModEvent nq(Space* home, int v);
00153       ModEvent nq(Space* home, int a, int b);
00154 
00156       ModEvent eq(Space* home, int v);
00158       ModEvent eq(Space* home, int a, int b);
00159        
00161       ModEvent intersect(Space* home,int i,int j);
00163       ModEvent intersect(Space* home,int i);
00164 
00166       ModEvent intersect(Space* home, bdd& d);   
00168 
00170 
00171 
00173       template <class I> ModEvent excludeI(Space* home, I& i);
00175       template <class I> ModEvent includeI(Space* home, I& i);  
00177       template <class I> ModEvent intersectI(Space* home, I& iter);
00179       template <class I> ModEvent eqI(Space* home, I& i);
00181       template <class I> ModEvent nqI(Space* home, I& i);
00183 
00185 
00186 
00187       void update(Space* home, bool share, CpltSetView& x);
00189 
00191 
00192 
00193       Reflection::Arg* spec(const Space* home, Reflection::VarMap& m) const;
00194       static Support::Symbol type(void);
00196 
00198 
00199 
00200       static ModEvent modevent(const Delta* d);
00202     };
00203 
00204   }
00211   template<>
00212   class ViewVarImpTraits<CpltSet::CpltSetView> {
00213   public:
00215     typedef CpltSet::CpltSetVarImp VarImp;
00216   };
00217 
00218 }
00219 
00220 #include "gecode/cpltset/var/cpltset.icc"
00221 #include "gecode/cpltset/view/cpltset.icc"
00222 
00227 GECODE_CPLTSET_EXPORT std::ostream&
00228 operator<<(std::ostream&, const Gecode::CpltSet::CpltSetView& x);
00229 
00230 
00231 // STATISTICS: cpltset-var