phylox.cherrypicking.base.find_all_reducible_pairs
- phylox.cherrypicking.base.find_all_reducible_pairs(network)
Finds all reducible pairs (cherries and reticulated cherries) in the network.
- Parameters:
network – a phylogenetic network.
- Returns:
a set of reducible pairs (cherries and reticulated cherries) in the network.
- Example:
>>> from phylox import DiNetwork >>> from phylox.cherrypicking.base import find_all_reducible_pairs >>> network = DiNetwork( ... edges=[(-1,0),(0,1),(1,2),(1,3),(2,3),(2,4),(3,5),(0,6),(6,7),(6,8)], ... ) >>> reducible_pairs = find_all_reducible_pairs(network) >>> reducible_pairs == {(7,8),(8,7),(5,4)} True