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
graph_analysis::SubGraphImpl
SubGraphImpl represents the subgraph implemention.
Definition: SubGraphImpl.hpp:15
graph_analysis::lemon::DirectedSubGraph::DirectedSubGraph
DirectedSubGraph(const shared_ptr< DirectedGraph > &graph)
graph_analysis::lemon::DirectedSubGraph::mNodeMap
::lemon::ListDigraph::NodeMap< bool > mNodeMap
Definition: DirectedSubGraph.hpp:38
graph_analysis::lemon::DirectedSubGraph::mArcMap
::lemon::ListDigraph::ArcMap< bool > mArcMap
Definition: DirectedSubGraph.hpp:39
graph_analysis::lemon::DirectedGraph
Directed graph implementation based on lemon library.
Definition: DirectedGraph.hpp:18
graph_analysis::lemon::SubGraphLemon
::lemon::SubDigraph< ::lemon::ListDigraph, ::lemon::ListDigraph::NodeMap< bool >, ::lemon::ListDigraph::ArcMap< bool > > SubGraphLemon
Definition: DirectedSubGraph.hpp:15
graph_analysis::lemon::DirectedSubGraph::enable
void enable(const Vertex::Ptr &vertex)
Definition: DirectedSubGraph.cpp:18
graph_analysis
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
graph_analysis::Edge::Ptr
shared_ptr< Edge > Ptr
Definition: Edge.hpp:21
graph_analysis::lemon::DirectedSubGraph
Definition: DirectedSubGraph.hpp:22
graph_analysis::lemon::DirectedSubGraph::disable
void disable(const Vertex::Ptr &vertex)
Definition: DirectedSubGraph.cpp:26
NodeIterator.hpp
graph_analysis::Vertex::Ptr
shared_ptr< Vertex > Ptr
Definition: Vertex.hpp:22
graph_analysis::lemon::DirectedSubGraph::enabled
bool enabled(const Vertex::Ptr &vertex) const
Definition: DirectedSubGraph.cpp:56
ArcIterator.hpp