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