int-noview.hpp
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 namespace Gecode {
00035
00036 namespace Int { namespace Linear {
00037
00042 class NoView : public ConstView<IntView> {
00043 public:
00045
00046
00047 NoView(void) {}
00049
00051
00052
00053 int min(void) const { return 0; }
00055 int max(void) const { return 0; }
00057 int med(void) const { return 0; }
00059 int val(void) const { return 0; }
00060
00062 unsigned int size(void) const { return 1; }
00064 unsigned int width(void) const { return 1; }
00066 unsigned int regret_min(void) const { return 0; }
00068 unsigned int regret_max(void) const { return 0; }
00070
00072
00073
00074 bool range(void) const { return true; }
00076 bool assigned(void) const { return true; }
00077
00079 bool in(int n) const { (void) n; return false; }
00081 bool in(long long int n) const { (void) n; return false; }
00083
00085
00086
00087 ModEvent lq(Space& home, int n) {
00088 (void) home; (void) n;
00089 return ME_INT_NONE;
00090 }
00092 ModEvent lq(Space& home, long long int n) {
00093 (void) home; (void) n;
00094 return ME_INT_NONE;
00095 }
00097 ModEvent le(Space& home, int n) {
00098 (void) home; (void) n;
00099 return ME_INT_NONE;
00100 }
00102 ModEvent le(Space& home, long long int n) {
00103 (void) home; (void) n;
00104 return ME_INT_NONE;
00105 }
00107 ModEvent gq(Space& home, int n) {
00108 (void) home; (void) n;
00109 return ME_INT_NONE;
00110 }
00112 ModEvent gq(Space& home, long long int n) {
00113 (void) home; (void) n;
00114 return ME_INT_NONE;
00115 }
00117 ModEvent gr(Space& home, int n) {
00118 (void) home; (void) n;
00119 return ME_INT_NONE;
00120 }
00122 ModEvent gr(Space& home, long long int n) {
00123 (void) home; (void) n;
00124 return ME_INT_NONE;
00125 }
00127 ModEvent nq(Space& home, int n) {
00128 (void) home; (void) n;
00129 return ME_INT_NONE;
00130 }
00132 ModEvent nq(Space& home, long long int n) {
00133 (void) home; (void) n;
00134 return ME_INT_NONE;
00135 }
00137 ModEvent eq(Space& home, int n) {
00138 (void) home; (void) n;
00139 return ME_INT_NONE;
00140 }
00142 ModEvent eq(Space& home, long long int n) {
00143 (void) home; (void) n;
00144 return ME_INT_NONE;
00145 }
00147 };
00148
00153 template<class Char, class Traits>
00154 std::basic_ostream<Char,Traits>&
00155 operator <<(std::basic_ostream<Char,Traits>& os, const NoView&) { return os; }
00156
00157 }}
00158
00159
00164 template<>
00165 class ViewArray<Int::Linear::NoView> {
00166 public:
00168
00169
00170 ViewArray(void) {}
00172 ViewArray(Space& home, int m) { (void) home; (void) m; }
00174 ViewArray(const ViewArray<Int::Linear::NoView>&) {}
00176 ViewArray(Space&, const ViewArray<Int::Linear::NoView>&) {}
00178 const ViewArray<Int::Linear::NoView>& operator =(const ViewArray<Int::Linear::NoView>&) { return *this; }
00180
00182
00183
00184 int size(void) const { return 0; }
00186 void size(int n) { (void) n; }
00188
00190
00191
00192 Int::Linear::NoView operator [](int i) {
00193 (void) i;
00194 Int::Linear::NoView n;
00195 return n;
00196 }
00198 const Int::Linear::NoView operator [](int i) const {
00199 (void) i;
00200 Int::Linear::NoView n;
00201 return n;
00202 }
00204
00206
00207
00208 void subscribe(Space&, Propagator& p, PropCond pc, bool process=true) {
00209 (void) p; (void) pc; (void) process;
00210 }
00212 void cancel(Space& home, Propagator& p, PropCond pc) {
00213 (void) home; (void) p; (void) pc;
00214 }
00216 void reschedule(Space& home, Propagator& p, PropCond pc) {
00217 (void) home; (void) p; (void) pc;
00218 }
00220
00222
00223
00224 void update(Space& home, ViewArray<Int::Linear::NoView>& a) {
00225 (void) home; (void) a;
00226 }
00228
00230
00231
00232 void move_fst(int i) { (void) i; }
00234 void move_lst(int i) { (void) i; }
00236 private:
00237 static void* operator new(size_t);
00238 static void operator delete(void*,size_t);
00239 };
00240
00241 }
00242
00243
00244
00245