stop.cc
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "gecode/search.hh"
00023
00024 namespace Gecode { namespace Search {
00025
00026
00027
00028
00029
00030 bool
00031 MemoryStop::stop(const Statistics& s) {
00032 return s.memory > l;
00033 }
00034
00035
00036
00037
00038
00039
00040 bool
00041 FailStop::stop(const Statistics& s) {
00042 return s.fail > l;
00043 }
00044
00045
00046
00047
00048
00049
00050 bool
00051 TimeStop::stop(const Statistics&) {
00052 return static_cast<unsigned long int>
00053 ((static_cast<double>(clock()-s)/CLOCKS_PER_SEC) * 1000.0) > l;
00054 }
00055
00056 }}
00057
00058