Algorithm-QuadTree

 view release on metacpan or  search on metacpan

QuadTree.pm  view on Meta::CPAN

# Creating a new QuadTree objects automatically
# segments the given area into quadtrees of the
# specified depth.
#
###############################

sub new {
    my $self  = shift;
    my $class = ref($self) || $self;

    my $obj   = bless {} => $class;

    $obj->{BACKREF} = {};
    $obj->{OBJECTS} = [];
    $obj->{ORIGIN}  = [0, 0];
    $obj->{SCALE}   = 1;

    my %args  = @_;

    for my $arg (qw/xmin ymin xmax ymax depth/) {
	unless (exists $args{"-$arg"}) {

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.162 second using v1.00-cache-1.14-grep-28634ff-cpan-4d46879620f )