Change condition on FT/Kernel for hash functions

This commit is contained in:
Simon Giraudot 2019-06-05 10:50:08 +02:00
parent 070a26a5b7
commit 72ea50ae77
15 changed files with 28 additions and 27 deletions

View File

@ -34,7 +34,7 @@ translation vector \f$ (v_0,\,v_1,\,1)\f$ appears in the last column of the
matrix. The entries \f$ m_{20}\f$ and \f$ m_{21}\f$ are always zero and
therefore do not appear in the constructors.
\cgalModels `Hashable` if `Kernel::FT` is a floating-point number
\cgalModels `Hashable` if `Kernel` is a cartesian kernel and if `Kernel::FT` is `Hashable`
\sa `Identity_transformation`
\sa `Rotation`

View File

@ -29,7 +29,7 @@ In three-dimensional space we have a \f$ 4\times 4\f$ matrix
\f$ m_{32}\f$ are always zero and therefore do not appear in the
constructors.
\cgalModels `Hashable` if `Kernel::FT` is a floating-point number
\cgalModels `Hashable` if `Kernel` is a cartesian kernel and if `Kernel::FT` is `Hashable`
\sa `CGAL::Aff_transformation_2<Kernel>`
\sa `CGAL::Identity_transformation`

View File

@ -12,7 +12,7 @@ splits \f$ \E^2\f$ into a bounded and an unbounded side. Note that the
circle can be degenerated, i.e.\ the squared radius may be zero.
\cgalModels `Kernel::Circle_2`
\cgalModels `Hashable` if `Kernel::FT` is a floating-point number
\cgalModels `Hashable` if `Kernel` is a cartesian kernel and if `Kernel::FT` is `Hashable`
*/
template< typename Kernel >

View File

@ -17,7 +17,7 @@ whereas the coordinate type of an iso-oriented cuboid is chosen by
the user.
\cgalModels `Kernel::IsoCuboid_3`
\cgalModels `Hashable` if `Kernel::FT` is a floating-point number
\cgalModels `Hashable` if `Kernel` is a cartesian kernel and if `Kernel::FT` is `Hashable`
*/
template< typename Kernel >

View File

@ -18,7 +18,7 @@ whereas the coordinate type of an iso-oriented rectangle is chosen by
the user.
\cgalModels `Kernel::IsoRectangle_2`
\cgalModels `Hashable` if `Kernel::FT` is a floating-point number
\cgalModels `Hashable` if `Kernel` is a cartesian kernel and if `Kernel::FT` is `Hashable`
*/
template< typename Kernel >

View File

@ -31,7 +31,7 @@ std::cout << p.x() << " " << p.y() << std::endl;
\endcode
\cgalModels `Kernel::Point_2`
\cgalModels `Hashable` if `Kernel::FT` is a floating-point number
\cgalModels `Hashable` if `Kernel` is a cartesian kernel and if `Kernel::FT` is `Hashable`
*/
template< typename Kernel >

View File

@ -17,7 +17,7 @@ to `NT`, and `Kernel::FT` is equal to `Quotient<NT>`.
The following operations can be applied on points:
\cgalModels `Kernel::Point_3`
\cgalModels `Hashable` if `Kernel::FT` is a floating-point number
\cgalModels `Hashable` if `Kernel` is a cartesian kernel and if `Kernel::FT` is `Hashable`
*/
template< typename Kernel >

View File

@ -15,7 +15,7 @@ perform a square root operation which is not defined for all
number types, which is expensive, and may not be exact.
\cgalModels `Kernel::Segment_2`
\cgalModels `Hashable` if `Kernel::FT` is a floating-point number
\cgalModels `Hashable` if `Kernel` is a cartesian kernel and if `Kernel::FT` is `Hashable`
*/
template< typename Kernel >

View File

@ -15,7 +15,7 @@ perform a square root operation which is not defined for all
number types, which is expensive, and may not be exact.
\cgalModels `Kernel::Segment_3`
\cgalModels `Hashable` if `Kernel::FT` is a floating-point number
\cgalModels `Hashable` if `Kernel` is a cartesian kernel and if `Kernel::FT` is `Hashable`
*/
template< typename Kernel >

View File

@ -12,6 +12,7 @@ splits \f$ \E^3\f$ into a bounded and an unbounded side. Note that the
sphere can be degenerated, i.e.\ the squared radius may be zero.
\cgalModels `Kernel::Sphere_3`
\cgalModels `Hashable` if `Kernel` is a cartesian kernel and if `Kernel::FT` is `Hashable`
*/
template< typename Kernel >

View File

@ -13,7 +13,7 @@ will explicitly state where you can pass this constant as an argument
instead of a vector initialized with zeros.
\cgalModels `Kernel::Vector_2`
\cgalModels `Hashable` if `Kernel::FT` is a floating-point number
\cgalModels `Hashable` if `Kernel` is a cartesian kernel and if `Kernel::FT` is `Hashable`
*/
template< typename Kernel >

View File

@ -13,7 +13,7 @@ will explicitly state where you can pass this constant as an argument
instead of a vector initialized with zeros.
\cgalModels `Kernel::Vector_3`
\cgalModels `Hashable` if `Kernel::FT` is a floating-point number
\cgalModels `Hashable` if `Kernel` is a cartesian kernel and if `Kernel::FT` is `Hashable`
\sa `cross_product_grp`
\sa `determinant_grp`

