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

Add more graph generators #6859

Closed
sagetrac-myurko mannequin opened this issue Sep 2, 2009 · 23 comments
Closed

Add more graph generators #6859

sagetrac-myurko mannequin opened this issue Sep 2, 2009 · 23 comments

Comments

@sagetrac-myurko
Copy link
Mannequin

sagetrac-myurko mannequin commented Sep 2, 2009

This patch add graph generators for the hyper star, (n,k)-star, n-star, and bubble sort graph.

Component: graph theory

Author: Michael Yurko

Reviewer: Jason Grout, Minh Van Nguyen

Merged: Sage 4.1.2.alpha4

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

@sagetrac-myurko sagetrac-myurko mannequin added this to the sage-4.1.2 milestone Sep 2, 2009
@sagetrac-myurko sagetrac-myurko mannequin assigned rlmill Sep 2, 2009
@sagetrac-myurko
Copy link
Mannequin Author

sagetrac-myurko mannequin commented Sep 2, 2009

Attachment: trac_6859.patch.gz

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Sep 6, 2009

comment:2

Would it be possible to add to the docstrings the definition of what these graphs should be ?

Nathann

@sagetrac-myurko
Copy link
Mannequin Author

sagetrac-myurko mannequin commented Sep 6, 2009

comment:3

Sure. I'll add definitions.

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Sep 6, 2009

comment:4

I do not know if you are aware of it ( I was not until very recently ) but the docstrings are used to generate a very complete documentation accessible through there :

http://www.sagemath.org/doc/reference/graphs.html

This also means that you can use LaTeX in your description if you deem it necessary, and that the formula will be automatically translated into beautiful equations on this page ;-)

Nathann

@sagetrac-myurko
Copy link
Mannequin Author

sagetrac-myurko mannequin commented Sep 6, 2009

comment:5

Well, I knew that you can use Latex in docstrings, but I tried not to use it since it is hard to read when introspecting.

@sagetrac-myurko
Copy link
Mannequin Author

sagetrac-myurko mannequin commented Sep 6, 2009

Attachment: trac_6859_definitions.patch.gz

Adds definitions of graphs to docstrings

@jasongrout
Copy link
Member

comment:7

Very nice.

I'm attaching a patch which optimizes some of the code to use more python things (like swapping), plus fixes a few typos. I think someone needs to review my patch.

@jasongrout
Copy link
Member

Attachment: trac-6859-optimize.patch.gz

apply on top of previous patches

@sagetrac-myurko
Copy link
Mannequin Author

sagetrac-myurko mannequin commented Sep 22, 2009

comment:8

I obviously can't review the patch, but the swapping certainly looks better. Coding too long in java has made forget some of the nice python idioms.

@jasongrout
Copy link
Member

comment:9

Okay, positive review for your patch.

You can review my changes (just make sure that you still get the same graphs). If you okay my changes, change this ticket to "positive review".

@sagetrac-myurko
Copy link
Mannequin Author

sagetrac-myurko mannequin commented Sep 22, 2009

comment:10

All the graphs except the n,k star graph worked still. However, it was just a one line fix to keep the v[0] = tmp_bit line inside the for loop (otherwise all the vertices become looped). I've uploaded a one line patch to fix it.

@sagetrac-myurko
Copy link
Mannequin Author

sagetrac-myurko mannequin commented Sep 22, 2009

Attachment: trac-6859-optimize-fix.patch.gz

@jasongrout
Copy link
Member

comment:11

ah, right. Okay, then, positive review.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 24, 2009

comment:12

The patch trac_6859-ascii-chars.patch uses only ASCII characters for quotation marks and long dashes. Without it, merging trac_6859.patch and building the reference manual would result in the following error:

reading sources... sage/graphs/graph_generators /scratch/mvngu/release/sage-4.1.2.alpha2/local/lib/python2.6/site-packages/Sphinx-0.5.1-py2.6.egg/sphinx/environment.py:543: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  raise SphinxError(err.message)
Sphinx error:

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 24, 2009

use ASCII characters for quotation marks and long dashes

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 24, 2009

Attachment: trac_6859-ascii-chars.patch.gz

Attachment: trac_6859-formatting-issues.patch.gz

proper formatting of lists

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 24, 2009

comment:13

The patch trac_6859-formatting-issues.patch fixes formatting of lists. Without it, I get the following warnings when building the reference manual:

WARNING: /scratch/mvngu/release/sage-4.1.2.alpha2/local/lib/python2.6/site-packages/sage/graphs/graph_generators.py:docstring of sage.graphs.graph_generators.GraphGenerators.HyperStarGraph:22: (WARNING/2) Bullet list ends without a blank line; unexpected unindent.
WARNING: /scratch/mvngu/release/sage-4.1.2.alpha2/local/lib/python2.6/site-packages/sage/graphs/graph_generators.py:docstring of sage.graphs.graph_generators.GraphGenerators.NKStarGraph:25: (WARNING/2) Bullet list ends without a blank line; unexpected unindent.
WARNING: /scratch/mvngu/release/sage-4.1.2.alpha2/local/lib/python2.6/site-packages/sage/graphs/graph_generators.py:docstring of sage.graphs.graph_generators.GraphGenerators.NStarGraph:19: (WARNING/2) Bullet list ends without a blank line; unexpected unindent.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 24, 2009

Reviewer: Jason Grout, Minh Van Nguyen

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 24, 2009

comment:14

Merged patches in this order:

  1. trac_6859.patch
  2. trac_6859-ascii-chars.patch
  3. trac_6859_definitions.patch
  4. trac-6859-optimize.patch
  5. trac-6859-optimize-fix.patch
  6. trac_6859-formatting-issues.patch

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 24, 2009

Author: Michael Yurko

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 24, 2009

Merged: Sage 4.1.2.alpha3

@sagetrac-mvngu sagetrac-mvngu mannequin closed this as completed Sep 24, 2009
@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 27, 2009

Changed merged from Sage 4.1.2.alpha3 to Sage 4.1.2.alpha4

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 27, 2009

comment:15

There is no 4.1.2.alpha3. Sage 4.1.2.alpha3 was William Stein's release for working on making the notebook a standalone package.

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

1 participant