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 #25795 is a reply to message #25780] Thu, 11 March 2010 23:24 Go to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
cbpporter wrote on Thu, 11 March 2010 09:11

I will definitely learn about Index and check out the code. for the easy tasks I had before, I could use it without deeper knowledge.

So if it behaves like Vector, if it is empty, I should have FindAdd("foo") = 0 and following FindAdd("bar") = 1 used in this order? And I can trust these indexes after a resize or hash reindex?



Yes.

Quote:


Also, if it behaves like a Vector<Key>, it will store the key, not just the hash.



Yes.

Quote:


Pointer invalidation for both.



Well, hash storage is implementation detail, not accessible by client code. Interface specifies invalidation for keys...

Quote:


And what about ArrayMap. Does it behave like two Arrays or a Vector and an Array?


Vector and Array. Simply because it is the most practical.

There is also ArrayIndex, which is Array counterpart of Index, but I do not remember I have ever used it. Theoretically, it would be possible and simple to create Array->Array map with it, but somewhat it is not ever useful. Maybe because most keys are simple types that store well into Vector.

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: Wed May 15 16:43:49 CEST 2024

Total time taken to generate the page: 0.02214 seconds