/usr/include/boost/geometry/index/detail/algorithms
Edit: /usr/include/boost/geometry/index/detail/algorithms/bounds.hpp (6457B)
// Boost.Geometry Index
//
// n-dimensional bounds
//
// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
//
// This file was modified by Oracle on 2019.
// Modifications copyright (c) 2019 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
//
// 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_INDEX_DETAIL_ALGORITHMS_BOUNDS_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_BOUNDS_HPP
#include
namespace boost { namespace geometry { namespace index { namespace detail
{
namespace dispatch
{
template ::type,
typename TagBounds = typename geometry::tag::type>
struct bounds
{
template
static inline void apply(Geometry const& g, Bounds & b, Strategy const& )
{
geometry::convert(g, b);
}
};
template
struct bounds
{
template
static inline void apply(Geometry const& g, Bounds & b, Strategy const& s)
{
index::detail::bounded_view v(g, s);
geometry::convert(v, b);
}
};
} // namespace dispatch
template
inline void bounds(Geometry const& g, Bounds & b, Strategy const& s)
{
concepts::check_concepts_and_equal_dimensions();
dispatch::bounds::apply(g, b, s);
}
namespace dispatch
{
template ::type,
typename TagGeometry = typename geometry::tag::type>
struct expand
{
// STATIC ASSERT
};
template
struct expand
{
static inline void apply(Bounds & b, Geometry const& g)
{
geometry::expand(b, g);
}
template
static inline void apply(Bounds & b, Geometry const& g, Strategy const& )
{
geometry::expand(b, g, typename Strategy::expand_point_strategy_type());
}
};
template
struct expand
{
static inline void apply(Bounds & b, Geometry const& g)
{
geometry::expand(b, g);
}
template
static inline void apply(Bounds & b, Geometry const& g, Strategy const& )
{
geometry::expand(b, g, typename Strategy::expand_box_strategy_type());
}
};
template
struct expand
{
static inline void apply(Bounds & b, Geometry const& g)
{
geometry::expand(b, g);
}
template
static inline void apply(Bounds & b, Geometry const& g, Strategy const& s)
{
index::detail::bounded_view v(g, s);
geometry::expand(b, v, typename Strategy::expand_box_strategy_type());
}
};
} // namespace dispatch
template
inline void expand(Bounds & b, Geometry const& g, Strategy const& s)
{
dispatch::expand::apply(b, g, s);
}
template
inline void expand(Bounds & b, Geometry const& g, default_strategy const& )
{
dispatch::expand::apply(b, g);
}
namespace dispatch
{
template ::type,
typename TagBounds = typename geometry::tag::type>
struct covered_by_bounds
{};
template
struct covered_by_bounds
{
static inline bool apply(Geometry const& g, Bounds & b)
{
return geometry::covered_by(g, b);
}
template
static inline bool apply(Geometry const& g, Bounds & b, Strategy const&)
{
return geometry::covered_by(g, b, typename Strategy::covered_by_point_box_strategy_type());
}
};
template
struct covered_by_bounds
{
static inline bool apply(Geometry const& g, Bounds & b)
{
return geometry::covered_by(g, b);
}
template
static inline bool apply(Geometry const& g, Bounds & b, Strategy const&)
{
return geometry::covered_by(g, b, typename Strategy::covered_by_box_box_strategy_type());
}
};
template
struct covered_by_bounds
{
static inline bool apply(Geometry const& g, Bounds & b)
{
typedef typename point_type::type point_type;
typedef geometry::model::box bounds_type;
typedef index::detail::bounded_view view_type;
return geometry::covered_by(view_type(g, default_strategy()), b);
}
template
static inline bool apply(Geometry const& g, Bounds & b, Strategy const& strategy)
{
typedef typename point_type::type point_type;
typedef geometry::model::box bounds_type;
typedef index::detail::bounded_view view_type;
return geometry::covered_by(view_type(g, strategy), b,
typename Strategy::covered_by_box_box_strategy_type());
}
};
} // namespace dispatch
template
inline bool covered_by_bounds(Geometry const& g, Bounds & b, Strategy const& s)
{
return dispatch::covered_by_bounds::apply(g, b, s);
}
template
inline bool covered_by_bounds(Geometry const& g, Bounds & b, default_strategy const& )
{
return dispatch::covered_by_bounds::apply(g, b);
}
}}}} // namespace boost::geometry::index::detail
#endif // BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_BOUNDS_HPP