The analysis of whether x I. y can give unreasonable results
when x is not sorted is not trivial.  For the small cost of
sorting x I wonder why you don't just go ahead and sort it.



----- Original Message -----
From: Cliff Reiter <[EMAIL PROTECTED]>
Date: Thursday, April 3, 2008 6:25
Subject: Interval Index: was Re: [Jgeneral] Transitive Closure and Line Wrap
To: General forum <[email protected]>

> I have been fairly routinely using Interval Index x I. y with
> "almost ordered" lists x. These are lists of a few thousand
> scalars where 98% of the steps are increasing and the
> deceases are tiny. I only need an index near the value y
> and have no need of a particular choice of index. I
> get visual feedback on all the results and have never
> felt the need to chose anything other than x I. y.
> 
> Am I a foolish old man?
> 
> Roger Hui wrote:
> > Interval Index is just finding the index of an item in
> > a sorted list.  Not really all that novel (binary search,
> > etc.)  In 1987 I did not have it as a primitive and 
> > solved the problem with one application of the monad /: .
> > 
> ...
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to