Runner's High
Public Member Functions | List of all members
DirectedGraph< T > Class Template Reference

Represents a directed graph. More...

Public Member Functions

 DirectedGraph ()
 Creates a new graph instance. More...
 
void Add (T data)
 Adds a vertex to the graph. More...
 
void Remove (T node)
 Remvoes a vertex from the graph. More...
 
void Connect (T fromNode, T toNode)
 Creates a directed edge between two vertices. More...
 
void Disconnect (T fromNode, T toNode)
 Disconnects a directed edge between two vertices. More...
 
List< T > GetAll (T node)
 

Detailed Description

Represents a directed graph.

Template Parameters
T

Constructor & Destructor Documentation

◆ DirectedGraph()

Creates a new graph instance.

Member Function Documentation

◆ Add()

void DirectedGraph< T >.Add ( data)

Adds a vertex to the graph.

Parameters
dataThe data to add as a vertex.

◆ Connect()

void DirectedGraph< T >.Connect ( fromNode,
toNode 
)

Creates a directed edge between two vertices.

Parameters
fromNodeThe origin vertex of the edge.
toNodeThe destiny vertex of the edge.

◆ Disconnect()

void DirectedGraph< T >.Disconnect ( fromNode,
toNode 
)

Disconnects a directed edge between two vertices.

Parameters
fromNodeThe origin vertex of the edge.
toNodeThe destiny vertex of the edge.

◆ GetAll()

List<T> DirectedGraph< T >.GetAll ( node)

Parameters
nodeThe node whose connections should be queried.
Returns
All vertices node is connected to (not from!)

◆ Remove()

void DirectedGraph< T >.Remove ( node)

Remvoes a vertex from the graph.

Parameters
nodeThe vertex to remove.

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