MCPcopy Create free account
hub / github.com/Gecode/gecode / IntView

Class IntView

gecode/int/view.hpp:129–264  ·  view source on GitHub ↗

* \brief Integer view for integer variables * \ingroup TaskActorIntView */

Source from the content-addressed store, hash-verified

127 * \ingroup TaskActorIntView
128 */
129 class IntView : public VarImpView<IntVar> {
130 protected:
131 using VarImpView<IntVar>::x;
132 public:
133 /// \name Constructors and initialization
134 //@{
135 /// Default constructor
136 IntView(void);
137 /// Initialize from integer variable \a y
138 IntView(const IntVar& y);
139 /// Initialize from integer variable \a y
140 IntView(IntVarImp* y);
141 //@}
142
143 /// \name Value access
144 //@{
145 /// Return minimum of domain
146 int min(void) const;
147 /// Return maximum of domain
148 int max(void) const;
149 /// Return median of domain (greatest element not greater than the median)
150 int med(void) const;
151 /// Return assigned value (only if assigned)
152 int val(void) const;
153#ifdef GECODE_HAS_CBS
154 /// Return reverse transformation of value according to view
155 int baseval(int val) const;
156#endif
157
158 /// Return size (cardinality) of domain
159 unsigned int size(void) const;
160 /// Return width of domain (distance between maximum and minimum)
161 unsigned int width(void) const;
162 /// Return regret of domain minimum (distance to next larger value)
163 unsigned int regret_min(void) const;
164 /// Return regret of domain maximum (distance to next smaller value)
165 unsigned int regret_max(void) const;
166 //@}
167
168 /// \name Domain tests
169 //@{
170 /// Test whether domain is a range
171 bool range(void) const;
172
173 /// Test whether \a n is contained in domain
174 bool in(int n) const;
175 /// Test whether \a n is contained in domain
176 bool in(long long int n) const;
177 //@}
178
179 /// \name Domain update by value
180 //@{
181 /// Restrict domain values to be less or equal than \a n
182 ModEvent lq(Space& home, int n);
183 /// Restrict domain values to be less or equal than \a n
184 ModEvent lq(Space& home, long long int n);
185
186 /// Restrict domain values to be less than \a n

Callers 7

nooverlapFunction · 0.70
countFunction · 0.70
pathFunction · 0.70
nvaluesFunction · 0.70
cumulativeFunction · 0.70
relFunction · 0.70
baseMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected