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

Class MinusView

gecode/int/view.hpp:282–415  ·  view source on GitHub ↗

* \brief Minus integer view * * A minus integer view \f$m\f$ for an integer view \f$x\f$ provides * operations such that \f$m\f$ behaves as \f$-x\f$. * \ingroup TaskActorIntView */

Source from the content-addressed store, hash-verified

280 * \ingroup TaskActorIntView
281 */
282 class MinusView : public DerivedView<IntView> {
283 protected:
284 using DerivedView<IntView>::x;
285 public:
286 /// \name Constructors and initialization
287 //@{
288 /// Default constructor
289 MinusView(void);
290 /// Initialize with integer view \a y
291 explicit MinusView(const IntView& y);
292 //@}
293
294 /// \name Value access
295 //@{
296 /// Return minimum of domain
297 int min(void) const;
298 /// Return maximum of domain
299 int max(void) const;
300 /// Return median of domain
301 int med(void) const;
302 /// Return assigned value (only if assigned)
303 int val(void) const;
304#ifdef GECODE_HAS_CBS
305 /// Return reverse transformation of value according to view
306 int baseval(int val) const;
307#endif
308
309 /// Return size (cardinality) of domain
310 unsigned int size(void) const;
311 /// Return width of domain (distance between maximum and minimum)
312 unsigned int width(void) const;
313 /// Return regret of domain minimum (distance to next larger value)
314 unsigned int regret_min(void) const;
315 /// Return regret of domain maximum (distance to next smaller value)
316 unsigned int regret_max(void) const;
317 //@}
318
319 /// \name Domain tests
320 //@{
321 /// Test whether domain is a range
322 bool range(void) const;
323
324 /// Test whether \a n is contained in domain
325 bool in(int n) const;
326 /// Test whether \a n is contained in domain
327 bool in(long long int n) const;
328 //@}
329
330 /// \name Domain update by value
331 //@{
332 /// Restrict domain values to be less or equal than \a n
333 ModEvent lq(Space& home, int n);
334 /// Restrict domain values to be less or equal than \a n
335 ModEvent lq(Space& home, long long int n);
336
337 /// Restrict domain values to be less than \a n
338 ModEvent le(Space& home, int n);
339 /// Restrict domain values to be less than \a n

Callers 15

minFunction · 0.70
argminFunction · 0.70
postFunction · 0.50
eqtobinFunction · 0.50
eqtoterFunction · 0.50
nqtobinFunction · 0.50
nqtoterFunction · 0.50
lqtobinFunction · 0.50
lqtoterFunction · 0.50
prop_abs_bndFunction · 0.50
postMethod · 0.50
propagateMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected