Sha256: 8a096e572a7137348eb3625f8ac79802ec81cb3937ddcc21ecad3613027f9af5
Contents?: true
Size: 1.45 KB
Versions: 1
Compression:
Stored size: 1.45 KB
Contents
/* * Main authors: * Christian Schulte <schulte@gecode.org> * * Copyright: * Christian Schulte, 2004 * * Last modified: * $Date: 2006-04-11 15:58:37 +0200 (Tue, 11 Apr 2006) $ by $Author: tack $ * $Revision: 3188 $ * * 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 { namespace Iter { namespace Ranges { /** * \brief Range iterator for singleton range * * Requires \code #include "gecode/iter.hh" \endcode * \ingroup FuncIterRanges */ class Singleton : public MinMax { public: /// \name Constructors and initialization //@{ /// Default constructor Singleton(void); /// Initialize with range \a min to \a max Singleton(int min, int max); /// Initialize with range \a min to \a max void init(int min, int max); //@} /// \name Iteration control //@{ /// Move iterator to next range (if possible) void operator++(void); //@} }; forceinline Singleton::Singleton(void) {} forceinline Singleton::Singleton(int min, int max) : MinMax(min,max) {} forceinline void Singleton::init(int min, int max) { mi = min; ma = max; } forceinline void Singleton::operator++(void) { mi=1; ma=0; } }}} // STATISTICS: iter-any
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gecoder-with-gecode-0.7.1 | ext/gecode-1.3.1/gecode/iter/ranges-singleton.icc |