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

Class IntVarArgs

gecode/int.hh:662–710  ·  view source on GitHub ↗

\brief Passing integer variables

Source from the content-addressed store, hash-verified

660
661 /// \brief Passing integer variables
662 class IntVarArgs : public VarArgArray<IntVar> {
663 public:
664 /// \name Constructors and initialization
665 //@{
666 /// Allocate empty array
667 IntVarArgs(void);
668 /// Allocate array with \a n elements
669 explicit IntVarArgs(int n);
670 /// Initialize from variable argument array \a a (copy elements)
671 IntVarArgs(const IntVarArgs& a);
672 /// Initialize from variable array \a a (copy elements)
673 IntVarArgs(const VarArray<IntVar>& a);
674 /// Initialize from \a a
675 IntVarArgs(const std::vector<IntVar>& a);
676 /// Initialize from \a a
677 IntVarArgs(std::initializer_list<IntVar> a);
678 /// Initialize from InputIterator \a first and \a last
679 template<class InputIterator>
680 IntVarArgs(InputIterator first, InputIterator last);
681 /**
682 * \brief Initialize array with \a n new variables
683 *
684 * The variables are created with a domain ranging from \a min
685 * to \a max. The following exceptions might be thrown:
686 * - If \a min is greater than \a max, an exception of type
687 * Gecode::Int::VariableEmptyDomain is thrown.
688 * - If \a min or \a max exceed the limits for integers as defined
689 * in Gecode::Int::Limits, an exception of type
690 * Gecode::Int::OutOfLimits is thrown.
691 */
692 GECODE_INT_EXPORT
693 IntVarArgs(Space& home, int n, int min, int max);
694 /**
695 * \brief Initialize array with \a n new variables
696 *
697 * The variables are created with a domain described by \a s.
698 * The following exceptions might be thrown:
699 * - If \a s is empty, an exception of type
700 * Gecode::Int::VariableEmptyDomain is thrown.
701 * - If \a s contains values that exceed the limits for integers
702 * as defined in Gecode::Int::Limits, an exception of type
703 * Gecode::Int::OutOfLimits is thrown.
704 */
705 GECODE_INT_EXPORT
706 IntVarArgs(Space& home, int n, const IntSet& s);
707 /// Assignment operator
708 IntVarArgs& operator =(const IntVarArgs&) = default;
709 //@}
710 };
711
712 /** \brief Passing Boolean variables
713 *

Callers 6

setupMethod · 0.50
postMethod · 0.50
DominoMethod · 0.50
same_or_0Method · 0.50
ColoredMatrixMethod · 0.50
BlackHoleMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected