mirror of https://github.com/CGAL/cgal
This commit introduces a new kind of predicate in
`<CGAL/Kernel/interface_macros.h>`. In addition to
- `CGAL_kernel_pred` for predicates,
- `CGAL_Kernel_pred_RT` for predicates that can be implemented using a
ring-type,
now there is also:
- `CGAL_Kernel_pred_RT_or_FT` for predicates with multiple overloads of
`operator()`, some needing a field type and other needing a ring type
(without the division operator).
The C++ code can discriminate between the two cases with a special wrapper
for the return type: `CGAL::Needs_FT<result_type` instead of `result_type`
(defined in `<CGAL/tags.h>`.
In `<CGAL/Filtered_predicate.h>`, in addition to the usual class template
`Filtered_predicate`, there is now also `Filtered_predicate_RT_FT` that
takes three predicates as template parameters instead of two:
- the exact predicate with an ring-type,
- the exact predicate with a field-type,
- the approximate predicate (with `Interval_nt` as number-type).
For the moment, only `Compare_distance_3` in
`<CGAL/Cartesian/function_objects.h>` is using the new
`Filtered_predicate_RT_FT`.
Before this commit, the file
`Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h` was testing
`Compare_distance_3` only with three points or for points. This commit adds:
- a test with `Point_3, Point_3, Segment_3`, and
- a test with `Line_3, Point_3, Point_3`, that actually needs a field type
with its current implementation.
In the test `Kernel_23/test/Kernel_23/Filtered_cartesian.cpp`, the macro
`CGAL_NO_MPZF_DIVISION_OPERATOR` is defined, to remove the division operator
from `CGAL::Mpzf`. `CGAL::Mpzf` is a ring-type, even with its `operator/`
(because that `operator/` can only compute exact divisions), but with
`CGAL_NO_MPZF_DIVISION_OPERATOR` defined, that is now checked by the compiler.
|
||
|---|---|---|
| .. | ||
| Help | ||
| config | ||
| CGALConfigVersion_binary_header_only.cmake.in | ||
| CGALConfig_binary.cmake.in | ||
| CGALConfig_binary_header_only.cmake.in | ||
| CGALConfig_install.cmake.in | ||
| CGALLibConfig.cmake.in | ||
| CGAL_Boost_iostreams_support.cmake | ||
| CGAL_Boost_serialization_support.cmake | ||
| CGAL_Ceres_support.cmake | ||
| CGAL_CheckCXXFileRuns.cmake | ||
| CGAL_Common.cmake | ||
| CGAL_CreateSingleSourceCGALProgram.cmake | ||
| CGAL_Eigen3_support.cmake | ||
| CGAL_Eigen_support.cmake | ||
| CGAL_GLPK_support.cmake | ||
| CGAL_GeneratorSpecificSettings.cmake | ||
| CGAL_ITK_support.cmake | ||
| CGAL_LASLIB_support.cmake | ||
| CGAL_METIS_support.cmake | ||
| CGAL_Macros.cmake | ||
| CGAL_OSQP_support.cmake | ||
| CGAL_OpenCV_support.cmake | ||
| CGAL_OpenGR_support.cmake | ||
| CGAL_Qt5_moc_and_resource_files.cmake | ||
| CGAL_SCIP_support.cmake | ||
| CGAL_SCM.cmake | ||
| CGAL_SetupBoost.cmake | ||
| CGAL_SetupCGALDependencies.cmake | ||
| CGAL_SetupCGAL_CoreDependencies.cmake | ||
| CGAL_SetupCGAL_ImageIODependencies.cmake | ||
| CGAL_SetupCGAL_Qt5Dependencies.cmake | ||
| CGAL_SetupDependencies.cmake | ||
| CGAL_SetupFlags.cmake | ||
| CGAL_SetupGMP.cmake | ||
| CGAL_SetupLEDA.cmake | ||
| CGAL_SetupVLD.cmake | ||
| CGAL_TBB_support.cmake | ||
| CGAL_TweakFindBoost.cmake | ||
| CGAL_UseLEDA.cmake | ||
| CGAL_UseMKL.cmake | ||
| CGAL_UseMPFI.cmake | ||
| CGAL_UseRS.cmake | ||
| CGAL_UseRS3.cmake | ||
| CGAL_VersionUtils.cmake | ||
| CGAL_add_test.cmake | ||
| CGAL_display_flags.cmake | ||
| CGAL_enable_end_of_configuration_hook.cmake | ||
| CGAL_parse_version_h.cmake | ||
| CGAL_pointmatcher_support.cmake | ||
| CGAL_setup_target_dependencies.cmake | ||
| CGAL_target_use_TBB.cmake | ||
| FindCORE.cmake | ||
| FindESBTL.cmake | ||
| FindEigen3.cmake | ||
| FindF2C.cmake | ||
| FindGLPK.cmake | ||
| FindGMP.cmake | ||
| FindGMPXX.cmake | ||
| FindIPE.cmake | ||
| FindITT.cmake | ||
| FindLASLIB.cmake | ||
| FindLEDA.cmake | ||
| FindLibSSH.cmake | ||
| FindMETIS.cmake | ||
| FindMKL.cmake | ||
| FindMPFI.cmake | ||
| FindMPFR.cmake | ||
| FindNTL.cmake | ||
| FindOSQP.cmake | ||
| FindOpenMesh.cmake | ||
| FindRS.cmake | ||
| FindRS3.cmake | ||
| FindSuiteSparse.cmake | ||
| FindTBB.cmake | ||
| Makefile | ||
| UseCGAL.cmake | ||
| UseESBTL.cmake | ||
| UseEigen3.cmake | ||
| UseLASLIB.cmake | ||
| UseOpenMesh.cmake | ||
| UseTBB.cmake | ||
| list_of_whitelisted_headers.cmake | ||
| process_dependencies.cmake | ||
| run_cmd_redirection_cerr.cmake | ||
| run_test_with_cin.cmake | ||
| test_MPFI.cpp | ||