idol
A C++ Framework for Optimization
Loading...
Searching...
No Matches
NodeSelectionRule.h
1//
2// Created by henri on 21/03/23.
3//
4
5#ifndef IDOL_NODESELECTIONRULE_H
6#define IDOL_NODESELECTIONRULE_H
7
8#include "idol/mixed-integer/optimizers/branch-and-bound/nodes/Node.h"
9#include "idol/mixed-integer/optimizers/branch-and-bound/nodes/NodeSet.h"
10
11namespace idol {
12 namespace Optimizers {
13 template<class NodeInfoT>
14 class BranchAndBound;
15 }
16
17 template<class NodeInfoT> class NodeSelectionRule;
18}
19
20template<class NodeInfoT>
23public:
24 explicit NodeSelectionRule(Optimizers::BranchAndBound<NodeInfoT>& t_parent) : m_parent(&t_parent) {}
25
26 virtual ~NodeSelectionRule() = default;
27
28 virtual typename NodeSet<Node<NodeInfoT>>::const_iterator operator()(const NodeSet<Node<NodeInfoT>>& t_active_nodes) = 0;
29
30 Optimizers::BranchAndBound<NodeInfoT>& parent() { return *m_parent; }
31
32 const Optimizers::BranchAndBound<NodeInfoT>& parent() const { return *m_parent; }
33};
34
35#endif //IDOL_NODESELECTIONRULE_H