![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/include/boost/geometry/policies/robustness/ |
Upload File : |
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2013 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2013 Bruno Lalande, Paris, France. // Copyright (c) 2013 Mateusz Loskot, London, UK. // Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland. // 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_POLICIES_ROBUSTNESS_NO_RESCALE_POLICY_HPP #define BOOST_GEOMETRY_POLICIES_ROBUSTNESS_NO_RESCALE_POLICY_HPP #include <stddef.h> #include <boost/geometry/core/coordinate_type.hpp> #include <boost/geometry/policies/robustness/robust_point_type.hpp> #include <boost/geometry/policies/robustness/segment_ratio.hpp> #include <boost/geometry/policies/robustness/segment_ratio_type.hpp> namespace boost { namespace geometry { #ifndef DOXYGEN_NO_DETAIL namespace detail { // Probably this will be moved out of namespace detail struct no_rescale_policy { static bool const enabled = false; // We don't rescale but return the reference of the input template <std::size_t Dimension, typename Value> inline Value const& apply(Value const& value) const { return value; } }; } // namespace detail #endif // Implement meta-functions for this policy template <typename Point> struct robust_point_type<Point, detail::no_rescale_policy> { // The point itself typedef Point type; }; template <typename Point> struct segment_ratio_type<Point, detail::no_rescale_policy> { // Define a segment_ratio defined on coordinate type, e.g. // int/int or float/float typedef typename geometry::coordinate_type<Point>::type coordinate_type; typedef segment_ratio<coordinate_type> type; }; }} // namespace boost::geometry #endif // BOOST_GEOMETRY_POLICIES_ROBUSTNESS_NO_RESCALE_POLICY_HPP