Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Questions about VectorMap
Re: Questions about VectorMap [message #25776 is a reply to message #25765] Thu, 11 March 2010 14:20 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
I think you definitely should learn Index semantics.

It works just like Vector for the most part, but is able to find index of element with given value really fast.

VectorMap is just a quite simple composition wrapper of Index and Vector. Index stores keys, Vector values.

Other than that, it really always behaves just like Vector.(Or two Vectors - imagine VectorMap as Vector<KEY> and Vector<VALUE>).

The only slightly problematic operation is Remove of element, not because it behaves differently than in Vector, but because it is slow (not only it has to move the memory, but also reindex hashtables). That is why there is Unlink that just "hides" the key, keeping the element in the place.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Clipped text in theIDE
Next Topic: Can't build examples
Goto Forum:
  


Current Time: Sun Jun 08 00:52:00 CEST 2025

Total time taken to generate the page: 0.04758 seconds