idol
A C++ Framework for Optimization
Loading...
Searching...
No Matches
BreadthFirst.h
1
//
2
// Created by henri on 22/03/23.
3
//
4
5
#ifndef IDOL_BREADTHFIRST_IMPL_H
6
#define IDOL_BREADTHFIRST_IMPL_H
7
8
#include "NodeSelectionRule.h"
9
#include "idol/mixed-integer/optimizers/branch-and-bound/nodes/NodeSet.h"
10
11
namespace
idol::NodeSelectionRules {
12
template
<
class
NodeT>
class
BreadthFirst;
13
}
14
15
template
<
class
NodeT>
16
class
idol::NodeSelectionRules::BreadthFirst
:
public
NodeSelectionRule
<NodeT> {
17
public
:
18
explicit
BreadthFirst
(
Optimizers::BranchAndBound<NodeT>
& t_parent) :
NodeSelectionRule<NodeT>
(t_parent) {}
19
20
typename
NodeSet<Node<NodeT>
>::const_iterator operator()(
const
NodeSet
<
Node<NodeT>
>& t_active_nodes)
override
{
21
return
t_active_nodes.by_level().begin();
22
}
23
};
24
25
#endif
//IDOL_BREADTHFIRST_IMPL_H
idol::NodeSelectionRule
Definition
NodeSelectionRule.h:21
idol::NodeSelectionRules::BreadthFirst
Definition
BreadthFirst.h:16
idol::NodeSet
Definition
NodeSet.h:17
idol::Node
Definition
Node.h:16
idol::Optimizers::BranchAndBound
Definition
Optimizers_BranchAndBound.h:30
lib
include
idol
mixed-integer
optimizers
branch-and-bound
node-selection-rules
impls
BreadthFirst.h
Generated by
1.9.8