idol
A C++ Framework for Optimization
Loading...
Searching...
No Matches
DepthFirst.h
1
//
2
// Created by henri on 21/03/23.
3
//
4
5
#ifndef IDOL_DEPTHFIRST_IMPL_H
6
#define IDOL_DEPTHFIRST_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
DepthFirst;
13
}
14
15
template
<
class
NodeT>
16
class
idol::NodeSelectionRules::DepthFirst
:
public
NodeSelectionRule
<NodeT> {
17
public
:
18
explicit
DepthFirst
(
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().end();
22
}
23
};
24
25
#endif
//IDOL_DEPTHFIRST_IMPL_H
idol::NodeSelectionRule
Definition
NodeSelectionRule.h:21
idol::NodeSelectionRules::DepthFirst
Definition
DepthFirst.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
DepthFirst.h
Generated by
1.9.8