Reputation: 21
I know how to handle graphs using matrices and linked list. I am new to Graphstream. I want to know is there any in-built function in Graphstream in java to store/Read Graph type graphs in text files and what is the format of storing such graphs in a file?
Upvotes: 1
Views: 954
Reputation: 205865
Reading files using FileSource
lists the file formats supported by concrete implementations of FileSource
. It outlines the use of readAll()
, as well as reading event-by-event from certain formats.
In particular, The DGS File Format Specification describes DGS, the default GraphStream text file format. In outline, a FileSource
connects a file to a graph:
Graph g = …;
FileSource fs = …;
fs.addSink(g);
fs.readAll(…);
Can I get some sample DGS file online storing big
Graph
?
Some small examples are shown here; a large example of the road network of Le Havre, France is cited here.
Upvotes: 2