Accepting request 972546 from devel:languages:perl:autoupdate

- 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

OBS-URL: https://build.opensuse.org/request/show/972546
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Algorithm-QuadTree?expand=0&rev=6
This commit is contained in:
Stephan Kulow
2022-04-28 05:09:17 +00:00
committed by Git OBS Bridge
parent f78a99c46c
commit 75c1af5b26
5 changed files with 140 additions and 42 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a5d827fe254917cc7ccb1a3f0f820f11caefeccaee0bb59cc711edd64bf49325
size 6296

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:38ace4c56616a02ba81c3633c759b084a7e7ecc2432f0e1d6d455a6f123ec757
size 8972

35
cpanspec.yml Normal file
View File

@@ -0,0 +1,35 @@
---
#description_paragraphs: 3
#description: |-
# override description from CPAN
#summary: override summary from CPAN
#no_testing: broken upstream
#sources:
# - source1
# - source2
#patches:
# foo.patch: -p1
# bar.patch:
# baz.patch: PATCH-FIX-OPENSUSE
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_build: |-
# rm unused.files
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module
#skip_doc: regexp_to_skip_for_doc.*
#add_doc: files to add to docs
#misc: |-
#anything else to be added to spec file
#follows directly after %files section, so it can contain new blocks or also
#changes to %files section

View File

@@ -1,3 +1,25 @@
-------------------------------------------------------------------
Fri Apr 22 03:05:57 UTC 2022 - Tina Müller <timueller+perl@suse.de>
- updated to 0.2
see /usr/share/doc/packages/perl-Algorithm-QuadTree/Changes
0.2 Thu Apr 21 21:00:00 2022
[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
------------------------------------------------------------------- -------------------------------------------------------------------
Thu May 05 00:00:00 UTC 2011 - opensuse@dstoecker.de Thu May 05 00:00:00 UTC 2011 - opensuse@dstoecker.de

View File

@@ -1,7 +1,7 @@
# #
# spec file for package perl-Algorithm-QuadTree # spec file for package perl-Algorithm-QuadTree
# #
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2022 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -12,65 +12,106 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
%define cpan_name Algorithm-QuadTree
Name: perl-Algorithm-QuadTree Name: perl-Algorithm-QuadTree
Version: 0.1 Version: 0.2
Release: 1 Release: 0
AutoReqProv: on License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl Summary: QuadTree Algorithm class in pure Perl
License: Perl URL: https://metacpan.org/release/%{cpan_name}
Url: http://search.cpan.org/dist/Algorithm-QuadTree/ Source0: https://cpan.metacpan.org/authors/id/B/BR/BRTASTIC/%{cpan_name}-%{version}.tar.gz
Summary: A QuadTree Algorithm class in pure Perl Source1: cpanspec.yml
Source: Algorithm-QuadTree-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildArch: noarch BuildArch: noarch
BuildRequires: perl BuildRequires: perl
BuildRequires: perl-macros BuildRequires: perl-macros
%{perl_requires}
%description %description
Algorithm::QuadTree implements a quadtree algorithm (QTA) 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. Essentially, a _QTA_ is used to access a particular area of a map very
This is especially useful in finding objects enclosed in a given region, or in quickly. This is especially useful in finding objects enclosed in a given
detecting intersection among objects. In fact, I wrote this module to rapidly region, or in detecting intersection among objects. In fact, I wrote this
search through objects in a Tk::Canvas widget, but have since used it in other module to rapidly search through objects in a Tk::Canvas widget, but have
non-Tk programs successfully. It is a classic memory/speed trade-off. 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 Lots of information about QTAs can be found on the web. But, very briefly,
quadtree is a hierarchical data model that recursively decomposes a map into a quadtree is a hierarchical data model that recursively decomposes a map
smaller regions. Each node in the tree has 4 children nodes, each of which into smaller regions. Each node in the tree has 4 children nodes, each of
represents one quarter of the area that the parent represents. So, the root node which represents one quarter of the area that the parent represents. So,
represents the complete map. This map is then split into 4 equal quarters, each the root node represents the complete map. This map is then split into 4
of which is represented by one child node. Each of these children is now treated equal quarters, each of which is represented by one child node. Each of
as a parent, and its area is recursively split up into 4 equal areas, and so on these children is now treated as a parent, and its area is recursively
up to a desired depth. split up into 4 equal areas, and so on up to a desired depth.
Here is a somewhat crude diagram:
------------------------------
|AAA|AAB| | |
|___AA__| AB | |
|AAC|AAD| | |
|___|___A_______| B |
| | | |
| | | |
| AC | AD | |
| | | |
-------------ROOT-------------
| | |
| | |
| | |
| C | D |
| | |
| | |
| | |
------------------------------
Which corresponds to the following quadtree:
__ROOT_
/ / \ \
/ / \ \
_____A_ B C D
/ / \ \
/ / \ \
_____AA AB AC AD
/ / \ \
/ / \ \
AAA AAB AAC AAD
In the above diagrams I show only the nodes through the first branch of
each level. The same structure exists under each node. This quadtree has a
depth of 4.
Each object in the map is assigned to the nodes that it intersects. For
example, if we have an object that overlaps regions _AAA_ and _AAC_, it
will be assigned to the nodes _ROOT_, _A_, _AA_, _AAA_ and _AAC_. Now,
suppose we want to find all the objects that intersect a given area.
Instead of checking all objects, we check to see which children of the ROOT
node intersect the area. For each of those nodes, we recursively check
_their_ children nodes, and so on until we reach the leaves of the tree.
Finally, we find all the objects that are assigned to those leaf nodes and
check them for overlap with the initial area.
%prep %prep
%setup -q -n QuadTree %autosetup -n %{cpan_name}-%{version}
%build %build
perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall" perl Makefile.PL INSTALLDIRS=vendor
make %make_build
%check %check
make test make test
%install %install
make DESTDIR=$RPM_BUILD_ROOT install_vendor %perl_make_install
%perl_process_packlist %perl_process_packlist
%perl_gen_filelist
%clean %files -f %{name}.files
rm -rf $RPM_BUILD_ROOT %doc Changes README.md
%files
%defattr(-,root,root)
%doc README Changes
%doc %{_mandir}/man3/*
%{perl_vendorlib}/Algorithm
#%{perl_vendorarch}/auto/Algorithm
%changelog %changelog