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

Class IntVar

gecode/int.hh:371–462  ·  view source on GitHub ↗

* \brief Integer variables * * \ingroup TaskModelIntVars */

Source from the content-addressed store, hash-verified

369 * \ingroup TaskModelIntVars
370 */
371 class IntVar : public VarImpVar<Int::IntVarImp> {
372 friend class IntVarArray;
373 friend class IntVarArgs;
374 private:
375 using VarImpVar<Int::IntVarImp>::x;
376 /**
377 * \brief Initialize variable with range domain
378 *
379 * The variable is created with a domain ranging from \a min
380 * to \a max. No exceptions are thrown.
381 */
382 void _init(Space& home, int min, int max);
383 /**
384 * \brief Initialize variable with arbitrary domain
385 *
386 * The variable is created with a domain described by \a d.
387 * No exceptions are thrown.
388 */
389 void _init(Space& home, const IntSet& d);
390 public:
391 /// \name Constructors and initialization
392 //@{
393 /// Default constructor
394 IntVar(void);
395 /// Initialize from integer variable \a y
396 IntVar(const IntVar& y);
397 /// Initialize from integer view \a y
398 IntVar(const Int::IntView& y);
399 /**
400 * \brief Initialize variable with range domain
401 *
402 * The variable is created with a domain ranging from \a min
403 * to \a max. The following exceptions might be thrown:
404 * - If \a min is greater than \a max, an exception of type
405 * Gecode::Int::VariableEmptyDomain is thrown.
406 * - If \a min or \a max exceed the limits for integers as defined
407 * in Gecode::Int::Limits, an exception of type
408 * Gecode::Int::OutOfLimits is thrown.
409 */
410 GECODE_INT_EXPORT IntVar(Space& home, int min, int max);
411 /**
412 * \brief Initialize variable with arbitrary domain
413 *
414 * The variable is created with a domain described by \a d.
415 * The following exceptions might be thrown:
416 * - If \a d is empty, an exception of type
417 * Gecode::Int::VariableEmptyDomain is thrown.
418 * - If \a d contains values that exceed the limits for integers
419 * as defined in Gecode::Int::Limits, an exception of type
420 * Gecode::Int::OutOfLimits is thrown.
421 */
422 GECODE_INT_EXPORT IntVar(Space& home, const IntSet& d);
423 //@}
424
425 /// \name Value access
426 //@{
427 /// Return minimum of domain
428 int min(void) const;

Callers 7

setForAllMethod · 0.50
RadiotherapyMethod · 0.50
WordSquareMethod · 0.50
same_or_0Method · 0.50
initMethod · 0.50
EFPAMethod · 0.50
BACPMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected