00001 #ifndef QELEMENT_H
00002 #define QELEMENT_H
00003
00004 #include <boost/graph/adjacency_list.hpp>
00005 #include <boost/graph/adjacency_matrix.hpp>
00006 #include <boost/graph/graph_traits.hpp>
00007 #include <scil/core/monomial.h>
00008 #include <scil/core/boolfunction.h>
00009
00010 namespace SCIL {
00011
00012 using namespace boost;
00013
00014 template <typename Graph>
00015 class qelement {
00016
00017 protected:
00018
00019 typedef graph_traits<Graph> GraphTraits;
00020 typedef typename GraphTraits::vertex_descriptor vertex_descriptor;
00021 typedef typename GraphTraits::edge_descriptor edge_descriptor;
00022
00023
00025
00028 void checkGraphConcepts() {
00029
00030 BOOST_CONCEPT_ASSERT((GraphConcept<Graph>));
00031 }
00032
00033 qelement<Graph>* l;
00034 qelement<Graph>* r;
00035
00036 bool maximal;
00037
00038 bool basic;
00039 qelement<Graph>* in_SG;
00040 vertex_descriptor sg_node;
00041
00042 public:
00043
00044
00045
00046
00047 void setNotMaximal() {
00048 maximal = false;
00049 return;
00050 }
00051
00052
00053 qelement<Graph>* getLeft() const {
00054 return l;
00055 }
00056
00057
00058 qelement<Graph>* getRight() const {
00059 return r;
00060 }
00061
00062
00063 void setLeft(qelement<Graph>* li) {
00064 l = li;
00065 return;
00066 }
00067
00068
00069 void setRight(qelement<Graph>* ri) {
00070 r = ri;
00071 return;
00072 }
00073
00074 void set_in_separation_graph(qelement<Graph>* bfsg){
00075 in_SG = bfsg;
00076 }
00077
00078 qelement<Graph>* in_separation_graph(){
00079 return in_SG;
00080 }
00081
00082
00083 bool isMaximal() const {
00084 return maximal;
00085 }
00086
00087
00088 bool isBasic() {
00089 return basic;
00090 }
00091
00092
00093 vertex_descriptor getSGNode() {
00094 return sg_node;
00095 }
00096
00097
00098 void setSGNode(vertex_descriptor v) {
00099 sg_node = v;
00100 return;
00101 }
00102
00103 qelement(){
00104 in_SG = NULL;
00105 }
00106
00107 virtual row get_linVar() {};
00108 virtual monomial* getMonomial() const {};
00109 virtual boolfunction* getBoolfunction() const {};
00110
00111
00112
00113 virtual row trans() {};
00114 virtual row transLeft() {};
00115 virtual row transRight() {};
00116
00117
00118 virtual void linearize(ILP_Problem& IP){};
00119
00120
00121 virtual void printName(){};
00122 };
00123
00124 }
00125 #endif