phylox.classes.dinetwork.is_tree_child
- phylox.classes.dinetwork.is_tree_child(network)
Checks if the network is a tree-child network.
- Parameters:
network – a phylogenetic network phylox.DiNetwork.
- Returns:
true if the network is a tree-child network, false otherwise.
- Example:
>>> from phylox import DiNetwork >>> from phylox.classes.dinetwork import is_tree_child >>> network = DiNetwork( ... edges=[(0,1),(1,2),(1,3),(2,3),(2,4),(3,5)], ... ) >>> is_tree_child(network) True
>>> network = DiNetwork( ... edges=[(0,1),(1,2),(1,3),(2,4),(3,5),(2,5),(3,4),(4,6),(5,7)], ... ) >>> is_tree_child(network) False
>>> network = DiNetwork( ... edges=[(0,1),(1,2),(1,3),(2,3),(3,5),(2,4),(4,5),(4,6),(5,7)], ... ) >>> is_tree_child(network) False