C4 Engine Terathon Software C4 Engine API Documentation

• Utility Library

API Links
Developer Links

Graph::Predecessor

Defined in:  C4Graph.h
Returns a boolean value indicating whether one node precedes another.
Prototype

bool Predecessor(const GraphNodeBase *first, const GraphNodeBase *second);

Parameters
first The first node in the graph.
second The second node in the graph.
Description
The Predecessor function returns true if the node specified by the first parameter precedes the node specified by the second parameter in a graph, and it returns false otherwise. In order for the first node to precede the second, there must be a sequence of edges starting at the first node that can be followed through a sequence of nodes that ultimately finishes at the second node.
See Also

GraphNode::GetFirstOutgoingEdge

GraphNode::GetLastOutgoingEdge

GraphNode::GetFirstIncomingEdge

GraphNode::GetLastIncomingEdge