7 #include <boost/graph/graphviz.hpp>
13 using namespace boost;
16 std::ofstream f(fname.c_str());
18 write_graphviz(f, root_);
30 remove_vertex(entry->
vertex(), root_);
37 boost::tie(edge_id, added) = add_edge(lhs->
vertex(), rhs->
vertex(), root_);
48 properties.
edge = edge;
55 boost::tie(edge_id, exists) = edge(src->
vertex(), tgt->
vertex(), root_);
59 return root_[edge_id].edge;
67 return num_vertices(root_);
71 return num_edges(root_);
75 return open_vertex_list_.begin();
79 return open_vertex_list_.end();
83 open_vertex_list_.push_back(*vertex);
88 open_vertex_list_.erase(open_vertex_list_.iterator_to(*vertex));
92 Vertex v = *(vertices(root_).first);
93 return root_[v].entry;
98 open_ = edge->
source(graph_);
104 if (graph_ == NULL) {
105 return (graph_ == rhs.
graph_);
109 return open_ == graph_->GetRoot();
112 return open_ == rhs.
open_;
117 if (graph_ == NULL || open_ == NULL) {
122 edge = open_->in_edge(graph_);
123 vertex = edge->
source(graph_);
124 return std::make_pair(vertex, edge);
boost::intrusive::list_member_hook open_vertex_
PolicyGraphBase::edge_descriptor Edge
boost::graph_traits< graph_t >::edge_descriptor edge_descriptor
void RemoveNode(PolicyGraphVertex *entry)
OpenVertexList::iterator OpenVertexIterator
PolicyGraphVertex * source(PolicyGraph *graph)
std::pair< PolicyGraphVertex *, PolicyGraphEdge * > OpenVertexPathPair
PolicyGraphVertex * GetRoot() const
OpenVertexIterator open_vertex_end()
void AddNode(PolicyGraphVertex *entry)
void SetEdgeProperty(PolicyGraphEdge *edge)
void WriteDot(const std::string &fname) const
PolicyGraphBase::vertex_descriptor Vertex
bool equal(const open_vertex_reverse_iterator &rhs) const
Edge Link(PolicyGraphVertex *lhs, PolicyGraphVertex *rhs)
void AddOpenVertex(PolicyGraphVertex *vertex)
OpenVertexPathPair dereference() const
size_t edge_count() const
PolicyGraphVertex * entry
void Unlink(PolicyGraphVertex *lhs, PolicyGraphVertex *rhs)
size_t vertex_count() const
void RemoveOpenVertex(PolicyGraphVertex *vertex)
void set_vertex(const Vertex &vertex_id)
OpenVertexIterator open_vertex_begin()
PolicyGraphVertex * open_
PolicyGraphEdge * GetEdge(const PolicyGraphVertex *src, const PolicyGraphVertex *tgt)