Free Software Foundation GPLv3 LGPL Electronic Frontier Foundation
Mozilla.org OpenOffice.org Linux.com
Inheritance diagram for OpenGraphtheory::Graph:
Collaboration diagram for OpenGraphtheory::Graph:

Public Member Functions

virtual ~Graph ()
 Graph Destructor.
 
 Graph (int size=0)
 Graph Constructor, creates a graph with "size" vertices.
 
 Graph (const Graph &G)
 Graph Copy-Constructor.
 
void Clear ()
 Remove all vertices, edges and attributes.
 
void operator= (const Graph &G)
 Operator to copy a graph. More...
 
int NumberOfVertices () const
 
int NumberOfEdges () const
 
bool IsUndirected ()
 Test whether the graph has no directed edges.
 
bool IsDirected ()
 Test whether the graph has no undirected edges.
 
bool IsMixed ()
 Test whether the graph has directed and undirected edges.
 
bool IsUndirectedHypergraph ()
 
bool IsHyperDigraph ()
 
bool IsMixedHypergraph ()
 
bool IsHypergraph ()
 Tests whether the graph contains at least one hyperedge.
 
bool HasDirectedLoops ()
 Test whether the graph contains a directed loop.
 
bool HasUndirectedLoops ()
 Test whether the graph contains an undirected loop.
 
bool HasLoops ()
 Test whether the graph contains a loop.
 
bool IsMultigraph ()
 Test whether the graph is undirected and contains no loops.
 
bool IsMultiDigraph ()
 Test whether the graph is directed and contains no directed loops.
 
bool IsMixedMultigraph ()
 Test whether the graph contains no loops.
 
bool HasParallelEdges ()
 
bool IsSimpleGraph ()
 
bool IsSimpleDigraph ()
 
VertexIterator BeginVertices ()
 begin-Iterator for the set of all vertices in the graph
 
ConstVertexIterator BeginVertices () const
 begin-Iterator for the set of all vertices in the graph
 
VertexIterator EndVertices ()
 end-Iterator for the set of all vertices in the graph
 
ConstVertexIterator EndVertices () const
 end-Iterator for the set of all vertices in the graph
 
EdgeIterator BeginEdges ()
 begin-Iterator for the set of all edges in the graph
 
ConstEdgeIterator BeginEdges () const
 begin-Iterator for the set of all edges in the graph
 
EdgeIterator EndEdges ()
 end-Iterator for the set of all edges in the graph
 
ConstEdgeIterator EndEdges () const
 end-Iterator for the set of all edges in the graph
 
EdgeIterator GetEdge (int ID)
 
VertexIterator GetVertex (int ID)
 
VertexIterator Fuse (VertexSet &Vertices)
 
void AddVertexSet (VertexSet &V, std::string name)
 management of attributes
 
VertexSet GetVertexSet (std::string name)
 
void AddEdgeSet (EdgeSet &E, std::string name)
 
EdgeSet GetEdgeSet (std::string name)
 
void AddVertexPartitioning (VertexPartitioning &Coloring, std::string name)
 
VertexPartitioning GetVertexPartitioning (std::string name)
 
void AddEdgePartitioning (EdgePartitioning &Coloring, std::string name)
 
EdgePartitioning GetEdgePartitioning (std::string name)
 
void AddVertexWeighting (VertexWeighting &Weights, std::string name)
 
VertexWeighting GetVertexWeighting (std::string name)
 
void AddEdgeWeighting (EdgeWeighting &Weights, std::string name)
 
EdgeWeighting GetEdgeWeighting (std::string name)
 
void AddVertexColoring (VertexColoring &Coloring, std::string name)
 
VertexColoring GetVertexColoring (std::string name)
 
void AddEdgeColoring (EdgeColoring &Coloring, std::string name)
 
EdgeColoring GetEdgeColoring (std::string name)
 
VertexIterator AddVertex ()
 
void RemoveVertex (Vertex *v, bool RemoveIncidentEdges=true)
 Internal Method: Remove a vertex from the graph. More...
 