View File

@ -14,7 +14,7 @@ to `NT`, and `Kernel::FT` is equal to `Quotient<NT>`.
\sa `Point_2<Kernel>`
\cgalModels `Kernel::WeightedPoint_2`
\cgalModels `Hashable` if `Kernel::FT` is a floating-point number
\cgalModels `Hashable` if `Kernel` is a cartesian kernel and if `Kernel::FT` is `Hashable`
*/
template< typename Kernel >

View File

@ -14,7 +14,7 @@ to `NT`, and `Kernel::FT` is equal to `Quotient<NT>`.
\sa `Point_3<Kernel>`
\cgalModels `Kernel::WeightedPoint_3`
\cgalModels `Hashable` if `Kernel::FT` is a floating-point number
\cgalModels `Hashable` if `Kernel` is a cartesian kernel and if `Kernel::FT` is `Hashable`
*/
template< typename Kernel >

View File

@ -31,7 +31,7 @@ namespace CGAL
using boost::hash_value;
template <typename K>
inline std::enable_if_t<std::is_floating_point<typename K::FT>::value, std::size_t>
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
hash_value (const Aff_transformation_2<K>& transform)
{
std::size_t result = hash_value(transform.cartesian(0,0));
@ -53,7 +53,7 @@ hash_value (const Bbox_2& bbox)
}
template <typename K>
inline std::enable_if_t<std::is_floating_point<typename K::FT>::value, std::size_t>
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
hash_value (const Circle_2<K>& circle)
{
std::size_t result = hash_value(circle.center());
@ -63,7 +63,7 @@ hash_value (const Circle_2<K>& circle)
}
template <typename K>
inline std::enable_if_t<std::is_floating_point<typename K::FT>::value, std::size_t>
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
hash_value (const Iso_rectangle_2<K>& iso_rectangle)
{
std::size_t result = hash_value(iso_rectangle.min());
@ -72,7 +72,7 @@ hash_value (const Iso_rectangle_2<K>& iso_rectangle)
}
template <typename K>
inline std::enable_if_t<std::is_floating_point<typename K::FT>::value, std::size_t>
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
hash_value (const Point_2<K>& point)
{
std::size_t result = hash_value(point.x());
@ -81,7 +81,7 @@ hash_value (const Point_2<K>& point)
}
template <typename K>
inline std::enable_if_t<std::is_floating_point<typename K::FT>::value, std::size_t>
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
hash_value (const Segment_2<K>& segment)
{
std::size_t result = hash_value(segment.source());
@ -90,7 +90,7 @@ hash_value (const Segment_2<K>& segment)
}
template <typename K>
inline std::enable_if_t<std::is_floating_point<typename K::FT>::value, std::size_t>
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
hash_value (const Vector_2<K>& vector)
{
std::size_t result = hash_value(vector.x());
@ -99,7 +99,7 @@ hash_value (const Vector_2<K>& vector)
}
template <typename K>
inline std::enable_if_t<std::is_floating_point<typename K::FT>::value, std::size_t>
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
hash_value (const Weighted_point_2<K>& weighed_point)
{
std::size_t result = hash_value(weighed_point.point());
@ -108,7 +108,7 @@ hash_value (const Weighted_point_2<K>& weighed_point)
}
template <typename K>
inline std::enable_if_t<std::is_floating_point<typename K::FT>::value, std::size_t>
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
hash_value (const Aff_transformation_3<K>& transform)
{
std::size_t result = hash_value(transform.cartesian(0,0));
@ -132,7 +132,7 @@ hash_value (const Bbox_3& bbox)
}
template <typename K>
inline std::enable_if_t<std::is_floating_point<typename K::FT>::value, std::size_t>
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
hash_value (const Iso_cuboid_3<K>& iso_cuboid)
{
std::size_t result = hash_value(iso_cuboid.min());
@ -141,7 +141,7 @@ hash_value (const Iso_cuboid_3<K>& iso_cuboid)
}
template <typename K>
inline std::enable_if_t<std::is_floating_point<typename K::FT>::value, std::size_t>
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
hash_value (const Point_3<K>& point)
{
std::size_t result = hash_value(point.x());
@ -151,7 +151,7 @@ hash_value (const Point_3<K>& point)
}
template <typename K>
inline std::enable_if_t<std::is_floating_point<typename K::FT>::value, std::size_t>
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
hash_value (const Segment_3<K>& segment)
{
std::size_t result = hash_value(segment.source());
@ -160,7 +160,7 @@ hash_value (const Segment_3<K>& segment)
}
template <typename K>
inline std::enable_if_t<std::is_floating_point<typename K::FT>::value, std::size_t>
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
hash_value (const Sphere_3<K>& sphere)
{
std::size_t result = hash_value(sphere.center());
@ -170,7 +170,7 @@ hash_value (const Sphere_3<K>& sphere)
}
template <typename K>
inline std::enable_if_t<std::is_floating_point<typename K::FT>::value, std::size_t>
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
hash_value (const Vector_3<K>& vector)
{
std::size_t result = hash_value(vector.x());
@ -180,7 +180,7 @@ hash_value (const Vector_3<K>& vector)
}
template <typename K>
inline std::enable_if_t<std::is_floating_point<typename K::FT>::value, std::size_t>
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
hash_value (const Weighted_point_3<K>& weighed_point)
{
std::size_t result = hash_value(weighed_point.point());