27 #include "CoinError.hpp"
28 #include "AlpsKnowledge.h"
84 weight_ = cost.weight_;
85 upCost_ = cost.upCost_;
86 upCount_ = cost.upCount_;
87 downCost_ = cost.downCost_;
88 downCount_ = cost.downCount_;
94 weight_ = cost.weight_;
95 upCost_ = cost.upCost_;
96 upCount_ = cost.upCount_;
97 downCost_ = cost.downCost_;
98 downCount_ = cost.downCount_;
105 if (w < 0.0 || w > 1.0) {
106 throw CoinError(
"weight is not in range [0,1]",
"setWeight",
113 void update(
const int dir,
114 const double parentObjValue,
115 const double objValue,
116 const double solValue);
119 void update(
const int dir,
120 const double objDiff,
121 const double solValue);
124 void update(
double upCost,
148 AlpsReturnStatus
encodeTo(AlpsEncoded *encoded)
const;
151 AlpsReturnStatus
decodeFrom(AlpsEncoded &encoded);
153 using AlpsKnowledge::encode ;
155 virtual AlpsEncoded*
encode()
const;
158 virtual AlpsKnowledge*
decode(AlpsEncoded&)
const;
BlisPseudocost(double uc, int un, double dc, int dn, double s)
Useful constructor.
double getDownCost()
Get down branching cost.
AlpsReturnStatus decodeFrom(AlpsEncoded &encoded)
Unpack pseudocost from the given encode object.
void setScore(double s)
Set importance.
void update(const int dir, const double parentObjValue, const double objValue, const double solValue)
Update pseudocost.
BlisPseudocost()
Default constructor.
void setWeight(double w)
Set weigth.
BlisPseudocost(const BlisPseudocost &cost)
Copy constructor.
BlisPseudocost & operator=(const BlisPseudocost &cost)
Overload operator =.
int getDownCount()
Get down branching count.
double getScore()
Get importance.
AlpsReturnStatus encodeTo(AlpsEncoded *encoded) const
Pack pseudocost to the given object.
int getUpCount()
Get up branching count.
virtual AlpsEncoded * encode() const
Encode this node for message passing.
virtual AlpsKnowledge * decode(AlpsEncoded &) const
Decode a node from an encoded object.
double getUpCost()
Get up branching cost.