Skip to content

Commit

Permalink
improve isomorphism testing for simplicial surfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
alice authored and alice committed Sep 18, 2024
1 parent 8d5ce0f commit d2f5ab0
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions gap/PolygonalComplexes/graphs.gi
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ if IsPackageMarkedForLoading("NautyTracesInterface", ">=0") then
od;
od;
Append(vertexList, Faces(complex) + maxVertex + maxEdge);


if IsSimplicialSurface(complex) then return
NautyColoredGraph(edgeList, colourList);
fi;
return NautyColoredGraphWithNodeLabels( edgeList, colourList, vertexList );
end
);
Expand Down Expand Up @@ -300,6 +303,7 @@ if IsPackageMarkedForLoading( "GRAPE", ">=0" ) then
if IsSimplicialSurface(complex1) and IsSimplicialSurface(complex2) and CounterOfButterflies(complex1)<>CounterOfButterflies(complex2) then
return false;
fi;

inc1 := IncidenceGrapeGraph(complex1);
inc2 := IncidenceGrapeGraph(complex2);
# We copy the structure fully, so that all components stay mutable
Expand All @@ -318,9 +322,15 @@ if IsPackageMarkedForLoading("NautyTracesInterface", ">=0") then
[IsTwistedPolygonalComplex, IsTwistedPolygonalComplex],5,
function(complex1, complex2)

if IsSimplicialSurface(complex1) and IsSimplicialSurface(complex2) and CounterOfButterflies(complex1)<>CounterOfButterflies(complex2) then
return false;
if IsSimplicialSurface(complex1) and IsSimplicialSurface(complex2) then
if CounterOfButterflies(complex1)<>CounterOfButterflies(complex2) then
return false;
fi;
return IsomorphismGraphs(
IncidenceNautyGraph(complex1),
IncidenceNautyGraph(complex2)) <> fail;
fi;

return IsomorphismGraphs(
ChamberAdjacencyGraph(complex1),
ChamberAdjacencyGraph(complex2)) <> fail;
Expand Down

1 comment on commit d2f5ab0

@aniemeyer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When testing isomorphism for simplicial surfaces using nauty, a general method that works for polygonal complexes was installed. This pull request uses a smaller graph for isomorphism testing when the complex is known to be a surface.

Please sign in to comment.