]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/geometry/algorithms/detail/is_valid/debug_complement_graph.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / geometry / algorithms / detail / is_valid / debug_complement_graph.hpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2
92f5a8d4 3// Copyright (c) 2014, 2018, 2019, Oracle and/or its affiliates.
7c673cae
FG
4
5// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
92f5a8d4 6// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
7c673cae
FG
7
8// Licensed under the Boost Software License version 1.0.
9// http://www.boost.org/users/license.html
10
11#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_COMPLEMENT_GRAPH_HPP
12#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_COMPLEMENT_GRAPH_HPP
13
14#ifdef BOOST_GEOMETRY_TEST_DEBUG
15#include <iostream>
16#endif
17
92f5a8d4
TL
18#include <boost/geometry/algorithms/detail/is_valid/complement_graph.hpp>
19
7c673cae
FG
20namespace boost { namespace geometry
21{
22
23namespace detail { namespace is_valid
24{
25
26
27#ifdef BOOST_GEOMETRY_TEST_DEBUG
92f5a8d4 28template <typename OutputStream, typename TurnPoint, typename CSTag>
7c673cae
FG
29inline void
30debug_print_complement_graph(OutputStream& os,
92f5a8d4 31 complement_graph<TurnPoint, CSTag> const& graph)
7c673cae
FG
32{
33 typedef typename complement_graph<TurnPoint>::vertex_handle vertex_handle;
34
35 os << "num rings: " << graph.m_num_rings << std::endl;
36 os << "vertex ids: {";
37 for (vertex_handle it = graph.m_vertices.begin();
38 it != graph.m_vertices.end(); ++it)
39 {
40 os << " " << it->id();
41 }
42 os << " }" << std::endl;
43
44 for (vertex_handle it = graph.m_vertices.begin();
45 it != graph.m_vertices.end(); ++it)
46 {
47 os << "neighbors of " << it->id() << ": {";
48 for (typename complement_graph
49 <
50 TurnPoint
51 >::neighbor_container::const_iterator
52 nit = graph.m_neighbors[it->id()].begin();
53 nit != graph.m_neighbors[it->id()].end(); ++nit)
54 {
55 os << " " << (*nit)->id();
56 }
57 os << "}" << std::endl;
58 }
59}
60#else
92f5a8d4 61template <typename OutputStream, typename TurnPoint, typename CSTag>
7c673cae 62inline void debug_print_complement_graph(OutputStream&,
92f5a8d4 63 complement_graph<TurnPoint, CSTag> const&)
7c673cae
FG
64{
65}
66#endif
67
68
69}} // namespace detail::is_valid
70
71}} // namespace boost::geometry
72
73#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_COMPLEMENT_GRAPH_HPP