Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > RSCommon > GGraph > Classes > TGCustomGraph > Properties

TGCustomGraph.Acyclic Property

Scroll Prev Top Next More

Returns whether the graph is acyclic. The property returns true if the graph is acyclic (has no cycles), false otherwise.

A graph is not acyclic when there is at least one cycle or loop in the graph, where you can start at a node and traverse edges and eventually get back to your starting node (for example, node 1 to node 2 to node 3 to node 1). Note that an undirected graph (where edges do not have a direction) always have cycles.

The Acyclic property uses the TopologicalOrder method to determine if a graph has cycles. If a topological order can be found (i.e., nothing is a prerequisite of itself, a cycle), the Acyclic property returns True.


This property is cached because of the expense of determining a topological ordering. Until you change the graph again, the property will be cached and directly return the value.


Do not check this property inside a BeginUpdateNodes/EndUpdateNodes block. The BeginUpdate prevents the node from informing the graph that it is changing. The cached value of the Acyclic property will be returned until the block is left.

Namespace: GGraph

Property Value

Type: Boolean

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb