iter.hh
Go to the documentation of this file.
00001 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 00002 /* 00003 * Main authors: 00004 * Christian Schulte <schulte@gecode.org> 00005 * 00006 * Copyright: 00007 * Christian Schulte, 2005 00008 * 00009 * Last modified: 00010 * $Date: 2009-09-08 21:10:29 +0200 (Tue, 08 Sep 2009) $ by $Author: schulte $ 00011 * $Revision: 9692 $ 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 #ifndef __GECODE_ITER_HH__ 00039 #define __GECODE_ITER_HH__ 00040 00041 namespace Gecode { 00043 namespace Iter { 00045 namespace Ranges { 00047 template<class I> struct IsRangeIter { 00049 static void constraints(I* p) { 00050 bool b = p->operator ()(); (void) b; 00051 p->operator ++(); 00052 int min = p->min(); (void) min; 00053 int max = p->max(); (void) max; 00054 unsigned int width = p->width(); (void) width; 00055 } 00057 IsRangeIter() { void(*p)(I*) = constraints; (void)p; } 00058 }; 00059 00061 namespace Virt {} 00062 } 00064 namespace Values { 00066 template<class I> struct IsValueIter { 00068 static void constraints(I* p) { 00069 bool b = p->operator ()(); (void) b; 00070 p->operator ++(); 00071 int val = p->val(); (void) val; 00072 } 00074 IsValueIter() { void(*p)(I*) = constraints; (void)p; } 00075 }; 00076 } 00077 } 00078 } 00079 00080 #include <gecode/iter/priority-queue.hpp> 00081 00082 #include <gecode/iter/ranges-operations.hpp> 00083 #include <gecode/iter/ranges-minmax.hpp> 00084 00085 #include <gecode/iter/ranges-append.hpp> 00086 #include <gecode/iter/ranges-array.hpp> 00087 #include <gecode/iter/ranges-cache.hpp> 00088 #include <gecode/iter/ranges-compl.hpp> 00089 #include <gecode/iter/ranges-diff.hpp> 00090 #include <gecode/iter/ranges-empty.hpp> 00091 #include <gecode/iter/ranges-inter.hpp> 00092 #include <gecode/iter/ranges-map.hpp> 00093 #include <gecode/iter/ranges-minus.hpp> 00094 #include <gecode/iter/ranges-negative.hpp> 00095 #include <gecode/iter/ranges-offset.hpp> 00096 #include <gecode/iter/ranges-positive.hpp> 00097 #include <gecode/iter/ranges-scale.hpp> 00098 #include <gecode/iter/ranges-singleton.hpp> 00099 #include <gecode/iter/ranges-union.hpp> 00100 #include <gecode/iter/ranges-values.hpp> 00101 #include <gecode/iter/ranges-add.hpp> 00102 #include <gecode/iter/ranges-singleton-append.hpp> 00103 00104 #include <gecode/iter/values-array.hpp> 00105 #include <gecode/iter/values-bitset.hpp> 00106 #include <gecode/iter/values-inter.hpp> 00107 #include <gecode/iter/values-map.hpp> 00108 #include <gecode/iter/values-minus.hpp> 00109 #include <gecode/iter/values-negative.hpp> 00110 #include <gecode/iter/values-offset.hpp> 00111 #include <gecode/iter/values-positive.hpp> 00112 #include <gecode/iter/values-ranges.hpp> 00113 #include <gecode/iter/values-singleton.hpp> 00114 #include <gecode/iter/values-union.hpp> 00115 #include <gecode/iter/values-unique.hpp> 00116 00117 #include <gecode/iter/ranges-size.hpp> 00118 00119 #include <gecode/iter/virtual-ranges.hpp> 00120 #include <gecode/iter/virtual-ranges-union.hpp> 00121 #include <gecode/iter/virtual-ranges-inter.hpp> 00122 #include <gecode/iter/virtual-ranges-compl.hpp> 00123 00124 #endif 00125 00126 // STATISTICS: iter-any