graph_analysis
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
graph_analysis::HyperEdge Class Reference

A HyperEdge represents a set of vertices. More...

#include <HyperEdge.hpp>

Inheritance diagram for graph_analysis::HyperEdge:
Inheritance graph
[legend]
Collaboration diagram for graph_analysis::HyperEdge:
Collaboration graph
[legend]

Public Types

typedef shared_ptr< HyperEdge > Ptr
 
- Public Types inherited from graph_analysis::Vertex
typedef shared_ptr< Vertex > Ptr
 
typedef shared_ptr< const Vertex > 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

 HyperEdge (const std::string &label=std::string())
 
 HyperEdge (const Vertex::PtrList &vertices, const std::string &label=std::string())
 
virtual ~HyperEdge ()
 
virtual std::string getClassName () const
 
virtual std::string toString () const
 
virtual std::string toString (uint32_t indent) const
 
virtual const Vertex::PtrList & getVertices () const
 
virtual void setVertices (const Vertex::PtrList &vertices)
 
- Public Member Functions inherited from graph_analysis::Vertex
virtual ~Vertex ()
 
 Vertex (const std::string &label=std::string())
 
Vertex::Ptr clone () const
 
Vertex::Ptr getSharedPointerFromGraph (const shared_ptr< BaseGraph > &pGraph) const
 
Vertex::Ptr getPtr ()
 
Vertex::ConstPtr getPtr () const
 
virtual void registerAttributes (VertexTypeManager *) 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 HyperEdge::Ptr &e0, const HyperEdge::Ptr &e1)
 
static bool areMeeting (const HyperEdge::Ptr &e0, const HyperEdge::Ptr &e1)
 
- Static Public Member Functions inherited from graph_analysis::GraphElement
static GraphElement::Ptr fromUuid (const GraphElementUuid &uuid)
 

Protected Member Functions

virtual Vertex * 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)
 

Protected Attributes

Vertex::PtrList mVertices
 
- Protected Attributes inherited from graph_analysis::GraphElement
GraphElementMap mGraphElementMap
 
GraphElementUuid mUuid
 
std::string mLabel
 

Additional Inherited Members

- Static Protected Attributes inherited from graph_analysis::GraphElement
static boost::uuids::random_generator msUuidGenerator
 
static std::map< GraphElementUuid, function< GraphElement::Ptr()> > msGraphElements
 

Detailed Description

A HyperEdge represents a set of vertices.

For the purpose of storing data in a HyperEdge, the storage type needs to be defined by inheriting from this class

Member Typedef Documentation

◆ Ptr

Constructor & Destructor Documentation

◆ HyperEdge() [1/2]

graph_analysis::HyperEdge::HyperEdge ( const std::string &  label = std::string())

◆ HyperEdge() [2/2]

graph_analysis::HyperEdge::HyperEdge ( const Vertex::PtrList &  vertices,
const std::string &  label = std::string() 
)

◆ ~HyperEdge()

virtual graph_analysis::HyperEdge::~HyperEdge ( )
inlinevirtual

Member Function Documentation

◆ areMeeting()

bool graph_analysis::HyperEdge::areMeeting ( const HyperEdge::Ptr &  e0,
const HyperEdge::Ptr &  e1 
)
static

Check if two HyperEdges meet at a particular vertex

Returns
true if edges meet at least one vertex

◆ getClassName()

std::string graph_analysis::HyperEdge::getClassName ( ) const
virtual

Get class name

Returns
class name

Reimplemented from graph_analysis::Vertex.

Reimplemented in graph_analysis::DirectedHyperEdge.

◆ getClone()

virtual Vertex* graph_analysis::HyperEdge::getClone ( ) const
inlineprotectedvirtual

Get instance of an edge

Reimplemented from graph_analysis::Vertex.

Reimplemented in graph_analysis::DirectedHyperEdge.

◆ getInvolvedVertices()

Vertex::PtrList graph_analysis::HyperEdge::getInvolvedVertices ( const HyperEdge::Ptr &  e0,
const HyperEdge::Ptr &  e1 
)
static

Get all involved vertices for two edges

Returns
all distinct vertices of two edges

◆ getVertices()

virtual const Vertex::PtrList& graph_analysis::HyperEdge::getVertices ( ) const
inlinevirtual

Get the vertices

◆ setVertices()

virtual void graph_analysis::HyperEdge::setVertices ( const Vertex::PtrList &  vertices)
inlinevirtual

Set the vertices of this (undirected) hyper edge

◆ toString() [1/2]

std::string graph_analysis::HyperEdge::toString ( ) const
virtual

Convert element to string

Returns
string representation of edge

Reimplemented from graph_analysis::Vertex.

Reimplemented in graph_analysis::DirectedHyperEdge.

◆ toString() [2/2]

std::string graph_analysis::HyperEdge::toString ( uint32_t  indent) const
virtual

Convert element to string

Returns
string representation of edge

Reimplemented from graph_analysis::Vertex.

Reimplemented in graph_analysis::DirectedHyperEdge.

Member Data Documentation

◆ mVertices

Vertex::PtrList graph_analysis::HyperEdge::mVertices
protected

The documentation for this class was generated from the following files: