|
graph_analysis
|
A subgraph represent a particular filtered 'view' on a BaseGraph. More...
#include <SubGraph.hpp>


Public Types | |
| typedef shared_ptr< SubGraph > | Ptr |
Public Member Functions | |
| SubGraph (const shared_ptr< BaseGraph > &graph) | |
| virtual | ~SubGraph () |
| virtual void | enable (const Vertex::Ptr &vertex) |
| virtual void | disable (const Vertex::Ptr &vertex) |
| virtual void | enable (const Edge::Ptr &edge) |
| virtual void | disable (const Edge::Ptr &edge) |
| virtual bool | enabled (const Vertex::Ptr &vertex) const |
| virtual bool | enabled (const Edge::Ptr &edge) const |
| bool | disabled (const Vertex::Ptr &vertex) const |
| bool | disabled (const Edge::Ptr &edge) const |
| void | enableAllVertices () |
| void | enableAllEdges () |
| void | disableAllVertices () |
| void | disableAllEdges () |
| void | applyFilters (const Filter< Vertex::Ptr >::Ptr &vertexFilter, const Filter< Edge::Ptr >::Ptr &edgeFilter) |
| virtual shared_ptr< BaseGraph > | toBaseGraph () const |
| virtual VertexIterator::Ptr | getVertexIterator () const |
| virtual EdgeIterator::Ptr | getEdgeIterator () const |
| virtual EdgeIterator::Ptr | getEdgeIterator (const Vertex::Ptr &vertex) const |
| shared_ptr< BaseGraph > | getBaseGraph () const |
Public Member Functions inherited from graph_analysis::VertexIterable | |
| virtual | ~VertexIterable () |
| virtual uint64_t | getVertexCount () const |
Public Member Functions inherited from graph_analysis::EdgeIterable | |
| virtual | ~EdgeIterable () |
| virtual uint64_t | getEdgeCount () const |
Protected Attributes | |
| shared_ptr< BaseGraph > | mpBaseGraph |
| Ptr which refers to the original (super) graph. More... | |
| std::set< GraphElementId > | mDisabledVertices |
| std::set< GraphElementId > | mDisabledEdges |
A subgraph represent a particular filtered 'view' on a BaseGraph.
Initialize the Subgraph G'(V',E') with a BaseGraph G(V,E), where the following holds
The subset membership for vertices and edges can be controlled via functions SubGraph::enable and SubGraph::disable
The iterators of the subgraph check the membership in order to transparently skip vertices / edges that are not members of the subgraph
Disabling a vertex will result in disabling all outgoing or incoming edges Reenabling such vertex however will only reenable the particular vertex
In order to export the SubGraph as a BaseGraph use SubGraph::toBaseGraph
| typedef shared_ptr<SubGraph> graph_analysis::SubGraph::Ptr |
| graph_analysis::SubGraph::SubGraph | ( | const shared_ptr< BaseGraph > & | graph | ) |
Default constructor
| graph | Initialize the Subgraph G'(V',E') with a BaseGraph G(V,E), where the following holds |
|
inlinevirtual |
| void graph_analysis::SubGraph::applyFilters | ( | const Filter< Vertex::Ptr >::Ptr & | vertexFilter, |
| const Filter< Edge::Ptr >::Ptr & | edgeFilter | ||
| ) |
Apply filters to this subgraph
Apply filters to this subgraph, pass filters::Filter<Vertex::Ptr>::Null() or filters::Filter<Edge::Ptr>::Null() to skip filter for vertices or nodes
|
virtual |
Disable the given edge
| edge | Edge that is part of the underlying main graph and should not be part of the subgraph |
Reimplemented in graph_analysis::lemon::DirectedSubGraph.
|
virtual |
Disable the given vertex
| vertex | Vertex that is part of the underlying main graph and should not(!) be part of the subgraph |
Reimplemented in graph_analysis::lemon::DirectedSubGraph.
| void graph_analysis::SubGraph::disableAllEdges | ( | ) |
Disable all edges
| void graph_analysis::SubGraph::disableAllVertices | ( | ) |
Disable all vertices
|
inline |
Test if an edge is disabled
|
inline |
Test if a vertex is disabled
|
virtual |
Enable the given edge
| edge | Edge that is part of the underlying main graph and should be part of the subgraph |
Reimplemented in graph_analysis::lemon::DirectedSubGraph.
|
virtual |
Enable the given vertex
| vertex | Vertex that is part of the underlying main graph and should also be part of the subgraph |
Reimplemented in graph_analysis::lemon::DirectedSubGraph.
| void graph_analysis::SubGraph::enableAllEdges | ( | ) |
Enable all edges
| void graph_analysis::SubGraph::enableAllVertices | ( | ) |
Enable all vertices
|
virtual |
Test if an edge is enabled
Reimplemented in graph_analysis::lemon::DirectedSubGraph.
|
virtual |
Test if a vertex is enabled
Reimplemented in graph_analysis::lemon::DirectedSubGraph.
| BaseGraph::Ptr graph_analysis::SubGraph::getBaseGraph | ( | ) | const |
Get the underlying base graph
|
virtual |
Get iterator over all edge in this subgraph
Reimplemented from graph_analysis::EdgeIterable.
|
virtual |
Get iterator over all edges that are starting a vertex
|
virtual |
Get the iterator over all vertices in this subgraph
Reimplemented from graph_analysis::VertexIterable.
|
virtual |
Convert the subgraph into a base graph by copying only the enabled nodes and edges
|
protected |
|
protected |
|
protected |
Ptr which refers to the original (super) graph.
1.8.17