Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
The inherent catch is that we prefer a cartesian system, hence we'll always prefer a compatible coverage if the costs are similar.

I don't disagree. My point is that without knowing anything qualitative about the data set it's going to be difficult to determine if the costs are similar.

Remember that the OP wanted to preselect (spatial index) plausible candidates, how would you do this with circles?

Not sure what you mean here. The exclusion by circles should be as simple as this:

#!/usr/bin/env perl use strict; use warnings; my @circles = ( { x => 3.0, y => 10.0, r => 5.0 }, { x => 4.0, y => 9.0, r => 2.0 }, { x => 12.0, y => 4.0, r => 4.0 }, ); while (my $one = shift @circles) { for my $other (@circles) { my $dx2 = ($one->{x} - $other->{x}) ** 2; my $dy2 = ($one->{y} - $other->{y}) ** 2; my $r2 = ($one->{r} + $other->{r}) ** 2; if ($dx2 + $dy2 < $r2) { warn "Potential overlap: $one->{x}, $one->{y}, $one->{r} w +ith $other->{x}, $other->{y}, $other->{r}\n"; } } }

In reply to Re^7: searching polygons not merged by hippo
in thread searching polygons not merged by dideod.yang

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-24 05:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found