[ENH] Interval method indexOf:
Boris.Gaertner at gmx.net
Tue Jun 15 14:22:18 UTC 2004
from the preamble of the attached change set:
"Change Set: IntervalIndexEnh
Date: 15 June 2004
Author: Boris Gaertner
Interval inherits #indexOf:startingAt:ifAbsent: from SequenceableCollection.
The inherited method enumerates all elements until it finds a hit. Try
(1 to: 100000 by: 0.01) indexOf: 99999
to see that this can be extremely time consuming. For Intervals, we can do
This enhancement assumes that the elements of an Interval are Numbers.
It is tempting to use intervals that contain instances of DataAndTime, but
this would require the generalization of some methods. "
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1273 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040615/06ba9f2b/IntervalIndexEnh.1.obj
More information about the Squeak-dev