/* * Main authors: * Guido Tack * Christian Schulte * * Contributing authors: * Gabor Szokoli * * Copyright: * Guido Tack, 2004 * Christian Schulte, 2004 * Gabor Szokoli, 2004 * * Last modified: * $Date: 2006-07-12 15:53:12 +0200 (Wed, 12 Jul 2006) $ by $Author: tack $ * $Revision: 3349 $ * * This file is part of Gecode, the generic constraint * development environment: * http://www.gecode.org * * See the file "LICENSE" for information on usage and * redistribution of this file, and for a * DISCLAIMER OF ALL WARRANTIES. * */ namespace Gecode { /** * \defgroup TaskIntSetArgs Argument arrays * * Argument arrays are just good enough for passing arguments * with automatic memory management. * \ingroup TaskIntSet */ //@{ /// Passing set variables typedef VarArgArray SetVarArgs; //@} /** * \defgroup TaskIntSetVarArrays Variable arrays * * Variable arrays can store variables. They are typically used * for storing the variables being part of a solution. However, * they can also be used for temporary purposes (even though * memory is not reclaimed until the space it is created for * is deleted). * \ingroup TaskIntSet */ /** * \brief %Set variable array * \ingroup TaskIntSetVarArrays */ class GECODE_SET_EXPORT SetVarArray : public VarArray { public: SetVarArray(void); SetVarArray(const SetVarArray&); /// Create an uninitialized array of size \a n SetVarArray(Space* home,int n); /** * \brief Create an array of size \a n. * * Each variable is initialized with the bounds and cardinality as * given by the arguments. */ SetVarArray(Space* home,int n,int glbMin,int glbMax,int lubMin,int lubMax, unsigned int minCard = 0, unsigned int maxCard = Limits::Set::card_max); /** * \brief Create an array of size \a n. * * Each variable is initialized with the bounds and cardinality as * given by the arguments. */ SetVarArray(Space* home,int n,const IntSet& glb, int lubMin, int lubMax, unsigned int minCard = 0, unsigned int maxCard = Limits::Set::card_max); /** * \brief Create an array of size \a n. * * Each variable is initialized with the bounds and cardinality as * given by the arguments. */ SetVarArray(Space* home,int n,int glbMin,int glbMax,const IntSet& lub, unsigned int minCard = 0, unsigned int maxCard = Limits::Set::card_max); /** * \brief Create an array of size \a n. * * Each variable is initialized with the bounds and cardinality as * given by the arguments. */ SetVarArray(Space* home,int n, const IntSet& glb,const IntSet& lub, unsigned int minCard = 0, unsigned int maxCard = Limits::Set::card_max); }; /// Traits of SetVarArray template <> class ArrayTraits { public: typedef SetVarArgs storage_type; typedef SetVar value_type; typedef SetVarArgs args_type; }; /// Traits of SetVarArgs template <> class ArrayTraits { public: typedef SetVarArgs storage_type; typedef SetVar value_type; typedef SetVarArgs args_type; }; /* * Implementation * */ forceinline SetVarArray::SetVarArray(void) {} forceinline SetVarArray::SetVarArray(const SetVarArray& a) : VarArray(a) {} } // STATISTICS: set-other