@@ -765,23 +765,56 @@ gap> List(D, x -> Size(x));
765765 <Returns >A digraph.</Returns >
766766 <Description >
767767 &STANDARD_FILT_TEXT;
768+
769+ The other implemented filters are as follows:
770+ <Ref Filt =' IsConnectedDigraph' />, <Ref Filt =' IsSymmetricDigraph' />, <Ref Filt =' IsAcyclicDigraph' />, <Ref Filt =' IsEulerianDigraph' />, <Ref Filt =' IsHamiltonianDigraph' />.<P />
771+
772+ For <Ref Filt =' IsConnectedDigraph' />, a random tree is first created independent of the value of <A >p</A >,
773+ guaranteeing connectivity (with <M ><A >n</A >-1</M > edges), and then edges are added between the remaining pairs
774+ of vertices with probability approximately <A >p</A >.<P />
775+
776+ For <Ref Filt =' IsHamiltonianDigraph' />, a random Hamiltonian cycle is first created independent of the
777+ value of <A >p</A > (with <A >n</A > edges), and then edges are added between the remaining pairs of vertices
778+ with probability approximately <A >p</A >.<P />
779+
780+ For <Ref Filt =' IsEulerianDigraph' />, a random Eulerian cycle is created where <A >p</A > influences how
781+ long the cycle will be. The cycle grows by randomly considering edges that extend the cycle, and
782+ adding an edge with probability approximately <A >p</A >. The cycle stops when we get back to the start vertex
783+ and have no more edges left to consider from it that extend the cycle further (any possible edge from the
784+ start vertex has either been added to the cycle, or rejected, leaving no more edges to consider). Thus
785+ <M ><A >p</A > = 1</M > does not necessarily guarantee a complete digraph. Instead, it guarantees that all edges
786+ considered up to the point where the cycle stops, are added.<P />
787+
788+ For <Ref Filt =' IsAcyclicDigraph' /> and <Ref Filt =' IsSymmetricDigraph' />, edges are added between any
789+ pairs of vertices with probability approximately <A >p</A >.<P />
768790
769791 If <A >n</A > is a positive integer, then this function returns a random
770792 digraph with <A >n</A > vertices and without multiple edges. The result
771- may or may not have loops.<P />
793+ may or may not have loops. If using <Ref Filt =' IsAcyclicDigraph' />, the resulting graph
794+ will not have any loops by definition.<P />
772795
773796 If the optional second argument <A >p</A > is a float with value
774797 <M >0 \leq </M > <A > p </A > <M > \leq 1</M >, then an edge will exist between each
775798 pair of vertices with probability approximately <A >p</A >.
776799 If <A >p</A > is not specified, then a random probability will be assumed
777- (chosen with uniform probability).
800+ (chosen with uniform probability).< P />
778801 <Log ><![CDATA[
779802gap> RandomDigraph(1000);
780803<immutable digraph with 1000 vertices, 364444 edges>
781804gap> RandomDigraph(10000, 0.023);
782805<immutable digraph with 10000 vertices, 2300438 edges>
783806gap> RandomDigraph(IsMutableDigraph, 1000, 1 / 2);
784807<mutable digraph with 1000 vertices, 499739 edges>
808+ gap> RandomDigraph(IsConnectedDigraph, 1000, 0.75);
809+ <immutable digraph with 1000 vertices, 750265 edges>
810+ gap> RandomDigraph(IsSymmetricDigraph, 1000);
811+ <immutable digraph with 1000 vertices, 329690 edges>
812+ gap> RandomDigraph(IsAcyclicDigraph, 1000, 0.25);
813+ <immutable digraph with 1000 vertices, 125070 edges>
814+ gap> RandomDigraph(IsHamiltonianDigraph, 1000, 0.5);
815+ <immutable digraph with 1000 vertices, 500327 edges>
816+ gap> RandomDigraph(IsEulerianDigraph, 1000, 0.5);
817+ <immutable digraph with 1000 vertices, 433869 edges>
785818]]> </Log >
786819 </Description >
787820</ManSection >
0 commit comments