00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef BlisPseudo_h_
00025 #define BlisPseudo_h_
00026
00027 #include "CoinError.hpp"
00028
00029
00030
00031 class BlisPseudocost
00032 {
00033 private:
00035 double weight_;
00036
00038 int upCount_;
00039
00041 double upCost_;
00042
00044 int downCount_;
00045
00047 double downCost_;
00048
00053 double score_;
00054
00055 public:
00057 BlisPseudocost() :
00058 weight_(1.0),
00059 upCount_(0),
00060 upCost_(0.0),
00061 downCount_(0),
00062 downCost_(0.0),
00063 score_(0.0)
00064 {}
00065
00067 BlisPseudocost(double uc,
00068 int un,
00069 double dc,
00070 int dn,
00071 double s)
00072 :
00073 weight_(1.0),
00074 upCount_(un),
00075 upCost_(uc),
00076 downCount_(dn),
00077 downCost_(dc),
00078 score_(s)
00079 {}
00080
00082 void setWeight(double w) {
00083 if (w < 0.0 || w > 1.0) {
00084 throw CoinError("weight is not in range [0,1]", "setWeight",
00085 "BlisPseudo");
00086 }
00087 weight_= w;
00088 }
00089
00091 void update(const int dir,
00092 const double parentObjValue,
00093 const double objValue,
00094 const double solValue);
00095
00097 void update(const int dir,
00098 const double objDiff,
00099 const double solValue);
00100
00102 int getUpCount() { return upCount_; }
00103
00105 double getUpCost() { return upCost_; }
00106
00108 int getDownCount() { return downCount_; }
00109
00111 double getDownCost() { return downCost_; }
00112
00114 double getScore() { return score_; }
00115 };
00116
00117 #endif