Main Page   Class Hierarchy   Compound List   File List   Contact   Download   Symbolic Constraints   Examples  

qmonomial.h

00001 #ifndef QMONOMIAL_H
00002 #define QMONOMIAL_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/qelement.h>
00009 
00010 namespace SCIL {
00011 
00012 using namespace boost;
00013 
00018 template <typename Graph>
00019 class qmonomial : public qelement<Graph>{
00020       private:
00021          monomial* m;
00022 
00023       public:
00024          //the trivial default constructor, everything undefined
00025          qmonomial() : m(NULL){
00026             this->l = NULL;
00027             this->r = NULL;
00028             this->maximal = true;
00029             this->basic = false;
00030             this->sg_node = NULL;
00031             this->checkGraphConcepts();
00032          }
00033 
00034          //construct a qmonomial from a monomial
00035          qmonomial(monomial* mo)
00036             : m(mo) {
00037                this->l = NULL;
00038                this->r = NULL;
00039                this->maximal = true;
00040                this->basic = false;
00041                this->sg_node = NULL;
00042                this->checkGraphConcepts();
00043             }
00044 
00045          //return the monomial itself
00046          monomial* getMonomial() const {
00047             return m;
00048          }
00049 
00050          //set the monomial
00051          void setMonomial(monomial* mo) {
00052             m = mo;
00053             return;
00054          }
00055 
00056          row get_linVar();
00057 
00058          //the linear transformations
00059          virtual row trans();
00060          virtual row transLeft();
00061          virtual row transRight();
00062 
00063          //add the constraints coupling the monomial to its decomposition
00064          virtual void linearize(ILP_Problem& IP);
00065 
00066          //output the variables making up the monomial (if QUADINST_DEBUG)
00067          virtual void printName();
00068 
00069    };
00070 
00071 }
00072 #include "../../../src/core/qmonomial.cc"
00073 #endif
Generated on Mon Mar 28 22:03:49 2011 for SCIL by  doxygen 1.6.3