Re: How to quickly search through arrays?

Discussion in 'C++' started by Steve555, Feb 23, 2010.

  1. Steve555

    Steve555 Guest

    On 23 Feb, 00:44, red floyd <> wrote:
    > On Feb 22, 4:42 pm, red floyd <> wrote:
    >
    > > On Feb 22, 11:20 am, Marcel Müller <>
    > > wrote:

    >
    > > > Feel free to use std::hash_map and forget about the internal structure
    > > > of hash tables.

    >
    > > Except for the small detail that there is no such thing as
    > > std::hash_map.

    >
    > > TR1 introduced std::unordered_map, std::unordered_multimap,
    > > std::unordered_set, and std::unordered_multiset.

    >
    > Oops.
    >
    > Those are all in std::tr1::, not std::, that is:
    >
    > std::tr1::unordered_map, std::tr1::unordered_multimap,
    > std::tr1::unordered_set, std::tr1::unordered_multiset


    I did find references to std::hash_map, has it been deprecated from
    the standard or something?

    Re: tr1, I started another thread on asking for help on installing
    Boost on Max OSX as I've been unable to get it working.

    Is std::tr1::unordered_map functionally equivalent to std::hash_map?
    If I can install it, could I substitute it in Marcel's suggestions
    like-for-like?

    Thanks

    Steve
     
    Steve555, Feb 23, 2010
    #1
    1. Advertisements

  2. Steve555

    red floyd Guest

    On Feb 23, 1:32 am, Steve555 <> wrote:
    > On 23 Feb, 00:44, red floyd <> wrote:
    >
    >
    >
    > > On Feb 22, 4:42 pm, red floyd <> wrote:

    >
    > > > On Feb 22, 11:20 am, Marcel Müller <>
    > > > wrote:

    >
    > > > > Feel free to use std::hash_map and forget about the internal structure
    > > > > of hash tables.

    >
    > > > Except for the small detail that there is no such thing as
    > > > std::hash_map.

    >
    > > > TR1 introduced std::unordered_map, std::unordered_multimap,
    > > > std::unordered_set, and std::unordered_multiset.

    >
    > > Oops.

    >
    > > Those are all in std::tr1::, not std::, that is:

    >
    > > std::tr1::unordered_map, std::tr1::unordered_multimap,
    > > std::tr1::unordered_set, std::tr1::unordered_multiset

    >
    > I did find references to std::hash_map, has it been deprecated from
    > the standard or something?
    >


    No, it wasn't deprecated from the Standard, it was never *IN* the
    Standard. I believe it was in the early SGI STL, and some vendors
    included it in the Standard Library, but it should not have been
    called std::hash_map -- only stuff in the Standard should go into
    std::.


    > Re: tr1,  I started another thread on asking for help on installing
    > Boost on Max OSX as I've been unable to get it working.
    >
    > Is std::tr1::unordered_map functionally equivalent to std::hash_map?
    > If I can install it, could I substitute it in Marcel's suggestions
    > like-for-like?
    >


    I don't know, since there is no such thing as std::hash_map.
     
    red floyd, Feb 23, 2010
    #2
    1. Advertisements

  3. Steve555

    red floyd Guest

    On Feb 23, 1:32 am, Steve555 <> wrote:
    > On 23 Feb, 00:44, red floyd <> wrote:
    >
    >
    >
    > > On Feb 22, 4:42 pm, red floyd <> wrote:

    >
    > > > On Feb 22, 11:20 am, Marcel Müller <>
    > > > wrote:

    >
    > > > > Feel free to use std::hash_map and forget about the internal structure
    > > > > of hash tables.

    >
    > > > Except for the small detail that there is no such thing as
    > > > std::hash_map.

    >
    > > > TR1 introduced std::unordered_map, std::unordered_multimap,
    > > > std::unordered_set, and std::unordered_multiset.

    >
    > > Oops.

    >
    > > Those are all in std::tr1::, not std::, that is:

    >
    > > std::tr1::unordered_map, std::tr1::unordered_multimap,
    > > std::tr1::unordered_set, std::tr1::unordered_multiset

    >
    > I did find references to std::hash_map, has it been deprecated from
    > the standard or something?
    >


    No, it wasn't deprecated from the Standard, it was never *IN* the
    Standard. I believe it was in the early SGI STL, and some vendors
    included it in the Standard Library, but it should not have been
    called std::hash_map -- only stuff in the Standard should go into
    std::.


    > Re: tr1,  I started another thread on asking for help on installing
    > Boost on Max OSX as I've been unable to get it working.
    >
    > Is std::tr1::unordered_map functionally equivalent to std::hash_map?
    > If I can install it, could I substitute it in Marcel's suggestions
    > like-for-like?
    >


    I don't know, since there is no such thing as std::hash_map.
     
    red floyd, Feb 23, 2010
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bruce barker
    Replies:
    1
    Views:
    475
    Florian Marinoiu
    Jul 29, 2003
  2. Rahul Kansara

    session expires quickly

    Rahul Kansara, Nov 11, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,155
    alex bowers
    Nov 11, 2003
  3. Charles Fox

    How to quickly print arrays?

    Charles Fox, Jul 13, 2004, in forum: Java
    Replies:
    8
    Views:
    567
    Neal Gafter
    Jul 14, 2004
  4. Philipp
    Replies:
    21
    Views:
    1,502
    Philipp
    Jan 20, 2009
  5. Steve555
    Replies:
    13
    Views:
    671
    tonydee
    Feb 24, 2010
  6. Abby Lee
    Replies:
    5
    Views:
    680
    Abby Lee
    Aug 2, 2004
  7. Brian Green
    Replies:
    2
    Views:
    202
    Brian Green
    Sep 5, 2008
  8. Replies:
    3
    Views:
    235
    Roy Smith
    Sep 25, 2013
Loading...