phylox.classes.dinetwork.is_orchard

phylox.classes.dinetwork.is_orchard(network)

Checks if the network is an orchard.

Parameters:

network – a phylogenetic network phylox.DiNetwork.

Returns:

true if the network is an orchard, false otherwise.

Example:

>>> from phylox import DiNetwork
>>> from phylox.classes.dinetwork import is_orchard
>>> network = DiNetwork(
...     edges=[(0,1),(1,2),(1,3),(2,3),(2,4),(3,5)],
... )
>>> is_orchard(network)
True
>>> network = DiNetwork(
...     edges=[(0,1),(1,2),(1,3),(2,4),(3,5),(2,5),(3,4),(4,6),(5,7)],
... )
>>> is_orchard(network)
False