Commit f51a6bd2 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Added --random-rewire option

parent a2ca129e
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment