documentationfor yFiles for HTML 2.6

FeedbackEdgeSet

Finds edges of a given graph whose removal or reversal would make the graph acyclic (also called Feedback Arc Set).

Inheritance Hierarchy
FeedbackEdgeSet

Remarks

This minimization is performed heuristically, since it is a well known hard problem to come up with an optimal solution.

If costs are provided the algorithm tries to minimize the cost associated with the marked edges. Otherwise, a faster algorithm based on a depth-first search is used. This approach also provides more stable results when edges are added or removed over time.

Other Tree-Related Algorithms

yFiles for HTML supports a number of other algorithms and helpers related to trees:

  • SpanningTree – calculates a (minimum) spanning tree for a graph
  • TreeAnalysis – analyzes directed trees and provides access to tree properties, for example, the root node, the set of leaf nodes or the depth of a node.

Examples

Highlighting a feedback edge set of a graph
// prepare the feedback set detection algorithm
const algorithm = new FeedbackEdgeSet()
// run the algorithm
const result = algorithm.run(graph)

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

Type Details

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

See Also

Constructors

Properties

Methods