igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Create a graph from an edgelist file(.txt) which is weighted


From: u9611111
Subject: [igraph] Create a graph from an edgelist file(.txt) which is weighted
Date: Wed, 17 Apr 2013 18:33:59 +0800

Dear all,

I want to create a graph in C, and import a .txt file as following:
=============
0 49389 5
0 49390 3
1 49298 3
1 49391 5
2 49392 2
3 49393 5
.....
=============
It means an edge weighted 5 form 0 to 49389, an edge weighted 3 form 0 to 
49390......(actually,it's fine that it's undirected).
The graph is a little big, 200,000 nodes.(perhaps a sparse matrix)

Solution 1. save as a igraph_matrix_t, but it needs too many RAM. It's 
impossible

Solution 2. use igraph_read_graph_edgelist, but it can't be weighted. The file 
only can be 2 nodes separated by a space.

How can I create the graph from this big weighted edgelist file?

Thanks for answering
James Fu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]