diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_base b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_base old mode 100755 new mode 100644 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake old mode 100755 new mode 100644 diff --git a/Arrangement_on_surface_2/test/Sweep_line_2/cgal_test b/Arrangement_on_surface_2/test/Sweep_line_2/cgal_test old mode 100755 new mode 100644 diff --git a/Arrangement_on_surface_2/test/Sweep_line_2/cgal_test_base b/Arrangement_on_surface_2/test/Sweep_line_2/cgal_test_base old mode 100755 new mode 100644 diff --git a/Arrangement_on_surface_2/test/Sweep_line_2/cgal_test_with_cmake b/Arrangement_on_surface_2/test/Sweep_line_2/cgal_test_with_cmake old mode 100755 new mode 100644 diff --git a/CGAL_ipelets/demo/CGAL_ipelets/cgal_test_with_cmake b/CGAL_ipelets/demo/CGAL_ipelets/cgal_test_with_cmake old mode 100755 new mode 100644 diff --git a/Documentation/conversion_tools/generate_rw_map.py b/Documentation/conversion_tools/generate_rw_map.py old mode 100755 new mode 100644 diff --git a/Documentation/conversion_tools/split_doxyassist.py b/Documentation/conversion_tools/split_doxyassist.py old mode 100755 new mode 100644 diff --git a/Documentation/html_output_post_processing.py b/Documentation/html_output_post_processing.py old mode 100755 new mode 100644 diff --git a/Documentation/pkglist_filter b/Documentation/pkglist_filter old mode 100755 new mode 100644 diff --git a/Documentation/pkglist_filter.py b/Documentation/pkglist_filter.py old mode 100755 new mode 100644 diff --git a/Documentation/pkglist_filter.sh b/Documentation/pkglist_filter.sh old mode 100755 new mode 100644 diff --git a/Documentation/scripts/makebiblio b/Documentation/scripts/makebiblio old mode 100755 new mode 100644 diff --git a/Documentation/testsuite.py b/Documentation/testsuite.py old mode 100755 new mode 100644 diff --git a/Filtered_kernel/developer_scripts/profile_cleanup b/Filtered_kernel/developer_scripts/profile_cleanup old mode 100755 new mode 100644 diff --git a/Installation/auxiliary/gdb/python/CGAL/__init__.py b/Installation/auxiliary/gdb/python/CGAL/__init__.py old mode 100755 new mode 100644 diff --git a/Installation/auxiliary/gdb/python/CGAL/printers.py b/Installation/auxiliary/gdb/python/CGAL/printers.py old mode 100755 new mode 100644 diff --git a/Installation/auxiliary/gdb/test-gdb.py b/Installation/auxiliary/gdb/test-gdb.py old mode 100755 new mode 100644 diff --git a/Installation/update_CHANGES b/Installation/update_CHANGES old mode 100755 new mode 100644 diff --git a/Jet_fitting_3/clean_tree.csh b/Jet_fitting_3/clean_tree.csh old mode 100755 new mode 100644 diff --git a/MacOSX/scripts/cgal_make_macosx_app b/MacOSX/scripts/cgal_make_macosx_app old mode 100755 new mode 100644 diff --git a/Maintenance/deb/sid/debian/rules b/Maintenance/deb/sid/debian/rules old mode 100755 new mode 100644 diff --git a/Maintenance/deb/squeeze/debian/rules b/Maintenance/deb/squeeze/debian/rules old mode 100755 new mode 100644 diff --git a/Maintenance/deb/wheezy/debian/rules b/Maintenance/deb/wheezy/debian/rules old mode 100755 new mode 100644 diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/cgal_diff_results b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/cgal_diff_results old mode 100755 new mode 100644 diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/collect_data_directories b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/collect_data_directories old mode 100755 new mode 100644 diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_release b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_release old mode 100755 new mode 100644 diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/dump_crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/dump_crontab old mode 100755 new mode 100644 diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/run_doxygen_testsuite b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/run_doxygen_testsuite old mode 100755 new mode 100644 diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/update_manual_tools b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/update_manual_tools old mode 100755 new mode 100644 diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/reference-platforms/boostrap b/Maintenance/infrastructure/cgal.geometryfactory.com/reference-platforms/boostrap old mode 100755 new mode 100644 diff --git a/Maintenance/infrastructure/delaunay.geometryfactory.com/.autocgalrc b/Maintenance/infrastructure/delaunay.geometryfactory.com/.autocgalrc old mode 100755 new mode 100644 diff --git a/Maintenance/infrastructure/delaunay.geometryfactory.com/scripts/compile-boost-i686 b/Maintenance/infrastructure/delaunay.geometryfactory.com/scripts/compile-boost-i686 old mode 100755 new mode 100644 diff --git a/Maintenance/infrastructure/delaunay.geometryfactory.com/scripts/compile-boost-x64 b/Maintenance/infrastructure/delaunay.geometryfactory.com/scripts/compile-boost-x64 old mode 100755 new mode 100644 diff --git a/Maintenance/infrastructure/magritte.geometryfactory.com/update.sh b/Maintenance/infrastructure/magritte.geometryfactory.com/update.sh old mode 100755 new mode 100644 diff --git a/Maintenance/infrastructure/picasso.geometryfactory.com/update.sh b/Maintenance/infrastructure/picasso.geometryfactory.com/update.sh old mode 100755 new mode 100644 diff --git a/Maintenance/infrastructure/scripts/rename_a_test_platform b/Maintenance/infrastructure/scripts/rename_a_test_platform old mode 100755 new mode 100644 diff --git a/Maintenance/public_release/scripts/precompiled_demos_zips b/Maintenance/public_release/scripts/precompiled_demos_zips old mode 100755 new mode 100644 diff --git a/Maintenance/public_release/scripts/prepare_release b/Maintenance/public_release/scripts/prepare_release old mode 100755 new mode 100644 diff --git a/Maintenance/test_handling/create_testresult_page b/Maintenance/test_handling/create_testresult_page old mode 100755 new mode 100644 diff --git a/Maintenance/test_handling/to_zipped_format b/Maintenance/test_handling/to_zipped_format old mode 100755 new mode 100644 diff --git a/Maintenance/test_handling/treat_result_collection b/Maintenance/test_handling/treat_result_collection old mode 100755 new mode 100644 diff --git a/Mesh_3/applications/dump_to_ghs_points b/Mesh_3/applications/dump_to_ghs_points old mode 100755 new mode 100644 diff --git a/Mesh_3/applications/filter_remove_tets_from_medit b/Mesh_3/applications/filter_remove_tets_from_medit old mode 100755 new mode 100644 diff --git a/Mesh_3/applications/mesher_tester_scripts/create_histogram.pl b/Mesh_3/applications/mesher_tester_scripts/create_histogram.pl old mode 100755 new mode 100644 diff --git a/Mesh_3/applications/mesher_tester_scripts/create_www.pl b/Mesh_3/applications/mesher_tester_scripts/create_www.pl old mode 100755 new mode 100644 diff --git a/Mesh_3/demo/Mesh_3/cgal_test_with_cmake b/Mesh_3/demo/Mesh_3/cgal_test_with_cmake old mode 100755 new mode 100644 diff --git a/Mesh_3/examples/Mesh_3/old_stuff/replay-chair b/Mesh_3/examples/Mesh_3/old_stuff/replay-chair old mode 100755 new mode 100644 diff --git a/Mesh_3/examples/Mesh_3/old_stuff/replay-skull b/Mesh_3/examples/Mesh_3/old_stuff/replay-skull old mode 100755 new mode 100644 diff --git a/Mesh_3/examples/Mesh_3/old_stuff/replay-tangle b/Mesh_3/examples/Mesh_3/old_stuff/replay-tangle old mode 100755 new mode 100644 diff --git a/Nef_2/noweb/specialize b/Nef_2/noweb/specialize old mode 100755 new mode 100644 diff --git a/Nef_3/SNC_walker/tangle b/Nef_3/SNC_walker/tangle old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/acis.run b/Nef_3/performance/Nef_3/acis.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/additional_optimizations.run b/Nef_3/performance/Nef_3/additional_optimizations.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/asymptotic.run b/Nef_3/performance/Nef_3/asymptotic.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/big_and_small.run b/Nef_3/performance/Nef_3/big_and_small.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/complex_sphere_map.run b/Nef_3/performance/Nef_3/complex_sphere_map.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/cutoff.run b/Nef_3/performance/Nef_3/cutoff.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/extended.run b/Nef_3/performance/Nef_3/extended.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/incremental.run b/Nef_3/performance/Nef_3/incremental.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/incremental2.run b/Nef_3/performance/Nef_3/incremental2.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/kdtree_intersection.run b/Nef_3/performance/Nef_3/kdtree_intersection.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/kernel.run b/Nef_3/performance/Nef_3/kernel.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/night.run b/Nef_3/performance/Nef_3/night.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/optimization.run b/Nef_3/performance/Nef_3/optimization.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/overlay_if_need.run b/Nef_3/performance/Nef_3/overlay_if_need.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/point_location.run b/Nef_3/performance/Nef_3/point_location.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/point_location2.run b/Nef_3/performance/Nef_3/point_location2.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/quadratic.run b/Nef_3/performance/Nef_3/quadratic.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/rotated_cylinders.run b/Nef_3/performance/Nef_3/rotated_cylinders.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/rotated_cylinders2.run b/Nef_3/performance/Nef_3/rotated_cylinders2.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/tetgrid.run b/Nef_3/performance/Nef_3/tetgrid.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/tmp_rotated_cylinders.run b/Nef_3/performance/Nef_3/tmp_rotated_cylinders.run old mode 100755 new mode 100644 diff --git a/Nef_3/performance/Nef_3/triangulated_cylinders.run b/Nef_3/performance/Nef_3/triangulated_cylinders.run old mode 100755 new mode 100644 diff --git a/Nef_3/test/Nef_3/upgradeNefFiles b/Nef_3/test/Nef_3/upgradeNefFiles old mode 100755 new mode 100644 diff --git a/Point_set_processing_3/examples/Point_set_processing_3/cgal_test_with_cmake b/Point_set_processing_3/examples/Point_set_processing_3/cgal_test_with_cmake old mode 100755 new mode 100644 diff --git a/Polyhedron/demo/Polyhedron/cgal_test_with_cmake b/Polyhedron/demo/Polyhedron/cgal_test_with_cmake old mode 100755 new mode 100644 diff --git a/Polytope_distance_d/test/Polytope_distance_d/create_test_PD_cin b/Polytope_distance_d/test/Polytope_distance_d/create_test_PD_cin old mode 100755 new mode 100644 diff --git a/QP_solver/test/QP_solver/create_test_solver_cin b/QP_solver/test/QP_solver/create_test_solver_cin old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/autotest_cgal b/Scripts/developer_scripts/autotest_cgal old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/autotest_cgal_with_cmake b/Scripts/developer_scripts/autotest_cgal_with_cmake old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/cgal2gml b/Scripts/developer_scripts/cgal2gml old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/cgal_build b/Scripts/developer_scripts/cgal_build old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/cgal_create_package_dir.py b/Scripts/developer_scripts/cgal_create_package_dir.py old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/cgal_depend b/Scripts/developer_scripts/cgal_depend old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/cgal_generate_cmake_script b/Scripts/developer_scripts/cgal_generate_cmake_script old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/cgal_git_update_hooks_for_client b/Scripts/developer_scripts/cgal_git_update_hooks_for_client old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/cgal_test_with_cmake b/Scripts/developer_scripts/cgal_test_with_cmake old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/check_library_uses_no_gpl_files b/Scripts/developer_scripts/check_library_uses_no_gpl_files old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/check_licenses b/Scripts/developer_scripts/check_licenses old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/check_macro_names b/Scripts/developer_scripts/check_macro_names old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/check_no_CGAL_USE_without_includes_before b/Scripts/developer_scripts/check_no_CGAL_USE_without_includes_before old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/check_svn_keywords b/Scripts/developer_scripts/check_svn_keywords old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/clean_up_branch.sh b/Scripts/developer_scripts/clean_up_branch.sh old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/create_cgal_test b/Scripts/developer_scripts/create_cgal_test old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/create_cgal_test_with_cmake b/Scripts/developer_scripts/create_cgal_test_with_cmake old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/create_internal_release b/Scripts/developer_scripts/create_internal_release old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/create_macosx_installer b/Scripts/developer_scripts/create_macosx_installer old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/create_new_release b/Scripts/developer_scripts/create_new_release old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/detect_files_with_mixed_eol_styles b/Scripts/developer_scripts/detect_files_with_mixed_eol_styles old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/detect_packages_licenses b/Scripts/developer_scripts/detect_packages_licenses old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/detect_wrong_encoding b/Scripts/developer_scripts/detect_wrong_encoding old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/detect_wrong_permissions b/Scripts/developer_scripts/detect_wrong_permissions old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/licensecheck b/Scripts/developer_scripts/licensecheck old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/list_cgal_includes b/Scripts/developer_scripts/list_cgal_includes old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/qpl-to-gplv3.perl b/Scripts/developer_scripts/qpl-to-gplv3.perl old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/remove_empty_lines.pl b/Scripts/developer_scripts/remove_empty_lines.pl old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/test_testsuite_submission b/Scripts/developer_scripts/test_testsuite_submission old mode 100755 new mode 100644 diff --git a/Scripts/developer_scripts/update_git_svn_clone b/Scripts/developer_scripts/update_git_svn_clone old mode 100755 new mode 100644 diff --git a/Scripts/scripts/cgal_create_CMakeLists b/Scripts/scripts/cgal_create_CMakeLists old mode 100755 new mode 100644 diff --git a/Scripts/scripts/cgal_create_assertions.sh b/Scripts/scripts/cgal_create_assertions.sh old mode 100755 new mode 100644 diff --git a/Scripts/scripts/cgal_create_cmake_script b/Scripts/scripts/cgal_create_cmake_script old mode 100755 new mode 100644 diff --git a/Snap_rounding_2/test/Snap_rounding_2/cgal_test b/Snap_rounding_2/test/Snap_rounding_2/cgal_test old mode 100755 new mode 100644 diff --git a/Snap_rounding_2/test/Snap_rounding_2/cgal_test_base b/Snap_rounding_2/test/Snap_rounding_2/cgal_test_base old mode 100755 new mode 100644 diff --git a/Snap_rounding_2/test/Snap_rounding_2/cgal_test_with_cmake b/Snap_rounding_2/test/Snap_rounding_2/cgal_test_with_cmake old mode 100755 new mode 100644 diff --git a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits.h b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits.h index 37fac8b60c2..1f91c10d060 100644 --- a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits.h +++ b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits.h @@ -6,7 +6,9 @@ namespace CGAL { The class `Search_traits` can be used as a template parameter of the kd tree and the search classes. It is a mere wrapper for the geometric types needed by these classes. - +\cgalModifBegin +Added Dimension +\cgalModifEnd \cgalModels `SearchTraits` \sa `Search_traits_2` @@ -14,13 +16,19 @@ by these classes. \sa `Search_traits_d` */ -template< typename NT, typename Point, typename CartesianIterator, typename ConstructCartesianIterator, typename ConstructMinVertex, typename ConstructMaxVertex > +template< typename NT, typename Point, typename CartesianIterator, typename ConstructCartesianIterator, typename ConstructMinVertex, typename ConstructMaxVertex, typename Dim > class Search_traits { public: /// \name Types /// @{ +/*! +Dimension type. Either `Dimension_tag` +or `Dynamic_dimension_tag`. +*/ +typedef unspecified_type Dimension; + /*! The number type of the coordinates. */ diff --git a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_2.h b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_2.h index a4c74419dee..dd9a24a1fe7 100644 --- a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_2.h +++ b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_2.h @@ -5,7 +5,9 @@ namespace CGAL { The class `Search_traits_2` can be used as a template parameter of the kd tree and the search classes. - +\cgalModifBegin +Added Dimension +\cgalModifEnd \cgalHeading{Parameters} Expects for the template argument a model of the concept `Kernel`, @@ -25,6 +27,11 @@ public: /// \name Types /// @{ +/*! +Dimension type. +*/ +typedef Dimension_tag<2> Dimension; + /*! Number type. */ diff --git a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_3.h b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_3.h index f68d21ff3f4..21e9c8e7f74 100644 --- a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_3.h +++ b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_3.h @@ -5,7 +5,9 @@ namespace CGAL { The class `Search_traits_3` can be used as a template parameter of the kd tree and the search classes. `Kernel` must be a \cgal kernel. - +\cgalModifBegin +Added Dimension +\cgalModifEnd \cgalHeading{Parameters} Expects for the template argument a model of the concept `Kernel`, @@ -25,6 +27,10 @@ public: /// \name Types /// @{ +/*! +Dimension type. +*/ +typedef Dimension_tag<3> Dimension; /*! Number type. */ diff --git a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_d.h b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_d.h index ac8f8ebf44e..4c173266eaf 100644 --- a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_d.h +++ b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_d.h @@ -5,13 +5,16 @@ namespace CGAL { The class `Search_traits_d` can be used as a template parameter of the kd tree and the search classes. `Kernel` must be a \cgal kernel. - +\cgalModifBegin +Added Dimension +\cgalModifEnd `Kernel` must be a d-dimensional \cgal kernel. \cgalHeading{Parameters} -Expects for the template argument a model of the concept `Kernel_d`, -for example `Cartesian_d`. +Expects for the first template argument a model of the concept `Kernel_d` +(for example `Cartesian_d`) and for the second argument a `Dimension_tag` +(default value is `Dynamic_dimension_tag`). \cgalModels `SearchTraits` \cgalModels `RangeSearchTraits` @@ -21,13 +24,19 @@ for example `Cartesian_d`. \sa `Search_traits` */ -template< typename Kernel > +template< typename Kernel, typename Dim > class Search_traits_d { public: /// \name Types /// @{ +/*! +Dimension type. Either `Dimension_tag` +or `Dynamic_dimension_tag`. +*/ +typedef Dim Dimension; + /*! Number type. */ diff --git a/Spatial_searching/doc/Spatial_searching/Concepts/SearchTraits.h b/Spatial_searching/doc/Spatial_searching/Concepts/SearchTraits.h index 89a9fb559d7..87a7d6a1e5f 100644 --- a/Spatial_searching/doc/Spatial_searching/Concepts/SearchTraits.h +++ b/Spatial_searching/doc/Spatial_searching/Concepts/SearchTraits.h @@ -4,11 +4,15 @@ The concept `SearchTraits` defines the requirements for the template parameter of the search classes. +\cgalModifBegin +Added Search_traits_d and Dimension +\cgalModifEnd \cgalHasModel `CGAL::Cartesian_d` \cgalHasModel `CGAL::Homogeneous_d` \cgalHasModel `CGAL::Search_traits_2` \cgalHasModel `CGAL::Search_traits_3` +\cgalHasModel `CGAL::Search_traits_d` \cgalHasModel `CGAL::Search_traits` \sa `RangeSearchTraits` @@ -22,6 +26,12 @@ public: /// \name Types /// @{ +/*! +Dimension type. Either `CGAL::Dimension_tag` +or `CGAL::Dynamic_dimension_tag`. +*/ +typedef unspecified_type Dimension; + /*! Point type. `CGAL::Kernel_traits` has to be specialized for this type. diff --git a/Spatial_searching/include/CGAL/Euclidean_distance.h b/Spatial_searching/include/CGAL/Euclidean_distance.h index 4d1031431af..eb2f45f44a2 100644 --- a/Spatial_searching/include/CGAL/Euclidean_distance.h +++ b/Spatial_searching/include/CGAL/Euclidean_distance.h @@ -21,15 +21,39 @@ #ifndef CGAL_EUCLIDEAN_DISTANCE_H #define CGAL_EUCLIDEAN_DISTANCE_H + #include #include +#include +#include + namespace CGAL { template class Euclidean_distance; - + + namespace internal{ + #ifndef HAS_DIMENSION_TAG + #define HAS_DIMENSION_TAG + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_dimension,Dimension,false); + #endif + + template ::value> + struct Euclidean_distance_base; + + template + struct Euclidean_distance_base{ + typedef typename SearchTraits::Dimension Dimension; + }; + + template + struct Euclidean_distance_base{ + typedef Dynamic_dimension_tag Dimension; + }; + + template struct Spatial_searching_default_distance{ typedef ::CGAL::Euclidean_distance type; @@ -47,6 +71,9 @@ namespace CGAL { typedef typename SearchTraits::Point_d Point_d; typedef Point_d Query_item; + typedef typename internal::Euclidean_distance_base::Dimension D; + + // default constructor Euclidean_distance(const SearchTraits& traits_=SearchTraits()):traits(traits_) {} @@ -64,7 +91,7 @@ namespace CGAL { inline FT min_distance_to_rectangle(const Query_item& q, - const Kd_tree_rectangle& r) const { + const Kd_tree_rectangle& r) const { FT distance = FT(0); typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Cartesian_const_iterator_d qit = construct_it(q), @@ -82,7 +109,7 @@ namespace CGAL { } inline FT max_distance_to_rectangle(const Query_item& q, - const Kd_tree_rectangle& r) const { + const Kd_tree_rectangle& r) const { FT distance=FT(0); typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Cartesian_const_iterator_d qit = construct_it(q), diff --git a/Spatial_searching/include/CGAL/K_neighbor_search.h b/Spatial_searching/include/CGAL/K_neighbor_search.h index 53f8acd51c5..3490702cb66 100644 --- a/Spatial_searching/include/CGAL/K_neighbor_search.h +++ b/Spatial_searching/include/CGAL/K_neighbor_search.h @@ -22,9 +22,34 @@ #define CGAL_K_NEIGHBOR_SEARCH_H #include +#include + + + namespace CGAL { + template +class K_neighbor_search; +namespace internal{ + #ifndef HAS_DIMENSION_TAG + #define HAS_DIMENSION_TAG + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_dimension,Dimension,false); + #endif + + template ::value> + struct K_neighbor_search_base; + + template + struct K_neighbor_search_base{ + typedef typename SearchTraits::Dimension Dimension; + }; + + template + struct K_neighbor_search_base{ + typedef Dynamic_dimension_tag Dimension; + }; +}//internal template ::type, class Splitter= Sliding_midpoint , @@ -34,6 +59,7 @@ class K_neighbor_search: public internal::K_neighbor_search::Dimension D; K_neighbor_search(const Tree& tree, const typename Base::Query_item& q, unsigned int k=1, FT Eps=FT(0.0), bool Search_nearest=true, const Distance& d=Distance(),bool sorted=true) @@ -49,7 +75,7 @@ private: using Base::branch; void - compute_neighbors_general(typename Base::Node_const_handle N, const Kd_tree_rectangle& r) + compute_neighbors_general(typename Base::Node_const_handle N, const Kd_tree_rectangle& r) { if (!(N->is_leaf())) { Tree::Internal_node_const_handle node = @@ -58,10 +84,10 @@ private: int new_cut_dim=node->cutting_dimension(); FT new_cut_val=node->cutting_value(); - Kd_tree_rectangle r_lower(r); + Kd_tree_rectangle r_lower(r); // modifies also r_lower to lower half - Kd_tree_rectangle r_upper(r_lower); + Kd_tree_rectangle r_upper(r_lower); r_lower.split(r_upper, new_cut_dim, new_cut_val); FT distance_to_lower_half; diff --git a/Spatial_searching/include/CGAL/Kd_tree.h b/Spatial_searching/include/CGAL/Kd_tree.h index d139a0f318e..7d328e2987c 100644 --- a/Spatial_searching/include/CGAL/Kd_tree.h +++ b/Spatial_searching/include/CGAL/Kd_tree.h @@ -29,6 +29,7 @@ #include #include #include +#include #ifdef CGAL_HAS_THREADS #include @@ -36,6 +37,30 @@ namespace CGAL { + + template +class Kd_tree; + + namespace internal{ + #ifndef HAS_DIMENSION_TAG + #define HAS_DIMENSION_TAG + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_dimension,Dimension,false); + #endif + + template ::value> + struct Kd_tree_base; + + template + struct Kd_tree_base{ + typedef typename SearchTraits::Dimension Dimension; + }; + + template + struct Kd_tree_base{ + typedef Dynamic_dimension_tag Dimension; + }; + } + //template , class UseExtendedNode = Tag_true > template , class UseExtendedNode = Tag_true > class Kd_tree { @@ -67,6 +92,10 @@ public: typedef typename std::vector::size_type size_type; + + + typedef typename internal::Kd_tree_base::Dimension D; + private: SearchTraits traits_; Splitter split; @@ -75,7 +104,7 @@ private: Node_handle tree_root; - Kd_tree_rectangle* bbox; + Kd_tree_rectangle* bbox; std::vector pts; // Instead of storing the points in arrays in the Kd_tree_node @@ -230,7 +259,7 @@ public: data.push_back(&pts[i]); } Point_container c(dim, data.begin(), data.end(),traits_); - bbox = new Kd_tree_rectangle(c.bounding_box()); + bbox = new Kd_tree_rectangle(c.bounding_box()); if (c.size() <= split.bucket_size()){ tree_root = create_leaf_node(c); }else { @@ -323,7 +352,7 @@ public: if(! is_built()){ const_build(); } - Kd_tree_rectangle b(*bbox); + Kd_tree_rectangle b(*bbox); tree_root->search(it,q,b); } return it; @@ -369,7 +398,7 @@ public: root()->print(); } - const Kd_tree_rectangle& + const Kd_tree_rectangle& bounding_box() const { if(! is_built()){ diff --git a/Spatial_searching/include/CGAL/Kd_tree_node.h b/Spatial_searching/include/CGAL/Kd_tree_node.h index 81d82c94888..c2f64be060d 100644 --- a/Spatial_searching/include/CGAL/Kd_tree_node.h +++ b/Spatial_searching/include/CGAL/Kd_tree_node.h @@ -45,6 +45,7 @@ namespace CGAL { typedef typename TreeTraits::FT FT; typedef typename Kd_tree::Separator Separator; typedef typename Kd_tree::Point_d_iterator Point_d_iterator; + typedef typename Kd_tree::D D; bool leaf; diff --git a/Spatial_searching/include/CGAL/Kd_tree_rectangle.h b/Spatial_searching/include/CGAL/Kd_tree_rectangle.h index a10ac002749..632e29fed45 100644 --- a/Spatial_searching/include/CGAL/Kd_tree_rectangle.h +++ b/Spatial_searching/include/CGAL/Kd_tree_rectangle.h @@ -25,6 +25,8 @@ #include #include #include +#include +#include namespace CGAL { @@ -53,8 +55,189 @@ namespace CGAL { }; - template + template class Kd_tree_rectangle { + public: + typedef FT_ FT; + typedef FT T; + + private: + + //int dim; + CGAL::cpp11::array lower_; + CGAL::cpp11::array upper_; + int max_span_coord_; + + public: + + inline void + set_upper_bound(int i, const FT& x) + { + CGAL_assertion(i >= 0 && i < D); + CGAL_assertion(x >= lower_[i]); + upper_[i] = x; + set_max_span(); + } + + inline void + set_lower_bound(int i, const FT& x) + { + CGAL_assertion(i >= 0 && i < D); + CGAL_assertion(x <= upper_[i]); + lower_[i] = x; + set_max_span(); + } + + inline void + set_max_span() + { + FT span = upper_[0]-lower_[0]; + max_span_coord_ = 0; + for (int i = 1; i < D::value; ++i) { + FT tmp = upper_[i] - lower_[i]; + if (span < tmp) { + span = tmp; + max_span_coord_ = i; + } + } + } + + Kd_tree_rectangle(int d) + : max_span_coord_(0) + { + lower_.assign(FT(0)); + upper_.assign(FT(0)); + } + + Kd_tree_rectangle() + {} + + + explicit + Kd_tree_rectangle(const Kd_tree_rectangle& r) + : max_span_coord_(r.max_span_coord_) + { + lower_ = r.lower_; + upper_ = r.upper_; + } + + template + void update_from_point_pointers(PointPointerIter begin, + PointPointerIter end, + const Construct_cartesian_const_iterator_d& construct_it + ) + { + if (begin ==end) + return; + // initialize with values of first point + typename Construct_cartesian_const_iterator_d::result_type bit = construct_it(**begin); + + for (int i=0; i < D::value; ++i, ++bit) { + lower_[i]= *bit; upper_[i]=lower_[i]; + } + begin++; + typedef typename std::iterator_traits::value_type P; + std::for_each(begin, end,set_bounds_from_pointer(D::value, &(lower_[0]), &(upper_[0]), construct_it)); + set_max_span(); + } + + template // was PointIter + Kd_tree_rectangle(int d, PointPointerIter begin, PointPointerIter end,const Construct_cartesian_const_iterator_d& construct_it) + { + update_from_point_pointers(begin,end,construct_it); + } + + inline int + max_span_coord() const + { + return max_span_coord_; + } + + inline FT + max_span() const + { + return upper_[max_span_coord_] - lower_[max_span_coord_]; + } + + inline FT + min_coord(int i) const + { + CGAL_assertion(lower_ != NULL); + return lower_[i]; + } + + inline FT + max_coord(int i) const + { + return upper_[i]; + } + + std::ostream& + print(std::ostream& s) const + { + s << "Rectangle dimension = " << D; + s << "\n lower: "; + for (int i=0; i < D; ++i) + s << lower_[i] << " "; + // std::copy(lower_, lower_ + D, + // std::ostream_iterator(s," ")); + s << "\n upper: "; + for (int j=0; j < D; ++j) + s << upper_[j] << " "; + // std::copy(upper_, upper_ + D, + // std::ostream_iterator(s," ")); + s << "\n maximum span " << max_span() << + " at coordinate " << max_span_coord() << std::endl; + return s; + } + + // Splits rectangle by modifying itself to lower half + // and returns upper half + // Kd_tree_rectangle* + void + split(Kd_tree_rectangle& r, int d, FT value) + { + CGAL_assertion(d >= 0 && d < D); + CGAL_assertion(lower_[d] <= value && value <= upper_[d]); + + //Kd_tree_rectangle* r = new Kd_tree_rectangle(*this); + upper_[d]=value; + r.lower_[d]=value; + //return r; + } + + + int + dimension() const + { + return D::value; + } + + const T* lower() const {return lower_;} + const T* upper() const {return upper_;} + + Kd_tree_rectangle& + operator=(const Kd_tree_rectangle& r) + { + CGAL_assertion(dimension() == r.dimension()); + if (this != &r) { + lower_ = r.lower_; + upper_ = r.upper_; + set_max_span(); + } + return *this; + } + + + + }; // of class Kd_tree_rectangle + + + // Partial specialization for dynamic dimension, which means dimension at runtime + + template + class Kd_tree_rectangle { + public: typedef FT_ FT; typedef FT T; @@ -62,8 +245,8 @@ namespace CGAL { private: int dim; - T *lower_; - T *upper_; + T* lower_; + T* upper_; int max_span_coord_; public: @@ -109,11 +292,12 @@ namespace CGAL { Kd_tree_rectangle() : dim(0), lower_(0), upper_(0) - {} + { +} explicit - Kd_tree_rectangle(const Kd_tree_rectangle& r) + Kd_tree_rectangle(const Kd_tree_rectangle& r) : dim(r.dim), lower_(new FT[dim]), upper_(new FT[dim]), max_span_coord_(r.max_span_coord_) { @@ -143,7 +327,7 @@ namespace CGAL { template // was PointIter Kd_tree_rectangle(int d, PointPointerIter begin, PointPointerIter end,const Construct_cartesian_const_iterator_d& construct_it) - : dim(d), lower_(new FT[d]), upper_(new FT[d]) + : dim(d), lower_(new FT[d]), upper_(new FT[d]) { update_from_point_pointers(begin,end,construct_it); } @@ -215,7 +399,7 @@ namespace CGAL { if (upper_) delete [] upper_; } } - + int dimension() const { @@ -225,8 +409,8 @@ namespace CGAL { const T* lower() const {return lower_;} const T* upper() const {return upper_;} - Kd_tree_rectangle& - operator=(const Kd_tree_rectangle& r) + Kd_tree_rectangle& + operator=(const Kd_tree_rectangle& r) { CGAL_assertion(dimension() == r.dimension()); if (this != &r) { @@ -239,11 +423,11 @@ namespace CGAL { - }; // of class Kd_tree_rectangle + }; // of partial specialization of class Kd_tree_rectangle - template + template std::ostream& - operator<<(std::ostream& s, const Kd_tree_rectangle& r) + operator<<(std::ostream& s, const Kd_tree_rectangle& r) { return r.print(s); } diff --git a/Spatial_searching/include/CGAL/Point_container.h b/Spatial_searching/include/CGAL/Point_container.h index b3f44264756..d2b04883071 100644 --- a/Spatial_searching/include/CGAL/Point_container.h +++ b/Spatial_searching/include/CGAL/Point_container.h @@ -31,8 +31,33 @@ #include + + namespace CGAL { + template +class Point_container; + +namespace internal{ + #ifndef HAS_DIMENSION_TAG + #define HAS_DIMENSION_TAG + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_dimension,Dimension,false); + #endif + + template ::value> + struct Point_container_base; + + template + struct Point_container_base{ + typedef typename SearchTraits::Dimension Dimension; + }; + + template + struct Point_container_base{ + typedef Dynamic_dimension_tag Dimension; + }; +} + template class Point_container { @@ -45,7 +70,7 @@ public: typedef typename Point_vector::iterator iterator; typedef typename Point_vector::const_iterator const_iterator; - + typedef typename internal::Point_container_base::Dimension D; private: Traits traits; // the iterator range of the Point_container @@ -53,20 +78,20 @@ private: boost::optional m_e ; int built_coord; // a coordinate for which the pointer list is built - Kd_tree_rectangle bbox; // bounding box, i.e. rectangle of node - Kd_tree_rectangle tbox; // tight bounding box, + Kd_tree_rectangle bbox; // bounding box, i.e. rectangle of node + Kd_tree_rectangle tbox; // tight bounding box, // i.e. minimal enclosing bounding // box of points public: - inline const Kd_tree_rectangle& + inline const Kd_tree_rectangle& bounding_box() const { return bbox; } - inline const Kd_tree_rectangle& + inline const Kd_tree_rectangle& tight_bounding_box() const { return tbox; diff --git a/Spatial_searching/include/CGAL/Search_traits.h b/Spatial_searching/include/CGAL/Search_traits.h index fb39d0d28ef..33b4474324e 100644 --- a/Spatial_searching/include/CGAL/Search_traits.h +++ b/Spatial_searching/include/CGAL/Search_traits.h @@ -21,13 +21,17 @@ #ifndef CGAL_KD_TREE_TRAITS_POINT_H #define CGAL_KD_TREE_TRAITS_POINT_H +#include namespace CGAL { - template + template class Search_traits { public: + + typedef D Dimension; + typedef CartesianCoordinateIterator Cartesian_const_iterator_d; typedef ConstructCartesianCoordinateIterator Construct_cartesian_const_iterator_d; typedef Point Point_d; diff --git a/Spatial_searching/include/CGAL/Search_traits_2.h b/Spatial_searching/include/CGAL/Search_traits_2.h index 666591a8ad3..07e80e3331f 100644 --- a/Spatial_searching/include/CGAL/Search_traits_2.h +++ b/Spatial_searching/include/CGAL/Search_traits_2.h @@ -21,6 +21,7 @@ #ifndef CGAL_SEARCH_TRAITS_2_H #define CGAL_SEARCH_TRAITS_2_H +#include namespace CGAL { @@ -30,6 +31,7 @@ namespace CGAL { class Search_traits_2 { public: + typedef typename Dimension_tag<2> Dimension; typedef typename K::Point_2 Point_d; typedef typename K::Iso_rectangle_2 Iso_box_d; typedef typename K::Circle_2 Sphere_d; diff --git a/Spatial_searching/include/CGAL/Search_traits_3.h b/Spatial_searching/include/CGAL/Search_traits_3.h index 9c6288d7825..8cd8bf3d49e 100644 --- a/Spatial_searching/include/CGAL/Search_traits_3.h +++ b/Spatial_searching/include/CGAL/Search_traits_3.h @@ -21,6 +21,7 @@ #ifndef CGAL_SEARCH_TRAITS_3_H #define CGAL_SEARCH_TRAITS_3_H +#include namespace CGAL { @@ -30,7 +31,8 @@ namespace CGAL { class Search_traits_3 { public: - + + typedef typename Dimension_tag<3> Dimension; typedef typename K::Cartesian_const_iterator_3 Cartesian_const_iterator_d; typedef typename K::Construct_cartesian_const_iterator_3 Construct_cartesian_const_iterator_d; typedef typename K::Point_3 Point_d; diff --git a/Spatial_searching/include/CGAL/Search_traits_d.h b/Spatial_searching/include/CGAL/Search_traits_d.h index b0aba510310..5648511b436 100644 --- a/Spatial_searching/include/CGAL/Search_traits_d.h +++ b/Spatial_searching/include/CGAL/Search_traits_d.h @@ -21,13 +21,16 @@ #ifndef CGAL_SEARCH_TRAITS_D_H #define CGAL_SEARCH_TRAITS_D_H +#include namespace CGAL { - template + + template class Search_traits_d { public: + typedef D Dimension; typedef typename K::Cartesian_const_iterator_d Cartesian_const_iterator_d; typedef typename K::Construct_cartesian_const_iterator_d Construct_cartesian_const_iterator_d; typedef typename K::Construct_iso_box_d Construct_iso_box_d; diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/data/make_list b/Straight_skeleton_2/test/Straight_skeleton_2/data/make_list old mode 100755 new mode 100644 diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/quick_test_suite.sh b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/quick_test_suite.sh old mode 100755 new mode 100644 diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/test.sh b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/test.sh old mode 100755 new mode 100644 diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/test_model.sh b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/test_model.sh old mode 100755 new mode 100644 diff --git a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/quick_test_suite.sh b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/quick_test_suite.sh old mode 100755 new mode 100644 diff --git a/Surface_mesher/demo/Surface_mesher/replay-tangle b/Surface_mesher/demo/Surface_mesher/replay-tangle old mode 100755 new mode 100644 diff --git a/Surface_mesher/find_debug_macros b/Surface_mesher/find_debug_macros old mode 100755 new mode 100644 diff --git a/Surface_mesher/find_non_debug_macros b/Surface_mesher/find_non_debug_macros old mode 100755 new mode 100644 diff --git a/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/cgal_test_with_cmake b/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/cgal_test_with_cmake old mode 100755 new mode 100644 diff --git a/Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/cgal_test_with_cmake b/Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/cgal_test_with_cmake old mode 100755 new mode 100644 diff --git a/Testsuite/test/Testsuite/cgal_test_with_cmake b/Testsuite/test/Testsuite/cgal_test_with_cmake old mode 100755 new mode 100644 diff --git a/Testsuite/test/collect_cgal_testresults_from_cmake b/Testsuite/test/collect_cgal_testresults_from_cmake old mode 100755 new mode 100644 diff --git a/Testsuite/test/run_testsuite_with_cmake b/Testsuite/test/run_testsuite_with_cmake old mode 100755 new mode 100644 diff --git a/Triangulation_2/benchmark/Triangulation_2/launch_tests b/Triangulation_2/benchmark/Triangulation_2/launch_tests old mode 100755 new mode 100644 diff --git a/Triangulation_2/benchmark/Triangulation_2/sum b/Triangulation_2/benchmark/Triangulation_2/sum old mode 100755 new mode 100644