#18530: Simplify generation of some basic graphs
-------------------------+-------------------------------------------------
Reporter: | Owner:
dcoudert | Status: needs_review
Type: | Milestone: sage-6.8
enhancement | Resolution:
Priority: minor | Merged in:
Component: graph | Reviewers:
theory | Work issues:
Keywords: | Commit:
Authors: David | b0936f38b2d7c04b20f806634e58509c5c424338
Coudert | Stopgaps:
Report Upstream: N/A |
Branch: |
public/18530 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by ncohen):
Helloooooooooo !
I added a commit at public/18530 (since you chose to make the branch
public).
Most of the changes I made are superficial:
- Reduce the number of lines whenever possible
- Add edges from an iterator instead of a dictionary. Adding edges from a
dictionary calls ` add_edge` on an iterator, so it can only be slower
I also fixed a bug with ladder_graph, which was incorrect (plot it, you
will see).
Most importantly, if you have never looked at paths, now is the time:
{{{
sage: graphs.PathGraph(3).show()
sage: graphs.PathGraph(30).show()
sage: graphs.PathGraph(100).show()
}}}
Run those three commands. You will be surprised `:-P`
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/18530#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.