# BlisPseudocost Class Reference

`#include <BlisPseudo.h>`

Inheritance diagram for BlisPseudocost:
[legend]
Collaboration diagram for BlisPseudocost:
[legend]

List of all members.

## Public Member Functions
| BlisPseudocost ()
| Default constructor.
| BlisPseudocost (double uc, int un, double dc, int dn, double s)
| Useful constructor.
void | setWeight (double w)
| Set weigth.
void | update (const int dir, const double parentObjValue, const double objValue, const double solValue)
| Update pseudocost.
void | update (const int dir, const double objDiff, const double solValue)
| Update pseudocost.
int | getUpCount ()
| Get up branching count.
double | getUpCost ()
| Get up branching cost.
int | getDownCount ()
| Get down branching count.
double | getDownCost ()
| Get down branching cost.
double | getScore ()
| Get importance.
| BlisPseudocost ()
| Default constructor.
| BlisPseudocost (double uc, int un, double dc, int dn, double s)
| Useful constructor.
| BlisPseudocost (const BlisPseudocost &cost)
| Copy constructor.
BlisPseudocost & | operator= (const BlisPseudocost &cost)
| Overload operator =.
void | setWeight (double w)
| Set weigth.
void | update (const int dir, const double parentObjValue, const double objValue, const double solValue)
| Update pseudocost.
void | update (const int dir, const double objDiff, const double solValue)
| Update pseudocost.
void | update (double upCost, int upCount, double downCost, int downCount)
| Update pseudocost.
int | getUpCount ()
| Get up branching count.
double | getUpCost ()
| Get up branching cost.
int | getDownCount ()
| Get down branching count.
double | getDownCost ()
| Get down branching cost.
double | getScore ()
| Get importance.
void | setScore (double s)
| Set importance.
AlpsReturnStatus | encodeTo (AlpsEncoded *encoded) const
| Pack pseudocost to the given object.
AlpsReturnStatus | decodeFrom (AlpsEncoded &encoded)
| Unpack pseudocost from the given encode object.
virtual AlpsEncoded * | encode () const
| Encode this node for message passing.
virtual AlpsKnowledge * | decode (AlpsEncoded &) const
| Decode a node from an encoded object.
## Private Attributes
double | weight_
| Use to calculate score.
int | upCount_
| How many times being branched up.
double | upCost_
| Average object change when branching up.
int | downCount_
| How many times being branched down.
double | downCost_
| Average object change when branching down.
double | score_
| The estimated importance.

## Detailed Description

Definition at line 31 of file BlisPseudo.h.

## Constructor & Destructor Documentation

BlisPseudocost::BlisPseudocost | ( |  | ) | `[inline]`

Default constructor.

Definition at line 57 of file BlisPseudo.h.

BlisPseudocost::BlisPseudocost | ( | double | uc,
|  | int | un,
|  | double | dc,
|  | int | dn,
|  | double | s |
| ) |  |  | `[inline]`

Useful constructor.

Definition at line 67 of file BlisPseudo.h.

BlisPseudocost::BlisPseudocost | ( |  | ) | `[inline]`

Default constructor.

Definition at line 58 of file BlisPseudo.h.

BlisPseudocost::BlisPseudocost | ( | double | uc,
|  | int | un,
|  | double | dc,
|  | int | dn,
|  | double | s |
| ) |  |  | `[inline]`

Useful constructor.

Definition at line 68 of file BlisPseudo.h.

BlisPseudocost::BlisPseudocost | ( | const BlisPseudocost & | cost | ) | `[inline]`

Copy constructor.

Definition at line 83 of file BlisPseudo.h.

## Member Function Documentation

void BlisPseudocost::setWeight | ( | double | w | ) | `[inline]`

Set weigth.

Definition at line 82 of file BlisPseudo.h.

void BlisPseudocost::update | ( | const int | dir,
|  | const double | parentObjValue,
|  | const double | objValue,
|  | const double | solValue |
| ) |  |  |

Update pseudocost.

void BlisPseudocost::update | ( | const int | dir,
|  | const double | objDiff,
|  | const double | solValue |
| ) |  |  |

Update pseudocost.

int BlisPseudocost::getUpCount | ( |  | ) | `[inline]`

Get up branching count.

Definition at line 102 of file BlisPseudo.h.

