graph_analysis
TypedGraph.hpp
Go to the documentation of this file.
1 #ifndef GRAPH_ANALYSIS_TYPED_GRAPH_HPP
2 #define GRAPH_ANALYSIS_TYPED_GRAPH_HPP
3 
4 #include "BaseGraph.hpp"
5 
6 namespace graph_analysis {
7 
8 template<typename T, typename G = BaseGraph>
9 class TypedGraph : public G
10 {
11 public:
12  TypedGraph(BaseGraph::ImplementationType type, bool directed = true)
13  : G(type, directed)
14  {}
15 
16  virtual ~TypedGraph() {};
17 
18  typedef T graph_t;
19 
23  graph_t& raw() { return mGraph; }
24 
25  const graph_t& raw() const { return mGraph; }
26 
27 protected:
28  graph_t mGraph;
29 
30 };
31 
32 } // end namespace graph_analysis
33 #endif // GRAPH_ANALYSIS_TYPED_GRAPH_HPP
TypedGraph(BaseGraph::ImplementationType type, bool directed=true)
Definition: TypedGraph.hpp:12
Definition: TypedGraph.hpp:9
const graph_t & raw() const
Definition: TypedGraph.hpp:25
graph_t & raw()
Definition: TypedGraph.hpp:23
graph_t mGraph
Definition: TypedGraph.hpp:28
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
virtual ~TypedGraph()
Definition: TypedGraph.hpp:16
T graph_t
Definition: TypedGraph.hpp:16
ImplementationType
Definition: BaseGraph.hpp:31