void RemoveVertex (VertexIterator v, bool RemoveIncidentEdges=true)
 Internal Method: Remove a vertex from the graph. More...
 
Graph operator- (VertexIterator v)
 
void operator-= (VertexIterator v)
 
EdgeIterator AddEdge (Vertex *a, Vertex *b)
 Adds an Edge to the Graph. More...
 
EdgeIterator AddEdge (VertexIterator a, VertexIterator b)
 Adds an Edge to the Graph. More...
 
EdgeIterator AddArc (Vertex *from, Vertex *to)
 Adds a Directed (Hyper)Edge to the Graph. More...
 
EdgeIterator AddArc (VertexIterator From, VertexIterator To)
 Adds a Directed (Hyper)Edge to the Graph. More...
 
EdgeIterator AddUndirectedLoop (VertexIterator v)
 Adds an undirected Loop-Edge to the Graph. More...
 
EdgeIterator AddDirectedLoop (VertexIterator v)
 Adds a directed Loop-Edge to the Graph. More...
 
EdgeIterator AddLooseEdge ()
 Adds a Loose Edge (an edge with no connection to a vertex) to the Graph.
 
void RemoveEdge (Edge *e)
 Internal Method: Removes an edge from the graph. More...
 
void RemoveEdge (EdgeIterator e)
 Removes an edge from the graph. More...
 
Graph operator- (EdgeIterator v)
 
void operator-= (EdgeIterator v)
 
bool LoadFromXML (OpenGraphtheory::XML::XML *root)
 streaming More...
 
bool LoadFromStream (std::istream &is)
 Load an XML-structure from an istream using istream& operator>>(istream&, XML&), then read the graph from the XML structure using bool Graph::LoadFromXML(XML* root)
 
void LoadFromFile (std::string filename)
 Load the file as an istream and load the graph from it, using bool Graph::LoadFromStream(istream& is)
 
void WriteToStream (std::ostream &os, int indent=0)
 
void SaveToFile (std::string filename)
 
- Public Member Functions inherited from OpenGraphtheory::GraphObject
 GraphObject ()
 GraphObject Constructor (abstract base class for Graphs, Vertices and Edges)
 
virtual ~GraphObject ()
 GraphObject Destructor.
 
void Clear ()
 Remove all attributes.
 
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 (size_t minCount, std::string Name="coordinates")
 Accessor-method for reading coordinates.
 
void SetCoordinates (const Coordinates &coordinates, std::string Name="coordinates")
 Accessor-method for writing coordinates.
 
void WriteToXml (OpenGraphtheory::XML::XML *xml, std::string IdPrefix)
 
bool LoadFromXml (OpenGraphtheory::XML::XML *xml)
 

Static Public Member Functions

static std::list< GraphLoadGraphsFromXML (OpenGraphtheory::XML::XML *root)
 
static std::list< GraphLoadGraphsFromStream (std::istream &is)
 

Protected Member Functions

VertexIterator InternalAddVertex (int ID=-1)
 adding and removing vertices More...
 
EdgeIterator InternalAddEdge (Vertex *from, Vertex *to, bool directed=false, int ID=-1)
 adding and removing edges More...
 
- Protected Member Functions inherited from OpenGraphtheory::GraphObject
 GraphObject (int ID)
 

Protected Attributes

VertexSet * Vertices
 
EdgeSet * Edges
 
- Protected Attributes inherited from OpenGraphtheory::GraphObject
AttributeCollectionattributes
 
int ID
 

Static Protected Attributes

static FactoryRegistrator< GraphObjectGraphRegistrator
 

Friends

std::istream & operator>> (std::istream &is, Graph &G)
 
std::ostream & operator<< (std::ostream &os, Graph &G)
 

Additional Inherited Members

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

The documentation for this class was generated from the following files:
  • sources/opengt.so/Headers/opengt.h
  • sources/opengt.so/Sources/opengt.cpp
Impressum, Datenschutzerklärung Contributors