# # spec file for package perl-Algorithm-QuadTree # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # Name: perl-Algorithm-QuadTree Version: 0.1 Release: 1 AutoReqProv: on Group: Development/Libraries/Perl License: Perl URL: http://search.cpan.org/dist/Algorithm-QuadTree/ Summary: A QuadTree Algorithm class in pure Perl Source: Algorithm-QuadTree-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build %{perl_requires} BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros %description 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. %prep %setup -q -n QuadTree %build perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall" make %check make test %install make DESTDIR=$RPM_BUILD_ROOT install_vendor %perl_process_packlist %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc README Changes %doc %{_mandir}/man3/* %{perl_vendorlib}/Algorithm #%{perl_vendorarch}/auto/Algorithm %changelog