Name : perl-Algorithm-RectanglesContainingDot
| |
Version : 0.02
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp154.1.1
| Date : 2023-01-27 17:25:41
|
Group : Development/Libraries/Perl
| Source RPM : perl-Algorithm-RectanglesContainingDot-0.02-lp154.1.1.src.rpm
|
Size : 0.01 MB
| |
Packager : https://www_suse_com/
| |
Summary : Find rectangles containing a given dot
|
Description :
Given a set of rectangles and a set of dots, the algorithm implemented in this modules finds for every dot, which rectangles contain it.
The algorithm complexity is O(R * log(R) * log(R) + D * log(R)) being R the number of rectangles and D the number of dots.
Its usage is very simple:
* 1) create and algorithm object:
$a = Algorithm::RectanglesContainingDot->new;
* 2) add the rectangles:
$a->add_rectangle($name, $x0, $y0, $x1, $y1);
Rectangles are identified by a name that can be any perl scalar (typically an integer or a string).
($x0, $y0) and ($x1, $y1) correspond to the coordinates of the left-botton and right-top vertices respectively.
* 3) call the search method for every dot:
AATTrects = $a->rectangles_containing_dot($x, $y)
Returns the names of the rectangles containing the dot ($x, $y).
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-A/15.4/noarch |