Skip to content

Commit 74b3afd

Browse files
Merge branch 'master' into amalgamDigraphs
2 parents 5e70d76 + 0da64d8 commit 74b3afd

File tree

12 files changed

+598
-47
lines changed

12 files changed

+598
-47
lines changed

.VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.2
1+
1.5.3

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ Wilf A. Wilson, Michael Young et al.
44

55
Licensing information can be found in the `LICENSE` file.
66

7+
## Version 1.5.3 (released 20/05/2022)
8+
9+
This is a minor release including the following changes:
10+
11+
* digraph: fix String method for chains/cycles by @james-d-mitchell in https://github.com/digraphs/Digraphs/pull/542
12+
* Disable edge labels if not already set in some cases by @james-d-mitchell in https://github.com/digraphs/Digraphs/pull/540
13+
* build: remove the default flag -march=native by @james-d-mitchell in https://github.com/digraphs/Digraphs/pull/541
14+
* doc: fix typos by @james-d-mitchell in https://github.com/digraphs/Digraphs/pull/544
15+
716
## Version 1.5.2 (released 30/03/2022)
817

918
This is a very minor release containing technical changes for maintaining compatibility with other GAP packages.

PackageInfo.g

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
##
1010

1111
## <#GAPDoc Label="PKGVERSIONDATA">
12-
## <!ENTITY VERSION "1.5.2">
12+
## <!ENTITY VERSION "1.5.3">
1313
## <!ENTITY GAPVERS "4.10.0">
1414
## <!ENTITY GRAPEVERS "4.8.1">
1515
## <!ENTITY IOVERS "4.5.1">
1616
## <!ENTITY ORBVERS "4.8.2">
1717
## <!ENTITY DATASTRUCTURESVERS "0.2.5">
1818
## <!ENTITY NAUTYTRACESINTERFACEVERS "0.2">
19-
## <!ENTITY ARCHIVENAME "digraphs-1.5.2">
19+
## <!ENTITY ARCHIVENAME "digraphs-1.5.3">
2020
## <!ENTITY COPYRIGHTYEARS "2014-22">
2121
## <#/GAPDoc>
2222

@@ -28,8 +28,8 @@ _STANDREWSCS := Concatenation(["Jack Cole Building, North Haugh, ",
2828
SetPackageInfo(rec(
2929
PackageName := "Digraphs",
3030
Subtitle := "Graphs, digraphs, and multidigraphs in GAP",
31-
Version := "1.5.2",
32-
Date := "30/03/2022", # dd/mm/yyyy format
31+
Version := "1.5.3",
32+
Date := "20/05/2022", # dd/mm/yyyy format
3333
License := "GPL-3.0-or-later",
3434
ArchiveFormats := ".tar.gz",
3535

@@ -219,7 +219,17 @@ rec(
219219
Place := "St Andrews",
220220
Institution := "University of St Andrews"),
221221

222-
rec(
222+
rec(
223+
LastName := "Sharma",
224+
FirstNames := "Kamran",
225+
IsAuthor := false,
226+
IsMaintainer := false,
227+
Email := "[email protected]",
228+
PostalAddress := _STANDREWSCS,
229+
Place := "St Andrews",
230+
Institution := "University of St Andrews"),
231+
232+
rec(
223233
LastName := "Smith",
224234
FirstNames := "Finn",
225235
IsAuthor := false,

VERSIONS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#############################################################################
99
##
1010

11+
release 1.5.3 - 20/05/2022
1112
release 1.5.2 - 30/03/2022
1213
release 1.5.1 - 29/03/2022
1314
release 1.5.0 - 27/10/2021

configure.ac

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ fi
118118

119119
AX_CHECK_BLISS()
120120

121-
# Check whether to use -march=native -mpopcnt and __builtin_ctzl
121+
# Check whether to use -mpopcnt and __builtin_ctzl
122122
AC_ARG_WITH([intrinsics],
123123
[AS_HELP_STRING([--without-intrinsics],
124124
[do not use compiler intrinsics even if available])]
@@ -127,10 +127,6 @@ AC_ARG_WITH([intrinsics],
127127
AS_IF([test "x$with_intrinsics" == "xno" ],
128128
[AC_MSG_NOTICE([compiler intrinsics will not be used even if available])])
129129

130-
AS_IF([test "x$with_intrinsics" != "xno"],
131-
[AX_CHECK_COMPILE_FLAG(-march=native, AX_APPEND_FLAG(-march=native))
132-
])
133-
134130
dnl compiler builtins
135131
AC_DEFUN([CHECK_COMPILER_BUILTIN],
136132
[AC_MSG_CHECKING([for $1])

doc/digraph.xml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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[
779802
gap> RandomDigraph(1000);
780803
<immutable digraph with 1000 vertices, 364444 edges>
781804
gap> RandomDigraph(10000, 0.023);
782805
<immutable digraph with 10000 vertices, 2300438 edges>
783806
gap> 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>

doc/grahom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ false
808808
<C>MaximalCommonSubdigraph</C> returns a maximal common subgraph <C>M</C> of
809809
<A>D1</A> and <A>D2</A> with the maximum number of vertices. So <C>M</C> is a
810810
digraph which embeds into both <A>D1</A> and <A>D2</A> and has the largest
811-
number of vertices amoung such digraphs.
811+
number of vertices among such digraphs.
812812

813813
It returns a list <C>[M, t1, t2]</C> where <C>M</C> is the maximal common
814814
subdigraph and <C>t1, t2</C> are transformations embedding <C>M</C> into
@@ -839,7 +839,7 @@ gap> MaximalCommonSubdigraph(NullDigraph(0), CompleteDigraph(10));
839839
<C>MinimalCommonSuperdigraph</C> returns a minimal common superdigraph
840840
<C>M</C> of <A>D1</A> and <A>D2</A> with the minimum number of vertices.
841841
So <C>M</C> is a digraph into which both <A>D1</A> and <A>D2</A> embed and
842-
has the smallest number of vertices amoung such digraphs.
842+
has the smallest number of vertices among such digraphs.
843843

844844
It returns a list <C>[M, t1, t2]</C> where <C>M</C> is the minimal common
845845
superdigraph and <C>t1, t2</C> are transformations embedding <A>D1</A> and

gap/attr.gi

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,30 +1787,24 @@ function(D)
17871787
return D;
17881788
end);
17891789

1790-
InstallMethod(DigraphAddAllLoops, "for a digraph by out-neighbours",
1791-
[IsDigraphByOutNeighboursRep],
1790+
InstallMethod(DigraphAddAllLoops, "for a digraph", [IsDigraph],
17921791
function(D)
1793-
local ismulti, C, list, v;
1794-
if HasIsReflexiveDigraph(D) and IsReflexiveDigraph(D) then
1795-
return D;
1796-
fi;
1797-
ismulti := IsMultiDigraph(D);
1792+
local C, v;
17981793
C := DigraphMutableCopyIfImmutable(D);
1799-
list := C!.OutNeighbours;
1800-
Assert(1, IsMutable(list));
1801-
for v in DigraphVertices(C) do
1802-
if not v in list[v] then
1803-
Add(list[v], v);
1804-
if not ismulti then
1805-
SetDigraphEdgeLabel(C, v, v, 1);
1794+
1795+
if not (HasIsReflexiveDigraph(D) and IsReflexiveDigraph(D)) then
1796+
for v in DigraphVertices(C) do
1797+
if not IsDigraphEdge(D, v, v) then
1798+
DigraphAddEdge(C, v, v);
18061799
fi;
1807-
fi;
1808-
od;
1800+
od;
1801+
fi;
1802+
18091803
if IsImmutableDigraph(D) then
18101804
MakeImmutable(C);
18111805
SetDigraphAddAllLoopsAttr(D, C);
18121806
SetIsReflexiveDigraph(C, true);
1813-
SetIsMultiDigraph(C, ismulti);
1807+
SetIsMultiDigraph(C, IsMultiDigraph(D));
18141808
SetDigraphHasLoops(C, DigraphHasAVertex(C));
18151809
fi;
18161810
return C;

0 commit comments

Comments
 (0)