Skip to content
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

Generalized Petersen graph generator #7228

Closed
haaninjo opened this issue Oct 15, 2009 · 10 comments
Closed

Generalized Petersen graph generator #7228

haaninjo opened this issue Oct 15, 2009 · 10 comments

Comments

@haaninjo
Copy link

This patch introduces a generator for the generalized Petersen graphs.

http://mathworld.wolfram.com/GeneralizedPetersenGraph.html

http://en.wikipedia.org/wiki/Petersen_graph#Generalized_Petersen_graphs

The method used for plotting gives exactly the same result as the Petersen, Desargues, and the Moebius-Kantor graphs, so these functions have been simplified to just call GeneralizedPetersenGraph() with suitable parameter values and then change the graph's name to the named graph in question.

Patch is made against sage 4.1.2

Component: graph theory

Author: Anders Jonsson

Reviewer: Nathann Cohen

Merged: sage-4.2.alpha1

Issue created by migration from https://trac.sagemath.org/ticket/7228

@haaninjo
Copy link
Author

generator for generalized Petersen graphs

@haaninjo
Copy link
Author

comment:1

Attachment: trac_7228.patch.gz

@haaninjo

This comment has been minimized.

@haaninjo haaninjo added this to the sage-4.2 milestone Oct 15, 2009
@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Oct 18, 2009

comment:2

This patch seems perfect to me ! I just modified the name of this graph so that it includes the values of n and k, and added some ` somewhere.

If you agree with these, you can set this ticket to positive review !

@haaninjo
Copy link
Author

comment:3

Attachment: trac_7228-reviewer.patch.gz

Thanks for your review, I agree with all changes. I noticed however that my patch caused a test to fail in graph.py (a test that looks up the coordinates of all vertices of the Petersen Graph). The failure was trivial, the main reason was that I had placed the nodes at larger distance from (0,0) than before.

I have fixed these position issues in this new patch, which should be applied on top of trac_7228-reviewer.patch

@haaninjo
Copy link
Author

Attachment: trac_7228-fix_positions.patch.gz

fixes failure of position test

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Oct 20, 2009

comment:4

good point !

Positive review !

@nathanncohen nathanncohen mannequin changed the title [need review] Generalized Petersen graph generator Generalized Petersen graph generator Oct 20, 2009
@mwhansen
Copy link
Contributor

Author: Anders Jonsson

@mwhansen
Copy link
Contributor

Reviewer: Nathann Cohen

@mwhansen
Copy link
Contributor

Merged: sage-4.2.alpha1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants