Re: Choice of data structures

From: Jon Boone (ipmonger_at_comcast.net)
Date: 09/27/04


Date: Mon, 27 Sep 2004 08:44:03 -0400

On 2004-09-27 07:31, in article
d3aed052.0409270331.3dba1ade@posting.google.com, "Mark McConnell"
<mmcconnell17704@yahoo.com> wrote:

> I'm wondering if you need the hashing. If you need to do some
> random-access operation, then sure, hashing is necessary. But
> random-access operations are not mentioned directly in 1 and 2.
>
> You could store the time in each piece of data, then use binary search
> to find ranges of data defined by time. Put the data into the generic
> sequences (Java's ArrayList, Lisp's adjustable-array) in the order it
> comes in, i.e., sorted by time. To find all the data from Tuesday
> 9/21 to Thursday 9/23, use a binary search to find 9/21, then another
> binary search (starting from the 9/21 point) to find 9/23.

  I was planning on using hashes to make out-of-order data insertion easier.
Since things would be keyed by the data-collection-date, I could just insert
the data according to the hash (not really caring where it ended up). When
I wanted to pull things out in sequence, I'd use the sorted keys to pull the
data in sequence.

  I've never used adjustable-arrays. I'll spend some time looking at them
and see if I can figure out how to work out the out-of-order data insertion.

--jon



Relevant Pages

  • Re: Query Form
    ... ID that is made of three separate fields (Year,Number, ... I have built combo box for the year and pull ... I want to do the same for sequence, ...
    (microsoft.public.access.formscoding)
  • Re: Query Form
    ... >ID that is made of three separate fields (Year,Number, ... I have built combo box for the year and pull ... >I want to do the same for sequence, ...
    (microsoft.public.access.formscoding)
  • Re: Choice of data structures
    ... > the data according to the hash (not really caring where it ended up). ... > I wanted to pull things out in sequence, I'd use the sorted keys to pull ... Sounds like you want a Tree to me, not a hash. ...
    (comp.lang.lisp)