double BlisPseudocost::getUpCost | ( |  | ) | `[inline]`

Get up branching cost.

Definition at line 105 of file BlisPseudo.h.

int BlisPseudocost::getDownCount | ( |  | ) | `[inline]`

Get down branching count.

Definition at line 108 of file BlisPseudo.h.

double BlisPseudocost::getDownCost | ( |  | ) | `[inline]`

Get down branching cost.

Definition at line 111 of file BlisPseudo.h.

double BlisPseudocost::getScore | ( |  | ) | `[inline]`

Get importance.

Definition at line 114 of file BlisPseudo.h.

BlisPseudocost& BlisPseudocost::operator= | ( | const BlisPseudocost & | cost | ) | `[inline]`

Overload operator =.

Reimplemented from AlpsKnowledge.

Definition at line 93 of file BlisPseudo.h.

void BlisPseudocost::setWeight | ( | double | w | ) | `[inline]`

Set weigth.

Definition at line 104 of file BlisPseudo.h.

void BlisPseudocost::update | ( | const int | dir,
|  | const double | parentObjValue,
|  | const double | objValue,
|  | const double | solValue |
| ) |  |  |

Update pseudocost.

void BlisPseudocost::update | ( | const int | dir,
|  | const double | objDiff,
|  | const double | solValue |
| ) |  |  |

Update pseudocost.

void BlisPseudocost::update | ( | double | upCost,
|  | int | upCount,
|  | double | downCost,
|  | int | downCount |
| ) |  |  |

Update pseudocost.

int BlisPseudocost::getUpCount | ( |  | ) | `[inline]`

Get up branching count.

Definition at line 130 of file BlisPseudo.h.

double BlisPseudocost::getUpCost | ( |  | ) | `[inline]`

Get up branching cost.

Definition at line 133 of file BlisPseudo.h.

int BlisPseudocost::getDownCount | ( |  | ) | `[inline]`

Get down branching count.

Definition at line 136 of file BlisPseudo.h.

double BlisPseudocost::getDownCost | ( |  | ) | `[inline]`

Get down branching cost.

Definition at line 139 of file BlisPseudo.h.

double BlisPseudocost::getScore | ( |  | ) | `[inline]`

Get importance.

Definition at line 142 of file BlisPseudo.h.

void BlisPseudocost::setScore | ( | double | s | ) | `[inline]`

Set importance.

Definition at line 145 of file BlisPseudo.h.

AlpsReturnStatus BlisPseudocost::encodeTo | ( | AlpsEncoded * | encoded | ) | const

Pack pseudocost to the given object.

AlpsReturnStatus BlisPseudocost::decodeFrom | ( | AlpsEncoded & | encoded | ) |

Unpack pseudocost from the given encode object.

virtual AlpsEncoded* BlisPseudocost::encode | ( |  | ) | const`[virtual]`

Encode this node for message passing.

Reimplemented from AlpsKnowledge.

virtual AlpsKnowledge* BlisPseudocost::decode | ( | AlpsEncoded & |  | ) | const`[virtual]`

Decode a node from an encoded object.

Reimplemented from AlpsKnowledge.

## Member Data Documentation

double BlisPseudocost::weight_`[private]`

Use to calculate score.

Definition at line 35 of file BlisPseudo.h.

int BlisPseudocost::upCount_`[private]`

How many times being branched up.

Definition at line 38 of file BlisPseudo.h.

double BlisPseudocost::upCost_`[private]`

Average object change when branching up.

Definition at line 41 of file BlisPseudo.h.

int BlisPseudocost::downCount_`[private]`

How many times being branched down.

Definition at line 44 of file BlisPseudo.h.

double BlisPseudocost::downCost_`[private]`

Average object change when branching down.

Definition at line 47 of file BlisPseudo.h.

double BlisPseudocost::score_`[private]`

The estimated importance.

Score = weight * MIN(downCost_, upCost_) + (1.0 - weight) * MAX(downCost_, upCost_)

Definition at line 53 of file BlisPseudo.h.

The documentation for this class was generated from the following files:

- /home/coin/svn-release/Blis-0.93.2/Bcps/examples/Blis/BlisPseudo.h
- /home/coin/svn-release/Blis-0.93.2/Blis/src/BlisPseudo.h