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 » U++ Library support » U++ Core » what about VectorBiMap / ArrayBiMap ?
Re: what about VectorBiMap / ArrayBiMap ? [message #26517 is a reply to message #26503] Fri, 07 May 2010 14:37 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
kohait00 wrote on Thu, 06 May 2010 14:38

sorry, i try to make it more clear..

in containers, by default, it is possible adding another element with same hash. this is called hash collision, because normaly a hash value should map to exactly one counterpart.

is there a possib in the containers internally, to restrict such behaviour besides manually checking before adding another element?

i know of FindAdd, but this handles it kind of differently..




Uh, I am not quite sure what you want to check.

Generally, hashing is always a little bit stochastic. In theory, it is possible that collisions would slow down your code, but statistically, it is quite unlikely.

Or, if you want some analogy, some very special pattern of memory allocations and frees could put down to knees any memory allocator and/or any cache subsystem. But it is so unlikely to happen (unless engineered) that we are still using memory allocators and caches... Smile

BTW, of course, U++ changes the size of hashing space dynamically based on number of elements...

Whatever, my advice is to forget about this. It is internal issue, do not think in terms of hash codes... Smile
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: _pick understanding
Next Topic: FileMove behaviour
Goto Forum:
  


Current Time: Sat Jun 15 21:26:13 CEST 2024

Total time taken to generate the page: 0.00970 seconds