File indexing completed on 2025-01-18 09:35:07
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_COMPLEMENT_GRAPH_HPP
0013 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_COMPLEMENT_GRAPH_HPP
0014
0015 #ifdef BOOST_GEOMETRY_TEST_DEBUG
0016 #include <iostream>
0017 #endif
0018
0019 #include <boost/geometry/algorithms/detail/is_valid/complement_graph.hpp>
0020
0021 namespace boost { namespace geometry
0022 {
0023
0024 namespace detail { namespace is_valid
0025 {
0026
0027
0028 #ifdef BOOST_GEOMETRY_TEST_DEBUG
0029 template <typename OutputStream, typename TurnPoint, typename Strategy>
0030 inline void
0031 debug_print_complement_graph(OutputStream& os,
0032 complement_graph<TurnPoint, Strategy> const& graph)
0033 {
0034 typedef typename complement_graph<TurnPoint, Strategy>::vertex_handle vertex_handle;
0035
0036 os << "num rings: " << graph.m_num_rings << std::endl;
0037 os << "vertex ids: {";
0038 for (vertex_handle it = graph.m_vertices.begin();
0039 it != graph.m_vertices.end(); ++it)
0040 {
0041 os << " " << it->id();
0042 }
0043 os << " }" << std::endl;
0044
0045 for (vertex_handle it = graph.m_vertices.begin();
0046 it != graph.m_vertices.end(); ++it)
0047 {
0048 os << "neighbors of " << it->id() << ": {";
0049 for (typename complement_graph
0050 <
0051 TurnPoint, Strategy
0052 >::neighbor_container::const_iterator
0053 nit = graph.m_neighbors[it->id()].begin();
0054 nit != graph.m_neighbors[it->id()].end(); ++nit)
0055 {
0056 os << " " << (*nit)->id();
0057 }
0058 os << "}" << std::endl;
0059 }
0060 }
0061 #else
0062 template <typename OutputStream, typename TurnPoint, typename Strategy>
0063 inline void debug_print_complement_graph(OutputStream&,
0064 complement_graph<TurnPoint, Strategy> const&)
0065 {
0066 }
0067 #endif
0068
0069
0070 }}
0071
0072 }}
0073
0074 #endif