MAiNGO
babBase::BabNodeWithInfo Class Reference

This class represents an node in the B&B-Tree with additional information attached that is used in selecting nodes or branching variables. More...

#include <babTree.h>

Public Member Functions

 BabNodeWithInfo (BabNode nodeIn, double selScoreIn)
 Constructor. More...
 
 operator BabNode const & () const &
 Conversion Operator only callable from l-values. More...
 
 operator BabNode && () &&
 Conversion Operator only callable from r-values. More...
 
double get_node_selection_score () const
 Returns the node selection score of the node. More...
 
void set_node_selection_score (double newScore)
 Sets the node selection score of the node. More...
 
double get_pruning_score () const
 Returns the pruning score of the node. More...
 
unsigned get_ID () const
 Returns the ID of the node. More...
 

Public Attributes

BabNode node
 
BranchingHistoryInfo branchingInfo
 Object storing the branching history. More...
 

Private Attributes

double _nodeSelectionScore
 

Detailed Description

This class represents an node in the B&B-Tree with additional information attached that is used in selecting nodes or branching variables.

Currently additional information over the BabNode class are the node selection score, that can be used to order the selection of the nodes from the B&B-Tree and the information which variable was branched when the node was created. Additionally it is saved whether the branching was up or down. The last two pieces of information are used to attribute changes to branching decisions. (e.g. in register_node_change in Brancher) Currently this class is only used internally in the BabTree class and when communicating with the Brancher class. Efficient way to convert to BabNode are provided.

Constructor & Destructor Documentation

◆ BabNodeWithInfo()

babBase::BabNodeWithInfo::BabNodeWithInfo ( BabNode  nodeIn,
double  selScoreIn 
)
inline

Constructor.

Parameters
[in]nodeInis a normal BabNode to be copied
[in]selScoreInis the selection score to be used for this bab node

Member Function Documentation

◆ get_ID()

unsigned babBase::BabNodeWithInfo::get_ID ( ) const
inline

Returns the ID of the node.

◆ get_node_selection_score()

double babBase::BabNodeWithInfo::get_node_selection_score ( ) const
inline

Returns the node selection score of the node.

◆ get_pruning_score()

double babBase::BabNodeWithInfo::get_pruning_score ( ) const
inline

Returns the pruning score of the node.

◆ operator BabNode &&()

babBase::BabNodeWithInfo::operator BabNode && ( ) &&
inline

Conversion Operator only callable from r-values.

◆ operator BabNode const &()

babBase::BabNodeWithInfo::operator BabNode const & ( ) const &
inline

Conversion Operator only callable from l-values.

◆ set_node_selection_score()

void babBase::BabNodeWithInfo::set_node_selection_score ( double  newScore)
inline

Sets the node selection score of the node.

Member Data Documentation

◆ _nodeSelectionScore

double babBase::BabNodeWithInfo::_nodeSelectionScore
private

The selection score assigned to this node can be used to decide which node to process next

◆ branchingInfo

BranchingHistoryInfo babBase::BabNodeWithInfo::branchingInfo

Object storing the branching history.

Currently no getter and setter for these, as a nontrivial implementation seems unlikely unless it changed the returned types

◆ node

BabNode babBase::BabNodeWithInfo::node

Not without info


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