Graph::Layout::Aesthetic::Force::MinLevelVariance - Try to put nodes at the same level equally far from the left


Graph-Layout-Aesthetic documentation  | view source Contained in the Graph-Layout-Aesthetic distribution.

Index


NAME

Top

Graph::Layout::Aesthetic::Force::MinLevelVariance - Try to put nodes at the same level equally far from the left

SYNOPSIS

Top

  use Graph::Layout::Aesthetic;
  $aglo = Graph::Layout::Aesthetic->new($topology);
  $aglo->add_force("MinLevelVariance", 1);

DESCRIPTION

Top

This module provides an aesthetic force for use by the Graph::Layout::Aesthetic package. It's normally implicitly loaded by using add_force.

The aesthetic force is that it tries to place nodes on the same level on the same distance from the left (same x-coordinate). The level of a node is roughly its distance from a leaf. For each level it then calculates the average x-coordinate, and for each node it then tries to move it along the x-axis with a force that grows as the third power of its distance from its level average.

The old aglo documentation describes the force of this aesthetic as being quadratic in the distance, but that's actually not what the code does.

METHODS

Top

This class inherits from Graph::Layout::Aesthetic::Force and adds no methods of its own.

EXPORT

Top

None.

SEE ALSO

Top

Graph::Layout::Aesthetic, Graph::Layout::Aesthetic::Force

AUTHOR

Top

Ton Hospel, <Graph-Layout-Aesthetic@ton.iguana.be>

COPYRIGHT AND LICENSE

Top


Graph-Layout-Aesthetic documentation  | view source Contained in the Graph-Layout-Aesthetic distribution.