Skip to content

Instantly share code, notes, and snippets.

View nefanov's full-sized avatar
🦝
very-very slow to respond...

nefanov

🦝
very-very slow to respond...
View GitHub Profile
@hagberg
hagberg / wrom.py
Created December 15, 2013 22:22
generate non-isomorphic free trees or rooted trees
#!/usr/bin/env python
"""Implementation of the Wright, Richmond, Odlyzko and McKay (WROM)
algorithm for the enumeration of all non-isomorphic free trees of a
given order. Rooted trees are represented by level sequences, i.e.,
lists in which the i-th element specifies the distance of vertex i to
the root."""
import sys