I need to make a dominator tree where I need to tell a function(a) dominates function(b). There is an API in GraphAlgorithms which needs GDirected graph and "vertex from" parameters, but I am having trouble figuring out how to make that graph. Can anyone help with this problem?

In the dominance tree, I need to find a particular function or basic blocks is a dominator.(either of them will work)

findDominanceTree​(GDirectedGraph<V,​E> g, TaskMonitor monitor)

The GdirectedGraph has parameters V and E, I don't know what to put in these parameters.

Any help will be greatly appreciated.

p.s. dominance : a node 'a' dominates node 'b' if all paths from start to 'b' contain 'a'; a node always dominates itself (except in 'strict dominance', which is all dominators except for itself)

  • The <V,E> part has to do with Java Generics. Do you know about those? If not, it's a good idea to do some research into them. Dec 3 '21 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.