Hello,

I have a problems using a loaded graphml graph.

my graphml look like this:

///////
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd";>
  <key id="key0" for="node" attr.name="ref" attr.type="long" />
  <key id="key1" for="edge" attr.name="weight" attr.type="double" />
  <graph id="G" edgedefault="undirected" parse.nodeids="canonical"
parse.edgeids="canonical" parse.order="nodesfirst">
    <node id="n0">
      <data key="key0">0</data>
    </node>
    <node id="n1">
      <data key="key0">1</data>
    </node>
////////
    <edge id="e0" source="n0" target="n1">
      <data key="key1">0.1</data>
    </edge>
    <edge id="e1" source="n0" target="n16">
      <data key="key1">1.08661</data>
    </edge>
    <edge id="e2" source="n0" target="n205">
      <data key="key1">1.17957</data>
    </edge>
////////


// What I do 
g_uDirG = Graph(directed=False)
eprop_ang_weight = g_uDirG.new_edge_property("float")
g_uDirG = load_graph(xml_filename)

// Prints about the loaded graph
Num of Nodes
7269
Num of Edges
16526
ref            (vertex)  (type: int64_t)
weight         (edge)    (type: long double)
////

// copy the edge weights
eprop_ang_weight = g_uDirG.edge_properties["weight"]

// run betweenness
graph_tool.centrality.betweenness(g_uDirG, vprop=vprop_betweenness,
weight=eprop_ang_weight , norm=False)
///////////


The problem is that I get '0' in the distances of shortest paths and I get
betweeness 'nan' for all vertices.

What am I missing?

Thanks
T



--
View this message in context: 
http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/problem-with-using-a-loaded-graph-graphml-tp4025182.html
Sent from the Main discussion list for the graph-tool project mailing list 
archive at Nabble.com.
_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to