1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2014, Oracle and/or its affiliates.
5 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
7 // Licensed under the Boost Software License version 1.0.
8 // http://www.boost.org/users/license.html
10 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_COMPLEMENT_GRAPH_HPP
11 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_COMPLEMENT_GRAPH_HPP
13 #ifdef BOOST_GEOMETRY_TEST_DEBUG
17 namespace boost { namespace geometry
20 namespace detail { namespace is_valid
24 #ifdef BOOST_GEOMETRY_TEST_DEBUG
25 template <typename OutputStream, typename TurnPoint>
27 debug_print_complement_graph(OutputStream& os,
28 complement_graph<TurnPoint> const& graph)
30 typedef typename complement_graph<TurnPoint>::vertex_handle vertex_handle;
32 os << "num rings: " << graph.m_num_rings << std::endl;
33 os << "vertex ids: {";
34 for (vertex_handle it = graph.m_vertices.begin();
35 it != graph.m_vertices.end(); ++it)
37 os << " " << it->id();
39 os << " }" << std::endl;
41 for (vertex_handle it = graph.m_vertices.begin();
42 it != graph.m_vertices.end(); ++it)
44 os << "neighbors of " << it->id() << ": {";
45 for (typename complement_graph
48 >::neighbor_container::const_iterator
49 nit = graph.m_neighbors[it->id()].begin();
50 nit != graph.m_neighbors[it->id()].end(); ++nit)
52 os << " " << (*nit)->id();
54 os << "}" << std::endl;
58 template <typename OutputStream, typename TurnPoint>
59 inline void debug_print_complement_graph(OutputStream&,
60 complement_graph<TurnPoint> const&)
66 }} // namespace detail::is_valid
68 }} // namespace boost::geometry
70 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_COMPLEMENT_GRAPH_HPP