1 /******************************************
2 Copyright (c) 2012  Cheng-Shen Han
3 Copyright (c) 2012  Jie-Hong Roland Jiang
4 Copyright (c) 2018  Mate Soos
5 
6 For more information, see " When Boolean Satisfiability Meets Gaussian
7 Elimination in a Simplex Way." by Cheng-Shen Han and Jie-Hong Roland Jiang
8 in CAV (Computer Aided Verification), 2012: 410-426
9 
10 
11 Permission is hereby granted, free of charge, to any person obtaining a copy
12 of this software and associated documentation files (the "Software"), to deal
13 in the Software without restriction, including without limitation the rights
14 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 copies of the Software, and to permit persons to whom the Software is
16 furnished to do so, subject to the following conditions:
17 
18 The above copyright notice and this permission notice shall be included in
19 all copies or substantial portions of the Software.
20 
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 THE SOFTWARE.
28 ***********************************************/
29 
30 #ifndef GAUSSWATCHED_H
31 #define GAUSSWATCHED_H
32 
33 namespace CMSat {
34     struct GaussWatched{
GaussWatchedGaussWatched35         GaussWatched(uint32_t r ,uint32_t m):
36             row_n(r) , matrix_num(m)
37         {}
38 
39         uint32_t row_n;        // watch row
40         uint32_t matrix_num;   // watch matrix
41 
42         bool operator<(const GaussWatched& other) const {
43             if (matrix_num < other.matrix_num) {
44                 return true;
45             }
46 
47             if (matrix_num > other.matrix_num) {
48                 return false;
49             }
50 
51             return row_n < other.row_n;
52         }
53     };
54 }
55 
56 #endif //GAUSSWATCHED_H
57