Minotaur 0.4.1
Docs for developers
Public Member Functions | List of all members
Minotaur::ActiveNodeStore Class Referenceabstract

Save and retrieve active nodes. More...

#include <ActiveNodeStore.h>

Inheritance diagram for Minotaur::ActiveNodeStore:
Inheritance graph
[legend]

Public Member Functions

 ActiveNodeStore ()
 Default Constructor.
 
virtual ~ActiveNodeStore ()
 Destroy.
 
virtual double getBestLB () const =0
 Find the minimum lower bound of all the active nodes. More...
 
virtual UInt getDeepestLevel () const =0
 Find the maximum depth of all active nodes. More...
 
virtual size_t getSize () const =0
 Get the number of active nodes. More...
 
virtual bool isEmpty () const =0
 Check if there are any active nodes left. More...
 
virtual void pop ()=0
 Remove the best node from the store. More...
 
virtual void push (NodePtr n)=0
 Add a node to the set of active nodes. More...
 
virtual NodePtr top () const =0
 Access to the best candidate for evaluating next. More...
 
virtual void write (std::ostream &out) const =0
 Display the active nodes. More...
 

Detailed Description

Save and retrieve active nodes.

Nodes that have not been processed yet by the branch-and-bound algorithm are called active nodes. This base class is used to store them in a suitable data structure (stack or heap).

Member Function Documentation

◆ getBestLB()

virtual double Minotaur::ActiveNodeStore::getBestLB ( ) const
pure virtual

Find the minimum lower bound of all the active nodes.

Implemented in Minotaur::NodeHeap, and Minotaur::NodeStack.

◆ getDeepestLevel()

virtual UInt Minotaur::ActiveNodeStore::getDeepestLevel ( ) const
pure virtual

Find the maximum depth of all active nodes.

Implemented in Minotaur::NodeHeap, and Minotaur::NodeStack.

◆ getSize()

virtual size_t Minotaur::ActiveNodeStore::getSize ( ) const
pure virtual

Get the number of active nodes.

Implemented in Minotaur::NodeHeap, and Minotaur::NodeStack.

◆ isEmpty()

virtual bool Minotaur::ActiveNodeStore::isEmpty ( ) const
pure virtual

Check if there are any active nodes left.

Returns
true if there are no active nodes in the heap, otherwise return false.

Implemented in Minotaur::NodeHeap, and Minotaur::NodeStack.

◆ pop()

virtual void Minotaur::ActiveNodeStore::pop ( )
pure virtual

Remove the best node from the store.

Implemented in Minotaur::NodeHeap, and Minotaur::NodeStack.

◆ push()

virtual void Minotaur::ActiveNodeStore::push ( NodePtr  n)
pure virtual

Add a node to the set of active nodes.

Parameters
[in]nPointer to node to be added.

Implemented in Minotaur::NodeHeap, and Minotaur::NodeStack.

◆ top()

virtual NodePtr Minotaur::ActiveNodeStore::top ( ) const
pure virtual

Access to the best candidate for evaluating next.

Does not remove the best candidate from the storage. It just returns a pointer to it. Use pop() to remove the candidate.

Returns
pointer to the best candidate node.

Implemented in Minotaur::NodeHeap, and Minotaur::NodeStack.

◆ write()

virtual void Minotaur::ActiveNodeStore::write ( std::ostream &  out) const
pure virtual

Display the active nodes.

Write in order the node IDs and the criteria used to order the nodes, e.g. bound value and depth.

Parameters
[in]outoutput stream to write to.

Implemented in Minotaur::NodeHeap, and Minotaur::NodeStack.


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

Minotaur source code documented by Doxygen 1.9.4 on Thu Apr 24 2025