Autolayout body

Implementation Notes

  • This package uses a heuristic algorithm to minimize the number of arc crossings.  It does not always achieve the true minimum number which could theoretically be reached.  However it does a nearly perfect job in relatively little time.  For details about the algorithm, see ...

Portability Issues

  • The native math package Math_Lib is used for computations of coordinate positions.
  • 32-bit integers are required.
  • No operating system specific routines are called.

Anticipated Changes

  • Coordinate_Type below could be changed from integer to float with little effort.  Care has been taken to not depend on the specific characteristics of integer arithmetic.

Functions

Define

procedure Define (New_Node : in Node)

Implementation Notes

  • This routine stores a node in the general purpose Graph data structure, not the Fast_Graph structure because ...

Layout

procedure Layout

Implementation Notes

  • This routine copies the Graph data structure (optimized for fast random access) into the Fast_Graph data structure (optimized for fast sequential iteration), then performs the layout, and copies the data back to the Graph structure.  This technique was introduced as an optimization when the algorithm was found to be too slow, and it produced an order of magnitude improvement.

Position_Of

function Position_Of (Current : in Node) return Position
procedure Define (New_Node : in Node)
procedure Layout
function Position_Of (Current : in Node) return Position