state_utils.cpp
Go to the documentation of this file.
00001 
00002 #include <actasp/state_utils.h>
00003 
00004 
00005 //this class became a template, this file is here for a syntax check
00006 
00007 // using namespace std;
00008 // 
00009 // namespace actasp {
00010 
00011   
00012 
00013 // bool  StateComparator::operator()(const std::set<AspFluent> &first,const std::set<AspFluent> &second) const {
00014 //   if (first.size() != second.size())
00015 //     return first.size() < second.size();
00016 // 
00017 //   //they have the same number of fluents
00018 //   set<AspFluent>::const_iterator thisV = first.begin();
00019 //   set<AspFluent>::const_iterator otherV = second.begin();
00020 // 
00021 //   ActionComparator lessThen; //ignores the time steps!
00022 // 
00023 //   for (; thisV != first.end(); ++thisV, ++otherV) {
00024 //     //this comparison is costly, so I'm using this unelegant expression to minimize the calls to it.
00025 //     if (lessThen(*thisV , *otherV))
00026 //       return true;
00027 //     if (lessThen(*otherV , *thisV))
00028 //       return false;
00029 //   }
00030 // 
00031 //   //they are the same
00032 //   return false;
00033 // }
00034 // 
00035 // 
00036 // bool  StateComparatorRef::operator()(const std::set<AspFluentRef> &first,const std::set<AspFluentRef> &second) const {
00037 //   if (first.size() != second.size())
00038 //     return first.size() < second.size();
00039 // 
00040 //   //they have the same number of fluents
00041 //   set<AspFluentRef>::const_iterator thisV = first.begin();
00042 //   set<AspFluentRef>::const_iterator otherV = second.begin();
00043 // 
00044 //   ActionComparator lessThen; //ignores the time steps!
00045 // 
00046 //   for (; thisV != first.end(); ++thisV, ++otherV) {
00047 //     //this comparison is costly, so I'm using this unelegant expression to minimize the calls to it.
00048 //     if (lessThen(*thisV , *otherV))
00049 //       return true;
00050 //     if (lessThen(*otherV , *thisV))
00051 //       return false;
00052 //   }
00053 // 
00054 //   //they are the same
00055 //   return false;
00056 // }
00057 
00058 
00059 // }
00060 


bwi_kr_execution
Author(s): Matteo Leonetti, Piyush Khandelwal
autogenerated on Fri Aug 28 2015 10:14:46