Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions gap/PolygonalComplexes/properties.gd
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,38 @@ DeclareProperty( "IsSimplexRing", IsTwistedPolygonalComplex);
DeclareProperty( "IsSimplexString", IsTwistedPolygonalComplex);
#! @EndGroup

#! @BeginGroup FaceListOfRing
#! @Description
#! Compute the face list of a simplex ring where the list starts with the
#! smallest face in the case of a simplex ring.
#!
#! @BeginExampleSession
#! gap> ring:=SimplexRingByIsomorphismType([1,2,3]);
#! simplicial surface (6 vertices, 12 edges, and 6 faces)
#! gap> FaceListOfSimplexRing(ring);
#! [ 1, 2, 3, 4, 5, 6 ]
#! @EndExampleSession
#!
#! @Arguments simplex ring
DeclareAttribute( "FaceListOfSimplexRing", IsSimplexRing);
#! @EndGroup

#! @BeginGroup FaceListOfString
#! @Description
#! Compute the face list of a simplex string where the list starts with the
#! smallest face that has two incident boundary edges in the case of a simplex string.
#!
#! @BeginExampleSession
#! gap> string:=SimplexStringByIsomorphismType([1,2,3]);
#! simplicial surface (8 vertices, 13 edges, and 6 faces)
#! gap> FaceListOfSimplexString(string);
#! [ 1, 2, 3, 4, 5, 6 ]
#! @EndExampleSession
#!
#! @Arguments simplex string
DeclareAttribute( "FaceListOfSimplexString", IsSimplexString);
#! @EndGroup

#! @BeginGroup IsMultiTetrahedralSphere
#! @Description
#! Check whether the given twisted polygonal complex is a multitetrahedral
Expand Down
39 changes: 38 additions & 1 deletion gap/PolygonalComplexes/properties.gi
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ InstallMethod( IsClosedSurface, "for a polygonal surface",
end
);

### Simplex strings and rings

InstallMethod( IsSimplexRing, "for a twisted polygonal complex",
[IsTwistedPolygonalComplex],
function( complex )
Expand Down Expand Up @@ -109,6 +111,41 @@ InstallMethod( IsSimplexString, "for a twisted polygonal complex",
end
);

BindGlobal("__SIMPLICIAL_FaceList",function(surface,startingFace)
local facedyclet,oldface, nextface, currentface, neighbours, neighbour;

oldface:= startingFace;
facedyclet:= [oldface];
nextface:= Minimum(NeighbourFacesOfFace(surface,oldface));
Add(facedyclet, nextface);
currentface:=nextface;

while Length(facedyclet)<>NumberOfFaces(surface) do
neighbours:= NeighbourFacesOfFace(surface,currentface);
neighbour:= Difference(neighbours,[oldface])[1];
Add(facedyclet, neighbour);
oldface:=currentface;
currentface:=neighbour;
od;

return facedyclet;
end
);

InstallMethod(FaceListOfSimplexRing,"for a simplex ring",[IsSimplexRing],
function(ring)
return __SIMPLICIAL_FaceList(ring,Flat(Faces(ring))[1]);
end);

InstallMethod(FaceListOfSimplexString,"for a simplex string",[IsSimplexString],
function(string)
local boundaryFaces;
boundaryFaces:=Filtered(Faces(string),f->Length(NeighbourFacesOfFace(string,f))=1);
return __SIMPLICIAL_FaceList(string, Minimum(boundaryFaces));
end);

### Multitetrahedral Spheres

InstallMethod( IsMultiTetrahedralSphere, "for a twisted polygonal complex",
[IsTwistedPolygonalComplex],
function(complex)
Expand All @@ -117,7 +154,7 @@ InstallMethod( IsMultiTetrahedralSphere, "for a twisted polygonal complex",
EulerCharacteristic(complex)=2 and IsVertexFaithful(complex)) then
return false;
fi;
waists:=AllThreeWaistsOfComplex(complex);
waists:=AllThreeWaistsOfComplex(complex);
if Length(waists)=NumberOfFaces(complex)/2-2 then
return true;
else
Expand Down