ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/brains/Exclude.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-4/src/brains/Exclude.hpp (file contents):
Revision 1719 by tim, Fri Nov 5 23:38:27 2004 UTC vs.
Revision 1804 by tim, Tue Nov 30 19:58:25 2004 UTC

# Line 1 | Line 1
1   #ifndef __EXCLUDE_H__
2 +
3   #define __EXCLUDE_H__
4  
5 + #include <iostream>
6   #include <set>
7   #include <utility>
8 + #include <vector>
9  
7 using namespace std;
8
10   namespace oopse {
11  
12 <    
13 <    class Exclude{
14 <
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();
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 <            std::set<std::pair<int, int> >::iterator   findPair(int i, int j);
29 >            /** Checks whether pair (i, j) is in this Exclude class */
30 >            bool hasPair(int i, int j) {
31 >                return findPair(i, j) != excludeSet_.end();
32 >            }
33  
34 <            int  getSize();  
34 >            /** Returns the number of exclusion pair */
35 >            int getSize();
36  
37 <            int* getExcludeList();
37 >            /** Returns the size of exclusion list */
38 >            int getSizeOfExcludeList();
39  
40 <            friend ostream& operator(ostream& o, Exclude& e);
41 <        protected:
40 >            /** Returns the exclusion pairs in a plain array*/
41 >            int *getExcludeList();
42  
43 <            std::set<std::pair<int, int> > excludeSet_;
44 <            std::vector<std::pair<int, int> > excludeList_;
33 <            bool modified_;
43 >            /** write out the exclusion list to an ostream */
44 >            friend std::ostream& operator <<(std::ostream& o, Exclude& e);
45  
46 +        private:
47  
48 < };    
48 >            std::set<std::pair<int, int> >::iterator findPair(int i, int j);
49  
50 < }//end namespace oopse
50 >            std::set < std::pair<int, int> > excludeSet_;
51 >            std::vector < std::pair<int, int> > excludeList_;
52 >            bool modified_;
53 >    };
54 >
55 > }      //end namespace oopse
56 >
57   #endif // __EXCLUDE_H__

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines