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

row_constraint.h

00001 #ifndef SCIL_ROW_CONSTRAINT_H
00002 #define SCIL_ROW_CONSTRAINT_H
00003 
00004 #include<scil/cons_obj.h>
00005 #include<scil/variable.h>
00006 #include<vector>
00007 
00008 namespace SCIL {
00009 
00010 class var_obj;
00011 class row;
00012 
00013 class row_constraint : public cons_obj {
00014 
00015  private:
00016 
00018   struct pair {
00019       var v; double c;
00020       pair( var v, double c ) : v(v), c(c){};
00021   };
00022 
00024   static bool compareByVar(const pair p1, const pair p2) { return (p1.v < p2.v); }
00025 
00026   std::vector<pair> NZ;
00027 
00028  public:
00029   row_constraint(row& r, cons_sense s);
00030   double rhs();
00031 
00033   double coeff(var_obj* v);
00034 
00036   void non_zero_entries(row& r);
00037 };
00038 };
00039 
00040 #endif
Generated on Mon Mar 28 22:03:49 2011 for SCIL by  doxygen 1.6.3