Generated on Wed Nov 1 15:04:27 2006 for Gecode by doxygen 1.4.5

baseline.cc

Go to the documentation of this file.
00001 /*
00002  *  Main authors:
00003  *     Guido Tack <tack@gecode.org>
00004  *
00005  *  Copyright:
00006  *     Guido Tack, 2006
00007  *
00008  *  Last modified:
00009  *     $Date: 2006-08-03 13:51:17 +0200 (Thu, 03 Aug 2006) $ by $Author: schulte $
00010  *     $Revision: 3506 $
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 #include "examples/support.hh"
00023 
00030 class Baseline : public Example {
00031 protected:
00033   IntVarArray x;
00034 public:
00036   Baseline(const Options& opt)
00037     : x(this,1,0,1) {
00038     branch(this, x, BVAR_NONE, BVAL_MIN);
00039   }
00040 
00042   Baseline(bool share, Baseline& s) : Example(share,s) {
00043     x.update(this, share, s.x);
00044   }
00045 
00047   virtual Space*
00048   copy(bool share) {
00049     return new Baseline(share,*this);
00050   }
00051 
00053   virtual void
00054   print(void) {}
00055 };
00056 
00060 int
00061 main(int argc, char** argv) {
00062   Options opt("Baseline");
00063   opt.iterations = 2000;
00064   opt.solutions  = 0;
00065   opt.parse(argc,argv);
00066   Example::run<Baseline,DFS>(opt);
00067   return 0;
00068 }
00069 
00070 // STATISTICS: example-any
00071