-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GeneralisedPetersenGraph function #204
Add GeneralisedPetersenGraph function #204
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor quibbles.
doc/exmpl.xml
Outdated
|
||
For more information, see <URL>https://en.wikipedia.org/wiki/Generalized_Petersen_graph</URL><P/> | ||
|
||
See also <Ref Func="DigraphsTestInstall"/>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we see also DigraphsTestInstall
??
doc/exmpl.xml
Outdated
<#GAPDoc Label="GeneralisedPetersenGraph"> | ||
<ManSection> | ||
<Attr Name="GeneralisedPetersenGraph" Arg="n, k"/> | ||
<Returns>A digaph.</Returns> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
digaph
-> digraph
<immutable digraph with 10 vertices, 30 edges> | ||
gap> IsIsomorphicDigraph(D, PetersenGraph()); | ||
true | ||
]]></Example> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not add an example which returns a mutable digraph? Other manual examples don't do this only because they haven't yet been updated.
gap/exmpl.gi
Outdated
if n + i + k <= 2 * n then | ||
DigraphAddEdge(D, [n + i, n + i + k]); | ||
else | ||
DigraphAddEdge(D, [n + i, (n + i + k) mod n + n]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe some brackets around ((n + i + k) mod n) + n
?
tst/standard/exmpl.tst
Outdated
<immutable digraph with 10 vertices, 30 edges> | ||
gap> IsIsomorphicDigraph(D, PetersenGraph()); | ||
true | ||
gap> mat8_3 := [[0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could make this all much shorter by just doing:
gap> G8_3 := DigraphFromGraph6String("OCQa`Q?OH?a@A@@?_OGB@");
This pull requests adds the Generalised Petersen Graphs to the standard examples, using the construction as described here.