From d0cf4b47a9b38025907c1c0abf00cc5e088fe354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Meike=20Wei=C3=9F?= Date: Wed, 18 Sep 2024 14:03:32 +0200 Subject: [PATCH 1/3] added double n-gon --- gap/Library/library.gd | 30 +++++++++++++++++++++++++++++- gap/Library/library.gi | 24 ++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/gap/Library/library.gd b/gap/Library/library.gd index fe61a5ae..73de2bab 100644 --- a/gap/Library/library.gd +++ b/gap/Library/library.gd @@ -461,7 +461,6 @@ DeclareOperation( "JanusHead", [] ); #! [ [ 1, 2, 5 ], [ 2, 3, 6 ], [ 3, 4, 7 ], [ 1, 4, 8 ] ] #! gap> VerticesOfFaces(umb4); #! [ [ 1, 2, 5 ], [ 2, 3, 5 ], [ 3, 4, 5 ], [ 1, 4, 5 ] ] -#! gap> #! gap> umb2 := SimplicialUmbrella(2); #! simplicial surface (3 vertices, 4 edges, and 2 faces) #! gap> VerticesOfEdges(umb2); @@ -476,6 +475,35 @@ DeclareOperation( "JanusHead", [] ); DeclareOperation( "SimplicialUmbrella", [ IsPosInt ] ); #! @EndGroup +#! +#! +#! +#! a simplicial surface +#! +#! Return a simplicial surface consisting of two closed umbrella-path +#! with nrFaces triangles which are joined at their boundary. +#! The labels of one umbrella are assigned according to the illustration for SimplicialUmbrella, +#! the additional vertex is labelled with nrFaces+2, the incident edges to this vertex +#! are labelled from 2*nrFaces+1 to 4*nrFaces and the incident faces are labelled from +#! nrFaces+1 to 2*nrFaces. +#! @ExampleSession +#! gap> doubleumb2:=SimplicialDoubleUmbrella(2); +#! simplicial surface (4 vertices, 6 edges, and 4 faces) +#! gap> VerticesOfEdges(doubleumb2); +#! [ [ 1, 3 ], [ 2, 3 ], [ 1, 2 ], [ 1, 2 ], [ 1, 4 ], [ 2, 4 ] ] +#! gap> EdgesOfFaces(doubleumb2); +#! [ [ 1, 2, 3 ], [ 1, 2, 4 ], [ 3, 5, 6 ], [ 4, 5, 6 ] ] +#! gap> doubleumb4:=SimplicialDoubleUmbrella(4); +#! simplicial surface (6 vertices, 12 edges, and 8 faces) +#! gap> IsIsomorphic(doubleumb4,Octahedron()); +#! true +#! @EndExampleSession +#! +#! +# here no AutoDoc documentation since synonyms can't be handled automatically +DeclareOperation("SimplicialDoubleUmbrella", [ IsPosInt ] ); +DeclareSynonym("SimplicialDoubleGon", SimplicialDoubleUmbrella); + #! @BeginGroup SimplicialOpenGeodesic #! @Description #! Return a simplicial surface consisting of one non-closed geodesic-path diff --git a/gap/Library/library.gi b/gap/Library/library.gi index 5904fa87..17ad9dce 100644 --- a/gap/Library/library.gi +++ b/gap/Library/library.gi @@ -827,6 +827,30 @@ InstallMethod( SimplicialUmbrella, "for an integer at least 2", [IsPosInt], end ); +InstallMethod(SimplicialDoubleUmbrella, "for an integer at least 2", [IsPosInt], + function(nrFaces) + local umbr, verticesOfEdges, edgesOfFaces, i; + + if nrFaces = 1 then + Error("SimplicialUmbrella: Argument has to be greater than 1."); + fi; + + umbr:=SimplicialUmbrella(nrFaces); + verticesOfEdges:=ShallowCopy(VerticesOfEdges(umbr)); + edgesOfFaces:=ShallowCopy(EdgesOfFaces(umbr)); + + for i in [1..nrFaces-1] do + edgesOfFaces[i+nrFaces] := [i+nrFaces,2*nrFaces+i,2*nrFaces+i+1]; + + verticesOfEdges[2*nrFaces+i] := [i,nrFaces+2]; + od; + edgesOfFaces[2*nrFaces] := [2*nrFaces,2*nrFaces+nrFaces, 2*nrFaces+1]; + verticesOfEdges[2*nrFaces+nrFaces]:=[nrFaces, nrFaces+2]; + + return SimplicialSurfaceByDownwardIncidence(verticesOfEdges, edgesOfFaces); +end); + + InstallMethod( SimplicialOpenGeodesic, "for an integer at least 1", [IsPosInt], function(nrFaces) local verticesOfFaces; From a77d7e4825f330a5a2f2f3851b48bd1de1caf459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Meike=20Wei=C3=9F?= Date: Wed, 18 Sep 2024 14:05:20 +0200 Subject: [PATCH 2/3] use NC version --- gap/Library/library.gi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gap/Library/library.gi b/gap/Library/library.gi index 17ad9dce..4424e642 100644 --- a/gap/Library/library.gi +++ b/gap/Library/library.gi @@ -847,7 +847,7 @@ InstallMethod(SimplicialDoubleUmbrella, "for an integer at least 2", [IsPosInt], edgesOfFaces[2*nrFaces] := [2*nrFaces,2*nrFaces+nrFaces, 2*nrFaces+1]; verticesOfEdges[2*nrFaces+nrFaces]:=[nrFaces, nrFaces+2]; - return SimplicialSurfaceByDownwardIncidence(verticesOfEdges, edgesOfFaces); + return SimplicialSurfaceByDownwardIncidenceNC(verticesOfEdges, edgesOfFaces); end); From 252c13fb23af7f1f0ed5be1ff871fdfc16a277d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Meike=20Wei=C3=9F?= Date: Thu, 19 Sep 2024 12:54:52 +0200 Subject: [PATCH 3/3] spelling mistake --- gap/Library/library.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gap/Library/library.gd b/gap/Library/library.gd index 73de2bab..2462f4f1 100644 --- a/gap/Library/library.gd +++ b/gap/Library/library.gd @@ -480,7 +480,7 @@ DeclareOperation( "SimplicialUmbrella", [ IsPosInt ] ); #! #! a simplicial surface #! -#! Return a simplicial surface consisting of two closed umbrella-path +#! Return a simplicial surface consisting of two closed umbrella-paths #! with nrFaces triangles which are joined at their boundary. #! The labels of one umbrella are assigned according to the illustration for SimplicialUmbrella, #! the additional vertex is labelled with nrFaces+2, the incident edges to this vertex