![]() |
Bearsampp 2026.9.23
|
The Graph.php file contains the definition of the Structures_Graph class
The Structures_Graph class represents a graph data structure.
A Graph is a data structure composed by a set of nodes, connected by arcs. Graphs may either be directed or undirected. In a directed graph, arcs are directional, and can be traveled only one way. In an undirected graph, arcs are bidirectional, and can be traveled both ways.
This file contains the definition of the Structures_Graph_Manipulator_AcyclicTest graph manipulator.
The Structures_Graph_Manipulator_AcyclicTest is a graph manipulator which tests whether a graph contains a cycle.
The definition of an acyclic graph used in this manipulator is that of a DAG. The graph must be directed, or else it is considered cyclic, even when there are no arcs.
This file contains the definition of the Structures_Graph_Manipulator_TopologicalSorter class.
The Structures_Graph_Manipulator_TopologicalSorter is a manipulator which is able to return the set of nodes in a graph, sorted by topological order.
A graph may only be sorted topologically iff it's a DAG. You can test it with the Structures_Graph_Manipulator_AcyclicTest.
This file contains the definition of the Structures_Graph_Node class
The Structures_Graph_Node class represents a Node that can be member of a graph node set.
A graph node can contain data. Under this API, the node contains default data, and key index data. It behaves, thus, both as a regular data node, and as a dictionary (or associative array) node.
Regular data is accessed via getData and setData. Key indexed data is accessed via getMetadata and setMetadata.