31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

17.6 Graph Windows ( GraphWin )<br />

1. Definition<br />

GraphWin combines the two types graph and window and forms a bridge between the<br />

graph data types and algorithms and the graphics interface of <strong>LEDA</strong>. GraphWin can<br />

easily be used in <strong>LEDA</strong> programs for constructing, displaying and manipulating graph<br />

and for animating and debugging graph algorithms.<br />

• <strong>The</strong> user interface of GraphWin is simple and intuitive. When clicking a mouse<br />

button inside the drawing area a corresponding default action is performed that<br />

can be redefined by users. With the initial default settings, the left mouse button<br />

is used for creating and moving objects, the middle button for selecting objects,<br />

and the right button for destroying objects. A number of menues at the top of the<br />

window give access to graph generators, modifiers, basic algorithms, embeddings,<br />

setup panels, and file input and output.<br />

• Graphwin can display and manipulate the data associated with the nodes and edges<br />

of <strong>LEDA</strong>’s parameterized graph type GRAP H < vtype, etype >. When a Graph-<br />

Win is opened for such a graph the associated node and edge labels of type vtype<br />

and etype can be displayed and edited.<br />

• Most of the actions of GraphWin can be customized by modifying or extending the<br />

menues of the main window or by defining call-back functions. So the user can<br />

define what happens if a node or edge is created, selected, moved, or deleted.<br />

• Graphwin offers a collection of graph generators, modifiers and tests. <strong>The</strong> generators<br />

include functions for constructing random, planar, complete, bipartite, grid graph,<br />

connected graph, biconnected, graph . . .<br />

<strong>The</strong>re are also methods for modifying existing graph (e.g. by removing or adding a<br />

certain set of edges) to fit in one of these categories and for testing whether a given<br />

graph is planar, connected, bipartite . . .<br />

• <strong>The</strong> standard menu includes a choice of fundamental graph algorithms and basic<br />

embedding algorithms.<br />

For every node and edge of the graph GraphWin maintains a set of parameters.<br />

With every node is associated the following list of parameters. Note that for every parameter<br />

there are corresponding set and get operations (gw.set param() and gw.get param)<br />

where param has to be replaced by the corresponding parameter name.<br />

position: the position of the node (type point),

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!