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 Stop::~Stop(void) {}
00031
00032
00033
00034
00035
00036
00037 bool
00038 MemoryStop::stop(const Statistics& s) {
00039 return s.memory > l;
00040 }
00041
00042
00043
00044
00045
00046
00047 bool
00048 FailStop::stop(const Statistics& s) {
00049 return s.fail > l;
00050 }
00051
00052
00053
00054
00055
00056
00057 bool
00058 TimeStop::stop(const Statistics&) {
00059 return static_cast<unsigned long int>
00060 ((static_cast<double>(clock()-s)/CLOCKS_PER_SEC) * 1000.0) > l;
00061 }
00062
00063 }}
00064
00065