@@ -649,14 +649,16 @@ def nauty_directg(self, graphs, options="", debug=False):
649
649
650
650
INPUT:
651
651
652
- - ``graphs`` -- a :class:`Graph` or an iterable containing :class:`Graph`
653
- the graph6 string of these graphs is used as an input for ``directg``.
652
+ - ``graphs`` -- a :class:`Graph` or an iterable containing
653
+ :class:`Graph`. The graph6 string of these graphs is used as an input
654
+ for ``directg``.
654
655
655
656
- ``options`` (str) -- a string passed to directg as if it was run at
656
657
a system command line. Available options from directg --help::
657
658
658
659
-e<int> | -e<int>:<int> specify a value or range of the total number of arcs
659
660
-o orient each edge in only one direction, never both
661
+ -a only make acyclic orientations (implies -o)
660
662
-f<int> Use only the subgroup that fixes the first <int> vertices setwise
661
663
-V only output graphs with nontrivial groups (including exchange of
662
664
isolated vertices). The -f option is respected.
@@ -680,6 +682,19 @@ def nauty_directg(self, graphs, options="", debug=False):
680
682
sage: len(list(digraphs.nauty_directg(graphs.PetersenGraph(), options="-o")))
681
683
324
682
684
685
+ Generate non-isomorphic acyclic orientations::
686
+
687
+ sage: K = graphs.CompleteGraph(4)
688
+ sage: all(d.is_directed_acyclic() for d in digraphs.nauty_directg(K, options='-a'))
689
+ True
690
+ sage: sum(1 for _ in digraphs.nauty_directg(K, options='-a'))
691
+ 1
692
+ sage: S = graphs.StarGraph(4)
693
+ sage: all(d.is_directed_acyclic() for d in digraphs.nauty_directg(S, options='-a'))
694
+ True
695
+ sage: sum(1 for _ in digraphs.nauty_directg(S, options='-a'))
696
+ 5
697
+
683
698
TESTS::
684
699
685
700
sage: g = digraphs.nauty_directg(graphs.PetersenGraph(), options="-o -G")
0 commit comments