Graph::Layout::Aesthetic::Force::NodeEdgeRepulsion - Nodes and edges repel each other


Graph-Layout-Aesthetic documentation Contained in the Graph-Layout-Aesthetic distribution.

Index


Code Index:

NAME

Top

Graph::Layout::Aesthetic::Force::NodeEdgeRepulsion - Nodes and edges repel each other

SYNOPSIS

Top

  use Graph::Layout::Aesthetic;
  $aglo = Graph::Layout::Aesthetic->new($topology);
  $aglo->add_force("NodeEdgeRepulsion", 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 not place nodes close to edges. It does this by imagining a line through the edge endpoints and finding the point on the line closest to the node under consideration. If this point is between the two edge endpoints there is a force between them that's the inverse of their distance.

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 Contained in the Graph-Layout-Aesthetic distribution.

package Graph::Layout::Aesthetic::Force::NodeEdgeRepulsion;
use 5.006001;
use strict;
use warnings;

our $VERSION = '0.02';
use base qw(Graph::Layout::Aesthetic::Force);

__PACKAGE__->new->register;

1;
__END__