A Literal is a pair of variable index and value.
| 44 | |
| 45 | /// A Literal is a pair of variable index and value. |
| 46 | class Literal { |
| 47 | public: |
| 48 | /// Constructor for an empty literal |
| 49 | Literal(void); |
| 50 | /// Constructor |
| 51 | Literal(int _var, int _val); |
| 52 | |
| 53 | /// Variable index. The ViewArray that the index is meant |
| 54 | /// for is assumed to be known by context. |
| 55 | int _variable; |
| 56 | /// The value of the literal. For int and bool variables, |
| 57 | /// this is the value itself; for set variables, this is |
| 58 | /// one of the possible elements of the set. |
| 59 | int _value; |
| 60 | |
| 61 | /// Less than. The ordering is the lexicographical order |
| 62 | /// on the (variable,value) pair. |
| 63 | bool operator <(const Literal &rhs) const; |
| 64 | }; |
| 65 | |
| 66 | /** |
| 67 | * \brief Find the location of an integer in a collection of |