graphml

Boost Graph read_graphml & dynamic vertex properties

…衆ロ難τιáo~ 提交于 2019-12-11 05:23:46
问题 I have use the boost graph library and read in a graph from a graphml such as 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"> <graph id="G" edgedefault="directed"> <node id="A"/> <node id="B"/> <edge id="0" source="A" target="B"> </graph> </graphml> I have the following C++

Import multigraph into Gephi from GML format

空扰寡人 提交于 2019-12-11 04:32:03
问题 I use NetworkX to create a set of nodes and edges and export them into GML format so that I can view them on Gephi 0.9.1 version. When I import the following GML: graph [ multigraph 1 directed 0 node [ id 0 label 1 ] node [ id 1 label 2 ] edge [ source 0 target 1 key "rel2" ] edge [ source 0 target 1 key "rel1" ] ] Gephi shows the following popup: It said Multi Graph: no while in the GML it is stated multigraph 1 . Gephi automatically merges the edges, and sets the weight to 2 , as below: How

Boost read_graphml example

ε祈祈猫儿з 提交于 2019-12-11 03:15:07
问题 I'm trying to build a simple GraphML loader using BOOST libraries. I have a GraphML file and I want to load it in a boost adjacency list structure. The graph is directed and the only information that it is stored are the name of the nodes (0,1,2,...) and the edges from one node to another. What I did is: void loadHierarchy(){ // ... std::ifstream inFile; inFile.open("ext.gml", std::ifstream::in); typedef boost::adjacency_list<> Graph; Graph g; boost::read_graphml(inFile, g); // ... } I don't

Boost: access graph specific properties with read_graphml()

社会主义新天地 提交于 2019-12-11 00:02:56
问题 I am trying to read graph related (custom) properties from a .graphml file created with yEd using the Boost Graph library. Reading vertex and edge (dynamic_)properties works but my graph properties are always empty . I've also came across how to read graph-domain attributes with boost::read_graphml? but that solution just produces empty strings (it's in the code below). Apart from that, I was not able to find much information about the problem. Here's the shortened code (complete working

Error when using export-graphml in Neo4j 2.2

天涯浪子 提交于 2019-12-10 10:40:21
问题 I am trying to use the export-graphml function in Neo4j 2.2. I have downloaded neo4j shell tools and extract it into the lib directory. I am able to export the entire database as a graphml file. However, if I try to export a subset using a query, I receive the following error: Error occurred in server thread; nested exception is: java.lang.NoSuchMethodError: org.neo4j.cypher.export.CypherResultSubGraph.from(Lorg/neo4j/cypher/javacompat/ExecutionResult;Lorg/neo4j/graphdb/GraphDatabaseService;Z

How to iterate over GraphML file with lxml

大城市里の小女人 提交于 2019-12-08 08:01:44
问题 I have the following GraphML file 'mygraph.gml' that I want to parse with a simple python script: This represents a simple graph with 2 nodes "node0", "node1" and an edge between them <?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="name" for="node" attr.name="name" attr

Error when using export-graphml in Neo4j 2.2

微笑、不失礼 提交于 2019-12-06 08:12:32
I am trying to use the export-graphml function in Neo4j 2.2. I have downloaded neo4j shell tools and extract it into the lib directory. I am able to export the entire database as a graphml file. However, if I try to export a subset using a query, I receive the following error: Error occurred in server thread; nested exception is: java.lang.NoSuchMethodError: org.neo4j.cypher.export.CypherResultSubGraph.from(Lorg/neo4j/cypher/javacompat/ExecutionResult;Lorg/neo4j/graphdb/GraphDatabaseService;Z)Lorg/neo4j/cypher/export/SubGraph; The statement I used is: export-graphml -o /path/to/file/out

Visualization of GraphML graph? [closed]

筅森魡賤 提交于 2019-12-03 13:27:36
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . What are the best options to visualize a graph defined in GraphML on Mac OSX or Linux ? R + iGraph seems to be a valid solution according to gremlin-users group but I'm wondering if there is any easier solution, ideally a simple "graphml2png" command line application. Any idea ? 回答1: I use yEd and it works on

Exporting twitter data to Gephi using R

安稳与你 提交于 2019-12-03 08:51:07
I have compiled a dataset consisting of thousands of tweets using R. The dataset basically looks like this: Data <- data.frame( X = c(1,2), text = c("Hello @User1 #hashtag1, hello @User2 and @User3, #hashtag2", "Hello @User2 #hashtag3, hello @User1 and @User3, #hashtag4"), screenname = c("author1", "author2") ) Now I want to export this dataset to a Gephi supported graph format (see Supported Graph Formats - Gephi ) Whenever an "author" mentions a @user in the text, there should be a direct link from the author to the user. In the case above, the results should be like this: author1 -> @User2

Graphml parse error

我只是一个虾纸丫 提交于 2019-12-02 09:36:21
问题 I tried to create a graphml file using python and igraph library. I can construct igraph's graph object and wrote it to a file using: g.write_graphml("mygraph.graphml") Everything seems to be successful but when I tried to read the file back to python using: g = Graph.Read_GraphML('mygraph.graphml') I got this error: igraph.core.InternalError: Error at .\src\foreign-graphml.c:1024: Input is not proper UTF-8, indicate encoding ! Bytes: 0xA0 0x3C 0x2F 0x64 How can I solve this, please? Thank