support-values.hh
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
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef __GECODE_INT_SUPPORT_VALUES_HH__
00039 #define __GECODE_INT_SUPPORT_VALUES_HH__
00040
00041 #include <gecode/int.hh>
00042
00043 namespace Gecode { namespace Int {
00044
00051 template<class View, class A>
00052 class SupportValues {
00053 private:
00055 A& a;
00057 class RangePos {
00058 public:
00059 int min;
00060 unsigned int pos;
00061 };
00063 class Unsupported {
00064 private:
00066 RangePos* rp;
00068 unsigned int p;
00070 SupportValues& sv;
00072 void find(void);
00073 public:
00075
00076
00077 Unsupported(SupportValues& sv0);
00079
00081
00082
00083 bool operator ()(void) const;
00085 void operator ++(void);
00087
00089
00090
00091 int val(void) const;
00093 };
00094
00096 View x;
00098 Gecode::Support::BitSetBase bs;
00100 RangePos* rp_fst;
00102 RangePos* rp_lst;
00104 RangePos* rp;
00106 int v;
00108 int max;
00109
00111 bool _support(int n);
00112 public:
00114 SupportValues(A& a, View x);
00116 ~SupportValues(void);
00117
00119
00120
00121 void reset(void);
00123 bool operator ()(void) const;
00125 void operator ++(void);
00127
00129
00130
00131 int val(void) const;
00133
00135
00136
00137 void support(void);
00139 bool support(int n);
00141 bool support(double n);
00143 ModEvent tell(Space& home);
00145 };
00146
00147 }}
00148
00149 #include <gecode/int/support-values.hpp>
00150
00151 #endif
00152
00153
00154