00001 #include<LEDA/list.h>
00002 #include<scil/cons.h>
00003 #include<scil/cons_obj.h>
00004 #include<scil/column.h>
00005
00006 int Hash(cons v) { return Hash(v.cons_pointer()); }
00007
00008 cons& cons::operator=(const cons& i) {
00009 IS=i.IS;
00010 return *this;
00011 }
00012
00013
00014 cons_obj* cons::cons_pointer() {
00015 if (IS==nil) cout<<"nil consuality\n";
00016 return IS;
00017 }
00018
00019 column cons::operator+ (column r) {
00020 return column(*this)+r;
00021 }
00022
00023 column cons::operator* (double d) {
00024 return column(*this)*d;
00025 }
00026
00027 bool cons::operator< (const cons& v1) const {
00028 return IS<v1.IS;
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 int compare(const cons& v1, const cons& v2) {
00048 if(v1>v2) return 1;
00049 if(v1<v2) return -1;
00050 return 0;
00051 }
00052
00053
00054
00055 double cons::rhs() {
00056 return cons_pointer()->rhs();
00057 };
00058
00059 cons_sense cons::sense() {
00060 return cons_pointer()->sense();
00061 };