IMP  2.4.0
The Integrative Modeling Platform
set.h
Go to the documentation of this file.
1 /**
2  * \file IMP/base/set.h
3  * \brief Declare an efficient stl-compatible set.
4  *
5  * Copyright 2007-2015 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPBASE_SET_H
9 #define IMPBASE_SET_H
10 
11 #include <IMP/base/base_config.h>
12 #include <boost/version.hpp>
13 
14 #include <boost/unordered_set.hpp>
15 #include "hash.h"
16 
17 IMPBASE_DEPRECATED_HEADER(2.2,
18  "Use boost::unordered_set directly or"
19  " base/set_map_macros.h.");
20 
21 IMPBASE_BEGIN_NAMESPACE
22 /** This class chooses the best of STL compatible
23  non-ordered
24  set available. This will, in general, be a hash set
25  if it
26  is available or std::set if it is not.
27  */
28 template <class Key>
29 class set : public boost::unordered_set<Key> {
30  typedef boost::unordered_set<Key> P;
31 
32  public:
33  set() {}
34  template <class It>
35  set(It b, It e)
36  : P(b, e) {}
37 };
38 
39 IMPBASE_END_NAMESPACE
40 
41 #endif /* IMPBASE_SET_H */
IO support.