Research Article
A Metric on the Space of Partly Reduced Phylogenetic Networks
Algorithm 1
Deciding semiequivalence for two nodes
and
.
) input: nodes and | () if the outdeg of and the outdeg of are not equal then | () return | () end if | () if and are leaves and (or i.e., and are from two networks) then | () add to the ISE of | () add to the ISE of | () else | () flag false | () for each child of do | () for each child of do | () if b.label = true then | () continue | () end if | () if the ISE of has then | () flag = true | () b.label = true | () end if | () end for | () if flag = false then | () return | () else | () flag = false | () end if | () end for | () add to the ISE of | () add to the ISE of | () end if |
|