Free Software Foundation GPLv3 LGPL Electronic Frontier Foundation
Mozilla.org OpenOffice.org Linux.com

A class to represent edges. More...

#include <opengt.h>

Inheritance diagram for OpenGraphtheory::Edge:
Collaboration diagram for OpenGraphtheory::Edge:

Public Member Functions

VertexFrom ()
 Iterator for the first incident vertex of an edge.
 
VertexTo ()
 Iterator for the second incident vertex of an edge (meant for regular edges, but works on hyperedges, too)
 
bool Incident (const Vertex *v, bool Undirected=true, bool Positive=false, bool Negative=false) const
 Test whether the Edge is incident to the given vertex.
 
bool UnderlyingIncident (const Vertex *v) const
 
VertexSet CollectIncidentVertices (bool Undirected, bool Positive, bool Negative)
 
bool IsUndirected ()
 Test whether the edge is undirected (has no directed connections)
 
bool IsEdge ()
 
bool IsArc ()
 
bool IsDirected ()
 Test whether the edge is directed (has no undirected connections)
 
bool IsHyperedge ()
 Test whether the EdgeIterator points to a hyperedge.
 
bool IsUndirectedLoop ()
 Test whether the Edge is an undirected loop.
 
bool IsDirectedLoop ()
 Test whether the Edge is a directed loop.
 
bool IsLoop ()
 Test whether the Edge is a loop.
 
size_t NumberOfConnections () const
 
VertexEdgeConnectionIterator BeginConnections ()
 
ConstVertexEdgeConnectionIterator BeginConnections () const
 
VertexEdgeConnectionIterator EndConnections ()
 
ConstVertexEdgeConnectionIterator EndConnections () const
 
VertexEdgeConnectionAddConnection (Vertex *vertex, VertexEdgeConnection::Direction direction=VertexEdgeConnection::Undirected)
 
void RemoveConnection (VertexEdgeConnection *connection)
 
void WriteToXml (OpenGraphtheory::XML::XML *xml)
 
bool LoadFromXml (OpenGraphtheory::XML::XML *xml, std::map< std::string, Vertex * > &Vertex_XML_ID_to_pointer, bool DefaultDirected)
 
- Public Member Functions inherited from OpenGraphtheory::GraphObject
 GraphObject ()
 GraphObject Constructor (abstract base class for Graphs, Vertices and Edges)
 
virtual ~GraphObject ()
 GraphObject Destructor.
 
void Clear ()
 
int GetID () const
 Accessor-method for reading IDs.
 
std::string GetIDString () const
 
AttributeAddAttribute (std::string AttributeName, std::string AttributeType)
 
AttributeGetAttribute (std::string AttributeName)
 
void RemoveAttribute (std::string AttributeName)
 
std::string GetLabel (std::string Name="name", std::string DefaultValue="")
 Accessor-method for reading labels.
 
void SetLabel (std::string Label, std::string Name="name")
 Accessor-method for writing labels.
 
float GetWeight (std::string Name="weight", float DefaultValue=0.05f)
 Accessor-method for reading weights.
 
void SetWeight (float Weight, std::string Name="weight")
 Accessor-method for writing labels.
 
float GetCapacity (std::string Name="capacity", float DefaultValue=0.0f)
 
void SetCapacity (float Capacity, std::string Name="capacity")
 
int GetColorClass (std::string Name="color")
 
void SetColorClass (int ColorClass, std::string Name="color")
 
Coordinates GetCoordinates (int minCount, std::string Name="coordinates")
 
void SetCoordinates (Coordinates &coordinates, std::string Name="coordinates")
 
void WriteToXml (OpenGraphtheory::XML::XML *xml, std::string IdPrefix)
 
bool LoadFromXml (OpenGraphtheory::XML::XML *xml)
 

Protected Member Functions

 Edge (Graph *owner=NULL, int ID=-1)
 Edge Constructor (protected, accessible for class "Graph")
 
 ~Edge ()
 Vertex Destructor.
 
void AddUndirectedConnection (VertexIterator v)
 
void AddOutgoingConnection (VertexIterator v)
 
void AddIncomingConnection (VertexIterator v)
 
void RemoveUndirectedConnection (VertexIterator v)
 
void RemoveOutgoingConnection (VertexIterator v)
 
void RemoveIncomingConnection (VertexIterator v)
 
- Protected Member Functions inherited from OpenGraphtheory::GraphObject
 GraphObject (int ID)
 

Protected Attributes

GraphOwner
 
VertexEdgeConnectionSetConnections
 
- Protected Attributes inherited from OpenGraphtheory::GraphObject
AttributeCollectionattributes
 
int ID
 

Static Protected Attributes

static FactoryRegistrator
< GraphObject
EdgeRegistrator
 
static FactoryRegistrator
< GraphObject
RelRegistrator
 

Friends

class Graph
 
class Vertex
 
class DefaultInstantiator< GraphObject, Edge >
 

Additional Inherited Members

- Static Public Attributes inherited from OpenGraphtheory::GraphObject
static Factory< GraphObjectGraphObjectFactory
 

Detailed Description

A class to represent edges.


The documentation for this class was generated from the following files:
  • sources/opengt.so/Headers/opengt.h
  • sources/opengt.so/Sources/opengt.cpp
Contributors Disclaimer