ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/brains/Exclude.hpp
Revision: 1856
Committed: Mon Dec 6 04:49:53 2004 UTC (19 years, 7 months ago) by tim
File size: 1404 byte(s)
Log Message:
fix a bug in Exclude List

File Contents

# Content
1 #ifndef __EXCLUDE_H__
2
3 #define __EXCLUDE_H__
4
5 #include <iostream>
6 #include <set>
7 #include <utility>
8 #include <vector>
9
10 namespace oopse {
11
12 /**
13 * @class Exclude Exclude.hpp "brains/Exclude.hpp"
14 * @brief Exclude class maintains the exclusion list of the simulation by the global indices of the
15 * atoms. The exclusion list will be passed to fortran in a plain array.
16 */
17 class Exclude {
18 public:
19
20 Exclude() : modified_(false) {}
21
22
23 /** Adds a pair into this Exclude class */
24 void addPair(int i, int j);
25
26 /** Remove a pair from Exclude class */
27 void removePair(int i, int j);
28
29 /** Checks whether pair (i, j) is in this Exclude class */
30 bool hasPair(int i, int j);
31
32 /** Returns the number of exclusion pair */
33 int getSize();
34
35 /** Returns the size of exclusion list */
36 int getSizeOfExcludeList();
37
38 /** Returns the exclusion pairs in a plain array*/
39 int *getExcludeList();
40
41 /** write out the exclusion list to an ostream */
42 friend std::ostream& operator <<(std::ostream& o, Exclude& e);
43
44 private:
45
46 std::set < std::pair<int, int> > excludeSet_;
47 std::vector <int> excludeList_;
48 bool modified_;
49 };
50
51 } //end namespace oopse
52
53 #endif // __EXCLUDE_H__