Skip to content

Commit

Permalink
Merge 102c57b into e097454
Browse files Browse the repository at this point in the history
  • Loading branch information
finnbuck authored Feb 28, 2021
2 parents e097454 + 102c57b commit 038ddd5
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gap/examples.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
15 changes: 15 additions & 0 deletions gap/examples.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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));
22 changes: 22 additions & 0 deletions tst/standard/examples.tst
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,28 @@ Error, the arguments <n> and <k> must be non-negative integers,
gap> JohnsonDigraph(IsMutableDigraph, 4, 2);
<mutable digraph with 6 vertices, 24 edges>

# Folkman
gap> D := FolkmanGraph();
<immutable digraph with 20 vertices, 80 edges>
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);
<mutable digraph with 20 vertices, 80 edges>

#
gap> DIGRAPHS_StopTest();
gap> STOP_TEST("Digraphs package: standard/examples.tst", 0);

0 comments on commit 038ddd5

Please sign in to comment.