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

cons.cc

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