|
graph_analysis
|
An Edge represents the link between two vertices. More...
#include <Edge.hpp>


Public Types | |
| typedef shared_ptr< Edge > | Ptr |
| typedef shared_ptr< const Edge > | ConstPtr |
| typedef std::vector< Ptr > | PtrList |
| typedef std::set< Ptr > | PtrSet |
Public Types inherited from graph_analysis::GraphElement | |
| typedef shared_ptr< GraphElement > | Ptr |
| typedef weak_ptr< GraphElement > | WeakPtr |
| typedef std::vector< Ptr > | PtrList |
Public Member Functions | |
| Edge (const std::string &label=std::string()) | |
| Edge (const Vertex::Ptr &source, const Vertex::Ptr &target, const std::string &label=std::string()) | |
| virtual | ~Edge () |
| Edge::Ptr | clone () const |
| virtual std::string | getClassName () const |
| virtual std::string | toString () const |
| virtual std::string | toString (uint32_t indent) const |
| Vertex::Ptr | getSourceVertex () const |
| Vertex::Ptr | getTargetVertex () const |
| void | setSourceVertex (const Vertex::Ptr &source) |
| void | setTargetVertex (const Vertex::Ptr &target) |
| Edge::Ptr | getSharedPointerFromGraph (const shared_ptr< BaseGraph > &pGraph) const |
| Edge::Ptr | getPtr () |
| Edge::ConstPtr | getPtr () const |
| virtual void | registerAttributes (EdgeTypeManager *) const |
Public Member Functions inherited from graph_analysis::GraphElement | |
| 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 |
| 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 std::vector< Vertex::Ptr > | getInvolvedVertices (const Edge::Ptr &e0, const Edge::Ptr &e1) |
| static bool | areMeeting (const Edge::Ptr &e0, const Edge::Ptr &e1) |
Static Public Member Functions inherited from graph_analysis::GraphElement | |
| static GraphElement::Ptr | fromUuid (const GraphElementUuid &uuid) |
Protected Member Functions | |
| virtual Edge * | getClone () const |
Protected Member Functions inherited from graph_analysis::GraphElement | |
| GraphElement::Ptr | getSharedFromThis () |
| void | disassociateFromAll () |
| void | setUuid (const GraphElementUuid &uuid) |
| void | setUuid (const std::string &uuid) |
Additional Inherited Members | |
Protected Attributes inherited from graph_analysis::GraphElement | |
| GraphElementMap | mGraphElementMap |
| GraphElementUuid | mUuid |
| std::string | mLabel |
Static Protected Attributes inherited from graph_analysis::GraphElement | |
| static boost::uuids::random_generator | msUuidGenerator |
| static std::map< GraphElementUuid, function< GraphElement::Ptr()> > | msGraphElements |
An Edge represents the link between two vertices.
For the purpose of storing data in a edge, the storage type needs to be defined by inheriting from this class, some default implementations exists
| typedef shared_ptr< const Edge > graph_analysis::Edge::ConstPtr |
| typedef shared_ptr< Edge > graph_analysis::Edge::Ptr |
| typedef std::vector< Ptr > graph_analysis::Edge::PtrList |
| typedef std::set< Ptr > graph_analysis::Edge::PtrSet |
| graph_analysis::Edge::Edge | ( | const std::string & | label = std::string() | ) |
| graph_analysis::Edge::Edge | ( | const Vertex::Ptr & | source, |
| const Vertex::Ptr & | target, | ||
| const std::string & | label = std::string() |
||
| ) |
|
inlinevirtual |
Check if two edges meet at a vertex
| Edge::Ptr graph_analysis::Edge::clone | ( | ) | const |
Clone this edge – the returned edge will have no graph association
|
virtual |
Reimplemented from graph_analysis::GraphElement.
Reimplemented in graph_analysis::NWeighted< T, Dim, Edge >, graph_analysis::NWeightedEdge< T, Dim >, and graph_analysis::algorithms::MultiCommodityEdge.
|
inlineprotectedvirtual |
Get instance of an edge
Reimplemented in graph_analysis::NWeighted< T, Dim, Edge >, and graph_analysis::NWeightedEdge< T, Dim >.
|
static |
Get all involved vertices for two edges
| Edge::Ptr graph_analysis::Edge::getPtr | ( | ) |
Get the shared pointer for this object
| Edge::ConstPtr graph_analysis::Edge::getPtr | ( | ) | const |
Get the shared pointer for this object – do not use on stack allocated objects
| Edge::Ptr graph_analysis::Edge::getSharedPointerFromGraph | ( | const shared_ptr< BaseGraph > & | pGraph | ) | const |
Deprecated function in order for child-classes to iterate the graph, a way to obtain the shared pointer actually respresenting this edge on a particular graph is needed.
| pGraph | shared pointer to the graph where this edge is contained |
|
inline |
Get the source vertex
|
inline |
Get the target vertex
|
inlinevirtual |
Hook to register attributes of this vertex, in order to properly perform serialization
If serialization is not needed, then registration is optional Otherwise each Edge implementation has to implement this method, and add a static member
#include "EdgeRegistration.hpp"
class DerivedEdge : Edge
{
static const EdgeRegistration<DerivedEdge> msRegistration;
}
in the source file, e.g. DerivedEdge.cpp add
const EdgeRegistration<DerivedEdge> DerivedEdge::msRegistration;
Reimplemented in graph_analysis::algorithms::MultiCommodityEdge.
|
inline |
Set the source vertex
|
inline |
Set the target vertex
|
virtual |
Convert element to string
Reimplemented from graph_analysis::GraphElement.
Reimplemented in graph_analysis::NWeighted< T, Dim, Edge >, and graph_analysis::algorithms::MultiCommodityEdge.
|
virtual |
Convert element to string
Reimplemented from graph_analysis::GraphElement.
1.8.13