Graph-Easy
==========

See Graph::Easy under LIMITATIONS for some hot topics.

In addition:

Graph:

* Attributes:
  + Make attribute checks strict, e.g. if it is not known, or well-formed
    then bail out.
  + Then add an attribute check to set_attribute() and set_attributes().
  + Also add an option 'strict', when set to false, will disable attribute
    checking. This can then be used by the Parser (which does it's own
    attribute checks).

Parser:

* deal with " -> [ node ], [node2], [node3]"
* parse nested graphs
* support for node splitting ala:

    "[ A ] | [ B | C ] || [ D | E ]"

* support for attribute lists on autosplit nodes ala:

    "[ A || B | C ] { background: red|blue|green; }"

* use "{}" to nest blocks?
* Nodes with both "|" and "\|" in their name are not parsed correctly

Output:

* write as_box(): output with box-drawing chars (unicode or iso)
* support different edge starting point styles ala:

  ----->  |----->  o----->  +----->  *----->  >>----->

* as_txt(): output of node clusters is not optimal
* as_txt(): output of node chains is not optimal
* as_ascii(): output group borders and group labels
* as_ascii(): node clusters need adjoining borders collapsed together
  +---++---+      +---+---+
  | A || B | vs.  | A | B |  (that als means A needs to be width-1!)
  +---++---+      +---+---+
* as_ascii(), as_html(): grow all edge pieces to be seemless
* as_html: node clusters have spacings between nodes:
           The spacing comes from the filler cells to make groups
	   work - arg!
* as_html(): output group labels
* as_html(): edges are borked in Opera, the table cell is not big enough
	     to hold them (*sigh*)
* as_html(): add a class "link" to generated links (so they can be styled
             differently)
* better support for different shapes (circle, box, rounded, polygon etc)
  in HTML/ASCII/Graphviz
* better support for different edge styles in HTML/ASCII/Graphviz
* nodes that occupy more than one cell:
    * fix the various output routines to deal with cx != 1 or cy != 1

Layout:

* find longest-chain (walk recursively children of startig node) and lay them
  out longest first. This will make flowchars with forward branches look
  better. See todo/astar.txt for an example, Bonn->Ulm->Bautzen-Berlin-Kassel
  should be in one line, with the rest branching off.
* allow user to specify max graph width (in cells) to avoid overly wide graphs
* auto-grow nodes to be multicelled depending on the dimensions of their label
  ("main page" gets 2x1, while "a \nb \nc \nd \ne \n" gets 1x2 cells)
* Use the seed to generate randomized layouts
* some paths could be shorter by one cell (when we create an edge cell
  that is both an edge and an endpoint at the same time)
* allow user to specifiy prefered direction of edges, as well as
  relatively placed nodes (in position relativ to another node)
* allow user to specify 
    direction: (up|down|left|right|north|south|west|east|0|90|180|270|360);
  to create default direction of edges
* the A* algorithm needs fine-tuning to generate less bendy paths
* add crossings into the A* algorithm (with a harsh penalty)

Optimizer:

* use Heap::Binary instead of Fibonacci?
* inline $elems->fields() call in A*
* use weaken() of refs in nodes back to graph to allow correct memory release
* write an optimizer for already laid out graphs to optimize layout
* less memory: store border and edge styles as ints instead of "solid" etc
* use AUTOLOAD for accessors in Node.pm: most are never used by normal code
* optimize attribute() (by not calling G::E::attribute from
  G::E::N::attribute()?):

 %Time ExclSec CumulS #Calls sec/call Csec/c  Name
  52.1   0.440  0.440 130300   0.0000 0.0000  Graph::Easy::attribute
  39.3   0.332  0.818  44000   0.0000 0.0000  Graph::Easy::Node::attribute
  17.5   0.148  1.067   8800   0.0000 0.0001  Graph::Easy::Node::as_html
  13.1   0.111  1.217    100   0.0011 0.0122  Graph::Easy::as_html
  7.94   0.067  0.067  52600   0.0000 0.0000  Graph::Easy::Node::class
  7.58   0.064  0.370   8800   0.0000 0.0000  Graph::Easy::Node::title
  5.92   0.050  0.099     24   0.0021 0.0041  Graph::Easy::BEGIN
  2.37   0.020  0.129      5   0.0040 0.0258  main::BEGIN
  2.01   0.017  0.016   1400   0.0000 0.0000  Graph::Easy::Edge::Cell::_content
  1.90   0.016  0.143   7000   0.0000 0.0000  Graph::Easy::Edge::Cell::attribute
  1.90   0.016  0.218   1400   0.0000 0.0002  Graph::Easy::Edge::Cell::as_html

Manual:

* finish the HTML conversion (Graph::Easy::Pod2HTML)
* write the actual manual text (in chapters)

