P485: Enumeration of all spanning trees in a directed graph

P485: Enumeration of all spanning trees in a directed graph
Input:
A directed graph $G = (V, E)$.
Output:
All directed spanning trees in $G$.
Complexity:
$O(N|V| + |V|^3)$ total time and $O(|V|^2)$ space.
Comment:
$N$: the number of solutions.
Reference:
[Kapoor2000] (Bibtex)