Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Hash table with more than one key?

Name: Anonymous 2008-03-07 16:55

I'm trying to make something like a hash table that can locate a value quickly given a key to match. But my problem is that the data can't just match one key to retrieve a unique value, it must match three different keys to get the correct value. Is there any sort of existing data structure that provides this sort of lookup capability?

Name: Anonymous 2008-03-07 16:59

You don't understand hash tables.

Name: Anonymous 2008-03-07 17:03

I know a hash table is not what I want. I just want to know if there's anything that offers what I need, a table that matches multiple keys to find a value quickly, so I don't have to program this from scratch.

Name: Anonymous 2008-03-07 17:05

>>3
Are you trolling?

Just curious.

Name: Anonymous 2008-03-07 17:06

stack pointer monadic overflow

Did that make any sense?

I'm not a programmer, I hang out here just for fun, and I thought I'll check what I have learned from you guys. So, does that make sense?

Name: Anonymous 2008-03-07 17:06

>>4
no

Name: Anonymous 2008-03-07 17:08

>>6
That sucks, because you have been caught trolling.

Name: Anonymous 2008-03-07 17:28

Use three different hashtables.

Name: Anonymous 2008-03-07 19:11

Like >>8 says.
For large datasets and primitive data types, a database could also be worthwhile.

Or do you mean a composite key, rather than independent lookup for each key? Then just store and retrieve using a tuple of the individual keys as the key, or whatever other hashable list your language offers.

Name: Anonymous 2008-03-08 0:06

>>1
HashMap

Name: Anonymous 2008-03-08 1:06

concatenate keys, dumbass

Name: Anonymous 2010-11-13 12:34

Name: Anonymous 2010-11-27 17:47

Name: Anonymous 2011-02-03 4:03


Don't change these.
Name: Email:
Entire Thread Thread List