documentationfor yFiles for HTML 2.6

CycleEdges

Finds all edges that are part of at least one directed or undirected simple cycle in the graph.

Inheritance Hierarchy
CycleEdges

Remarks

The graph can be directed or undirected.

Examples

Highlighting all cycles in a graph
// prepare the cycle edge detection algorithm
const algorithm = new CycleEdges({
  // We are only interested in finding directed cycles
  directed: true
})
// run the algorithm
const result = algorithm.run(graph)

// highlight the cycle
for (const edge of result.edges) {
  graph.setStyle(edge, highlightCycleEdgesStyle)
}

Type Details

yfiles module
view-layout-bridge
yfiles-umd modules
view-layout-bridge
Legacy UMD name
yfiles.analysis.CycleEdges

See Also

Self-loops are always considered to be cycle edges.

Constructors

Properties

Methods