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

cons.cc

00001 #include<LEDA/list.h>
00002 #include<scil/cons.h>
00003 #include<scil/cons_obj.h>
00004 #include<scil/column.h>
00005 
00006 using namespace SCIL;
00007 
00008 int SCIL::Hash(cons v) { return LEDA::Hash((void*) v.cons_pointer()); }
00009 
00010 cons& cons::operator=(const cons& i) {
00011   IS=i.IS;
00012   return *this;
00013 }
00014 
00015 
00016 cons_obj* cons::cons_pointer() {
00017   if (IS==nil) cout<<"nil consuality\n";
00018   return IS;
00019 }
00020 
00021 ABA_Constraint* cons::Acons_pointer() {
00022   if (IS==nil) cout<<"nil variable\n";
00023   return IS->Acons();
00024 }
00025 
00026 column cons::operator+ (column r) {
00027   return column(*this)+r;
00028 }
00029 
00030 column cons::operator* (double d) {
00031   return column(*this)*d;
00032 }
00033 
00034 bool cons::operator< (const cons& v1) const {
00035   return IS<v1.IS;
00036 }
00037 
00038 bool cons::operator<= (const cons& v1) const {
00039   return IS<=v1.IS;
00040 }
00041 
00042 bool cons::operator!= (const cons& v1) const {
00043   return IS!=v1.IS;
00044 }
00045 
00046 bool cons::operator== (const cons& v1) const {
00047   return IS==v1.IS;
00048 }
00049 
00050 bool cons::operator> (const cons& v1) const {
00051   return IS>v1.IS;
00052 }
00053 
00054 int SCIL::compare(const cons& v1, const cons& v2) {
00055   if(v1>v2) return 1;
00056   if(v1<v2) return -1;
00057   return 0;
00058 }
00059 
00060 
00061 
00062 double cons::rhs() {
00063   return cons_pointer()->rhs();
00064 }; 
00065 
00066 cons_sense cons::sense() {
00067   return cons_pointer()->sense();
00068 };

Generated on Tue Nov 16 15:18:14 2004 for SCIL by doxygen1.2.16