NAME
Graph::Convert - Convert between graph formats: Graph and Graph::Easy
SYNOPSIS
use Graph::Convert;
my $graph_easy = Graph::Easy->new();
$graph_easy->add_edge ('Bonn', 'Berlin');
# from "Graph::Easy" to "Graph"
my $graph = Graph::Convert->as_graph ( $graph_easy );
# and back to "Graph::Easy"
my $ge = Graph::Convert->as_graph_easy ( $graph );
print $ge->as_ascii( );
# prints:
# +------+ +--------+
# | Bonn | --> | Berlin |
# +------+ +--------+
DESCRIPTION
Graph::Convert
lets you convert graphs between some popular graph formats:
Graph
Graph::Easy
Input
Output
METHODS
Graph::Convert
supports the following methods:
as_graph()
use Graph::Convert;
my $graph_easy = Graph::Easy->new( );
my $graph = Graph::Convert->as_graph( $graph_easy );
Converts the given Graph::Easy object into a Graph object.
as_graph_easy()
use Graph::Convert;
my $graph = Graph->new( );
my $graph_easy = Graph::Convert->as_graph_easy( $graph_easy );
Converts the given Graph object into a Graph::Easy object.
CAVEATS
This module does only convert vertices and edges, it neglets any attributes as well as subgraphs/groups.
LICENSE
This library is free software; you can redistribute it and/or modify it under the terms of the GPL version 2.
See the LICENSE file for a copy of the GPL.
AUTHOR
Copyright (C) 2006 by Tels http://bloodgate.com