P.I.G.A.L.E. Public Implementation of a Graph Algorithm Library and Editor H. de Fraysseix P. Ossona de Mendez |
The simple program client is an example how to communicate with the server. The client reads its instructions from stdin so that it should not be difficult for applications to communicate with the server.
The server and client use a TCP connection on port 4242. The server should be allowed to write on /tmp or \tmp on Windows (CREATE it, if necessary).
To launch the client/server application,The commands that can be used are most of the ones found in QT/Action.h, that is all the Pigale macros plus some specific ones:
Command | Argument | |
RS_GRAPH | graph filename | load a graph (on the server side) |
RC_GRAPH | graph filename | load a graph (from the client side) |
N_GRAPH | creates an empty graph | |
N_V | number of vertices | create n vertices |
N_E | pair of vertices | create an edge |
PNG | size (1 int) | get a png image of the current drawing |
PS | get a postscript file of the current drawing | |
RS_SAVE_GRAPH | graph filename with extension | ask the server to save the current graph and send it to the client (the file format is determined by the extension) |
N | number of vertices |
M | number of edges |
SIMPLE | simple graph |
PLAN | planar |
OPLAN | outer planar |
SR | serie-parallel |
MPLAN | triangulated planar graph |
BI | bipartite graph |
MBI | max planar bipartite graph |
REG | regular |
C1 | connected |
C2 | 2-Connected |
C3 | 3-Connected |
MIN_D | minimal degree |
MAX_D | maximal degree |
COORD | retrieve coords |
VLAB | retrieve labels (long integers) |
GEN_N1 | number of vertices | an integer |
GEN_N2 | number of vertices | an integer |
GEN_M | number of edges | an integer |
GEN_GRID | grid | GEN_N1, GEN_N2 |
GEN_COMPLETE | complete graph | GEN_N1 |
GEN_COMPLETE_BIP | complete bipartite graph | GEN_N1, GEN_N2 |
GEN_RANDOM | planar or not | GEN_N1 GEN_M |
GEN_PLANAR | planar | GEN_M |
GEN_PLANAR_2C | planar 2-connected | GEN_M |
GEN_PLANAR_3C | planar 3-connected | GEN_M |
GEN_PLANAR_3R_2C | planar 3-regular 2-connected | GEN_M |
GEN_PLANAR_3R_3C | planar 3-regular 3-connected | GEN_M |
GEN_PLANAR_3R_D4C | planar 3-regular 3-connected without 4-separator | GEN_M |
GEN_PLANAR_4R_C | planar 4-regular connected | GEN_M |
GEN_PLANAR_4R_2C | planar 4-regular 2-connected | GEN_M |
GEN_PLANAR_4R_3C | planar 4-regular 3-connected | GEN_M |
GEN_PLANAR_4R_BIP | planar 4-regular bipartite | GEN_M |
GEN_PLANAR_BIP | planar bipartite | GEN_M |
GEN_PLANAR_BIP_2C | planar 2-connected bipartite | GEN_M |
GEN_PLANAR_BIP_3C | planar 3-connected bipartite | GEN_M |
GEN_P_OUTER_N | maximal outerplanar | GEN_N1 |
GEN_P_OUTER_NM | outerplanar | GEN_N1, GEN_M |
DUAL | |
DUAL_G | without the exterior vertex |
ANGLE | |
ANGLE_G | without the exterior face |
CONNECT | add edges |
CONNECT_V | add vertices |
BICONNECT | biconnect a planar graph adding edges |
BICONNECT_NP | biconnect adding edges |
BICONNECT_NP_V | biconnect adding vertices |
TRIANGULATE_ZZ | triangulate adding edges |
TRIANGULATE_V | triangulate adding vertices |
TRIANGULATE_3C | triangulate a 3-connected planar graph adding edges |
QUADRANGULATE_V | quadrangle a bipartite graph, adding vertices |
BISSECT_ALL_E | bisect all edges |
REMOVE_ISOLATED_V |
REMOVE_LOOPS |
REMOVE_MULTIPLE_E |
REMOVE_BRIDGES |
SCHNYDER_E | Schnyder algorithm: the graph is first made maximal by adding edges |
SCHNYDER_V | Schnyder algorithm: the graph is first made maximal by adding vertices |
FPP_FARY | Fraysseix, Pach, Pollack algorithm |
POLYLINE | Bonichon's algorithm (3-connected planar graph) |
CCD | Convex drawing (3-connected planar graph) |
CD | Optimal convex drawing by Bonichon |
TUTTE_CIRCLE | some edges are added before using Tutte's barycentric representation |
TUTTE | Tutte's barycentric representation |
SPRING_PM | spring embedder preserving the map |
JACQUARD | spring embedder for planar graphs (Jacquard) |
CURVES | spring embedder using curves |
VISION | visibility algorithm for planar graphs |
CONTATC_BIPARTI | representation of planar bipartite graphs by contact of segments |
FPP_RECTI | kind of visibility representation based on FPP_FARY |
GVISION | visibility algorithm generalized to non-planar graphs |
T_CONTACT | representation of a planar graph by contact of T |
TRIANGLE_CONTACT | representation of a planar graph by contact of triangles |
EMBED-3d | 3d representations |
EMBED-3d_SCHNYDER | representation on S2 of a planar graph |
KURATOWSKI | extract a Kuratowski subdivision of a non-planar graph |
COTREE_CRITICAL | extract a cotree critical subgraph of a non-planar graph |
COLOR_NON_CRITIC | color non-critical cotree edges of a non-planar graph |
NPSET | |
FIND_MAX_PLANAR | heuristic to find a maximal planar subgraph in a non-planar graph |
NETCUT | partition a graph in a prescribe number of classes |
SYMMETRY | heuristic to detect a symetrie in a graph |
USE_GEOMETRIC_CIR | |
USE_LRALGO_CIR | |
COLOR_BIPARTI | |
COLOR_EXT_FACE | |
RESET_COLORS |
ORIENT_EDGES |
ORIENT_INF |
ORIENT_TRICON |
ORIENT_BIPARTITE |
ORIENT_SCHNYDER |
ORIENT_BIPOLAR |
ORIENT_BIPOLAR_NON_PLANAR |
TEST_1 |
TEST_2 |
TEST_3 |
Command are separated by : and arguments by ;.
For example, the line
RC_GRAPH;ex.graphml
asks to transfer the file ex.graphml from the client and read the graph.
Whether under Linux or Windows, use / and not \ inside path names.
In debugging mode all the commands (including comments) are echoed by the client and then by the server (prepended by a !) when the command has been fully processed.