noview.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 namespace Gecode {
00023
00024 namespace Int { namespace Linear {
00025
00030 class NoView : public ConstantViewBase {
00031 public:
00033
00034
00035 NoView(void) {}
00037 void init(void) {}
00039
00041
00042
00043 int min(void) const { return 0; }
00045 int max(void) const { return 0; }
00047 int med(void) const { return 0; }
00049 int val(void) const { return 0; }
00050
00052 unsigned int size(void) const { return 1; }
00054 unsigned int width(void) const { return 1; }
00056 unsigned int regret_min(void) const { return 0; }
00058 unsigned int regret_max(void) const { return 0; }
00060
00062
00063
00064 bool range(void) const { return true; }
00066 bool assigned(void) const { return true; }
00067
00069 bool in(int n) const { return false; }
00071 bool in(double n) const { return false; }
00073
00075
00076
00077 ModEvent lq(Space* home, int n) { return ME_INT_NONE; }
00079 ModEvent lq(Space* home, double n) { return ME_INT_NONE; }
00081 ModEvent le(Space* home, int n) { return ME_INT_NONE; }
00083 ModEvent le(Space* home, double n) { return ME_INT_NONE; }
00085 ModEvent gq(Space* home, int n) { return ME_INT_NONE; }
00087 ModEvent gq(Space* home, double n) { return ME_INT_NONE; }
00089 ModEvent gr(Space* home, int n) { return ME_INT_NONE; }
00091 ModEvent gr(Space* home, double n) { return ME_INT_NONE; }
00093 ModEvent nq(Space* home, int n) { return ME_INT_NONE; }
00095 ModEvent nq(Space* home, double n) { return ME_INT_NONE; }
00097 ModEvent eq(Space* home, int n) { return ME_INT_NONE; }
00099 ModEvent eq(Space* home, double n) { return ME_INT_NONE; }
00101
00103
00104
00105 static ModEvent pme(const Propagator* p) { return ME_INT_NONE; }
00107 static PropModEvent pme(ModEvent me) { return ME_INT_NONE; }
00109
00111
00112
00113 void subscribe(Space* home, Propagator* p, PropCond pc, bool process=true) {}
00115 void cancel(Space* home, Propagator* p, PropCond pc) {}
00117
00119
00120
00121 void update(Space* home, bool share, NoView& x) {}
00123
00125
00126
00127 bool operator ==(const NoView& x) const { return true; }
00129 bool operator !=(const NoView& x) const { return false; }
00131 bool operator < (const NoView& x) const { return false; }
00133 bool operator > (const NoView& x) const { return false; }
00135 };
00136
00137 }}
00138
00139
00144 template <>
00145 class ViewArray<Int::Linear::NoView> {
00146 public:
00148
00149
00150 ViewArray(void) {}
00152 ViewArray(Space* home, int m) {}
00154 ViewArray(const ViewArray<Int::Linear::NoView>&) {}
00156 ViewArray(Space*, const ViewArray<Int::Linear::NoView>&) {}
00158 const ViewArray<Int::Linear::NoView>& operator=(const ViewArray<Int::Linear::NoView>&) { return *this; }
00160
00162
00163
00164 int size(void) const { return 0; }
00166 void size(int n) {}
00168
00170
00171
00172 Int::Linear::NoView operator[](int i) { Int::Linear::NoView n; return n; }
00174
00176
00177
00178 void subscribe(Space*, Propagator* p, PropCond pc, bool process=true) {}
00180 void cancel(Space* home, Propagator* p, PropCond pc) {}
00182
00184
00185
00192 void update(Space*, bool share, ViewArray<Int::Linear::NoView>& a) {}
00194
00195
00197
00198
00199 void move_fst(int i) {}
00201 void move_lst(int i) {}
00207 void move_fst(int i, Propagator* p, PropCond pc) {}
00213 void move_lst(int i, Propagator* p, PropCond pc) {}
00215
00217
00218
00219 void drop_fst(int i);
00221 void drop_lst(int i);
00227 void drop_fst(int i, Propagator* p, PropCond pc) {}
00234 void drop_lst(int i, Propagator* p, PropCond pc) {}
00236
00238
00239
00240 bool equal(void) const { return false; }
00242 bool equal(const Int::Linear::NoView& y) const {return false; }
00244 void unique(void) {}
00246
00248
00249
00250 bool shared(void) const { return false; }
00252 bool shared(const Int::Linear::NoView& y) const { return false; }
00254
00255 private:
00256 static void* operator new(size_t);
00257 static void operator delete(void*,size_t);
00258 };
00259
00260 }
00261
00262
00263
00264