Thread View: comp.lang.c++.leda
2 messages
2 total messages
Started by Sid
Mon, 02 Oct 1995 01:11
(no subject)
Author: Sid
Date: Mon, 02 Oct 1995 01:11
Date: Mon, 02 Oct 1995 01:11
14 lines
957 bytes
957 bytes
Dear LEDA users: I want to be able to use the very powerful graph planarity testing program planar.c. But, I want to be able to read the graph from a file. I could not find any information about how to define the datafile. I will be using it on undirected and unweighted graphs. For example: K3(Complete graph on 3 vertices) How would I define the graph.gg file for this? I really really thank the designers of LEDA for providing the planarity testing program. Thanks in Advance! Sid Bagali http://bit.csc.lsu.edu/~bagali
Re: (no subject)
Author: Olivier L'Heureux
Date: Sat, 14 Oct 1995 20:50
Date: Sat, 14 Oct 1995 20:50
74 lines
2733 bytes
2733 bytes
In article <44ne7b$52v@sundog.tiac.net> Sid <mebaga@unix1.sncc.lsu.edu> writes:
[...]
>> I want to be able to use the very powerful graph planarity testing
>> program planar.c. But, I want to be able to read the graph from a
>> file. I could not find any information about how to define the
>> datafile. I will be using it on undirected and unweighted graphs.
>> For example: K3(Complete graph on 3 vertices)
The simplest way: use `ged', the Graph EDitor which comes with LEDA,
to draw your graphs. If you want to define them otherwise, look at the
result of ged.
I did it for long with version 3.1.1 of LEDA.
The format is the following:
1) A first line with the words "LEDA.GRAPH"
2) 2nd line with the name of the type for the nodes, for instance
"point" in the graphs edited with `ged'.
3) 3rd line with the name of the type for the edges, for instance
"int" in the graphs edited with `ged'.
4) 4th line with the number `n' of nodes
5) `n' lines, each with the representation of a node.
6) A line with the number `e' of edges
7) `e' lines with the rank of the source node in the list cited in 5),
a space, the rank of the sink, a space, and the representation of
the edge.
It is certainly clearer with a small example:
Suppose the following graph is a GRAPH<FirstName,int>
(Amandine)
/ | \
2 / | \7
| | |
V |8 V
(Bernard) | (Christine)
| | |
3 \ | /4
V V V
(Elise)
should give:
---------------
LEDA.GRAPH
FirstName
int
4
Amandine
Bernard
Christine
Elise
5
1 2 2
1 3 7
1 4 8
2 4 3
3 4 4
---------------
[...]
>> Sid Bagali
Olivier L'Heureux
----------------------------------------------------------------------
Laboratoire de microélectronique de l'Université catholique de Louvain
e-mail: lheureux@dice.ucl.ac.be B-1348 Louvain-la-Neuve
<URL:http://www.dice.ucl.ac.be/~lheureux> Belgium
MIME/PGP accepted
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads