Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dominatorTree

Compute dominator tree from a vertex in a directed graph


Description

Compute dominator tree from a vertex in a directed graph

Usage

dominatorTree(g, start=nodes(g)[1])
lengauerTarjanDominatorTree(g, start=nodes(g)[1])

Arguments

g

a directed graph, one instance of the graph class

start

a vertex in graph g

Details

As stated in documentation on Lengauer Tarjan dominator tree in Boost Graph Library:

A vertex u dominates a vertex v, if every path of directed graph from the entry to v must go through u.

This function builds the dominator tree for a directed graph.

Value

Output is a vector, giving each node its immediate dominator.

Author(s)

Li Long <li.long@isb-sib.ch>

References

Boost Graph Library ( www.boost.org/libs/graph/doc/index.html )

Examples

con1 <- file(system.file("XML/dominator.gxl",package="RBGL"), open="r")
g1 <- fromGXL(con1)
close(con1)

dominatorTree(g1)
lengauerTarjanDominatorTree(g1)

RBGL

An interface to the BOOST graph library

v1.66.0
Artistic-2.0
Authors
Vince Carey <stvjc@channing.harvard.edu>, Li Long <li.long@isb-sib.ch>, R. Gentleman
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.