ranges-singleton.icc
Go to the documentation of this file.00001 /* 00002 * Main authors: 00003 * Christian Schulte <schulte@gecode.org> 00004 * 00005 * Copyright: 00006 * Christian Schulte, 2004 00007 * 00008 * Last modified: 00009 * $Date: 2006-04-11 15:58:37 +0200 (Tue, 11 Apr 2006) $ by $Author: tack $ 00010 * $Revision: 3188 $ 00011 * 00012 * This file is part of Gecode, the generic constraint 00013 * development environment: 00014 * http://www.gecode.org 00015 * 00016 * See the file "LICENSE" for information on usage and 00017 * redistribution of this file, and for a 00018 * DISCLAIMER OF ALL WARRANTIES. 00019 * 00020 */ 00021 00022 namespace Gecode { namespace Iter { namespace Ranges { 00023 00031 class Singleton : public MinMax { 00032 public: 00034 00035 00036 Singleton(void); 00038 Singleton(int min, int max); 00040 void init(int min, int max); 00042 00044 00045 00046 void operator++(void); 00048 }; 00049 00050 00051 forceinline 00052 Singleton::Singleton(void) {} 00053 00054 forceinline 00055 Singleton::Singleton(int min, int max) 00056 : MinMax(min,max) {} 00057 00058 forceinline void 00059 Singleton::init(int min, int max) { 00060 mi = min; ma = max; 00061 } 00062 00063 forceinline void 00064 Singleton::operator++(void) { 00065 mi=1; ma=0; 00066 } 00067 00068 }}} 00069 00070 // STATISTICS: iter-any 00071