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 » Hashes in U++
icon5.gif  Hashes in U++ [message #2026] Thu, 30 March 2006 02:38 Go to next message
Justin is currently offline  Justin
Messages: 57
Registered: March 2006
Location: Orange County California
Member
If NTL replaces STL, how would I go about working with Hashes?
Re: Hashes in U++ [message #2048 is a reply to message #2026] Thu, 30 March 2006 22:10 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Justin wrote on Wed, 29 March 2006 19:38

If NTL replaces STL, how would I go about working with Hashes?


Now I am not sure what is this question about... As you most likely know, STL (as defined in std:: library) does not have hash tables.

On opposite, all NTL associativity is based on hashes.

Now, if you ask about how to make your type "associative" in NTL:

- provide it with operator==

- define a GetHashValue either as external function or as method.

To define GetHashValue - most U++ values have GetHashValue defined, so make hash value of all components and then use CombineHash to get single hash value (well, you can sum or xor them together too, but CombineHash might provide slightly less conflicts).

There is a reference/Common that demostrates such common lower level practices of U++.

Mirek
Previous Topic: Gate behavior with multiple callback funcs design/documentation
Next Topic: Format function conversion specifiers and EditDate widget
Goto Forum:
  


Current Time: Fri Apr 26 06:42:56 CEST 2024

Total time taken to generate the page: 0.04321 seconds