1 |
|
#ifndef __EXCLUDE_H__ |
2 |
+ |
|
3 |
|
#define __EXCLUDE_H__ |
4 |
|
|
5 |
|
#include <set> |
6 |
|
#include <utility> |
7 |
|
#include <iostream> |
8 |
|
|
8 |
– |
using namespace std; |
9 |
– |
|
9 |
|
namespace oopse { |
10 |
|
|
11 |
|
/** |
13 |
|
* @brief Exclude class maintains the exclusion list of the simulation by the global indices of the |
14 |
|
* atoms. The exclusion list will be passed to fortran in a plain array. |
15 |
|
*/ |
16 |
< |
class Exclude{ |
18 |
< |
|
16 |
> |
class Exclude { |
17 |
|
public: |
18 |
|
|
19 |
|
Exclude(); |
30 |
|
bool hasPair(int i, int j) { |
31 |
|
return findPair(i, j) != excludeSet_.end(); |
32 |
|
} |
33 |
< |
|
33 |
> |
|
34 |
|
/** Returns the number of exclusion pair */ |
35 |
< |
int getSize(); |
35 |
> |
int getSize(); |
36 |
|
|
37 |
|
/** Returns the size of exclusion list */ |
38 |
|
int getSizeOfExcludeList(); |
39 |
|
|
40 |
|
/** Returns the exclusion pairs in a plain array*/ |
41 |
< |
int* getExcludeList(); |
41 |
> |
int *getExcludeList(); |
42 |
|
|
43 |
|
/** write out the exclusion list to an ostream */ |
44 |
|
friend std::ostream& operator(std::ostream& o, Exclude& e); |
45 |
|
|
46 |
|
private: |
47 |
|
|
48 |
< |
std::set<std::pair<int, int> >::iterator findPair(int i, int j); |
48 |
> |
std::set<std::pair<int, int> >::iterator findPair(int i, int j); |
49 |
|
|
50 |
< |
std::set<std::pair<int, int> > excludeSet_; |
51 |
< |
std::vector<std::pair<int, int> > excludeList_; |
50 |
> |
std::set < std::pair<int, int> > excludeSet_; |
51 |
> |
std::vector < std::pair<int, int> > excludeList_; |
52 |
|
bool modified_; |
53 |
+ |
}; |
54 |
|
|
55 |
< |
}; |
55 |
> |
} //end namespace oopse |
56 |
|
|
58 |
– |
}//end namespace oopse |
57 |
|
#endif // __EXCLUDE_H__ |