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

stress-exec.cc

Go to the documentation of this file.
00001 /*
00002  *  Main authors:
00003  *     Christian Schulte <schulte@gecode.org>
00004  *
00005  *  Copyright:
00006  *     Christian Schulte, 2001
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 StressExec : public Example {
00031 protected:
00033   IntVarArray x;
00034 public:
00036   StressExec(const Options& opt)
00037     : x(this,2,0,opt.size) {
00038 
00039     rel(this, x[0], IRT_LE, x[1]);
00040     rel(this, x[1], IRT_LE, x[0]);
00041 
00042   }
00043 
00045   StressExec(bool share, StressExec& s) : Example(share,s) {
00046     x.update(this, share, s.x);
00047   }
00048 
00050   virtual Space*
00051   copy(bool share) {
00052     return new StressExec(share,*this);
00053   }
00054 
00056   virtual void
00057   print(void) {}
00058 };
00059 
00063 int
00064 main(int argc, char** argv) {
00065   Options opt("StressExec");
00066   opt.iterations = 20;
00067   opt.size       = 1000000;
00068   opt.parse(argc,argv);
00069   Example::run<StressExec,DFS>(opt);
00070   return 0;
00071 }
00072 
00073 // STATISTICS: example-any
00074