Project

General

Profile

Statistics
| Branch: | Revision:

cool / src / lib / GMLMIP-0.1 / rules / node.h @ 7c4d2eb4

History | View | Annotate | Download (659 Bytes)

1 e034e268 Thorsten WiƟmann
#ifndef NODE_H
2
#define NODE_H
3
4
#include <iostream>
5
#include <cmath>
6
#include <vector>
7
8
using namespace std;
9
10
class Node {
11
        friend ostream& operator<<(ostream& out, const Node& n);
12
        private:
13
                //size comes from the premise. Premise with n literals gives 2^n size.
14
                int size;
15
16
                // bit vector: 0 = valuation not admitted, 1 = valuation is.
17
                vector<bool> valuations;
18
19
        public:
20
                Node(){size = 0;};
21
                Node(int no_of_atoms);
22
23
                void allow(int a);
24
                void disallow(int d);
25
        
26
                //Copyable, assignable and comparable for use in STL
27
                bool operator==(const Node& other) const;                
28
                        
29
                // For checking supersets.
30
                bool operator<(const Node& other) const;
31
32
};
33
34
#endif