Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > hash_map

Reply
Thread Tools

hash_map

 
 
BobR
Guest
Posts: n/a
 
      06-15-2007

James Kanze wrote in message...
On Jun 14, 7:47 pm, "BobR" wrote:
> James Kanze wrote in message...


> On Jun 14, 5:27 am, "BobR" wrote:

// ref:
> /* """ quote
> """ */ unquote


> You're using OE, too?


> (This didn't used to be a problem. Since I'm sure that OE
> hasn't changed, it must be something either at Google or in our
> firewall that has changed. I'm still looking.)


Yep, OE. I am currently doing most reading on the win partition.
I'm still 'tweaking' my GNU Debian partition (rebuilding all after
an base HD went south on me [1]), so, I don't want to load the
newsgroups twice. Will eventially go GNU, and keep win for my
Adventure games (or use Wine when I can).

[1] Hard Drives used to last 10 years (mtbf), but seems like they only
last 2-3 years now. Hard to find small ( <100G) drives anymore
(salvage yard is my friend <G>).
Add one month to the warranty == fail. ;-{

Thanks for the 'hash table' info.
--
Bob R
POVrookie



 
Reply With Quote
 
 
 
 
James Kanze
Guest
Posts: n/a
 
      06-16-2007
On Jun 15, 8:08 pm, aaragon <(E-Mail Removed)> wrote:
> On Jun 15, 4:03 am, James Kanze <(E-Mail Removed)> wrote:


> Well, with the map you still need a one to one correspondence between
> keys and values. The different running time complexity relies in the
> different data structures that are used by the map and the hash table
> but they need the same mapping.


I don't think so. A map or set is ordered, so you can e.g.
insert just the lower bounds of the ranges, and use lower_bound
to look it up.

> Therefore, I just need to find a
> function that maps several double values to a single std:air (like a
> mathematical function pair<double,double> = f(double)). Once I have
> this, I could implement the mapping using either the std::map or the
> hash table, it doesn't matter.


You can use std::map to implement that function. Or, even and
std::vector with the ranges, sorted, and then use
std::lower_bound for the lookup.

--
James Kanze (Gabi Software) email: http://www.velocityreviews.com/forums/(E-Mail Removed)
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hash_map Jon Cosby C++ 10 12-02-2003 12:31 AM
C2143, hash_map Florian Liefers C++ 11 11-12-2003 09:18 PM
hash_map iterator Charles Herman C++ 5 11-04-2003 02:50 AM
Pre-standardizing hash_map & friends. Jacek Generowicz C++ 0 08-26-2003 12:58 PM
2d hash_map iteration ? Kristofer Pettijohn C++ 1 06-26-2003 08:18 AM



Advertisments