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
graph_analysis::BipartiteGraph::getBlueSubGraph
SubGraph::Ptr getBlueSubGraph() const
Definition: BipartiteGraph.hpp:52
graph_analysis::BipartiteGraph::BipartiteGraph
BipartiteGraph()
Definition: BipartiteGraph.cpp:6
graph_analysis::BipartiteGraph::getPartners
std::vector< Vertex::Ptr > getPartners(const Vertex::Ptr &vertex) const
Definition: BipartiteGraph.cpp:36
BaseGraph.hpp
graph_analysis
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
graph_analysis::BaseGraph::Ptr
shared_ptr< BaseGraph > Ptr
Definition: BaseGraph.hpp:34
graph_analysis::BipartiteGraph::getRedSubGraph
SubGraph::Ptr getRedSubGraph() const
Definition: BipartiteGraph.hpp:46
graph_analysis::BipartiteGraph::getUniquePartner
Vertex::Ptr getUniquePartner(const Vertex::Ptr &vertex) const
Definition: BipartiteGraph.cpp:53
graph_analysis::Vertex::Ptr
shared_ptr< Vertex > Ptr
Definition: Vertex.hpp:22
SubGraph.hpp
graph_analysis::BipartiteGraph::linkVertices
void linkVertices(const Vertex::Ptr &red, const Vertex::Ptr &blue, const std::string &label="")
Definition: BipartiteGraph.cpp:14
graph_analysis::BipartiteGraph
Implementation of a bipartite graph, that consists of a set of 'blue' nodes and of 'red' nodes.
Definition: BipartiteGraph.hpp:18
graph_analysis::SubGraph::Ptr
shared_ptr< SubGraph > Ptr
Definition: SubGraph.hpp:52