Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
f51a6bd2
Commit
f51a6bd2
authored
Oct 07, 2007
by
Tiago Peixoto
Browse files
Added --random-rewire option
parent
a2ca129e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph-tool
View file @
f51a6bd2
...
...
@@ -124,7 +124,14 @@ def parse_options(arguments = sys.argv[1:]):
[
"remove-graph-property"
,
"PROPERTY"
,
"remove the selected graph property"
,
{},
"graph.RemoveGraphProperty($PROPERTY)"
],
[
"insert-vertex-index-property"
,
"PROPERTY"
,
"insert vertex index as property"
,
{},
"graph.InsertVertexIndexProperty($PROPERTY)"
],
[
"insert-edge-index-property"
,
"PROPERTY"
,
"insert edge index as property"
,
{},
"graph.InsertEdgeIndexProperty($PROPERTY"
],
[
"list-properties"
,
None
,
"list all properties"
,
{},
"graph.ListProperties()"
]]
[
"list-properties"
,
None
,
"list all properties"
,
{},
"graph.ListProperties()"
],
[
"random-rewire"
,
"OPTIONS"
,
"randomly rewire edges. Options are: $OPTIONS_LIST"
,
{
"OPTIONS"
:[(
"correlated"
,(
"string[1]"
,
False
)),(
"uncorrelated"
,(
"string[1]"
,
True
)),
(
"self_loops"
,(
"string"
,
False
)),(
"parallel_edges"
,(
"string"
,
False
)),
(
"seed"
,(
"int"
,
int
(
time
.
time
())))]},
[
"strat = {'correlated':RewireStrat.Correlated, 'uncorrelated':RewireStrat.Uncorrelated}"
,
"graph.RandomRewire(strat[$correlated], $self_loops, $parallel_edges, $seed)"
]]
]
option_groups
.
append
(
modification
)
...
...
Write
Preview
Supports
Markdown
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