NAME
Net::GraphSpace::Graph
VERSION
version 0.0009
SYNOPSIS
my
$graph
= Net::GraphSpace::Graph->new(
description
=>
'a great graph'
,
tags
=> [
'foo'
,
'bar'
],
);
my
$node1
= Net::GraphSpace::Node->new(
id
=>
'node-a'
,
label
=>
'A'
);
my
$node2
= Net::GraphSpace::Node->new(
id
=>
'node-b'
,
label
=>
'B'
);
$graph
->add_nodes([
$node1
,
$node2
]);
my
$edge
= Net::GraphSpace::Edge->new(
id
=>
'a-b'
,
source
=>
'node-a'
,
target
=>
'node-b'
);
$graph
->add_edge(
$edge
);
$graph
->add_node(Net::GraphSpace::Node->new(
id
=> 3,
label
=>
'C'
));
DESCRIPTION
Represents a graph in GraphSpace.
ATTRIBUTES
Optional:
METHODS
add_node($node)
add_nodes(\@nodes)
add_edge($edge)
add_edges(\@edges)
AUTHOR
Naveed Massjouni <naveedm9@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Naveed Massjouni.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.