diff --git a/gap/examples.gd b/gap/examples.gd index 4a08fdf79..b28aa6c2c 100644 --- a/gap/examples.gd +++ b/gap/examples.gd @@ -48,3 +48,7 @@ DeclareOperation("PetersenGraph", [IsFunction]); DeclareConstructor("GeneralisedPetersenGraphCons", [IsDigraph, IsInt, IsInt]); DeclareOperation("GeneralisedPetersenGraph", [IsInt, IsInt]); DeclareOperation("GeneralisedPetersenGraph", [IsFunction, IsInt, IsInt]); + +DeclareConstructor("FolkmanGraphCons", [IsDigraph]); +DeclareOperation("FolkmanGraph", []); +DeclareOperation("FolkmanGraph", [IsFunction]); diff --git a/gap/examples.gi b/gap/examples.gi index 402ef6456..d681af66d 100644 --- a/gap/examples.gi +++ b/gap/examples.gi @@ -370,3 +370,18 @@ GeneralisedPetersenGraphCons); InstallMethod(GeneralisedPetersenGraph, "for integer, integer", [IsInt, IsInt], {n, k} -> GeneralisedPetersenGraphCons(IsImmutableDigraph, n, k)); + +InstallMethod(FolkmanGraphCons, "for IsMutableDigraph", [IsMutableDigraph], +function(filt) + return DigraphFromGraph6String(IsMutableDigraph, + "Sl?gHS?_g?oTS?AA_?GOT@O??_i_?G@@S"); +end); + +InstallMethod(FolkmanGraphCons, "for IsImmutableDigraph", [IsImmutableDigraph], +filt -> MakeImmutable(FolkmanGraphCons(IsMutableDigraph))); + +InstallMethod(FolkmanGraph, [], +{} -> FolkmanGraphCons(IsImmutableDigraph)); + +InstallMethod(FolkmanGraph, "for a function", [IsFunction], +filt -> FolkmanGraphCons(filt)); diff --git a/tst/standard/examples.tst b/tst/standard/examples.tst index d06db41e4..536a8c9b1 100644 --- a/tst/standard/examples.tst +++ b/tst/standard/examples.tst @@ -226,6 +226,28 @@ Error, the arguments and must be non-negative integers, gap> JohnsonDigraph(IsMutableDigraph, 4, 2); +# Folkman +gap> D := FolkmanGraph(); + +gap> DigraphNrVertices(D) = 20; +true +gap> DigraphNrEdges(D) = 80; +true +gap> Size(AutomorphismGroup(D)) = 3840; +true +gap> IsHamiltonianDigraph(D); +true +gap> ChromaticNumber(D); +2 +gap> DigraphDiameter(D); +4 +gap> IsBipartiteDigraph(D); +true +gap> IsRegularDigraph(D); +true +gap> D := FolkmanGraph(IsMutableDigraph); + + # gap> DIGRAPHS_StopTest(); gap> STOP_TEST("Digraphs package: standard/examples.tst", 0);