Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
Graph< Vertex, EdgeData > Class Template Reference

#include <qgraph_p.h>

+ Collaboration diagram for Graph< Vertex, EdgeData >:

Classes

class  const_iterator
 

Public Member Functions

 Graph ()
 
const_iterator constBegin () const
 
const_iterator constEnd () const
 
EdgeDataedgeData (Vertex *first, Vertex *second)
 
void createEdge (Vertex *first, Vertex *second, EdgeData *data)
 
void removeEdge (Vertex *first, Vertex *second)
 
EdgeDatatakeEdge (Vertex *first, Vertex *second)
 
QList< Vertex * > adjacentVertices (Vertex *vertex) const
 
QSet< Vertex * > vertices () const
 
QList< QPair< Vertex *, Vertex * > > connections () const
 

Protected Member Functions

void createDirectedEdge (Vertex *from, Vertex *to, EdgeData *data)
 
void removeDirectedEdge (Vertex *from, Vertex *to)
 

Detailed Description

template<typename Vertex, typename EdgeData>
class Graph< Vertex, EdgeData >

Definition at line 34 of file qgraph_p.h.

Constructor & Destructor Documentation

◆ Graph()

template<typename Vertex , typename EdgeData >
Graph< Vertex, EdgeData >::Graph ( )
inline

Definition at line 37 of file qgraph_p.h.

Member Function Documentation

◆ adjacentVertices()

template<typename Vertex , typename EdgeData >
QList< Vertex * > Graph< Vertex, EdgeData >::adjacentVertices ( Vertex * vertex) const
inline

Definition at line 165 of file qgraph_p.h.

References QHash< Key, T >::cend(), QHash< Key, T >::constFind(), and it.

+ Here is the call graph for this function:

◆ connections()

template<typename Vertex , typename EdgeData >
QList< QPair< Vertex *, Vertex * > > Graph< Vertex, EdgeData >::connections ( ) const
inline

Definition at line 182 of file qgraph_p.h.

References Graph< Vertex, EdgeData >::constBegin(), Graph< Vertex, EdgeData >::constEnd(), it, and qMakePair().

+ Here is the call graph for this function:

◆ constBegin()

template<typename Vertex , typename EdgeData >
const_iterator Graph< Vertex, EdgeData >::constBegin ( ) const
inline

Definition at line 93 of file qgraph_p.h.

Referenced by Graph< Vertex, EdgeData >::connections(), and Graph< Vertex, EdgeData >::vertices().

+ Here is the caller graph for this function:

◆ constEnd()

template<typename Vertex , typename EdgeData >
const_iterator Graph< Vertex, EdgeData >::constEnd ( ) const
inline

Definition at line 97 of file qgraph_p.h.

Referenced by Graph< Vertex, EdgeData >::connections(), and Graph< Vertex, EdgeData >::vertices().

+ Here is the caller graph for this function:

◆ createDirectedEdge()

template<typename Vertex , typename EdgeData >
void Graph< Vertex, EdgeData >::createDirectedEdge ( Vertex * from,
Vertex * to,
EdgeData * data )
inlineprotected

Definition at line 226 of file qgraph_p.h.

Referenced by Graph< Vertex, EdgeData >::createEdge().

+ Here is the caller graph for this function:

◆ createEdge()

template<typename Vertex , typename EdgeData >
void Graph< Vertex, EdgeData >::createEdge ( Vertex * first,
Vertex * second,
EdgeData * data )
inline

Definition at line 118 of file qgraph_p.h.

References arg, Graph< Vertex, EdgeData >::createDirectedEdge(), Graph< Vertex, EdgeData >::edgeData(), QString::fromLatin1(), qDebug, qPrintable, and qWarning.

+ Here is the call graph for this function:

◆ edgeData()

template<typename Vertex , typename EdgeData >
EdgeData * Graph< Vertex, EdgeData >::edgeData ( Vertex * first,
Vertex * second )
inline

If there is an edge between first and second, it will return a structure containing the data associated with the edge, otherwise it will return 0.

Definition at line 108 of file qgraph_p.h.

References QHash< Key, T >::cend(), QSet< T >::cend(), QHash< Key, T >::constFind(), QSet< T >::constFind(), and it.

Referenced by Graph< Vertex, EdgeData >::createEdge(), Graph< Vertex, EdgeData >::removeEdge(), and Graph< Vertex, EdgeData >::takeEdge().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeDirectedEdge()

template<typename Vertex , typename EdgeData >
void Graph< Vertex, EdgeData >::removeDirectedEdge ( Vertex * from,
Vertex * to )
inlineprotected

Definition at line 231 of file qgraph_p.h.

References QHash< Key, T >::end(), QHash< Key, T >::erase(), QHash< Key, T >::find(), QSet< T >::isEmpty(), it, Q_ASSERT, and QSet< T >::remove().

Referenced by Graph< Vertex, EdgeData >::removeEdge(), and Graph< Vertex, EdgeData >::takeEdge().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeEdge()

template<typename Vertex , typename EdgeData >
void Graph< Vertex, EdgeData >::removeEdge ( Vertex * first,
Vertex * second )
inline

Definition at line 135 of file qgraph_p.h.

References arg, Graph< Vertex, EdgeData >::edgeData(), QString::fromLatin1(), qDebug, qPrintable, and Graph< Vertex, EdgeData >::removeDirectedEdge().

+ Here is the call graph for this function:

◆ takeEdge()

template<typename Vertex , typename EdgeData >
EdgeData * Graph< Vertex, EdgeData >::takeEdge ( Vertex * first,
Vertex * second )
inline

Definition at line 149 of file qgraph_p.h.

References arg, Graph< Vertex, EdgeData >::edgeData(), QString::fromLatin1(), qDebug, qPrintable, and Graph< Vertex, EdgeData >::removeDirectedEdge().

+ Here is the call graph for this function:

◆ vertices()

template<typename Vertex , typename EdgeData >
QSet< Vertex * > Graph< Vertex, EdgeData >::vertices ( ) const
inline

Definition at line 174 of file qgraph_p.h.

References Graph< Vertex, EdgeData >::constBegin(), Graph< Vertex, EdgeData >::constEnd(), and it.

+ Here is the call graph for this function:

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