graph_analysis
BipartiteGraph.hpp
Go to the documentation of this file.
1 #ifndef GRAPH_ANALYISIS_BIPARTITE_GRAPH_HPP
2 #define GRAPH_ANALYISIS_BIPARTITE_GRAPH_HPP
3 
4 #include "BaseGraph.hpp"
5 #include "SubGraph.hpp"
6 
7 namespace graph_analysis {
8 
19 {
20 public:
22 
29  void linkVertices(const Vertex::Ptr& red, const Vertex::Ptr& blue, const std::string& label = "");
30 
34  std::vector<Vertex::Ptr> getPartners(const Vertex::Ptr& vertex) const;
35 
40  Vertex::Ptr getUniquePartner(const Vertex::Ptr& vertex) const;
41 
46  SubGraph::Ptr getRedSubGraph() const { return mpRed; }
47 
52  SubGraph::Ptr getBlueSubGraph() const { return mpBlue; }
53 
54 protected:
55 private:
56  BaseGraph::Ptr mpGraph;
57 
58  SubGraph::Ptr mpRed;
59  SubGraph::Ptr mpBlue;
60 };
61 
62 } // end namespace graph_analysis
63 #endif // GRAPH_ANALYISIS_BIPARTITE_GRAPH_HPP
SubGraph::Ptr getBlueSubGraph() const
Definition: BipartiteGraph.hpp:52
void linkVertices(const Vertex::Ptr &red, const Vertex::Ptr &blue, const std::string &label="")
Definition: BipartiteGraph.cpp:14
std::vector< Vertex::Ptr > getPartners(const Vertex::Ptr &vertex) const
Definition: BipartiteGraph.cpp:36
Vertex::Ptr getUniquePartner(const Vertex::Ptr &vertex) const
Definition: BipartiteGraph.cpp:53
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
shared_ptr< Vertex > Ptr
Definition: Vertex.hpp:22
BipartiteGraph()
Definition: BipartiteGraph.cpp:6
SubGraph::Ptr getRedSubGraph() const
Definition: BipartiteGraph.hpp:46
shared_ptr< SubGraph > Ptr
Definition: SubGraph.hpp:52
shared_ptr< BaseGraph > Ptr
Definition: BaseGraph.hpp:34
Implementation of a bipartite graph, that consists of a set of &#39;blue&#39; nodes and of &#39;red&#39; nodes...
Definition: BipartiteGraph.hpp:18