27#include "CoinError.hpp"
28#include "AlpsKnowledge.h"
85 weight_ = cost.weight_;
86 upCost_ = cost.upCost_;
87 upCount_ = cost.upCount_;
88 downCost_ = cost.downCost_;
89 downCount_ = cost.downCount_;
95 weight_ = cost.weight_;
96 upCost_ = cost.upCost_;
97 upCount_ = cost.upCount_;
98 downCost_ = cost.downCost_;
99 downCount_ = cost.downCount_;
100 score_ = cost.score_;
106 if (w < 0.0 || w > 1.0) {
107 throw CoinError(
"weight is not in range [0,1]",
"setWeight",
115 const double parentObjValue,
116 const double objValue,
117 const double solValue);
121 const double objDiff,
122 const double solValue);
149 AlpsReturnStatus
encodeTo(AlpsEncoded *encoded)
const;
154 using AlpsKnowledge::encode ;
159 virtual AlpsKnowledge*
decode(AlpsEncoded&)
const;
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.
double getDownCost()
Get down branching cost.
double getUpCost()
Get up branching cost.
BlisPseudocost(double uc, int un, double dc, int dn, double s)
Useful constructor.
int getUpCount()
Get up branching count.
void update(const int dir, const double objDiff, const double solValue)
Update pseudocost.
AlpsReturnStatus decodeFrom(AlpsEncoded &encoded)
Unpack pseudocost from the given encode object.
double getScore()
Get importance.
int getDownCount()
Get down branching count.
BlisPseudocost(const BlisPseudocost &cost)
Copy constructor.
BlisPseudocost & operator=(const BlisPseudocost &cost)
Overload operator =.
AlpsReturnStatus encodeTo(AlpsEncoded *encoded) const
Pack pseudocost to the given object.
void update(double upCost, int upCount, double downCost, int downCount)
Update pseudocost.
virtual AlpsKnowledge * decode(AlpsEncoded &) const
Decode a node from an encoded object.
virtual AlpsEncoded * encode() const
Encode this node for message passing.
void setWeight(double w)
Set weigth.