"Xanadu" and the Flaming-X logo are registered trademarks of Project Xanadu.

Google
  Entire Web   sunless-sea.net   xanadu.net   udanax.com
 
  1 Visitor(s) on Site
  98 Wiki Pages

Recently Modified

Sections (edit)

How This Wiki Works

SearchWiki:
Recent Changes Printable View Page History Edit Page
Content Last Modified on January 22, 2008, at 10:03 PM CST

An IntegerRegion can be thought of as the disjoint union of intervals and inequalities.

The interesting cases to look at are:

The distinctions:

1) The empty region

2) The full region

3) A "left" inequality -- e.g., everything less that 3.

4) A "right" inequality -- e.g., everything greater than or equal to 7

The non-distinction simple regions:

5) An interval -- e.g., from 3 inclusive to 7 exclusive

The non-simple regions:

6) A disjoint union of (in order) an optional left inequality, a set of intervals, and an optional right inequality.

If a non-empty region has a least element, then it "isBoundedLeft". Otherwise it extends leftwards indefinitely. Similarly, if a non-empty region has a greatest element, then it "isBoundedRight". Otherwise it extends rightwards indefinitely. (We may figuratively speak of the region extending towards + or - infinity, but we have purposely avoided introducing any value which represents an infinity.)

Looking at cases again:

1) "isBoundedLeft" and "isBoundedRight" since it doesn''t extent indenfinitely in either direction. (A danger to watch out for is that this still has niether a greatest nor a least element).

2) neither.

3) "isBoundedRight"

4) "isBoundedLeft"

5) "isBoundedLeft" and "isBoundedRight"

6) "isBoundedLeft" iff doesnt include a left inequality, "isBoundedRight" iff doesnt include a right inequality.

An efficiency note: Currently many of the method which could be doing an O(log) binary search (such as hasMember) are instead doing a linear search. This will be fixed if it turns out to be a problem in practice.

Recent Changes Printable View Page History Edit Page
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest (c) 2001-2007 Jeff Rush