in reply to Re: Re: indexing segments
in thread indexing segments

If it is just a list of single values then 'a length of about 100-1000' and 'a start/end value anywhere between 1 and a few hundred million' are mutually exclusive.

I guess I phrased this poorly. It is not a list of single values, each element has two values: a start position, and an end position. What I meant was that the space these elements occupy can go up to a few hundred million (ie, with only a few hundred thousand elements it is fairly sparsely populated), but the length of each element (end - start) is usually no more than a few thousand.

Hope that clarifies it.

That said if it is just a list of values you are correct - grep or similar would be the way forward.

grep is the slow way to go, it not being good enough is why I am seeking the wisdom in the first place :)

Replies are listed 'Best First'.
Re: Re: Re: Re: indexing segments
by EvdB (Deacon) on Oct 10, 2003 at 13:50 UTC

    Just mulling on this now.

    If you have a start and end value for each element then you could plot each element on an xy chart. Then to get the ones you want you could select an area on the chart which matches your criteria.

    Now my copy of 'Mastering Algorithm with Perl' has chapters on both graphs and sets. This might be a fruitful line of study.

    On the database front Postgres has lots of builtin coordinate functions - although you're better off in Perl me thinks.

    I should have taken CS instead of Physics - alas I can be of no more help until I hav eread up some more...

    --tidiness is the memory loss of environmental mnemonics