package flow
import "gonum.org/v1/gonum/graph/flow"
Package flow provides control flow analysis functions.
Index ¶
Types ¶
type DominatorTree ¶
type DominatorTree struct {
// contains filtered or unexported fields
}
DominatorTree is a flow graph dominator tree.
func Dominators ¶
func Dominators(root graph.Node, g graph.Directed) DominatorTree
Dominators returns a dominator tree for all nodes in the flow graph g starting from the given root node.
func DominatorsSLT ¶
func DominatorsSLT(root graph.Node, g graph.Directed) DominatorTree
DominatorsSLT returns a dominator tree for all nodes in the flow graph g starting from the given root node using the sophisticated version of the Lengauer-Tarjan algorithm. The SLT algorithm may outperform the simple LT algorithm for very large dense graphs.
func (DominatorTree) DominatedBy ¶
func (d DominatorTree) DominatedBy(id int64) []graph.Node
DominatedBy returns a slice of all nodes immediately dominated by the node with the given ID. Elements of the slice are retained by the DominatorTree.
func (DominatorTree) DominatorOf ¶
func (d DominatorTree) DominatorOf(id int64) graph.Node
DominatorOf returns the immediate dominator of the node with the given ID.
func (DominatorTree) Root ¶
func (d DominatorTree) Root() graph.Node
Root returns the root of the tree.
Source Files ¶
control_flow_lt.go control_flow_slt.go doc.go
- Version
- v0.15.1 (latest)
- Published
- Aug 16, 2024
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 10 hours ago –
Tools for package owners.