How to identify which numbers in a list are within each others' range



Hi,

I have a list of numbers each with a +/- margin of error. I need to
identify which ones overlab each other.

For example:
55 +/- 3
20 +/- 2
17 +/- 4
60 +/- 3

#base, max, min
list = [
(55, 58, 52),
(20, 22, 18),
(17, 21, 13),
(60, 63, 57),
]

In this example the range of list[0] overlaps the range of list[3] AND
list[1] overlaps list[2]

What is the best way to in python to identify the list items that
overlap and the items that don't overlap with any other.

Thanks!
Erik
.



Relevant Pages

  • Re: How to identify which numbers in a list are within each others range
    ... What is the best way to in python to identify the list items that ... overlap and the items that don't overlap with any other. ... if y!= x: yield i, ...
    (comp.lang.python)
  • Re: How to identify which numbers in a list are within each others range
    ... I have a list of numbers each with a +/- margin of error. ... What is the best way to in python to identify the list items that ... overlap and the items that don't overlap with any other. ... for idx, s in enumerate: ...
    (comp.lang.python)
  • Re: WYSIWYG
    ... The text box also has a default margin from the sides and the ... You can change the side margins by going to Format> Text box> Text box tab ... Publisher file. ... are white spaces between objects and text boxes unless I overlap items. ...
    (microsoft.public.publisher.webdesign)
  • Re: Please help me understand how to do this layout
    ... overlap in FF. ... I removed the margin on both divs, and the widths were fine, except the boxes overlapped in the middle. ... If you uncomment the two margin lines, then FF shows it fine, but IE makes it wider than the window, resulting in horizontal scrolbars. ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: Finding overlapping times...
    ... I would like to be able to determine which of these overlap each ... result to the Python community. ... first sorting all the lower bounds ... for a printer program command line: ...
    (comp.lang.python)