-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[util] move bounds to geometry::util
- Loading branch information
1 parent
88d0076
commit 2dc235b
Showing
14 changed files
with
214 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Boost.Geometry | ||
|
||
// Copyright (c) 2024 Barend Gehrels, 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_UTIL_BOUNDS_HPP | ||
#define BOOST_GEOMETRY_UTIL_BOUNDS_HPP | ||
|
||
#include <boost/numeric/conversion/bounds.hpp> | ||
|
||
namespace boost { namespace geometry { namespace util | ||
{ | ||
|
||
// Define a boost::geometry::util::bounds | ||
// It might be specialized for other numeric types, for example Boost.Rational | ||
template<class CT> | ||
struct bounds | ||
{ | ||
static CT lowest () { return boost::numeric::bounds<CT>::lowest(); } | ||
static CT highest () { return boost::numeric::bounds<CT>::highest(); } | ||
}; | ||
|
||
}}} // namespace boost::geometry::util | ||
|
||
#endif // BOOST_GEOMETRY_UTIL_BOUNDS_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,3 +48,4 @@ if (NOT TARGET tests) | |
endif() | ||
|
||
add_subdirectory(algorithms) | ||
add_subdirectory(util) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Boost.Geometry | ||
# Copyright (c) 2024 Barend Gehrels, 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) | ||
|
||
foreach(item IN ITEMS | ||
envelope | ||
envelope_multi | ||
expand | ||
expand_on_spheroid | ||
) | ||
boost_geometry_add_unit_test("algorithms" ${item}) | ||
endforeach() | ||
|
||
if (NOT APPLE) | ||
# The results of these tests vary considerably on Apple/Darwin/arm64 using clang | ||
foreach(item IN ITEMS | ||
envelope_on_spheroid | ||
) | ||
boost_geometry_add_unit_test("algorithms" ${item}) | ||
endforeach() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Boost.Geometry | ||
# Copyright (c) 2024 Barend Gehrels, 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) | ||
|
||
foreach(item IN ITEMS | ||
algorithm | ||
calculation_type | ||
for_each_coordinate | ||
math_abs | ||
math_divide | ||
math_equals | ||
math_sqrt | ||
math_normalize_spheroidal | ||
promote_integral | ||
range | ||
rational | ||
select_most_precise | ||
tuples | ||
write_dsv | ||
) | ||
boost_geometry_add_unit_test("util" ${item}) | ||
endforeach() |
Oops, something went wrong.