Main Page   Namespace List   Alphabetical List   Compound List   File List   Compound Members   File Members  

DFrontier.hpp

Go to the documentation of this file.
00001 /* Copyright (C) Kwee Heong Tan 2002 - 2003
00002    Permission is granted to use this code without restriction as
00003    long as this copyright notice appears in all source files.
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){ // optimization heuristic: weight Vertex based on distance from PI
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__

Generated on Mon Jan 20 11:54:26 2003 for ATPG by doxygen1.3-rc1