Venerable monks
Lets say i had a information about a set of lines. The information i have is the length of a line in terms of its position along the x axis. So for each line i have properties start_x and end_x
I also have information about a set or coordinates which just have the property x_pos which is their location on the x axis
Lets say i wanted to find out if any of the co-ordinates reside in any of the lines. This result could be represented by a notional property of the coordinate called isWithinLine
What is the best way of finding if a coordinate is within a line? All of my data is in a database and can be loaded into any perl structures you recommend. I have tried doing this within a database using sql and it is very very slow.
Please bear in mind I am only a part-time perl programmer and have limited knowledge of the extent of all perls features. I'm more than happy to look them up if you could point me in the right direction.
thanks a lot
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.