#include <dreyfus_wagner.hpp>
Public Types | |
using | MT = data_structures::metric_traits< Metric > |
using | Vertex = typename MT::VertexType |
using | Dist = typename MT::DistanceType |
using | Edge = typename std::pair< Vertex, Vertex > |
using | TerminalsBitSet = typename std::bitset< TerminalsLimit > |
using | State = std::pair< Vertex, TerminalsBitSet > |
using | steiner_elements = std::unordered_set< Vertex, boost::hash< Vertex >> |
Public Member Functions | |
dreyfus_wagner (const Metric &cost_map, const Terminals &term, const NonTerminals &non_terminals) | |
void | solve (int start=0) |
Dist | get_cost () const |
const std::vector< Edge > & | get_edges () const |
const steiner_elements & | get_steiner_elements () const |
Implements Dreyfus-Wagner algorithm. The algorithm finds optimal Steiner Tree in exponential time, 3^k * n.
Definition at line 33 of file dreyfus_wagner.hpp.
|
inline |
Constructor used for solving Steiner Tree problem.
Definition at line 46 of file dreyfus_wagner.hpp.
|
inline |
Gets the optimal Steiner Tree cost.
Definition at line 78 of file dreyfus_wagner.hpp.
|
inline |
Gets edges belonging to optimal tree.
Definition at line 83 of file dreyfus_wagner.hpp.
|
inline |
Gets selected Steiner vertices.
Definition at line 88 of file dreyfus_wagner.hpp.
|
inline |
Finds optimal Steiner Tree.
start | Vertex to start the recurrence from. |
Definition at line 61 of file dreyfus_wagner.hpp.