Generated on Tue Apr 18 10:21:36 2017 for Gecode by doxygen 1.6.3

branch.hh

Go to the documentation of this file.
00001 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
00002 /*
00003  *  Main authors:
00004  *     Mikael Lagerkvist <lagerkvist@gecode.org>
00005  *     Christian Schulte <schulte@gecode.org>
00006  *
00007  *  Contributing authors:
00008  *     Vincent Barichard <Vincent.Barichard@univ-angers.fr>
00009  *
00010  *  Copyright:
00011  *     Mikael Lagerkvist, 2006
00012  *     Christian Schulte, 2009
00013  *     Vincent Barichard, 2012
00014  *
00015  *  Last modified:
00016  *     $Date: 2012-04-05 12:00:11 +0200 (Thu, 05 Apr 2012) $ by $Author: vbarichard $
00017  *     $Revision: 12703 $
00018  *
00019  *  This file is part of Gecode, the generic constraint
00020  *  development environment:
00021  *     http://www.gecode.org
00022  *
00023  *  Permission is hereby granted, free of charge, to any person obtaining
00024  *  a copy of this software and associated documentation files (the
00025  *  "Software"), to deal in the Software without restriction, including
00026  *  without limitation the rights to use, copy, modify, merge, publish,
00027  *  distribute, sublicense, and/or sell copies of the Software, and to
00028  *  permit persons to whom the Software is furnished to do so, subject to
00029  *  the following conditions:
00030  *
00031  *  The above copyright notice and this permission notice shall be
00032  *  included in all copies or substantial portions of the Software.
00033  *
00034  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00035  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00036  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00037  *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00038  *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00039  *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00040  *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00041  *
00042  */
00043 
00044 #ifndef __GECODE_TEST_BRANCH_HH__
00045 #define __GECODE_TEST_BRANCH_HH__
00046 
00047 #include <gecode/kernel.hh>
00048 
00049 #include <gecode/int.hh>
00050 
00051 #ifdef GECODE_HAS_SET_VARS
00052 #include <gecode/set.hh>
00053 #endif
00054 
00055 #ifdef GECODE_HAS_FLOAT_VARS
00056 #include <gecode/float.hh>
00057 #endif
00058 
00059 #include "test/test.hh"
00060 
00061 namespace Test {
00062 
00064   namespace Branch {
00065 
00070     class IntTest : public Base {
00071     protected:
00073       int arity;
00075       Gecode::IntSet dom;
00076     public:
00078       IntTest(const std::string& s, int a, const Gecode::IntSet& d);
00080       virtual bool run(void);
00082       virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) = 0;
00083     };
00084 
00089     class BoolTest : public Base {
00090     protected:
00092       int arity;
00093     public:
00095       BoolTest(const std::string& s, int a);
00097       virtual bool run(void);
00099       virtual void post(Gecode::Space& home, Gecode::BoolVarArray& x) = 0;
00100     };
00101 
00102 #ifdef GECODE_HAS_SET_VARS
00103 
00107     class SetTest : public Base {
00108     protected:
00110       int arity;
00112       Gecode::IntSet dom;
00113     public:
00115       SetTest(const std::string& s, int a, const Gecode::IntSet& d);
00117       virtual bool run(void);
00119       virtual void post(Gecode::Space& home, Gecode::SetVarArray& x) = 0;
00120     };
00121 #endif
00122 
00123 #ifdef GECODE_HAS_FLOAT_VARS
00124 
00128     class FloatTest : public Base {
00129     protected:
00131       int arity;
00133       Gecode::FloatVal dom;
00135       int nbSols;
00136     public:
00138       FloatTest(const std::string& s, int a, const Gecode::FloatVal& d, int nbs);
00140       virtual bool run(void);
00142       virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) = 0;
00143     };
00144 #endif
00145 
00146   }
00147 
00148 }
00149 
00150 #endif
00151 
00152 // STATISTICS: test-branch