A QuadTree Algorithm class in pure Perl
Algorithm::QuadTree implements a quadtree algorithm (QTA) in pure Perl. Essentially, a QTA is used to access a particular area of a map very quickly. This is especially useful in finding objects enclosed in a given region, or in detecting intersection among objects. In fact, I wrote this module to rapidly search through objects in a Tk::Canvas widget, but have since used it in other non-Tk programs successfully. It is a classic memory/speed trade-off.
Lots of information about QTAs can be found on the web. But, very briefly, a quadtree is a hierarchical data model that recursively decomposes a map into smaller regions. Each node in the tree has 4 children nodes, each of which represents one quarter of the area that the parent represents. So, the root node represents the complete map. This map is then split into 4 equal quarters, each of which is represented by one child node. Each of these children is now treated as a parent, and its area is recursively split up into 4 equal areas, and so on up to a desired depth.
- Sources inherited from project devel:languages:perl
- Download package
-
Checkout Package
osc -A https://api.opensuse.org checkout home:Tomcat42/perl-Algorithm-QuadTree && cd $_
- Create Badge
Source Files
Filename | Size | Changed |
---|---|---|
Algorithm-QuadTree-0.2.tar.gz | 0000008972 8.76 KB | |
cpanspec.yml | 0000000923 923 Bytes | |
perl-Algorithm-QuadTree.changes | 0000000899 899 Bytes | |
perl-Algorithm-QuadTree.spec | 0000004552 4.45 KB |
Revision 6 (latest revision is 8)
- updated to 0.2 see /usr/share/doc/packages/perl-Algorithm-QuadTree/Changes 0.2 [New features] - New method: ->clear - Method ->add now treats shape as circular when passed four arguments - Method ->getEnclosedObjects now treats shape as circular when passed three arguments - Object references are now correctly handled and can be used instead of IDs [Bug fixes] - fix ->delete method - RT#55747 [Other changes] - Performance optimization - Added test suite - Added github repository and bugtracker - Maintenance-related changes
Comments 0