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. Advertising

  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. Advertising

  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. Advertising

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. Charles Fox

    How to quickly print arrays?

    Charles Fox, Jul 13, 2004, in forum: Java
    Replies:
    8
    Views:
    405
    Neal Gafter
    Jul 14, 2004
  2. Philipp
    Replies:
    21
    Views:
    1,156
    Philipp
    Jan 20, 2009
  3. Steve555
    Replies:
    13
    Views:
    528
    tonydee
    Feb 24, 2010
  4. Brian Green
    Replies:
    2
    Views:
    117
    Brian Green
    Sep 5, 2008
  5. Replies:
    3
    Views:
    131
    Roy Smith
    Sep 25, 2013
Loading...

Share This Page