phylox.isomorphism.base.count_automorphisms
- phylox.isomorphism.base.count_automorphisms(network, ignore_labels=False, use_mu_vector=True)
Determines the number of automorphisms of a network.
- Parameters:
network – a phylogenetic network, i.e., a DAG with leaf labels.
ignore_labels – if True, the automorphisms are counted without considering the labels of the nodes.
- Returns:
the number of automorphisms of the network.
- Example:
>>> from phylox import DiNetwork >>> from phylox.isomorphism.base import count_automorphisms >>> network = DiNetwork( ... edges=[(-1,0), (0, 1), (0, 2), (1, 3), (1, 4), (2, 5), (2, 6)], ... labels=[(3, "A"), (4, "B"), (5, "C"), (6, "C")], ... ) >>> count_automorphisms(network, ignore_labels=True) 8 >>> count_automorphisms(network, ignore_labels=False) 2 >>> count_automorphisms(network, ignore_labels=True, use_mu_vector=False) 8 >>> count_automorphisms(network, ignore_labels=False, use_mu_vector=False) 2