Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:35:07

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2014-2023, Oracle and/or its affiliates.
0004 
0005 // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
0006 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
0007 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0008 
0009 // Licensed under the Boost Software License version 1.0.
0010 // http://www.boost.org/users/license.html
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 }} // namespace detail::is_valid
0071 
0072 }} // namespace boost::geometry
0073 
0074 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_COMPLEMENT_GRAPH_HPP