<<<<<<<<<<<<<<<<<

stt(layout) Layout stt(layout)

NAME

stt - a graph layout algorithm

DESCRIPTION

STT is an algorithm that lays out a graph in the Network Editor. Nodes and edges need to have already been instantiated in the editor before the algorithm may be used. The algorithm has three phases: the first phase divides all the nodes into levels and inserts dummy nodes (which are just place-holders for edge bends), the second phase minimizes edge-crossings between levels, the third phase minimizes edge lengths.

SUPERCLASS

object

INSTANCE VARIABLES

partition_name is the name of a collection object that contains all the nodes of a graph in the Network Editor that are to be laid out.

vertex_height is the height of all vertices in the graph. This algorithm assumes a constant height of all nodes.

level_dist_min is the minimum allowable distance between node levels. This directly affects the length of edges.

level_dist_max is the maximum allowable distance between node levels. This directly affects the length of edges.

node_separation is the distance between adjacent nodes that reside in the same level. Nodes that are in the same level are laid out vertically.

horizontal_margin is the distance between a node and a colliding edge. This will attempt to prevent node-edge collisions.

MESSAGES

partition_name? returns the name of the collection that contains all nodes in the graph.

vertex_height? returns the height of all vertices in the graph.

level_dist_min? returns the minimum allowable distance between node

levels.

level_dist_min? returns the maximum allowable distance between node levels.

node_separation? returns the distance between adjacent nodes that reside in the same level.

horizontal_margin? returns the distance between a node and an edge that may potentially cause a collision.

layout! will lay out nodes in the Network Editor.

EXAMPLE

/* lay out nodes in the Network Editor */ stt new : stt1 partition_name = a_collection_name level_dist=30 node_separation=30 vertex_height=34 horizontal_margin=20 layout!;

SEE ALSO

widget_edge partition_algorithm


Please send comments and suggestions to
consult@rpi.edu