Tree::Visualize 0.01
Sponsored Links
Tree::Visualize 0.01 Ranking & Summary
File size:
0.015 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
963
Date added:
2007-03-07
Publisher:
Stevan Little
Tree::Visualize 0.01 description
Tree::Visualize is a Perl module for visualizing Tree structures.
SYNOPSIS
use Tree::Visualize;
use Tree::Binary;
my $tree = Tree::Binary->new("*")
->setLeft(
Tree::Binary->new("+")
->setLeft(Tree::Binary->new("2"))
->setRight(Tree::Binary->new("2"))
)
->setRight(
Tree::Binary->new("+")
->setLeft(Tree::Binary->new("4"))
->setRight(Tree::Binary->new("5"))
);
my $visualize = Tree::Visualize->new($tree, ASCII, TopDown);
print $visualize->draw();
# +---+
# +--------| * |-------+
# | +---+ |
# +---+ +---+
# +--| + |--+ +--| + |--+
# | +---+ | | +---+ |
# +---+ +---+ +---+ +---+
# | 2 | | 2 | | 4 | | 5 |
# +---+ +---+ +---+ +---+
my $tree = Tree::Binary::Search->new();
foreach my $value (7, 3, 1, 0, 2, 5, 4, 6, 11, 9, 10, 8, 13, 12, 14) {
$tree->insert($value => $value);
}
my $visualize = Tree::Visualize->new($tree, ASCII, Diagonal);
print $visualize->draw();
# (7)-------------(11)-----(13)-(14)
# | | |
# | | (12)
# | |
# | (9)-(10)
# | |
# | (8)
# |
# (3)-----(5)-(6)
# | |
# | (4)
# |
# (1)-(2)
# |
# (0)
my $tree = Tree::Simple->new("test")
->addChildren(
Tree::Simple->new("test-1")
->addChildren(
Tree::Simple->new("test-1-1")
),
Tree::Simple->new("test-2"),
Tree::Simple->new("test-3")
);
my $visualize = Tree::Visualize->new($tree, ASCII, TopDown);
print $visualize->draw();
# |
# +------+
# | test |
# +------+
# ____________|_____________
# | | |
# +--------+ +--------+ +--------+
# | test-1 | | test-2 | | test-3 |
# +--------+ +--------+ +--------+
# |
# |
# +----------+
# | test-1-1 |
# +----------+
NOTE: This is very early release alpha software
The goal of this module is to provide a means of easily visualizing trees in a number of output formats and layouts. Currently only ASCII output and a limited number of formats are supported. There is some support for output as GraphViz dot files, but that is buggy at best right now.
As I said, this is alpha software, and so please dont expect it to do all that much. Many of the classes inside are not even implemented, and few if any are documented. I am releasing this to CPAN largely as a means of self-motivation, although I can make no promises about the speed of my progress.
SYNOPSIS
use Tree::Visualize;
use Tree::Binary;
my $tree = Tree::Binary->new("*")
->setLeft(
Tree::Binary->new("+")
->setLeft(Tree::Binary->new("2"))
->setRight(Tree::Binary->new("2"))
)
->setRight(
Tree::Binary->new("+")
->setLeft(Tree::Binary->new("4"))
->setRight(Tree::Binary->new("5"))
);
my $visualize = Tree::Visualize->new($tree, ASCII, TopDown);
print $visualize->draw();
# +---+
# +--------| * |-------+
# | +---+ |
# +---+ +---+
# +--| + |--+ +--| + |--+
# | +---+ | | +---+ |
# +---+ +---+ +---+ +---+
# | 2 | | 2 | | 4 | | 5 |
# +---+ +---+ +---+ +---+
my $tree = Tree::Binary::Search->new();
foreach my $value (7, 3, 1, 0, 2, 5, 4, 6, 11, 9, 10, 8, 13, 12, 14) {
$tree->insert($value => $value);
}
my $visualize = Tree::Visualize->new($tree, ASCII, Diagonal);
print $visualize->draw();
# (7)-------------(11)-----(13)-(14)
# | | |
# | | (12)
# | |
# | (9)-(10)
# | |
# | (8)
# |
# (3)-----(5)-(6)
# | |
# | (4)
# |
# (1)-(2)
# |
# (0)
my $tree = Tree::Simple->new("test")
->addChildren(
Tree::Simple->new("test-1")
->addChildren(
Tree::Simple->new("test-1-1")
),
Tree::Simple->new("test-2"),
Tree::Simple->new("test-3")
);
my $visualize = Tree::Visualize->new($tree, ASCII, TopDown);
print $visualize->draw();
# |
# +------+
# | test |
# +------+
# ____________|_____________
# | | |
# +--------+ +--------+ +--------+
# | test-1 | | test-2 | | test-3 |
# +--------+ +--------+ +--------+
# |
# |
# +----------+
# | test-1-1 |
# +----------+
NOTE: This is very early release alpha software
The goal of this module is to provide a means of easily visualizing trees in a number of output formats and layouts. Currently only ASCII output and a limited number of formats are supported. There is some support for output as GraphViz dot files, but that is buggy at best right now.
As I said, this is alpha software, and so please dont expect it to do all that much. Many of the classes inside are not even implemented, and few if any are documented. I am releasing this to CPAN largely as a means of self-motivation, although I can make no promises about the speed of my progress.
Tree::Visualize 0.01 Screenshot
Tree::Visualize 0.01 Keywords
ASCII
Visualize 0.01
tree structures
Perl module
new
tree
2
visualizing
module
4
Tree::Visualize
TreeVisualize
Tree::Visualize 0.01
Libraries
Programming
Bookmark Tree::Visualize 0.01
Tree::Visualize 0.01 Copyright
WareSeeker periodically updates pricing and software information of Tree::Visualize 0.01 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Tree::Visualize 0.01 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
Related Software
Text::VisualWidth is a Perl module that provides functions to treat half-width and full-width characters. Free Download
MILA::Transliterate is a Perl Module for transliterating text from Hebrew to various transliterations used in the Knowledge Cent Free Download
dtRdr::User.pm is a user class as a Perl module. Free Download
WebService::Google::Suggest is a Perl module for Google Suggest as an API. Free Download
Template::Plugin::SumOf is a Perl module to calculate the sum with VMETHODS. Free Download
Tie::Eudora is a Perl module that can encode/decode emails, read/write emails in Eudora mailbox files. Free Download
Finance::BDT is a Perl module that implements BDT yield curve model. Free Download
Text::Emoticon::GoogleTalk is a Perl module emoticon filter of GoogleTalk. Free Download
Latest Software
Popular Software
Favourite Software