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

changed extended clustering start index from 0 to 1


git-svn-id: https://svn.forked.de/graph-tool/trunk@44 d4600afd-f417-0410-95de-beed9576f240
parent 05fa231a
......@@ -119,7 +119,7 @@ correlations.add_option("--scalar-assortativity-coefficient", action="callback",
clustering = parser.add_option_group("Clustering")
clustering.add_option("--set-local-clustering-to-property", action="callback", callback=push_option, type="string", metavar="PROPERTY", help="set the local clustering coefficient to vertex property")
clustering.add_option("--global-clustering-coefficient", action="callback", callback=push_option, type="string", metavar="FILE", help="get the global clustering coefficient")
clustering.add_option("--set-extended-clustering-to-property", action="callback", callback=push_option, type="string", metavar="PROPERTY_PREFIX|MAX", help="set the extended clustering coefficients c0 to cMAX to vertex properties PROPERTY_PREFIX0 to PROPERTY_PREFIXMAX")
clustering.add_option("--set-extended-clustering-to-property", action="callback", callback=push_option, type="string", metavar="PREFIX|MAX", help="set the extended clustering coefficients c1 to cMAX to vertex properties PREFIX1 to PREFIXMAX")
layout = parser.add_option_group("Layout")
layout.add_option("--compute-spring-block-layout", action="callback", callback=push_option, type="string", metavar="ITERATIONS[|SEED]", help="compute the spring block layout")
......@@ -485,7 +485,7 @@ def parse_option(opt, just_file=False):
values = parse_values(opt.value)
if len(values) == 0 or len(values) > 2:
raise OptionError(opt.name, "invalid value '%s'" % opt.value)
graph.SetExtendedClusteringToProperty(values[0],int(values[1])+1)
graph.SetExtendedClusteringToProperty(values[0],int(values[1]))
elif opt.name == "compute-spring-block-layout":
if just_file:
return None
......
......@@ -163,7 +163,7 @@ void GraphInterface::SetExtendedClusteringToProperty(string property_prefix, siz
for (size_t i = 0; i < cmaps.size(); ++i)
{
string name = property_prefix + lexical_cast<string>(i);
string name = property_prefix + lexical_cast<string>(i+1);
try
{
find_property_map(_properties, name, typeid(graph_traits<multigraph_t>::vertex_descriptor));
......
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