/usr/include/boost/geometry/algorithms
NameSizeModeActions
detail/-0755rm
dispatch/-0755rm
append.hpp114930644editdlrm
area.hpp106570644editdlrm
assign.hpp107090644editdlrm
buffer.hpp86560644editdlrm
centroid.hpp196200644editdlrm
clear.hpp51560644editdlrm
comparable_distance.hpp11070644editdlrm
convert.hpp173270644editdlrm
convex_hull.hpp115890644editdlrm
correct.hpp99560644editdlrm
correct_closure.hpp58620644editdlrm
covered_by.hpp10770644editdlrm
crosses.hpp84780644editdlrm
densify.hpp124720644editdlrm
difference.hpp165910644editdlrm
discrete_frechet_distance.hpp78440644editdlrm
discrete_hausdorff_distance.hpp112810644editdlrm
disjoint.hpp11910644editdlrm
distance.hpp11100644editdlrm
envelope.hpp10210644editdlrm
equals.hpp11960644editdlrm
expand.hpp10730644editdlrm
for_each.hpp98310644editdlrm
intersection.hpp8060644editdlrm
intersects.hpp11450644editdlrm
is_convex.hpp65080644editdlrm
is_empty.hpp48530644editdlrm
is_simple.hpp5750644editdlrm
is_valid.hpp5700644editdlrm
length.hpp93410644editdlrm
line_interpolate.hpp130540644editdlrm
make.hpp51700644editdlrm
not_implemented.hpp38390644editdlrm
num_geometries.hpp35860644editdlrm
num_interior_rings.hpp37560644editdlrm
num_points.hpp55650644editdlrm
num_segments.hpp47750644editdlrm
overlaps.hpp10670644editdlrm
perimeter.hpp72120644editdlrm
point_on_surface.hpp132810644editdlrm
relate.hpp6420644editdlrm
relation.hpp6520644editdlrm
remove_spikes.hpp97530644editdlrm
reverse.hpp43860644editdlrm
simplify.hpp226960644editdlrm
sym_difference.hpp231690644editdlrm
touches.hpp11270644editdlrm
transform.hpp141050644editdlrm
union.hpp213830644editdlrm
unique.hpp46820644editdlrm
validity_failure_type.hpp36840644editdlrm
within.hpp10570644editdlrm
Edit: /usr/include/boost/geometry/algorithms/append.hpp (11493B)
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2008-2014 Bruno Lalande, Paris, France. // Copyright (c) 2009-2014 Mateusz Loskot, London, UK. // This file was modified by Oracle on 2014. // Modifications copyright (c) 2014, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_GEOMETRY_ALGORITHMS_APPEND_HPP #define BOOST_GEOMETRY_ALGORITHMS_APPEND_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace geometry { #ifndef DOXYGEN_NO_DETAIL namespace detail { namespace append { template struct append_no_action { static inline void apply(Geometry& , Point const& , int = 0, int = 0) { } }; template struct append_point { static inline void apply(Geometry& geometry, Point const& point, int = 0, int = 0) { typename geometry::point_type::type copy; geometry::detail::conversion::convert_point_to_point(point, copy); traits::push_back::apply(geometry, copy); } }; template struct append_range { typedef typename boost::range_value::type point_type; static inline void apply(Geometry& geometry, Range const& range, int = 0, int = 0) { for (typename boost::range_iterator::type it = boost::begin(range); it != boost::end(range); ++it) { append_point::apply(geometry, *it); } } }; template struct point_to_polygon { typedef typename ring_type::type ring_type; typedef typename ring_return_type::type exterior_ring_type; typedef typename interior_return_type::type interior_ring_range_type; static inline void apply(Polygon& polygon, Point const& point, int ring_index, int = 0) { if (ring_index == -1) { exterior_ring_type ext_ring = exterior_ring(polygon); append_point::apply( ext_ring, point); } else if (ring_index < int(num_interior_rings(polygon))) { interior_ring_range_type int_rings = interior_rings(polygon); append_point::apply( range::at(int_rings, ring_index), point); } } }; template struct range_to_polygon { typedef typename ring_type::type ring_type; typedef typename ring_return_type::type exterior_ring_type; typedef typename interior_return_type::type interior_ring_range_type; static inline void apply(Polygon& polygon, Range const& range, int ring_index, int = 0) { if (ring_index == -1) { exterior_ring_type ext_ring = exterior_ring(polygon); append_range::apply( ext_ring, range); } else if (ring_index < int(num_interior_rings(polygon))) { interior_ring_range_type int_rings = interior_rings(polygon); append_range::apply( range::at(int_rings, ring_index), range); } } }; }} // namespace detail::append #endif // DOXYGEN_NO_DETAIL #ifndef DOXYGEN_NO_DISPATCH namespace dispatch { namespace splitted_dispatch { template struct append_point : detail::append::append_no_action {}; template struct append_point : detail::append::append_point {}; template struct append_point : detail::append::append_point {}; template struct append_point : detail::append::point_to_polygon {}; template struct append_range : detail::append::append_no_action {}; template struct append_range : detail::append::append_range {}; template struct append_range : detail::append::append_range {}; template struct append_range : detail::append::range_to_polygon {}; } // namespace splitted_dispatch // Default: append a range (or linestring or ring or whatever) to any geometry template < typename Geometry, typename RangeOrPoint, typename TagRangeOrPoint = typename tag::type > struct append : splitted_dispatch::append_range::type, Geometry, RangeOrPoint> {}; // Specialization for point to append a point to any geometry template struct append : splitted_dispatch::append_point::type, Geometry, RangeOrPoint> {}; } // namespace dispatch #endif // DOXYGEN_NO_DISPATCH #ifndef DOXYGEN_NO_DETAIL namespace detail { namespace append { template struct append_to_multigeometry { static inline void apply(MultiGeometry& multigeometry, RangeOrPoint const& range_or_point, int ring_index, int multi_index) { dispatch::append < typename boost::range_value::type, RangeOrPoint >::apply(range::at(multigeometry, multi_index), range_or_point, ring_index); } }; }} // namespace detail::append #endif // DOXYGEN_NO_DETAIL #ifndef DOXYGEN_NO_DISPATCH namespace dispatch { namespace splitted_dispatch { template struct append_point : detail::append::append_point {}; template struct append_range : detail::append::append_range {}; template struct append_point : detail::append::append_to_multigeometry {}; template struct append_range : detail::append::append_to_multigeometry {}; template struct append_point : detail::append::append_to_multigeometry {}; template struct append_range : detail::append::append_to_multigeometry {}; } // namespace splitted_dispatch } // namespace dispatch #endif // DOXYGEN_NO_DISPATCH namespace resolve_variant { template struct append { template static inline void apply(Geometry& geometry, RangeOrPoint const& range_or_point, int ring_index, int multi_index) { concepts::check(); dispatch::append::apply(geometry, range_or_point, ring_index, multi_index); } }; template struct append > { template struct visitor: boost::static_visitor { RangeOrPoint const& m_range_or_point; int m_ring_index; int m_multi_index; visitor(RangeOrPoint const& range_or_point, int ring_index, int multi_index): m_range_or_point(range_or_point), m_ring_index(ring_index), m_multi_index(multi_index) {} template void operator()(Geometry& geometry) const { append::apply(geometry, m_range_or_point, m_ring_index, m_multi_index); } }; template static inline void apply(boost::variant& variant_geometry, RangeOrPoint const& range_or_point, int ring_index, int multi_index) { boost::apply_visitor( visitor( range_or_point, ring_index, multi_index ), variant_geometry ); } }; } // namespace resolve_variant; /*! \brief Appends one or more points to a linestring, ring, polygon, multi-geometry \ingroup append \tparam Geometry \tparam_geometry \tparam RangeOrPoint Either a range or a point, fullfilling Boost.Range concept or Boost.Geometry Point Concept \param geometry \param_geometry \param range_or_point The point or range to add \param ring_index The index of the ring in case of a polygon: exterior ring (-1, the default) or interior ring index \param multi_index The index of the geometry to which the points are appended \qbk{[include reference/algorithms/append.qbk]} } */ template inline void append(Geometry& geometry, RangeOrPoint const& range_or_point, int ring_index = -1, int multi_index = 0) { resolve_variant::append ::apply(geometry, range_or_point, ring_index, multi_index); } }} // namespace boost::geometry #endif // BOOST_GEOMETRY_ALGORITHMS_APPEND_HPP