C4 Engine Terathon Software C4 Engine API Documentation

• Utility Library

API Links
Developer Links

class Graph

Defined in:  C4Graph.h
The Graph class encapsulates a directed graph.
Definition

template <class nodeType, class edgeType> class Graph : public GraphBase

Member Functions
Graph::Empty Returns a boolean value indicating whether any nodes exist in a graph.
Graph::GetNodeCount Returns the number of nodes in a graph.
Graph::Purge Destroys all nodes belonging to a graph.
Graph::AddNode Adds a node to a graph.
Graph::RemoveNode Removes a node from a graph.
Graph::Predecessor Returns a boolean value indicating whether one node precedes another.
Template Parameters
nodeType The type of the class that can be stored as a node in the graph.
edgeType The type of the class that represents the edges in the graph.
Constructor

Graph();

Description
The Graph class is used to organize a set of nodes and edges arranged as a directed graph.
Base Classes
GraphBase Used internally to encapsulate common functionality that is independent of the template parameter.
See Also
GraphNode

GraphEdge