MTT wrote:[color=blue]
> Hi there
>
> I like to know if any class avilable before proceeding on my work.
>
> I need a inverted list behaviour for sequential access of elements[/color]
for[color=blue]
> both direction (previous(),next()) also search element if exist or[/color]
not[color=blue]
> and locate position. Since sequential iteration for search is costly[/color]
I[color=blue]
> like to have access by b-tree behaviour.
>
> Hence I will deal with some large counts of elements (in several K),
> memory utilization and search time is my concern.
>
> I'm planning to use sorted arrays as list elements (as clusters)
> (enable me b-seacrh in node and reduce node count). planning to
> construct a balanced b-tree over these nodes (by include left & right
> links).
>[/color]
I am not sure if this is what you're after, but the
Boost Multi-index Containers Library
(
http://boost.org/libs/multi_index/doc/index.html) allows
you to obtain (among other possibilites) a type of
container that behaves like a std::list while having
fast (O(log n)) key-based lookup at the same time. Check
the section entitled "A bidirectional list with fast lookup"
at the tutorial. Hope this helps,
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo