graph_analysis
DirectedSubGraph.hpp
Go to the documentation of this file.
1 #ifndef GRAPH_ANALYSIS_LEMON_DIRECTED_SUB_GRAPH_HPP
2 #define GRAPH_ANALYSIS_LEMON_DIRECTED_SUB_GRAPH_HPP
3 
4 #include "../SubGraphImpl.hpp"
5 #include "../Graph.hpp"
6 #include "NodeIterator.hpp"
7 #include "ArcIterator.hpp"
8 
9 #include <lemon/adaptors.h>
10 #include <lemon/list_graph.h>
11 
12 namespace graph_analysis {
13 namespace lemon {
14 
16 
17 typedef ::lemon::SubDigraph< ::lemon::ListDigraph, ::lemon::ListDigraph::NodeMap<bool>, ::lemon::ListDigraph::ArcMap<bool> > SubGraphLemon;
18 
22 class DirectedSubGraph : public SubGraphImpl< SubGraphLemon >
23 {
24  shared_ptr<DirectedGraph> mpDirectedGraph;
25 
26 public:
27  DirectedSubGraph(const shared_ptr<DirectedGraph>& graph);
28 
29  void enable(const Vertex::Ptr& vertex);
30  void disable(const Vertex::Ptr& vertex);
31 
32  void enable(const Edge::Ptr& edge);
33  void disable(const Edge::Ptr& edge);
34 
35  bool enabled(const Vertex::Ptr& vertex) const;
36  bool enabled(const Edge::Ptr& vertex) const;
37 
38  ::lemon::ListDigraph::NodeMap<bool> mNodeMap;
39  ::lemon::ListDigraph::ArcMap<bool> mArcMap;
40 };
41 
42 } // end namespace lemon
43 } // end namespace graph_analysis
44 #endif // GRAPH_ANALYSIS_LEMON_DIRECTED_SUB_GRAPH_HPP
Definition: DirectedSubGraph.hpp:22
::lemon::SubDigraph< ::lemon::ListDigraph, ::lemon::ListDigraph::NodeMap< bool >, ::lemon::ListDigraph::ArcMap< bool > > SubGraphLemon
Definition: DirectedSubGraph.hpp:15
::lemon::ListDigraph::ArcMap< bool > mArcMap
Definition: DirectedSubGraph.hpp:39
shared_ptr< Edge > Ptr
Definition: Edge.hpp:21
void disable(const Vertex::Ptr &vertex)
Definition: DirectedSubGraph.cpp:26
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
shared_ptr< Vertex > Ptr
Definition: Vertex.hpp:22
void enable(const Vertex::Ptr &vertex)
Definition: DirectedSubGraph.cpp:18
DirectedSubGraph(const shared_ptr< DirectedGraph > &graph)
bool enabled(const Vertex::Ptr &vertex) const
Definition: DirectedSubGraph.cpp:56
::lemon::ListDigraph::NodeMap< bool > mNodeMap
Definition: DirectedSubGraph.hpp:38
SubGraphImpl represents the subgraph implemention.
Definition: SubGraphImpl.hpp:15
Directed graph implementation based on lemon library.
Definition: DirectedGraph.hpp:18