IMP  2.1.1
The Integrative Modeling Platform
base/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-2013 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_BEGIN_NAMESPACE
18 /** This class chooses the best of STL compatible
19  non-ordered
20  set available. This will, in general, be a hash set
21  if it
22  is available or std::set if it is not.
23  */
24 template <class Key>
25 class set : public boost::unordered_set<Key> {
26  typedef boost::unordered_set<Key> P;
27 
28  public:
29  set() {}
30  template <class It>
31  set(It b, It e)
32  : P(b, e) {}
33 };
34 
35 IMPBASE_END_NAMESPACE
36 
37 #endif /* IMPBASE_SET_H */
IO support.