|
graph_analysis
|
GraphElement is the base class for all element in a graph, i.e. for edges and vertices. More...
#include <GraphElement.hpp>


Public Types | |
| typedef shared_ptr< GraphElement > | Ptr |
| typedef weak_ptr< GraphElement > | WeakPtr |
| typedef std::vector< Ptr > | PtrList |
Public Member Functions | |
| GraphElement (const std::string &label=std::string()) | |
| Default constructor. More... | |
| virtual | ~GraphElement () |
| virtual void | setLabel (const std::string &label) |
| virtual const std::string & | getLabel () const |
| virtual std::string | getClassName () const |
| virtual std::string | toString (uint32_t indent) const |
| virtual std::string | toString () const |
| bool | associated (GraphId graph) const |
| void | associate (GraphId graph, GraphElementId elementId) |
| void | disassociate (GraphId graph) |
| GraphElementId | getId (GraphId graph) const |
| GraphElementUuid | getUid () const |
| GraphElementUuid | getUuid () const |
| GraphIdList | getGraphAssociations () const |
| std::string | toPrefixedString (GraphId graph) const |
Static Public Member Functions | |
| static GraphElement::Ptr | fromUuid (const GraphElementUuid &uuid) |
Protected Member Functions | |
| GraphElement::Ptr | getSharedFromThis () |
| void | disassociateFromAll () |
| void | setUuid (const GraphElementUuid &uuid) |
| void | setUuid (const std::string &uuid) |
Protected Attributes | |
| GraphElementMap | mGraphElementMap |
| GraphElementUuid | mUuid |
| std::string | mLabel |
Static Protected Attributes | |
| static boost::uuids::random_generator | msUuidGenerator |
| static std::map< GraphElementUuid, function< GraphElement::Ptr()> > | msGraphElements |
Friends | |
| class | graph_analysis::io::Reader |
GraphElement is the base class for all element in a graph, i.e. for edges and vertices.
It provides labeling functionality as well as the handling of ids One GraphElement can be associated in multiple graphs
| typedef shared_ptr< GraphElement > graph_analysis::GraphElement::Ptr |
| typedef std::vector<Ptr> graph_analysis::GraphElement::PtrList |
| typedef weak_ptr< GraphElement > graph_analysis::GraphElement::WeakPtr |
| graph_analysis::GraphElement::GraphElement | ( | const std::string & | label = std::string() | ) |
Default constructor.
|
virtual |
|
inline |
Add the element to a corresponding graph This allows reverse mapping from the element to the graphs it belongs to
|
inline |
Test whether this element has been associated with an edge or node
|
inline |
Remove the edge that corresponds to a given graph
|
inlineprotected |
|
static |
Get pointer to existing GraphElement from Uuid
|
inlinevirtual |
Reimplemented in graph_analysis::algorithms::MultiCommodityVertex, graph_analysis::NWeightedEdge< T, Dim >, graph_analysis::algorithms::MultiCommodityEdge, graph_analysis::Edge, graph_analysis::Vertex, graph_analysis::NWeightedVertex< T, Dim >, graph_analysis::DirectedHyperEdge, and graph_analysis::HyperEdge.
| GraphIdList graph_analysis::GraphElement::getGraphAssociations | ( | ) | const |
Get list of graph associations this element has
| GraphElementId graph_analysis::GraphElement::getId | ( | GraphId | graphId | ) | const |
Get id of this element within a given graph
|
inlinevirtual |
Get label
|
inlineprotected |
Add local method to shared from this to allow using bind
|
inline |
Get a universally unique id of this GraphElement
|
inline |
Get a universally unique id of this GraphElement
|
inlinevirtual |
Set a label
|
inlineprotected |
Set the uuid from a given one, e.g., when deserialising elements
|
protected |
| std::string graph_analysis::GraphElement::toPrefixedString | ( | GraphId | graph | ) | const |
Convert to a string with the element id as prefix
|
inlinevirtual |
Convert element to string
Reimplemented in graph_analysis::algorithms::MultiCommodityVertex, graph_analysis::algorithms::MultiCommodityEdge, graph_analysis::Edge, graph_analysis::Vertex, graph_analysis::DirectedHyperEdge, and graph_analysis::HyperEdge.
|
inlinevirtual |
Convert element to string and adding and indentation (in spaces) to the string
Reimplemented in graph_analysis::Vertex, graph_analysis::Edge, graph_analysis::DirectedHyperEdge, and graph_analysis::HyperEdge.
|
friend |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |
1.8.17