00001 #ifndef SCIL_GLOBAL_H
00002 #define SCIL_GLOBAL_H
00003
00004 #include <iostream>
00005
00006 class ABA_VARIABLE;
00007 class ABA_CONSTRAINT;
00008
00009 namespace SCIL {
00010 class var;
00011 class column_entry;
00012 class row_entry;
00013 class cons;
00014 class row;
00015 class monomial;
00016 class pol_entry;
00017
00018 typedef int var_item;
00019 #define UNDEFINED_VARIABLE -1
00020 #define minimal_size 1000
00021 #define foreach(it,S) for( (it)=(S).begin();(it)!=(S).end();(it)++ )
00022 #define forall_vertices(v,v_end,G) for(tie((v),(v_end))=vertices((G)); (v)!=(v_end); ++(v))
00023
00024 enum Activation { Dynamic, Static };
00025 enum Validity { Global, Local };
00026 enum Liftability { Liftable, Nonliftable };
00027 enum Vartype { Vartype_Integer, Vartype_Float, Vartype_Binary };
00028 enum Optsense { Optsense_Min, Optsense_Max};
00029 enum cons_sense { Equal, Less, Greater };
00030 enum Opt_Inequality { Static_Inequalities, Dynamic_Inequalities };
00031 enum Opt_Variables { Static_Variables, Dynamic_Variables };
00032 enum Branching_Type { Inequality_Branching, Set_Variable_Branching,
00033 Variable_Bounds_Branching };
00034 enum Varstat { Free, SetToLowerBound, Set, SetToUpperBound,
00035 FixedToLowerBound, Fixed, FixedToUpperBound };
00036
00037 enum as_what { as_is, as_min, as_max };
00038
00039 enum quadRefStatus { NONE, CHECK, SQK2, SQK3, SQK2_SQK3 };
00040 enum bool_cons_type { C0, C1, CS, CE };
00041 enum boolOperator {
00042 BASIC,
00043 AND,
00044 NAND,
00045 OR,
00046 NOR,
00047 XOR,
00048 EQU,
00049 IMP,
00050 NIMP,
00051 PMI,
00052 PMIN
00053 };
00054
00055
00056 void debug_out(const char* outp, int paramnum = 0, ...);
00057
00058
00059
00060
00061 int compare(const SCIL::row& r1, const SCIL::row& r2);
00062 int compare(const SCIL::row_entry& t1, const SCIL::row_entry& t2);
00063 int compare(const SCIL::var& v1, const SCIL::var& v2);
00064 int compare(SCIL::var& v1, const SCIL::var& v2);
00065 int compare(const SCIL::cons& v1, const SCIL::cons& v2);
00066
00067 std::istream& operator>>(std::istream& in, SCIL::var& b);
00068 }
00069
00070 template<class A, class B>
00071 class ABA_ACTIVE;
00072 typedef ABA_ACTIVE<ABA_VARIABLE, ABA_CONSTRAINT> Active_Variables;
00073 typedef ABA_ACTIVE<ABA_CONSTRAINT, ABA_VARIABLE> Active_Inequalities;
00074
00075 class ABA_ROW;
00076 typedef ABA_ROW Row;
00077 class ABA_COLUMN;
00078 typedef ABA_COLUMN Column;
00079
00080 #endif