J
James Aguilar
Hey all,
I have a program that runs the Manber-Myers suffix array search algorithm
with longest common prefix values. I need an efficient way to represent a
sequential array of characters to be passed into the algorithm. Here are
the features I need for the representation:
* Must be randomly accessible in constant time
* Must be capable of efficiently storing strings of more than 10 million
characters
Here are some plusses:
* Dereferencing an iterator should be fast, not just constant time, but
quick constant time, since it will be happening often (at least (size of
pattern) + log(size of text) times)
* Incrementing an iterator should be similarly fast
It would also be useful if this representation provided an efficient method
of extracting all the characters for the problem from the standard input
(again, no less than 5 million characters, randomly distributed among A, C,
G, and T).
Now, here's the question: which is better for this problem, a string or a
rope. If a rope would be best, can you offer any guidance as to ways to
make the use of the rope as fast and painless as possible (if that is the
preferable representation).
- JFA1
I have a program that runs the Manber-Myers suffix array search algorithm
with longest common prefix values. I need an efficient way to represent a
sequential array of characters to be passed into the algorithm. Here are
the features I need for the representation:
* Must be randomly accessible in constant time
* Must be capable of efficiently storing strings of more than 10 million
characters
Here are some plusses:
* Dereferencing an iterator should be fast, not just constant time, but
quick constant time, since it will be happening often (at least (size of
pattern) + log(size of text) times)
* Incrementing an iterator should be similarly fast
It would also be useful if this representation provided an efficient method
of extracting all the characters for the problem from the standard input
(again, no less than 5 million characters, randomly distributed among A, C,
G, and T).
Now, here's the question: which is better for this problem, a string or a
rope. If a rope would be best, can you offer any guidance as to ways to
make the use of the rope as fast and painless as possible (if that is the
preferable representation).
- JFA1