Managed Hosting



Directed Acyclic Graph Example
Project Home Contact Project

Author: Stuie Wakefield (All RIAForge projects by this author)
Last Updated: April 26, 2010 10:46 AM
Views: 11,878
Downloads: 1,090
License: Apache License, Version 2


This is a basic implementation of a Directed Acyclic Graph within ColdFusion and how you could potentially implement a DAG for a data structure.

A DAG allows mutliple "parent" joins and multiple "children" joins. recursion is prevented by enforcing that no "child" node is also a "ancestor" node.

The example uses QOQ for storage (available for the lifetime of the application). Finding ancestry of a node is not computationally sensitive, it is implemented in this example using a depth-first search strategy.

finding routes and paths is not included in the component but could potentially be extrapolated from the isDescendant method.


ColdFusion 8