Algorithm-SpatialIndex
view release on metacpan or search on metacpan
lib/Algorithm/SpatialIndex.pm view on Meta::CPAN
limit_z_up
bucket_size
max_depth
)],
};
sub new {
my $class = shift;
my %opt = @_;
my $self = bless {
limit_x_low => -100,
limit_x_up => 100,
limit_y_low => -100,
limit_y_up => 100,
limit_z_low => -100,
limit_z_up => 100,
bucket_size => 100,
max_depth => 20,
%opt,
} => $class;
lib/Algorithm/SpatialIndex/Bucket.pm view on Meta::CPAN
=head2 node_id
Read/write accessor for the id of the node that this bucket
corresponds to.
=head2 items
Read/write accessor for the array ref (or undef if not
initialized) of items in this bucket.
An item is defined to be an unblessed array references
containing the item id followed by the item coordinates.
The type and number of coordinates may depend on the
chosen index C<Strategy>. Cf. the strategy's
C<item_coord_types> method.
=head2 nitems
Returns the number of items in the bucket.
=head2 add_items
lib/Algorithm/SpatialIndex/Storage.pm view on Meta::CPAN
no_of_subnodes
bucket_class
)],
};
sub new {
my $class = shift;
my %opt = @_;
my $ext_opt = $opt{opt}||{};
my $self = bless {
bucket_class => defined($ext_opt->{bucket_class}) ? $ext_opt->{bucket_class} : 'Algorithm::SpatialIndex::Bucket',
%opt,
} => $class;
weaken($self->{index});
my $bucket_class = $self->bucket_class;
if (not $bucket_class =~ /::/) {
$bucket_class = "Algorithm::SpatialIndex::Bucket::$bucket_class";
$self->{bucket_class} = $bucket_class;
lib/Algorithm/SpatialIndex/Strategy.pm view on Meta::CPAN
index
storage
bucket_size
)],
};
sub new {
my $class = shift;
my %opt = @_;
my $self = bless {
bucket_size => 100,
%opt,
} => $class;
weaken($self->{index});
$self->init() if $self->can('init');
return $self;
}
( run in 1.265 second using v1.01-cache-2.11-cpan-de7293f3b23 )