All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
zelikovsky_11_per_6_example.cpp
Go to the documentation of this file.
1 //=======================================================================
2 // Copyright (c)
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See
5 // accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //=======================================================================
18 
19 #include "test/test_utils/sample_graph.hpp"
20 
21 #include <iostream>
22 
23 int main() {
24  // sample metric
25  typedef sample_graphs_metrics SGM;
26  auto gm = SGM::get_graph_metric_steiner();
27  typedef decltype(gm) Metric;
28 
29  // sample voronoi
32  typedef VT::GeneratorsSet GSet;
33  typedef VT::VerticesSet VSet;
34  voronoiT voronoi(GSet{ SGM::A, SGM::B, SGM::C, SGM::D }, VSet{ SGM::E },
35  gm);
36 
37  // run algorithm
38  std::vector<int> steiner_points;
40  gm, voronoi, std::back_inserter(steiner_points));
41 
42  // print result
43  std::cout << "Steiner points:" << std::endl;
44  boost::copy(steiner_points, std::ostream_iterator<int>(std::cout, "\n"));
45  return 0;
46 }
default VertexType is int.
void steiner_tree_zelikovsky11per6approximation(const Metric &m, const Voronoi &v, OutputIterator out)
11/6 approximation for steiner_tree problem
simple implementation of the Voronoi concept.
Definition: voronoi.hpp:42
int main()
[Steiner Tree Example]