GraphIO provides support to LightGraphs.jl for reading/writing graphs in various formats.
The current version of GraphIO works with Julia version >= 0.7.
Currently, the following functionality is provided:
Format | Read | Write | Multiple Graphs | Format Name |
---|---|---|---|---|
[EdgeList] | ✓ | ✓ | EdgeListFormat | |
GML | ✓ | ✓ | ✓ | GMLFormat |
Graph6 | ✓ | ✓ | ✓ | Graph6Format |
GraphML | ✓ | ✓ | ✓ | GraphMLFormat |
Pajek NET | ✓ | ✓ | NETFormat | |
GEXF | ✓ | GEXFFormat | ||
DOT | ✓ | ✓ | DOTFormat | |
[CDF] | ✓ | CDFFormat |
[EdgeList]: a simple list of sources and dests separated by whitespace and/or comma, one pair per line.
Graphs are read using either the loadgraph
function or, for formats that support multiple graphs in a single file,
the loadgraphs
functions. loadgraph
returns a LightGraph object, while loadgraphs
returns a dictionary of LightGraph objects.
For example, an edgelist file could be loaded as:
graph = loadgraph("path_to_graph/my_edgelist.txt", "graph_key", EdgeListFormat())
04/10/2017
4 days ago
74 commits