Class represents k-components of Steiner Tree. Component is a subtree whose terminals coincide with leaves. More...
#include <steiner_component.hpp>
Public Types | |
using | Edge = typename std::pair< Vertex, Vertex > |
using | Vertices = typename std::vector< Vertex > |
Public Member Functions | |
template<typename Metric , typename Terminals > | |
steiner_component (const Metric &cost_map, Vertices terminals, const Terminals &steiner_vertices) | |
constructor | |
Vertex | get_sink (int version) const |
Each component has versions, where sink is chosen from its terminals. | |
const Vertices & | get_terminals () const |
const Vertices & | get_steiner_elements () const |
const std::vector< Edge > & | get_edges () const |
int | count_terminals () const |
Dist | get_cost () const |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const steiner_component &component) |
Class represents k-components of Steiner Tree. Component is a subtree whose terminals coincide with leaves.
Definition at line 38 of file steiner_component.hpp.
|
inline |
Returns degree of component, i.e. number of terminals.
Definition at line 104 of file steiner_component.hpp.
|
inline |
Returns minimal cost of spanning a component.
Definition at line 109 of file steiner_component.hpp.
|
inline |
Returns edges spanning the component.
Definition at line 99 of file steiner_component.hpp.
|
inline |
Returns vector composed of component's nonterminals, i.e. Steiner elements.
Definition at line 92 of file steiner_component.hpp.
|
inline |
Returns vector composed of component's terminals.
Definition at line 86 of file steiner_component.hpp.
|
friend |
Prints the component.
Definition at line 114 of file steiner_component.hpp.