1 |
< |
/* |
1 |
> |
/* |
2 |
|
* Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. |
3 |
|
* |
4 |
|
* The University of Notre Dame grants you ("Licensee") a |
50 |
|
|
51 |
|
namespace oopse { |
52 |
|
|
53 |
< |
/** |
54 |
< |
* @class Exclude Exclude.hpp "brains/Exclude.hpp" |
55 |
< |
* @brief Exclude class maintains the exclusion list of the simulation by the global indices of the |
56 |
< |
* atoms. The exclusion list will be passed to fortran in a plain array. |
57 |
< |
*/ |
58 |
< |
class Exclude { |
59 |
< |
public: |
53 |
> |
/** |
54 |
> |
* @class Exclude Exclude.hpp "brains/Exclude.hpp" |
55 |
> |
* @brief Exclude class maintains the exclusion list of the simulation by the global indices of the |
56 |
> |
* atoms. The exclusion list will be passed to fortran in a plain array. |
57 |
> |
*/ |
58 |
> |
class Exclude { |
59 |
> |
public: |
60 |
|
|
61 |
< |
Exclude() : modified_(false) {} |
61 |
> |
Exclude() : modified_(false) {} |
62 |
|
|
63 |
|
|
64 |
< |
/** Adds a pair into this Exclude class */ |
65 |
< |
void addPair(int i, int j); |
64 |
> |
/** Adds a pair into this Exclude class */ |
65 |
> |
void addPair(int i, int j); |
66 |
|
|
67 |
< |
/** Remove a pair from Exclude class */ |
68 |
< |
void removePair(int i, int j); |
67 |
> |
void addPairs(std::set<int>& set1, std::set<int>& set2); |
68 |
> |
template<typename IterType1, typename IterType2> |
69 |
> |
void addPairs(IterType1 iter1_first, IterType1 iter1_last, IterType2 iter2_first, IterType2 iter2_last); |
70 |
|
|
71 |
< |
/** Checks whether pair (i, j) is in this Exclude class */ |
72 |
< |
bool hasPair(int i, int j); |
71 |
> |
/** Remove a pair from Exclude class */ |
72 |
> |
void removePair(int i, int j); |
73 |
|
|
74 |
< |
/** Returns the number of exclusion pair */ |
75 |
< |
int getSize(); |
74 |
> |
void removePairs(std::set<int>& set1, std::set<int>& set2); |
75 |
> |
template<typename IterType1, typename IterType2> |
76 |
> |
void removePairs(IterType1 iter1_first, IterType1 iter1_last, IterType2 iter2_first, IterType2 iter2_last); |
77 |
|
|
78 |
< |
/** Returns the size of exclusion list */ |
79 |
< |
int getSizeOfExcludeList(); |
78 |
> |
/** Checks whether pair (i, j) is in this Exclude class */ |
79 |
> |
bool hasPair(int i, int j); |
80 |
|
|
81 |
< |
/** Returns the exclusion pairs in a plain array*/ |
82 |
< |
int *getExcludeList(); |
81 |
> |
/** Returns the number of exclusion pair */ |
82 |
> |
int getSize(); |
83 |
|
|
84 |
< |
/** write out the exclusion list to an ostream */ |
85 |
< |
friend std::ostream& operator <<(std::ostream& o, Exclude& e); |
84 |
> |
/** Returns the size of exclusion list */ |
85 |
> |
int getSizeOfExcludeList(); |
86 |
|
|
87 |
< |
private: |
87 |
> |
/** Returns the exclusion pairs in a plain array*/ |
88 |
> |
int *getExcludeList(); |
89 |
|
|
90 |
< |
std::set < std::pair<int, int> > excludeSet_; |
91 |
< |
std::vector <int> excludeList_; |
89 |
< |
bool modified_; |
90 |
< |
}; |
90 |
> |
/** write out the exclusion list to an ostream */ |
91 |
> |
friend std::ostream& operator <<(std::ostream& o, Exclude& e); |
92 |
|
|
93 |
+ |
private: |
94 |
+ |
|
95 |
+ |
std::set < std::pair<int, int> > excludeSet_; |
96 |
+ |
std::vector <int> excludeList_; |
97 |
+ |
bool modified_; |
98 |
+ |
}; |
99 |
+ |
|
100 |
|
} //end namespace oopse |
101 |
|
|
102 |
|
#endif // __EXCLUDE_H__ |