Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tiago Peixoto
graph-tool
Commits
7f10e926
Commit
7f10e926
authored
Feb 06, 2009
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix seeding in random_graph()
The seed option is now correctly interpreted.
parent
be9b2596
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/graph_tool/generation/__init__.py
src/graph_tool/generation/__init__.py
+3
-3
No files found.
src/graph_tool/generation/__init__.py
View file @
7f10e926
...
...
@@ -20,15 +20,15 @@ from .. dl_import import dl_import
dl_import
(
"import libgraph_tool_generation"
)
from
..
core
import
Graph
import
sys
,
random
import
sys
,
numpy
__all__
=
[
"random_graph"
]
def
random_graph
(
N
,
deg_sampler
,
deg_corr
=
None
,
directed
=
True
,
parallel
=
False
,
self_loops
=
False
,
seed
=
0
,
verbose
=
False
):
if
seed
!
=
0
:
seed
=
random
.
randint
(
0
,
sys
.
maxint
)
if
seed
=
=
0
:
seed
=
numpy
.
random
.
randint
(
0
,
sys
.
maxint
)
g
=
Graph
()
if
deg_corr
==
None
:
uncorrelated
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment