digraphs / Digraphs

The GAP package Digraphs
https://digraphs.github.io/Digraphs
Other
30 stars 46 forks source link

Problem with DigraphMaximumMatching #461

Closed lhsoicher closed 3 years ago

lhsoicher commented 3 years ago

Hi @james-d-mitchell @wilfwilson

When I call DigraphMaximumMatching(Digraph(grapegraph)), I need to first Unbind(grapegraph.names) to prevent an error. Please see the example below:

gap> LoadPackage("grape");
─────────────────────────────────────────────────────────────────────────────
Loading  GRAPE 4.8.5 (GRaph Algorithms using PErmutation groups)
by Leonard H. Soicher (http://www.maths.qmul.ac.uk/~lsoicher/).
Homepage: https://gap-packages.github.io/grape
Report issues at https://github.com/gap-packages/grape/issues
─────────────────────────────────────────────────────────────────────────────
true
gap> LoadPackage("digraphs");
─────────────────────────────────────────────────────────────────────────────
Loading  datastructures 0.2.5 (datastructures - GAP Data Structures)
by Markus Pfeiffer (http://www.morphism.de/~markusp),
   Max Horn (https://www.quendi.de/math),
   Christopher Jefferson (http://caj.host.cs.st-andrews.ac.uk/), and
   Steve Linton (http://sl4.host.cs.st-andrews.ac.uk/).
Homepage: https://gap-packages.github.io/datastructures
Report issues at https://github.com/gap-packages/datastructures/issues
─────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────
Loading  Digraphs 1.3.1 (Digraphs - Methods for digraphs)
by Jan De Beule (http://homepages.vub.ac.be/~jdbeule/),
   Julius Jonusas (http://julius.jonusas.work),
   James Mitchell (https://jdbm.me),
   Michael Torpey (https://mtorpey.github.io),
   Maria Tsalakou (https://mariatsalakou.github.io/), and
   Wilf A. Wilson (https://wilf.me).
with contributions by:
   Stuart Burrell (sb235@st-andrews.ac.uk),
   Reinis Cirpons (rc234@st-andrews.ac.uk),
   Luke Elliott (le27@st-andrews.ac.uk),
   Max Horn (https://www.quendi.de/math),
   Christopher Jefferson (http://caj.host.cs.st-andrews.ac.uk),
   Markus Pfeiffer (https://www.morphism.de/~markusp),
   Christopher Russell (cr66@st-andrews.ac.uk),
   Finn Smith (fls3@st-andrews.ac.uk), and
   Murray Whyte (mw231@st-andrews.ac.uk).
maintained by:
   James Mitchell (https://jdbm.me) and
   Wilf A. Wilson (https://wilf.me).
Homepage: https://digraphs.github.io/Digraphs
Report issues at https://github.com/digraphs/Digraphs/issues
─────────────────────────────────────────────────────────────────────────────
true
gap> H:=HammingGraph(2,2);
rec( adjacencies := [ [ 2, 3 ] ], 
  group := Group([ (1,3)(2,4), (1,2)(3,4), (2,3) ]), isGraph := true, 
  names := [ [ 1, 1 ], [ 1, 2 ], [ 2, 1 ], [ 2, 2 ] ], order := 4, 
  representatives := [ 1 ], schreierVector := [ -1, 2, 1, 2 ] )
gap> Unbind(H.names);
gap> DigraphMaximumMatching(Digraph(H));
[ [ 1, 2 ], [ 3, 4 ] ]
gap> H:=HammingGraph(2,2);;
gap> DigraphMaximumMatching(Digraph(H));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `[]:=' on 3 arguments at /home/lsoicher/gap/standard/gap-4.11.1/lib/methsel2.g:249 called from
mateD[lab[i]] := lab[mateG[i]]
 ; at /home/lsoicher/gap/standard/gap-4.11.1/pkg/digraphs-1.3.1/gap/attr.gi:23\
52 called from
<function "DigraphMaximumMatching for a digraph">( <arguments> )
 called from read-eval loop at *stdin*:8
type 'quit;' to quit to outer loop
brk> 
wilfwilson commented 3 years ago

Thanks for the report @lhsoicher. I've fixed this in PR #462, and it will be included in the next release.

wilfwilson commented 3 years ago

This fix is included in the new v1.4.1 release.