From: Kem Tekinay <[EMAIL PROTECTED]>
Date: Sun, 26 Mar 2006 20:27:52 -0500
I have hundreds or thousands of integers that I would like to
combine in
such a way that I can figure out the component numbers later. I
will know
how many numbers there are in a series, and the high and low
numbers, and I
can record any other information about the series that would let me
backtrack. Ideally, the result would fit in an Int64, but I can go
higher
than that if need be.
Does anyone have a suggestion?
I've never done anything like this or come across it, so any
suggestion I might make might not be the best...
It might work just to do this the simple way, use a plain old array.
If you only have thousands of items, it might be OK. You can use a
binary search to find the correct items in the array. You can even
modify the binary search to search for the position in which it
should be inserted into, instead just doing what normal binary
searches do which is to search for an equal number.
That'll automatically give you sortedness, which means all your data
will be in a series. The high and low numbers are the ones at the
ends of your array...
Otherwise, make a "series" class? And keep an array of series.
Class Series
dim Data as Int64()
function High() as Int64
function Low() as Int64
End Class
dim MySeries as Series()
Something like that.
--
http://elfdata.com/plugin/
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>