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
random_vertex and random_edge functions #7569
Comments
This comment has been minimized.
This comment has been minimized.
comment:5
All patches must include doctests, especially new functions. |
comment:6
I agree, but I did not know how to comment a random generator.... How would you do that ? ;-) Nathann |
comment:7
Replying to @nathanncohen:
There are several ways, e.g.
etc.
|
comment:8
Got it ! Here is the new version :-) Nathann |
comment:9
Hello, Nathann ! |
comment:11
Hello !! I added this parameter because I can not stand the fact that Graph.edges() returns triples instead of pairs, so I constantly use the labels = False argument :-) Patch updated ! Nathann |
Attachment: trac_7569.patch.gz |
Review patch with formatting of code and doc -- apply on top of Nathann's patch |
Author: Nathann Cohen |
Reviewer: Alexandre Blondin Massé |
comment:12
Attachment: trac_7569_review-abm.patch.gz I've tested this patch on sage 4.3.4. All tests passed, and the documentation generated with the Positive review. |
comment:13
Thank you very much again :-) Nathann |
Merged: sage-4.4.alpha0 |
comment:14
Merged in 4.4.alpha0:
|
In many algorithms we want to find a random vertex or a random edge in a graph.
Here it is !
Nathann
CC: @sagetrac-abmasse
Component: graph theory
Author: Nathann Cohen
Reviewer: Alexandre Blondin Massé
Merged: sage-4.4.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/7569
The text was updated successfully, but these errors were encountered: