XX CMake Package
Loading...
Searching...
No Matches
XX::Graph Class Reference

graph structure More...

#include <XXGraph.h>

Detailed Description

graph structure

fill with vertices and edges, then use algorithms to process the graph data

Classes

class  Algorithm
 graph algorithms More...
class  Edge
 an edge in a graph More...
class  Vertex
 a vertex in a graph More...

Public Member Functions

 Graph ()
int addVertex (Vertex *vertex)
bool removeVertex (Vertex *vertex, bool deleteVertex=false)
int vertexIndex (const Vertex *vertex) const
int vertexCount () const
VertexgetVertex (int vertexIndex) const
VertexfindVertexByName (const QString &name) const
int addEdge (Edge *edge)
bool removeEdge (Edge *edge, bool deleteEdge=false)
int edgeIndex (const Edge *edge) const
int edgeCount () const
EdgegetEdge (int edgeIndex) const
int findEdgeIndex (const Vertex *vertexA, const Vertex *vertexB) const
void clear (bool deleteAll=false)

Constructor & Destructor Documentation

◆ Graph()

XX::Graph::Graph ( )

Member Function Documentation

◆ addEdge()

int XX::Graph::addEdge ( Edge * edge)

◆ addVertex()

int XX::Graph::addVertex ( Vertex * vertex)

◆ clear()

void XX::Graph::clear ( bool deleteAll = false)

◆ edgeCount()

int XX::Graph::edgeCount ( ) const

◆ edgeIndex()

int XX::Graph::edgeIndex ( const Edge * edge) const

◆ findEdgeIndex()

int XX::Graph::findEdgeIndex ( const Vertex * vertexA,
const Vertex * vertexB ) const

◆ findVertexByName()

Vertex * XX::Graph::findVertexByName ( const QString & name) const

◆ getEdge()

Edge * XX::Graph::getEdge ( int edgeIndex) const

◆ getVertex()

Vertex * XX::Graph::getVertex ( int vertexIndex) const

◆ removeEdge()

bool XX::Graph::removeEdge ( Edge * edge,
bool deleteEdge = false )

◆ removeVertex()

bool XX::Graph::removeVertex ( Vertex * vertex,
bool deleteVertex = false )

◆ vertexCount()

int XX::Graph::vertexCount ( ) const

◆ vertexIndex()

int XX::Graph::vertexIndex ( const Vertex * vertex) const

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