00001
00002
00003
00004
00005 #ifndef __DFrontier__
00006 #define __DFrontier__
00007 #include <vector>
00008 #include <string>
00009 using std::vector;
00010 using std::string;
00011
00012 template <typename GraphType>
00013 class DFrontier{
00014 typedef boost::graph_traits<GraphType>::vertex_descriptor VertexType;
00015 public:
00016 DFrontier() : _reachedPO(false) {}
00017 const char* getVersion(){ return _Version; };
00018 bool empty(){ return _stackVertex.empty(); }
00019 bool reachedPO() { return _reachedPO; }
00020 void setReachedPO() { _reachedPO=true;}
00021 void addObjective(VertexType& v){
00022 _stackVertex.push_back(v);
00023 }
00024 VertexType getObjective(){
00025 VertexType v=_stackVertex.front();
00026 _stackVertex.pop_back();
00027 return v;
00028 };
00029 private:
00030 static char* _Version;
00031 vector<VertexType> _stackVertex;
00032 bool _reachedPO;
00033 };
00034 template<typename G>
00035 char* DFrontier<G>::_Version="$Id: DFrontier.hpp,v 1.2 2002/11/21 18:09:12 khtan Exp $";
00036 #endif // __DFrontier__