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