Name : perl-Algorithm-RectanglesContainingDot
| |
Version : 0.02
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 1.59
| Date : 2024-08-05 17:31:29
|
Group : Development/Libraries/Perl
| Source RPM : perl-Algorithm-RectanglesContainingDot-0.02-1.59.src.rpm
|
Size : 0.01 MB
| |
Packager : (none)
| |
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/openSUSE_Tumbleweed/noarch |