problem with using a loaded graph (graphml)
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/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
Hi, No one is using graphml loader? :( T -- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 11/07/2013 08:25 PM, Tasos wrote:
Hi,
No one is using graphml loader? :(
Please be patient when asking questions. I simply did not understand the problem you are having. I don't see why it has anything to do with the graphml loader... Please provide a minimal and complete working example where the problem can be seen, so that I can have chance of understanding it. -- Tiago de Paula Peixoto <tiago@skewed.de>
Im sorry that felt a bit of pressure. I’ve been smashing my head all day with no solution and because its a small community list I thought that a number of people will have a solution. I finally found the solution 6AM after I woke up from jet lag. Thanks for all the help in any case T -- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
participants (2)
-
Tasos -
Tiago de Paula Peixoto