[Insight-users] data structure question
Luis Ibanez
luis.ibanez@kitware.com
Fri, 04 Apr 2003 11:41:48 -0500
Hi Zein,
STL has a priority_queue container:
http://www.sgi.com/tech/stl/priority_queue.html
It acts as an adaptor that uses the std::vector
as underlying container by default. You could change
this choice in the second template parameter of the
priority_queue.
You can use the generic STL find algorithm
in order to search for the existance of a given value.
http://www.sgi.com/tech/stl/find.html
The performance of 'find' will strongly depend on
the container you choose for the priority_queue.
---
The full reference of STL is available at:
http://www.sgi.com/tech/stl/
Regards,
Luis
---------------------
salah wrote:
> Hi friends,
>
> I need some sort of data structure that is much like a priority queue, but
> with the ability to search for the existance of an element that has some
> given value.
>
> what would you recommend me? does STL support such a container?
>
> Thanks,
>
> Zein
>
>
> ->8<------------->8<------------->8<------------->8<------------->8<------------->8<-
> Zein I. Salah
> University of Tübingen, WSI-GRIS, Sand 14, 72076 Tübingen
> Email: salah@gris.uni-tuebingen.de
> Tel.: (07071) 29 75465 (GRIS), Fax: (07071) 29 54 66
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>