diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000000..369aadbb15f --- /dev/null +++ b/.clang-format @@ -0,0 +1,35 @@ +--- +Language: Cpp +BasedOnStyle: LLVM +AccessModifierOffset: -2 +AllowShortFunctionsOnASingleLine: true +BinPackParameters: false +BreakConstructorInitializers: BeforeComma +BreakBeforeBraces: Custom +BraceWrapping: + AfterCaseLabel: false + AfterClass: true + AfterControlStatement: MultiLine + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: true + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + BeforeLambdaBody: false + BeforeWhile: false + IndentBraces: false + SplitEmptyFunction: false + SplitEmptyRecord: false + SplitEmptyNamespace: false +ColumnLimit: 120 +# Force pointers to the type for C++. +DerivePointerAlignment: false +PointerAlignment: Left +# Control the spaces around conditionals +SpacesInConditionalStatement: false +SpaceBeforeParens: false +... diff --git a/.devcontainer/doxygen-cgal/Dockerfile b/.devcontainer/doxygen-cgal/Dockerfile new file mode 100644 index 00000000000..81cb1f954ce --- /dev/null +++ b/.devcontainer/doxygen-cgal/Dockerfile @@ -0,0 +1,55 @@ +# Use an official Fedora as a parent image for the build stage +FROM fedora:latest AS sources_deps + +# Set environment variables to non-interactive +ENV DEBIAN_FRONTEND=noninteractive + +# Install dependencies +RUN dnf update -y && dnf install -y \ + wget \ + make \ + gcc \ + gcc-c++ \ + patch \ + cmake \ + bison \ + flex \ + unzip \ + python3 \ + && dnf clean all + +# Copy the patch file to the build context +COPY cgal-NO_ADDITIONAL_DETAILS.patch . + +FROM sources_deps AS build + +# Build and install Doxygen from sources +ARG DOXYGEN_VERSION=1.9.6 +ARG MAKEFLAGS=-j$(nproc) +RUN if [ -n "$DEBUG"];then set -x && make --version && ls -lZ /tmp && id; fi \ + && DOXYGEN_VERSION_UNDERSCORE=$(echo ${DOXYGEN_VERSION} | sed 's/\./_/g') \ + && wget https://github.com/doxygen/doxygen/archive/refs/tags/Release_${DOXYGEN_VERSION_UNDERSCORE}.zip \ + && unzip Release_${DOXYGEN_VERSION_UNDERSCORE}.zip \ + && cd doxygen-Release_${DOXYGEN_VERSION_UNDERSCORE} \ + && patch -p1 < ../cgal-NO_ADDITIONAL_DETAILS.patch \ + && mkdir build \ + && cd build \ + && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. \ + && cmake --build . \ + && cmake --install . \ + && mkdir -p /usr/local/share/doc/doxygen && cp ../LICENSE /usr/local/share/doc/doxygen/LICENSE.TXT \ + && cd ../.. \ + && rm -rf doxygen-Release_${DOXYGEN_VERSION_UNDERSCORE} Release_${DOXYGEN_VERSION_UNDERSCORE}.zip + +# Use a smaller base image for the final stage +FROM fedora:latest + +# Install necessary runtime dependencies +RUN set -x \ + && dnf update -y && dnf install -y graphviz 'perl(Getopt::Std)' tex-bibtex cmake python3-lxml python3-pyquery \ + && dnf clean all + +# Copy Doxygen from the build stage +COPY --from=build /usr/local/bin/doxygen /usr/local/bin +COPY --from=build /usr/local/share/doc/doxygen/LICENSE.TXT /usr/local/share/doc/doxygen/LICENSE.TXT +RUN doxygen --version diff --git a/.devcontainer/doxygen-cgal/Makefile b/.devcontainer/doxygen-cgal/Makefile new file mode 100644 index 00000000000..9413173b5a7 --- /dev/null +++ b/.devcontainer/doxygen-cgal/Makefile @@ -0,0 +1,23 @@ +SHELL := /bin/bash +DOXYGEN_VERSIONS := 1.12.0 1.11.0 1.10.0 1.9.8 1.9.7 1.9.6 + +.PHONY: all build-% push-% build push + +all: build + @echo "Use `$(MAKE) push` to push the images to the registry." + +build-%: + @echo "MAKEFLAGS: $(MAKEFLAGS)" + @echo "Building Doxygen version $*..." + if [ "$$(getenforce || true)" == "Enforcing" ]; then Z=:z; else Z=; fi; \ + F="$(MAKEFLAGS)"; F=$${F##*fifo:}; F=$${F%% *}; \ + if [ -p "$$F" ]; then echo "The GNU make FIFO file exists:"; ls -l $$F; VOLUME_ARGS="-v $$F:$$F$$Z"; echo -- $$VOLUME_ARGS; fi; \ + podman build --build-arg DOXYGEN_VERSION=$* --build-arg "MAKEFLAGS=$(MAKEFLAGS)" $$VOLUME_ARGS -t cgal/doxygen:$* . + +push-%: build-% + @echo "Pushing cgal/doxygen:$*..." + podman push cgal/doxygen:$* + +build: $(foreach version,$(DOXYGEN_VERSIONS),build-$(version)) + +push: $(foreach version,$(DOXYGEN_VERSIONS),push-$(version)) diff --git a/.devcontainer/doxygen-cgal/cgal-NO_ADDITIONAL_DETAILS.patch b/.devcontainer/doxygen-cgal/cgal-NO_ADDITIONAL_DETAILS.patch new file mode 100644 index 00000000000..bb6e63b274d --- /dev/null +++ b/.devcontainer/doxygen-cgal/cgal-NO_ADDITIONAL_DETAILS.patch @@ -0,0 +1,44 @@ +diff --git a/src/config.xml b/src/config.xml +index 13910958a6..31f1354e44 100644 +--- a/src/config.xml ++++ b/src/config.xml +@@ -893,6 +893,18 @@ Go to the next section or return to the + \note This will also disable the warnings about undocumented members + that are normally produced when \ref cfg_warnings "WARNINGS" is + set to \c YES. ++]]> ++ ++ ++ ++ ++ +diff --git a/src/memberdef.cpp b/src/memberdef.cpp +index 08d9bf24c5..ab04e994c5 100644 +--- a/src/memberdef.cpp ++++ b/src/memberdef.cpp +@@ -2501,6 +2501,7 @@ bool MemberDefImpl::hasDetailedDescription() const + if (!m_hasDetailedDescriptionCached) + { + bool extractAll = Config_getBool(EXTRACT_ALL); ++ bool xAllNoDetailedSec = Config_getBool(NO_ADDITIONAL_DETAILS); + bool alwaysDetailedSec = Config_getBool(ALWAYS_DETAILED_SEC); + bool repeatBrief = Config_getBool(REPEAT_BRIEF); + bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC); +@@ -2512,7 +2513,7 @@ bool MemberDefImpl::hasDetailedDescription() const + // the member has detailed documentation because the user added some comments + bool docFilter = + // extract all is enabled +- extractAll || ++ (extractAll && !xAllNoDetailedSec) || + // has detailed docs + !documentation().isEmpty() || + // has inbody docs diff --git a/.devcontainer/doxygen-cgal/devcontainer.json b/.devcontainer/doxygen-cgal/devcontainer.json new file mode 100644 index 00000000000..f1c9f05badb --- /dev/null +++ b/.devcontainer/doxygen-cgal/devcontainer.json @@ -0,0 +1,16 @@ +{ + "name": "CGAL Doxygen Dev Container, version 1.12.0, with CGAL patch", + "image": "docker.io/cgal/doxygen:1.12.0", + "features": { + "ghcr.io/devcontainers/features/git:1.3.2": {} + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cmake-tools", + "bbenoist.Doxygen", + "ms-vscode.cpptools" + ] + } + }, +} \ No newline at end of file diff --git a/.devcontainer/doxygen-cgal/distrobox.ini b/.devcontainer/doxygen-cgal/distrobox.ini new file mode 100644 index 00000000000..55c7c546481 --- /dev/null +++ b/.devcontainer/doxygen-cgal/distrobox.ini @@ -0,0 +1,29 @@ +[distrobox-doxygen-1.12.0] +image=cgal/doxygen:1.12.0 +exported_bins="/usr/local/bin/doxygen /usr/bin/perl /usr/bin/cmake /usr/bin/python3" +exported_bins_path=$HOME/.local/bin-doxygen-1.12.0 + +[distrobox-doxygen-1.11.0] +image=cgal/doxygen:1.11.0 +exported_bins="/usr/local/bin/doxygen /usr/bin/perl /usr/bin/cmake /usr/bin/python3" +exported_bins_path=$HOME/.local/bin-doxygen-1.11.0 + +[distrobox-doxygen-1.10.0] +image=cgal/doxygen:1.10.0 +exported_bins="/usr/local/bin/doxygen /usr/bin/perl /usr/bin/cmake /usr/bin/python3" +exported_bins_path=$HOME/.local/bin-doxygen-1.10.0 + +[distrobox-doxygen-1.9.8] +image=cgal/doxygen:1.9.8 +exported_bins="/usr/local/bin/doxygen /usr/bin/perl /usr/bin/cmake /usr/bin/python3" +exported_bins_path=$HOME/.local/bin-doxygen-1.9.8 + +[distrobox-doxygen-1.9.7] +image=cgal/doxygen:1.9.7 +exported_bins="/usr/local/bin/doxygen /usr/bin/perl /usr/bin/cmake /usr/bin/python3" +exported_bins_path=$HOME/.local/bin-doxygen-1.9.7 + +[distrobox-doxygen-1.9.6] +image=cgal/doxygen:1.9.6 +exported_bins="/usr/local/bin/doxygen /usr/bin/perl /usr/bin/cmake /usr/bin/python3" +exported_bins_path=$HOME/.local/bin-doxygen-1.9.6 diff --git a/.gitattributes b/.gitattributes index 4211b302eb1..0c2e3c3b778 100644 --- a/.gitattributes +++ b/.gitattributes @@ -44,11 +44,9 @@ Documentation/Doxyfile text eol=lf Documentation/pkglist_filter text eol=lf Installation/update_CHANGES text eol=lf Scripts/developer_scripts/autotest_cgal text eol=lf -Scripts/developer_scripts/autotest_cgal_with_cmake text eol=lf Scripts/developer_scripts/cgal_build text eol=lf Scripts/developer_scripts/cgal_depend text eol=lf Scripts/developer_scripts/cgal_git_update_hooks_for_client text eol=lf -Scripts/developer_scripts/cgal_test_with_cmake text eol=lf Scripts/developer_scripts/cgal2gml text eol=lf Scripts/developer_scripts/check_library_uses_no_gpl_files text eol=lf Scripts/developer_scripts/check_licenses text eol=lf @@ -56,7 +54,6 @@ Scripts/developer_scripts/check_macro_names text eol=lf Scripts/developer_scripts/check_no_CGAL_USE_without_includes_before text eol=lf Scripts/developer_scripts/check_svn_keywords text eol=lf Scripts/developer_scripts/create_cgal_test text eol=lf -Scripts/developer_scripts/create_cgal_test_with_cmake text eol=lf Scripts/developer_scripts/create_internal_release text eol=lf Scripts/developer_scripts/create_new_release text eol=lf Scripts/developer_scripts/detect_files_with_mixed_eol_styles text eol=lf diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 78d96aa94db..d93b3226731 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -7,9 +7,8 @@ permissions: jobs: build: - + if: github.repository == 'CGAL/cgal' || github.event_name != 'push' runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - name: install dependencies @@ -17,7 +16,7 @@ jobs: .github/install.sh set -x sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html - sudo pip install lxml + sudo pip install lxml sudo pip install 'pyquery==1.4.1' # it seems to be the last py2 compatible version wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~cgaltest/doxygen_1_8_13_patched/doxygen sudo mv doxygen_exe /usr/bin/doxygen diff --git a/.github/workflows/cmake-all.yml b/.github/workflows/cmake-all.yml index 94c7dd8851e..f20755248c4 100644 --- a/.github/workflows/cmake-all.yml +++ b/.github/workflows/cmake-all.yml @@ -7,9 +7,8 @@ permissions: jobs: cmake-testsuite: - + if: github.repository == 'CGAL/cgal' || github.event_name != 'push' runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - name: install dependencies @@ -21,9 +20,8 @@ jobs: ctest -L Installation -j $(getconf _NPROCESSORS_ONLN) cmake-testsuite-with-qt: - + if: github.repository == 'CGAL/cgal' || github.event_name != 'push' runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - name: install dependencies diff --git a/.github/workflows/filter_testsuite.yml b/.github/workflows/filter_testsuite.yml deleted file mode 100644 index 4aaf03a3140..00000000000 --- a/.github/workflows/filter_testsuite.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Filter Testsuite - -on: - issue_comment: - types: [created] - workflow_dispatch: - -permissions: {} -jobs: - build: - permissions: - pull-requests: write # to create comment - - if: (github.event.comment.user.login == 'sloriot' || github.event.comment.user.login == 'lrineau') && contains(github.event.comment.body, '/testme') - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v7 - id: get_label - with: - result-encoding: string - script: | - //get branch name and username - const pr_url = context.payload.issue.pull_request.url - const pr_content = await github.request(pr_url) - const label = pr_content.data.head.label - const base = pr_content.data.base.ref - console.log(label) - return label+":"+base - - name: Run Testsuite - run: | - mkdir -p ~/.ssh - #ssh key - ( - cat <> ~/.ssh/id_rsa - chmod 600 /home/runner/.ssh/id_rsa - #ssh public key - ( - cat <> ~/.ssh/id_rsa.pub - chmod 644 /home/runner/.ssh/id_rsa.pub - #known hosts - wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_known_hosts -O ~/.ssh/known_hosts - #config file - wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_config -O ~/.ssh/config - #list of hosts - wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_host_list -O ~/ssh_host_list - #ssh command - LABEL="${{ steps.get_label.outputs.result }}" - USER_NAME=$(echo $LABEL | cut -d':' -f 1) - BRANCH_NAME=$(echo $LABEL | cut -d':' -f 2) - BASE=$(echo $LABEL | cut -d':' -f 3) - PR_NUMBER=${{ github.event.issue.number }} - mapfile -t HOSTS < ~/ssh_host_list; - for i in ${!HOSTS[@]}; do - HOST=$(echo ${HOSTS[$i]}|cut -d' ' -f 1 ) - PATH_TO_SCRIPT=$(echo ${HOSTS[$i]}|cut -d' ' -f 2 ) - echo "ssh ${HOST} ${PATH_TO_SCRIPT}/run_testsuite_from_branch_name.sh $USER_NAME $BRANCH_NAME $BASE $PR_NUMBER" - ssh ${HOST} "${PATH_TO_SCRIPT}/run_testsuite_from_branch_name.sh $USER_NAME $BRANCH_NAME $BASE $PR_NUMBER" - done - - name: Post address - uses: actions/github-script@v7 - with: - script: | - const address = "Testsuite launched. Results will appear on the following page: https://cgal.geometryfactory.com/~cgaltest/test_suite/TESTRESULTS/index.shtml " - github.issues.createComment({ - owner: "CGAL", - repo: "cgal", - issue_number: ${{ github.event.issue.number }}, - body: address - }); diff --git a/.gitignore b/.gitignore index 381f7a9105f..93b7a9bfc90 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ AABB_tree/demo/AABB_tree/Makefile AABB_tree/examples/AABB_tree/*.kdev* AABB_tree/examples/AABB_tree/*_example AABB_tree/examples/AABB_tree/Makefile -AABB_tree/examples/AABB_tree/cgal_test_with_cmake AABB_tree/test/AABB_tree/*.kdev* AABB_tree/test/AABB_tree/Makefile AABB_tree/test/AABB_tree/aabb_correctness_triangle_test @@ -18,17 +17,14 @@ AABB_tree/test/AABB_tree/aabb_distance_triangle_test AABB_tree/test/AABB_tree/aabb_intersection_triangle_test AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_segment_test AABB_tree/test/AABB_tree/aabb_projection_triangle_test -AABB_tree/test/AABB_tree/cgal_test_with_cmake Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits Algebraic_foundations/test/Algebraic_foundations/Chinese_remainder_traits Algebraic_foundations/test/Algebraic_foundations/Coercion_traits Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits -Algebraic_foundations/test/Algebraic_foundations/cgal_test_with_cmake Algebraic_foundations/test/Algebraic_foundations/extended_euclidean_algorithm Algebraic_foundations/test/Algebraic_foundations/ipower -Algebraic_kernel_d/test/Algebraic_kernel_d/cgal_test_with_cmake Algebraic_kernel_d/test/Algebraic_kernel_d/rs_isolator Alpha_shapes_2/demo/Alpha_shapes_2/Makefile Alpha_shapes_2/demo/Alpha_shapes_2/alpha_shapes_2 @@ -37,7 +33,6 @@ Alpha_shapes_2/examples/Alpha_shapes_2/alpha_shapes_2 Alpha_shapes_3/demo/Alpha_shapes_3/Makefile Alpha_shapes_3/demo/Alpha_shapes_3/alpha_shapes_3 Alpha_shapes_3/demo/Alpha_shapes_3/weighted_alpha_shapes_3 -Alpha_shapes_3/test/Alpha_shapes_3/cgal_test_with_cmake Alpha_shapes_3/test/Alpha_shapes_3/test_alpha_shape_3 Alpha_shapes_3/test/Alpha_shapes_3/test_fixed_alpha_shape_3 Alpha_shapes_3/test/Alpha_shapes_3/test_weighted_alpha_shape_3 @@ -60,7 +55,6 @@ Arrangement_on_surface_2/examples/Arrangement_on_surface_2/batched_point_locatio Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_dual_adapter Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bounded_planar_vertical_decomposition -Arrangement_on_surface_2/examples/Arrangement_on_surface_2/cgal_test_with_cmake Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circles Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_arcs Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_line_arcs @@ -103,30 +97,24 @@ Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unbounded_rational_fu Arrangement_on_surface_2/examples/Arrangement_on_surface_2/vertical_ray_shooting Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_point_location.cpp BGL/examples/BGL_arrangement_2/Makefile -BGL/examples/BGL_arrangement_2/cgal_test_with_cmake BGL/examples/BGL_arrangement_2/dual BGL/examples/BGL_arrangement_2/primal -BGL/test/BGL/cgal_test_with_cmake Boolean_set_operations_2/demo/Boolean_set_operations_2/Makefile Boolean_set_operations_2/demo/Boolean_set_operations_2/boolean_operations_2 Box_intersection_d/test/Box_intersection_d/automated_test Box_intersection_d/test/Box_intersection_d/benchmark.data Box_intersection_d/test/Box_intersection_d/benchmark_box_intersection Box_intersection_d/test/Box_intersection_d/box_grid -Box_intersection_d/test/Box_intersection_d/cgal_test_with_cmake Box_intersection_d/test/Box_intersection_d/random_set_test CGAL_ImageIO/demo/CGALimageIO/Makefile -CGAL_ImageIO/demo/CGALimageIO/cgal_test_with_cmake CGAL_ImageIO/demo/CGALimageIO/image_to_vtk_viewer CGAL_ImageIO/examples/CGALimageIO/Makefile -CGAL_ImageIO/examples/CGALimageIO/cgal_test_with_cmake CGAL_ImageIO/examples/CGALimageIO/convert_raw_image_to_inr CGAL_ImageIO/examples/CGALimageIO/makefile CGAL_ImageIO/examples/CGALimageIO/test_imageio CGAL_ImageIO/src/CGAL_ImageIO/Makefile Circular_kernel_3/demo/Circular_kernel_3/Circular_kernel_3_demo Circular_kernel_3/demo/Circular_kernel_3/Makefile -Circular_kernel_3/test/Circular_kernel_3/cgal_test_with_cmake Circular_kernel_3/test/Circular_kernel_3/test_Exact_spherical_kernel Circular_kernel_3/test/Circular_kernel_3/test_Lazy_Spherical_kernel Circular_kernel_3/test/Circular_kernel_3/test_Lazy_spherical_kernel_basics @@ -137,7 +125,6 @@ Documentation/log/*.* Documentation/output Documentation/tags/*.* Generator/examples/Generator/ball_d -Generator/examples/Generator/cgal_test_with_cmake Generator/examples/Generator/cube_d Generator/examples/Generator/grid_d Generator/examples/Generator/random_convex_set @@ -149,7 +136,6 @@ Generator/examples/Generator/random_segments1 Generator/examples/Generator/random_segments2 Generator/examples/Generator/sphere_d Generator/test/Generator/bug -Generator/test/Generator/cgal_test_with_cmake Generator/test/Generator/random_poly_test Generator/test/Generator/rcs_test Generator/test/Generator/test_combination_enumerator @@ -178,7 +164,6 @@ GraphicsView/demo/Triangulation_2/Makefile GraphicsView/demo/Triangulation_2/Regular_triangulation_2 GraphicsView/demo/Triangulation_2/qrc_*.cxx GraphicsView/demo/Triangulation_2/ui_*.h -HalfedgeDS/test/HalfedgeDS/cgal_test_with_cmake HalfedgeDS/test/HalfedgeDS/test_hds HalfedgeDS/test/HalfedgeDS/test_hds_decorator Inscribed_areas/test/Inscribed_areas/Makefile @@ -188,11 +173,8 @@ Installation/auxiliary/gdb/python/CGAL/printers.pyc Installation/auxiliary/gdb/test Installation/cmake/modules/*.tmp Installation/test/Installation/cgal_test -/Installation/test/Installation/cgal_test_with_cmake Installation/test/Installation/deprecation_warning -Interpolation/demo/Interpolation/cgal_test_with_cmake Intersections_3/test/Intersections_3/bbox_other_do_intersect_test -Intersections_3/test/Intersections_3/cgal_test_with_cmake Intersections_3/test/Intersections_3/circle_other Intersections_3/test/Intersections_3/line_line Intersections_3/test/Intersections_3/segment_segment @@ -206,7 +188,6 @@ Jet_fitting_3/examples/Jet_fitting_3/Single_estimation Jet_fitting_3/examples/Jet_fitting_3/VC Jet_fitting_3/test/Jet_fitting_3/Makefile Jet_fitting_3/test/Jet_fitting_3/blind_1pt -/Jet_fitting_3/examples/Jet_fitting_3/cgal_test_with_cmake /Jet_fitting_3/examples/Jet_fitting_3/data_ellipe0.003.off.4ogl.txt Kernel_23/test/Kernel_23/Cartesian Kernel_23/test/Kernel_23/Dimension @@ -220,7 +201,6 @@ Kernel_23/test/Kernel_23/Simple_cartesian Kernel_23/test/Kernel_23/Simple_homogeneous Kernel_23/test/Kernel_23/Test_IO.out /Kernel_23/test/Kernel_23/Test-*IO.out -Kernel_23/test/Kernel_23/cgal_test_with_cmake Kernel_23/test/Kernel_23/test_kernel__ Kinetic_data_structures/demo/Kinetic_data_structures/Delaunay_triangulation_2 Kinetic_data_structures/demo/Kinetic_data_structures/Delaunay_triangulation_stable_subset_2 @@ -229,13 +209,11 @@ Kinetic_data_structures/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_ Kinetic_data_structures/demo/Kinetic_data_structures/KDS_generate_data Kinetic_data_structures/demo/Kinetic_data_structures/KDS_gui_2 Kinetic_data_structures/demo/Kinetic_data_structures/Makefile -Kinetic_data_structures/demo/Kinetic_data_structures/cgal_test_with_cmake Kinetic_data_structures/demo/Kinetic_data_structures/generate_data Kinetic_data_structures/demo/Kinetic_data_structures/gui_2 Kinetic_data_structures/test/Kinetic_data_structures/Delaunay_triangulation_2 Kinetic_data_structures/test/Kinetic_data_structures/Delaunay_triangulation_3 Kinetic_data_structures/test/Kinetic_data_structures/active_objects_tables -Kinetic_data_structures/test/Kinetic_data_structures/cgal_test_with_cmake Kinetic_data_structures/test/Kinetic_data_structures/exact_kds Kinetic_data_structures/test/Kinetic_data_structures/instantaneous_kernel Kinetic_data_structures/test/Kinetic_data_structures/numbers @@ -248,8 +226,6 @@ Kinetic_data_structures/test/Kinetic_data_structures/test_KDS_Delaunay_triangula Kinetic_data_structures/test/Kinetic_data_structures/timings Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3.qrc.depends Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo -Linear_cell_complex/demo/Linear_cell_complex/cgal_test_with_cmake -Linear_cell_complex/examples/Linear_cell_complex/cgal_test_with_cmake Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3 Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_triangulation Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_with_colored_vertices @@ -297,7 +273,6 @@ Mesh_2/demo/Mesh_2/*.core Mesh_2/demo/Mesh_2/*.moc Mesh_2/demo/Mesh_2/.*.deps Mesh_2/demo/Mesh_2/Makefile -Mesh_2/demo/Mesh_2/cgal_test_with_cmake Mesh_2/demo/Mesh_2/conform Mesh_2/demo/Mesh_2/depends Mesh_2/demo/Mesh_2/filename.edg @@ -309,7 +284,6 @@ Mesh_2/demo/Mesh_2/semantic.cache Mesh_2/doxygen Mesh_2/examples/Mesh_2/*.core Mesh_2/examples/Mesh_2/.*.deps -Mesh_2/examples/Mesh_2/cgal_test_with_cmake Mesh_2/examples/Mesh_2/conform Mesh_2/examples/Mesh_2/conforming Mesh_2/examples/Mesh_2/depends @@ -324,7 +298,6 @@ Mesh_2/test/Mesh_2/*.core Mesh_2/test/Mesh_2/.*.deps Mesh_2/test/Mesh_2/Makefile Mesh_2/test/Mesh_2/bench_double_map -Mesh_2/test/Mesh_2/cgal_test_with_cmake Mesh_2/test/Mesh_2/conform_plus Mesh_2/test/Mesh_2/depends Mesh_2/test/Mesh_2/my_makefile @@ -373,7 +346,6 @@ Mesh_3/examples/Mesh_3/.*.deps Mesh_3/examples/Mesh_3/random-image.inr Mesh_3/examples/Mesh_3/Makefile Mesh_3/examples/Mesh_3/applications -Mesh_3/examples/Mesh_3/cgal_test_with_cmake Mesh_3/examples/Mesh_3/cgal_to_medit Mesh_3/examples/Mesh_3/chair-after.mesh Mesh_3/examples/Mesh_3/chair-after.png @@ -411,7 +383,6 @@ Mesh_3/examples/Mesh_3/test_off /Mesh_3/test/Mesh_3/a.lua /Mesh_3/test/Mesh_3/applications /Mesh_3/test/Mesh_3/*.cgal -/Mesh_3/test/Mesh_3/cgal_test_with_cmake /Mesh_3/test/Mesh_3/cgal_to_medit /Mesh_3/test/Mesh_3/combined_spheres /Mesh_3/test/Mesh_3/combined_spheres-with-sphere-oracle @@ -513,11 +484,9 @@ Min_ellipse_2/.tmp Min_ellipse_2/Makefile Min_ellipse_2/bin Min_ellipse_2/doc_ps -Minkowski_sum_3/test/Minkowski_sum_3/cgal_test_with_cmake Nef_2/test/Nef_2/EPoint-test Nef_2/test/Nef_2/Nef_polyhedron_2-test Nef_2/test/Nef_2/Polynomial-test -Nef_2/test/Nef_2/cgal_test_with_cmake Nef_2/test/Nef_2/nef_2_point_location Nef_3/demo/Nef_3/Makefile Nef_3/examples/Nef_3/Makefile @@ -575,7 +544,6 @@ Number_types/test/Number_types/_test_valid_finite_double Number_types/test/Number_types/_test_valid_finite_float Number_types/test/Number_types/bench_interval Number_types/test/Number_types/cgal_test -Number_types/test/Number_types/cgal_test_with_cmake Number_types/test/Number_types/constant Number_types/test/Number_types/double Number_types/test/Number_types/doubletst @@ -626,7 +594,6 @@ Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/moc_*.cpp Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/ui_*.h Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/Periodic_Lloyd_3.qch Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/Test_tds_IO_3 -Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/cgal_test_with_cmake Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_alpha_shape_3 Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_delaunay_3 Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_delaunay_hierarchy_3 @@ -637,7 +604,6 @@ Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_trian Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_triangulation_traits_H_3 Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_triangulation_traits_SC_3 Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_triangulation_traits_SH_3 -Point_set_2/test/Point_set_2/cgal_test_with_cmake Point_set_2/test/Point_set_2/nearest_nb1 Point_set_2/test/Point_set_2/nearest_nb_fcn Point_set_2/test/Point_set_2/range_search_fcn @@ -683,7 +649,6 @@ Point_set_processing_3/test/Point_set_processing_3/smoothing_test /Polygon_mesh_processing/test/Polygon_mesh_processing/elephant-oriented.off /Polygon_mesh_processing/test/Polygon_mesh_processing/elephant-shuffled.off /Polygon_mesh_processing/test/Polygon_mesh_processing/blobby_2cc_no_id.off -/Polygon_mesh_processing/test/Polygon_mesh_processing/cgal_test_with_cmake /Polygon_mesh_processing/test/Polygon_mesh_processing/data/U.polylines.txt.off /Polygon_mesh_processing/test/Polygon_mesh_processing/data/hole1.txt.off /Polygon_mesh_processing/test/Polygon_mesh_processing/data/hole2.txt.off @@ -707,7 +672,6 @@ Polyhedron/demo/Polyhedron/snapshot.* Polyhedron/demo/Polyhedron/ui_*.h Polyhedron/test/Polyhedron/*.kdev* Polyhedron/test/Polyhedron/Makefile -Polyhedron/test/Polyhedron/cgal_test_with_cmake Polyhedron/test/Polyhedron/test_polyhedron Polynomial/test/Polynomial/Exponent_vector Polynomial/test/Polynomial/Interpolator @@ -715,7 +679,6 @@ Polynomial/test/Polynomial/Polynomial_traits_d Polynomial/test/Polynomial/Polynomial_type_generator Polynomial/test/Polynomial/Polynomial_using_core Polynomial/test/Polynomial/Polynomial_using_leda -Polynomial/test/Polynomial/cgal_test_with_cmake Polynomial/test/Polynomial/modular_gcd_utcf_algorithm_M Polynomial/test/Polynomial/modular_gcd_utcf_dfai Polynomial/test/Polynomial/modular_gcd_utcf_pure_wang @@ -745,10 +708,8 @@ Polytope_distance_d/.obj Polytope_distance_d/.tmp Polytope_distance_d/Makefile Polytope_distance_d/bin -Polytope_distance_d/test/Polytope_distance_d/cgal_test_with_cmake Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d_d Principal_component_analysis/test/Principal_component_analysis/bounding_box -Principal_component_analysis/test/Principal_component_analysis/cgal_test_with_cmake Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_circles_2 Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_cuboids_3 Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_points_2 @@ -773,7 +734,6 @@ Principal_component_analysis/test/Principal_component_analysis/test_linear_least Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_tetrahedra_3 Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_2 Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_3 -/Profiling_tools/test/Profiling_tools/cgal_test_with_cmake /Profiling_tools/test/Profiling_tools/test_memory_sizer /Profiling_tools/test/Profiling_tools/test_timer QP_solver/documentation/Degeneracies.aux @@ -805,7 +765,6 @@ Ridges_3/examples/Ridges_3/Compute_Ridges_Umbilics Ridges_3/examples/Ridges_3/Makefile Ridges_3/test/Ridges_3/Makefile Ridges_3/test/Ridges_3/ridge_test -STL_Extension/test/STL_Extension/cgal_test_with_cmake STL_Extension/test/STL_Extension/test_Cache STL_Extension/test/STL_Extension/test_Compact_container STL_Extension/test/STL_Extension/test_Concatenate_iterator @@ -827,7 +786,6 @@ STL_Extension/test/STL_Extension/test_nth_element STL_Extension/test/STL_Extension/test_stl_extension STL_Extension/test/STL_Extension/test_type_traits STL_Extension/test/STL_Extension/test_vector -SearchStructures/test/RangeSegmentTrees/cgal_test_with_cmake SearchStructures/test/RangeSegmentTrees/test_segment_tree_set_2 Skin_surface_3/.cdtproject Skin_surface_3/.project @@ -838,7 +796,6 @@ Skin_surface_3/test/Skin_surface_3/err.txt Skin_surface_3/test/Skin_surface_3/makefile Skin_surface_3/test/Skin_surface_3/msgs.txt Skin_surface_3/test/Skin_surface_3/subdivision_test -Spatial_sorting/test/Spatial_sorting/cgal_test_with_cmake Stream_lines_2/demo/Stream_lines_2/Makefile Stream_lines_2/demo/Stream_lines_2/streamlines Surface_mesh_parameterization/examples/Surface_mesh_parameterization/*.eps @@ -966,20 +923,15 @@ Triangulation/test/Triangulation/output-pcds* Triangulation/test/Triangulation/pc Triangulation/test/Triangulation/pcds Triangulation/test/Triangulation/torture -/Triangulation/examples/Triangulation/cgal_test_with_cmake -/Triangulation/test/Triangulation/cgal_test_with_cmake /Triangulation/test/Triangulation/output-tds-* -Triangulation_2/cgal_test_with_cmake Triangulation_2/demo/Triangulation_2/Makefile Triangulation_2/demo/Triangulation_2/constrained Triangulation_2/demo/Triangulation_2/constrained_delaunay_triangulation_2 Triangulation_2/demo/Triangulation_2/delaunay_triangulation_2 Triangulation_2/demo/Triangulation_2/regular_triangulation_2 -Triangulation_2/examples/Triangulation_2/cgal_test_with_cmake Triangulation_2/examples/Triangulation_2/regular Triangulation_2/test/Triangulation_2/Makefile Triangulation_2/test/Triangulation_2/T??.triangulation -Triangulation_2/test/Triangulation_2/cgal_test_with_cmake Triangulation_2/test/Triangulation_2/file_tds* Triangulation_2/test/Triangulation_2/makefile Triangulation_2/test/Triangulation_2/test_cdt_degenerate_case @@ -997,10 +949,8 @@ Triangulation_2/test/Triangulation_2/test_triangulation_2_bis Triangulation_2/test/Triangulation_2/test_triangulation_geom_traits Triangulation_2/test/Triangulation_2/test_triangulation_tds Triangulation_2/test/Triangulation_2/vrml_tds* -Triangulation_3/benchmark/Triangulation_3/cgal_test_with_cmake Triangulation_3/benchmark/Triangulation_3/simple Triangulation_3/examples/Triangulation_3/adding_handles_3 -Triangulation_3/examples/Triangulation_3/cgal_test_with_cmake Triangulation_3/examples/Triangulation_3/color Triangulation_3/examples/Triangulation_3/fast_location_3 Triangulation_3/examples/Triangulation_3/find_conflicts_3 @@ -1026,7 +976,6 @@ Triangulation_3/test/Triangulation_3/Test8_triangulation_IO_3_binary Triangulation_3/test/Triangulation_3/Test??_triangulation_IO_3 Triangulation_3/test/Triangulation_3/Test?_triangulation_IO_3 Triangulation_3/test/Triangulation_3/Test_tds_IO_3 -Triangulation_3/test/Triangulation_3/cgal_test_with_cmake Triangulation_3/test/Triangulation_3/makefile Triangulation_3/test/Triangulation_3/test_delaunay_3 Triangulation_3/test/Triangulation_3/test_delaunay_hierarchy_3 @@ -1083,7 +1032,6 @@ ProgramOutput* ErrorOutput* CompilerOutput* error.txt -cgal_test_with_cmake.log # File created by the Semantic Bovinator (an Emacs package) semantic.cache @@ -1140,9 +1088,7 @@ Doxyfile gmon.* # Unsorted file names: -/Point_set_processing_3/test/Point_set_processing_3/cgal_test_with_cmake /Point_set_processing_3/test/Point_set_processing_3/read_test -/Nef_S2/test/Nef_S2/cgal_test_with_cmake /Arrangement_on_surface_2/test/Arrangement_on_surface_2/construction_test_suite_generator /Arrangement_on_surface_2/test/Arrangement_on_surface_2/ex_kernel_point /Arrangement_on_surface_2/test/Arrangement_on_surface_2/ex_kernel_segment @@ -1190,15 +1136,11 @@ gmon.* /Principal_component_analysis/examples/Principal_component_analysis/barycenter /Principal_component_analysis/examples/Principal_component_analysis/bounding_box /Principal_component_analysis/examples/Principal_component_analysis/centroid -/Principal_component_analysis/examples/Principal_component_analysis/cgal_test_with_cmake /Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_points_2 /Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_triangles_3 -/Polygon/examples/Polygon/cgal_test_with_cmake -/Polygon/test/Polygon/cgal_test_with_cmake /Polygon/test/Polygon/polytest.ascii /Polygon/test/Polygon/polytest.binary /Polygon/test/Polygon/polytest.pretty -/Stream_support/test/Stream_support/cgal_test_with_cmake /*.html /Snap_rounding_2/test/Snap_rounding_2/data/out Polygonal_surface_reconstruction/examples/build* diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 00000000000..70106c515ce --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,7 @@ +{ + "default": true, + "line-length": false, + "no-duplicate-heading": { + "siblings_only": true + } +} diff --git a/AABB_tree/benchmark/AABB_tree/CMakeLists.txt b/AABB_tree/benchmark/AABB_tree/CMakeLists.txt index 63ac01c5851..bfcbb5454fa 100644 --- a/AABB_tree/benchmark/AABB_tree/CMakeLists.txt +++ b/AABB_tree/benchmark/AABB_tree/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(AABB_traits_benchmark) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) @@ -13,7 +13,7 @@ create_single_source_cgal_program("tree_construction.cpp") find_package(benchmark QUIET) if(benchmark_FOUND) create_single_source_cgal_program("tree_creation.cpp") - target_link_libraries(tree_creation benchmark::benchmark) + target_link_libraries(tree_creation PRIVATE benchmark::benchmark) else() message(STATUS "NOTICE: The benchmark 'tree_creation.cpp' requires the Google benchmark library, and will not be compiled.") endif() diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index eabac21335c..3af9388139f 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -1,6 +1,6 @@ # This is the CMake script for compiling the AABB tree demo. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(AABB_tree_Demo) # Find includes in corresponding build directories diff --git a/AABB_tree/examples/AABB_tree/CMakeLists.txt b/AABB_tree/examples/AABB_tree/CMakeLists.txt index 620a79dccdb..ba856721722 100644 --- a/AABB_tree/examples/AABB_tree/CMakeLists.txt +++ b/AABB_tree/examples/AABB_tree/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(AABB_tree_Examples) find_package(CGAL REQUIRED) diff --git a/AABB_tree/test/AABB_tree/CMakeLists.txt b/AABB_tree/test/AABB_tree/CMakeLists.txt index 72cd7d066a2..1e13ff0ba26 100644 --- a/AABB_tree/test/AABB_tree/CMakeLists.txt +++ b/AABB_tree/test/AABB_tree/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(AABB_tree_Tests) find_package(CGAL REQUIRED) diff --git a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/CMakeLists.txt b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/CMakeLists.txt index 3378a510767..255045d782d 100644 --- a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/CMakeLists.txt +++ b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Advancing_front_surface_reconstruction_Examples) find_package(CGAL REQUIRED) diff --git a/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/CMakeLists.txt b/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/CMakeLists.txt index 27973a058d8..23e1dd2529b 100644 --- a/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/CMakeLists.txt +++ b/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Advancing_front_surface_reconstruction_Tests) find_package(CGAL REQUIRED) diff --git a/Algebraic_foundations/examples/Algebraic_foundations/CMakeLists.txt b/Algebraic_foundations/examples/Algebraic_foundations/CMakeLists.txt index 186e8a01b2e..7150fdadd62 100644 --- a/Algebraic_foundations/examples/Algebraic_foundations/CMakeLists.txt +++ b/Algebraic_foundations/examples/Algebraic_foundations/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Algebraic_foundations_Examples) find_package(CGAL REQUIRED) diff --git a/Algebraic_foundations/test/Algebraic_foundations/CMakeLists.txt b/Algebraic_foundations/test/Algebraic_foundations/CMakeLists.txt index 467fdca406f..170d443ae71 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/CMakeLists.txt +++ b/Algebraic_foundations/test/Algebraic_foundations/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Algebraic_foundations_Tests) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt index f93c12d0950..a06ae073399 100644 --- a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Algebraic_kernel_d_Examples) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt index 1e6570dd393..0f0d16a3c9c 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Algebraic_kernel_d_Tests) # CGAL and its components diff --git a/Algebraic_kernel_for_circles/test/Algebraic_kernel_for_circles/CMakeLists.txt b/Algebraic_kernel_for_circles/test/Algebraic_kernel_for_circles/CMakeLists.txt index 424bd86fd28..f957c0e835c 100644 --- a/Algebraic_kernel_for_circles/test/Algebraic_kernel_for_circles/CMakeLists.txt +++ b/Algebraic_kernel_for_circles/test/Algebraic_kernel_for_circles/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Algebraic_kernel_for_circles_Tests) find_package(CGAL REQUIRED) diff --git a/Algebraic_kernel_for_spheres/test/Algebraic_kernel_for_spheres/CMakeLists.txt b/Algebraic_kernel_for_spheres/test/Algebraic_kernel_for_spheres/CMakeLists.txt index 637387543f2..0167d0c1d98 100644 --- a/Algebraic_kernel_for_spheres/test/Algebraic_kernel_for_spheres/CMakeLists.txt +++ b/Algebraic_kernel_for_spheres/test/Algebraic_kernel_for_spheres/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Algebraic_kernel_for_spheres_Tests) find_package(CGAL REQUIRED) diff --git a/Alpha_shapes_2/examples/Alpha_shapes_2/CMakeLists.txt b/Alpha_shapes_2/examples/Alpha_shapes_2/CMakeLists.txt index 493cacad635..35daf075ee4 100644 --- a/Alpha_shapes_2/examples/Alpha_shapes_2/CMakeLists.txt +++ b/Alpha_shapes_2/examples/Alpha_shapes_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Alpha_shapes_2_Examples) find_package(CGAL REQUIRED) diff --git a/Alpha_shapes_2/test/Alpha_shapes_2/CMakeLists.txt b/Alpha_shapes_2/test/Alpha_shapes_2/CMakeLists.txt index a4b13149993..94a0b7a934b 100644 --- a/Alpha_shapes_2/test/Alpha_shapes_2/CMakeLists.txt +++ b/Alpha_shapes_2/test/Alpha_shapes_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Alpha_shapes_2_Tests) find_package(CGAL REQUIRED) diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt index 1028c6f4ea4..097684b274e 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Alpha_shapes_3_Demo) # Find includes in corresponding build directories diff --git a/Alpha_shapes_3/examples/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/examples/Alpha_shapes_3/CMakeLists.txt index 04f6565859d..892c164faa2 100644 --- a/Alpha_shapes_3/examples/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/examples/Alpha_shapes_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Alpha_shapes_3_Examples) find_package(CGAL REQUIRED) diff --git a/Alpha_shapes_3/test/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/test/Alpha_shapes_3/CMakeLists.txt index e4aca061940..fe6da11668c 100644 --- a/Alpha_shapes_3/test/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/test/Alpha_shapes_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Alpha_shapes_3_Tests) find_package(CGAL REQUIRED) diff --git a/Alpha_wrap_3/benchmark/Alpha_wrap_3/CMakeLists.txt b/Alpha_wrap_3/benchmark/Alpha_wrap_3/CMakeLists.txt index 23150027c4f..c118956dcbf 100644 --- a/Alpha_wrap_3/benchmark/Alpha_wrap_3/CMakeLists.txt +++ b/Alpha_wrap_3/benchmark/Alpha_wrap_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Alpha_wrap_3_Benchmark) find_package(CGAL REQUIRED) diff --git a/Alpha_wrap_3/benchmark/Alpha_wrap_3/Quality/quality_benchmark.cpp b/Alpha_wrap_3/benchmark/Alpha_wrap_3/Quality/quality_benchmark.cpp index f8e54c488a4..12fa0690c9d 100644 --- a/Alpha_wrap_3/benchmark/Alpha_wrap_3/Quality/quality_benchmark.cpp +++ b/Alpha_wrap_3/benchmark/Alpha_wrap_3/Quality/quality_benchmark.cpp @@ -75,7 +75,7 @@ double mean_min_angle(const Mesh& mesh) const Triangle_3 tr = surface_mesh_face_to_triangle(f, mesh); std::array angles = triangle_angles(tr); - FT min_angle = std::min({angles[0], angles[1], angles[2]}); + FT min_angle = (std::min)({angles[0], angles[1], angles[2]}); min_angle = min_angle * (180.0 / CGAL_PI); mean_min_angle += min_angle; @@ -93,7 +93,7 @@ double mean_max_angle(const Mesh& mesh) const Triangle_3 tr = surface_mesh_face_to_triangle(f, mesh); std::array angles = triangle_angles(tr); - FT max_angle = std::max({angles[0], angles[1], angles[2]}); + FT max_angle = (std::max)({angles[0], angles[1], angles[2]}); max_angle = max_angle * (180.0 / CGAL_PI); mean_max_angle += max_angle; @@ -151,8 +151,8 @@ double mean_edge_ratio(const Mesh& mesh, FT a = std::sqrt(CGAL::squared_distance(tr[0], tr[1])); FT b = std::sqrt(CGAL::squared_distance(tr[1], tr[2])); FT c = std::sqrt(CGAL::squared_distance(tr[2], tr[0])); - FT min_edge = std::min({a, b, c}); - FT max_edge = std::max({a, b, c}); + FT min_edge = (std::min)({a, b, c}); + FT max_edge = (std::max)({a, b, c}); FT edge_ratio = max_edge / min_edge; mean_edge_ratio += edge_ratio; @@ -181,7 +181,7 @@ double mean_aspect_ratio(const Mesh& mesh, FT c = std::sqrt(CGAL::squared_distance(tr[2], tr[0])); FT s = 0.5 * (a + b + c); FT inscribed_radius = std::sqrt((s * (s - a) * (s - b) * (s - c)) / s); - FT max_edge = std::max({a, b, c}); + FT max_edge = (std::max)({a, b, c}); FT aspect_ratio = max_edge / inscribed_radius; aspect_ratio /= (2. * std::sqrt(3.)); // normalized mean_aspect_ratio += aspect_ratio; diff --git a/Alpha_wrap_3/examples/Alpha_wrap_3/CMakeLists.txt b/Alpha_wrap_3/examples/Alpha_wrap_3/CMakeLists.txt index 8a1c8d1b9fe..ed779a17df5 100644 --- a/Alpha_wrap_3/examples/Alpha_wrap_3/CMakeLists.txt +++ b/Alpha_wrap_3/examples/Alpha_wrap_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Alpha_wrap_3_Examples) find_package(CGAL REQUIRED) diff --git a/Alpha_wrap_3/test/Alpha_wrap_3/CMakeLists.txt b/Alpha_wrap_3/test/Alpha_wrap_3/CMakeLists.txt index d719fae8a63..4281c1efcda 100644 --- a/Alpha_wrap_3/test/Alpha_wrap_3/CMakeLists.txt +++ b/Alpha_wrap_3/test/Alpha_wrap_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Alpha_wrap_3_Tests) find_package(CGAL REQUIRED) diff --git a/Apollonius_graph_2/examples/Apollonius_graph_2/CMakeLists.txt b/Apollonius_graph_2/examples/Apollonius_graph_2/CMakeLists.txt index 8b4217331c6..758309e7dc0 100644 --- a/Apollonius_graph_2/examples/Apollonius_graph_2/CMakeLists.txt +++ b/Apollonius_graph_2/examples/Apollonius_graph_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Apollonius_graph_2_Examples) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Apollonius_graph_2/test/Apollonius_graph_2/CMakeLists.txt b/Apollonius_graph_2/test/Apollonius_graph_2/CMakeLists.txt index c9d061984c7..51ea8576fa6 100644 --- a/Apollonius_graph_2/test/Apollonius_graph_2/CMakeLists.txt +++ b/Apollonius_graph_2/test/Apollonius_graph_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Apollonius_graph_2_Tests) find_package(CGAL REQUIRED) diff --git a/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt b/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt index 2b62b5b12c9..a2df1177140 100644 --- a/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt +++ b/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Arithmetic_kernel_Tests) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.cpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.cpp index a1032551da2..02a1b3e92df 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.cpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.cpp @@ -54,7 +54,7 @@ void validate(std::any & v, const std::vector & values, Option_parser::my_validate(v, values); } -/*! Constructor */ +/*! constructs */ Option_parser::Option_parser() : m_generic_opts("Generic options"), m_config_opts("Configuration options"), @@ -136,7 +136,7 @@ Option_parser::Option_parser() : m_positional_opts.add("input-file", -1); } -/*! Parse the options */ +/*! parses the options */ void Option_parser::operator()(int argc, char * argv[]) { po::store(po::command_line_parser(argc, argv). @@ -225,20 +225,20 @@ void Option_parser::operator()(int argc, char * argv[]) } } -/*! Obtain the base file-name */ +/*! obtains the base file-name */ const std::string & Option_parser::get_file_name(unsigned int i) const { return m_variable_map["input-file"].as()[i]; } -/*! Obtain the full file-name */ +/*! obtains the full file-name */ const std::string & Option_parser::get_full_name(unsigned int i) const { return m_full_names[i]; } -/*! Obtain number of type options */ +/*! obtains number of type options */ unsigned int Option_parser::get_number_opts(Type_id &) { return sizeof(s_type_opts) / sizeof(char *); } -/*! Obtain number of strategy options */ +/*! obtains number of strategy options */ unsigned int Option_parser::get_number_opts(Strategy_id &) { return sizeof(s_strategy_opts) / sizeof(char *); } diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.hpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.hpp index a20f3b804c2..edca2243def 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.hpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.hpp @@ -62,17 +62,17 @@ public: typedef Vector_strategy_id::iterator Vector_strategy_id_iter; public: - /*! \brief obtains number of type options */ + /*! obtains number of type options */ static unsigned int get_number_opts(Type_id &); - /*! \brief obtains number of strategy options */ + /*! obtains number of strategy options */ static unsigned int get_number_opts(Strategy_id &); - /*! Compare the i-th type option to a given option */ + /*! compares the i-th type option to a given option */ static bool compare_opt(unsigned int i, const char * opt, Type_id &) { return strcmp(s_type_opts[i], opt) == 0; } - /*! Compare the i-th strategy option to a given option */ + /*! compares the i-th strategy option to a given option */ static bool compare_opt(unsigned int i, const char * opt, Strategy_id &) { return strcmp(s_strategy_opts[i], opt) == 0; } @@ -94,19 +94,19 @@ public: Input_file_missing_error(std::string & str) : error(str) {} }; - /*! Parse the options */ + /*! parses the options */ void operator()(int argc, char * argv[]); - /*! Obtain the verbosity level */ + /*! obtains the verbosity level */ unsigned int get_verbose_level() const { return m_verbose_level; } - /*! Obtain the number of input files */ + /*! obtains the number of input files */ unsigned int get_number_files() const { return m_number_files; } - /*! \brief obtains the base file-name */ + /*! obtains the base file-name */ const std::string & get_file_name(unsigned int i) const; - /*! \brief obtains the full file-name */ + /*! obtains the full file-name */ const std::string & get_full_name(unsigned int i) const; bool get_postscript() const { return m_postscript; } @@ -117,10 +117,10 @@ public: const char * get_strategy_name(Strategy_code id) const { return s_strategy_opts[id]; } - /*! Obtain the window width */ + /*! obtains the window width */ unsigned int get_width() const { return m_win_width; } - /*! Obtain the window height */ + /*! obtains the window height */ unsigned int get_height() const { return m_win_height; } template diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt index 990e8d5092e..5e94ede8117 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt @@ -1,6 +1,6 @@ # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Arrangement_on_surface_2_Demo) if(NOT POLICY CMP0070 AND POLICY CMP0053) diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/CMakeLists.txt index fa18ff35df6..332c3deada6 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/CMakeLists.txt @@ -1,6 +1,6 @@ # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Arrangement_on_surface_2_earth_Demo) if(NOT POLICY CMP0070 AND POLICY CMP0053) diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.cpp index 58bc34f3ca2..53f7aba4972 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.cpp @@ -62,7 +62,7 @@ void GUI_country_pick_handler::mouse_press_event(QMouseEvent* e) { auto sd = sqrt(d); auto t1 = (-b - sd) / (2 * a); auto t2 = (-b + sd) / (2 * a); - if (t1 > 0 && t2 > 0) ti = std::min(t1, t2); + if (t1 > 0 && t2 > 0) ti = (std::min)(t1, t2); else if (t1 > 0) ti = t1; else ti = t2; } diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.cpp index f99c6c7e55b..decff54e3d5 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.cpp @@ -140,7 +140,7 @@ void Main_widget::initializeGL() { for (auto& [country_name, triangle_points] : country_triangles_map) { auto country_triangles = std::make_unique(triangle_points); auto color = QVector4D(rndm(), rndm(), rndm(), 1); - auto m = std::max(color.x(), std::max(color.y(), color.z())); + auto m = (std::max)(color.x(), (std::max)(color.y(), color.z())); color /= m; color *= m_dimming_factor; color.setW(1); diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index 5b4b9ed9051..64d3604362f 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -9,9 +9,9 @@ namespace CGAL { \authors Ron Wein, Eric Berberich, Efi Fogel, Dan Halperin, Michael Hemmer, Oren Salzman, and Baruch Zukerman - + \section aos_sec-intro Introduction - + Geometric arrangements, or arrangements for short, are subdivisions of some space induced by geometric objects. @@ -42,9 +42,9 @@ computational-geometry literature and have many applications; see, e.g., \cgalCite{as-aa-00}, \cgalCite{cgal:bfhks-apsca-10}, \cgalCite{cgal:bfhmw-apsgf-10}, and \cgalCite{cgal:h-a-04}. - + \subsection aos_ssec-intro-sep Separation of Topology and Geometry - + The use of the generic programming paradigm enables a convenient separation of the topology and the geometry of data @@ -123,9 +123,9 @@ themselves. The precise minimal sets of requirements the actual traits classes must conform to are organized as a hierarchy of concepts; see Section \ref aos_sec-geom_traits. - + \subsection aos_ssec-intro-well_behaved Well-Behaved Curves - + What constitutes valid curves that can be handled by the \ref PkgArrangementOnSurface2 package is discussed in detail in Section @@ -168,13 +168,14 @@ Remarks of segments in all the polylines together. The same holds for the more general type polycurve, which are piecewise curves that are not necessarily linear; see Section \ref - arr_sssectr_polycurves. + arr_sssectr_polycurves. + - + \subsection aos_ssec-intro-outline Outline - + In Section \ref aos_sec-basic we provide the minimum material you need to know in order to use \cgal 2D arrangements in the plane. In Section @@ -207,9 +208,9 @@ to apply the graph algorithms implemented in the Boost Graph Library to arrangement types. Finally, in Section \ref aos_sec-tips we provide some tips that can be applied to expedite computation. - + \section aos_sec-basic Basic Arrangements - + We start with a formal definition of two-dimensional arrangements, and proceed with an introduction to the data structure used to represent @@ -220,9 +221,9 @@ describe a central component in the \ref PkgArrangementOnSurface2 package, namely, the `Arrangement_2` class-template, which can be used to represent arrangements in the plane. - + \subsection aos_ssec-basic-dcel Representation of Arrangements: The Dcel - + Given a set \f$\mathcal{C}\f$ of curves embedded in a two-dimensional surface, the arrangement \f$\mathcal{A}(\mathcal{C})\f$ is @@ -346,7 +347,7 @@ theoretically, the former are degenerate holes. See \dcel features. For more details on the \dcel data structure see \cgalCite{bkos-cgaa-00} Chapter 2. - + \cgalFigureBegin{aos_fig-arr_segs,arr_segs.png} An arrangement of interior-disjoint line segments with some of the \dcel records that represent it. The unbounded face \f$ f_0\f$ has @@ -364,11 +365,11 @@ adjacent faces \f$ f_3\f$ and \f$ f_4\f$, while the other hole comprises of two edges. \f$ f_1\f$ also contains two isolated vertices \f$ u_1\f$ and \f$ u_2\f$ in its interior. \cgalFigureEnd - + - + \subsection aos_ssec-basic-arr_class The Arrangement Class Template - + One of the main components of the \ref PkgArrangementOnSurface2 package is the `Arrangement_2` class template. An @@ -502,9 +503,9 @@ int main() { } \endcode - + \subsection arr_ssectraverse Traversing the Arrangement - + The simplest and most fundamental arrangement operations are the various traversal methods, which allow users to systematically go over @@ -573,9 +574,9 @@ The call \link Arrangement_on_surface_2::non_const_handle() `non_const_handle()`\endlink can be issued only if the arrangement object `arr` is mutable; see, e.g., Section \ref arr_ssecpl. - + \subsubsection arr_sssectr_vertex Traversal Methods for an Arrangement Vertex - + A vertex \f$v\f$ of an arrangement induced by bounded curves is always associated with a geometric entity, namely with an \link @@ -625,9 +626,9 @@ If \f$v\f$ is an isolated vertex, the call \link Arrangement_on_surface_2::Vertex::face() `v->face()`\endlink can be used to obtain the face that contains \f$v\f$. - + \subsubsection arr_sssectr_halfedge Traversal Methods for an Arrangement Halfedge - + A halfedge \f$e\f$ of an arrangement induced by bounded curves is associated with an \link Arrangement_on_surface_2::X_monotone_curve_2 @@ -698,9 +699,9 @@ void print_ccb(typename Arrangement::Ccb_halfedge_const_circulator circ) { } \endcode - + \subsubsection arr_sssectr_face Traversal Methods for an Arrangement Face - + An `Arrangement_2` object `arr` that identifies an arrangement of bounded curves always has a single unbounded face. The call \link @@ -811,9 +812,9 @@ void print_arrangement (const Arrangement_2& arr) { } \endcode - + \subsection arr_ssecmodify Modifying the Arrangement - + In this section we review the various member functions of the `Arrangement_2` class that allow users to modify the topological @@ -834,9 +835,9 @@ terms of the specialized insertion functions, we start by describing the fundamental functionality of the arrangement class, and describe the operation of the free functions in Section \ref arr_secgl_funcs. - + \subsection arr_sssecmf_insert_cv Inserting Pairwise Disjoint x-Monotone Curves - + The most trivial functions that allow users to modify the arrangement are the specialized functions for the insertion of an \f$x\f$-monotone @@ -858,7 +859,7 @@ free functions that operate on the arrangement and the inserted curve(s); see Section \ref arr_secgl_funcs for more details and examples. - + \cgalFigureBegin{aos_fig-insert,insert.png} Illustrations of the various specialized insertion procedures. The inserted \f$x\f$-monotone curve is drawn as a dashed line, surrounded @@ -874,7 +875,7 @@ endpoints of which correspond to existing vertices \f$u_1\f$ and \f$f'\f$. The hole \f$h_1\f$, which belonged to \f$f\f$ before the insertion, becomes a hole in this new face. \cgalFigureEnd - + When an \f$x\f$-monotone curve is inserted into an existing arrangement, such that the interior of this curve is disjoint from the @@ -965,14 +966,14 @@ halfedge directed from \f$v_1\f$ to \f$v_2\f$. - + \cgalFigureBegin{aos_fig-edge_insertion,edge_insertion.png} The arrangement of the line segments \f$s_1, \ldots, s_5\f$ constructed in \ref Arrangement_on_surface_2/edge_insertion.cpp. The arrows mark the direction of the halfedges returned from the various insertion functions. \cgalFigureEnd - + The program below demonstrates the usage of the four specialized insertion functions. It creates an arrangement of five line segments @@ -1030,9 +1031,9 @@ typedef Arrangement::Halfedge_handle Halfedge_handle; typedef Arrangement::Face_handle Face_handle; \endcode - + \subsection arr_sssecmf_iso_verts Manipulating Isolated Vertices - + Isolated points are simpler geometric entities than curves, and indeed the member functions that manipulate them are easier to understand. @@ -1052,14 +1053,14 @@ function accepts a handle to an isolated vertex and removes it from the arrangement. - + \cgalFigureBegin{aos_fig-isolated_vertices,isolated_vertices.png} An arrangement of line segments containing three isolated vertices, as constructed in \ref Arrangement_on_surface_2/isolated_vertices.cpp. The vertices \f$u_2\f$ and \f$u_3\f$ are eventually removed from the arrangement. \cgalFigureEnd - + The following program demonstrates the usage of the arrangement member-functions for manipulating isolated vertices. It first inserts @@ -1073,9 +1074,9 @@ isolated vertices that are still contained in the unbounded face \cgalExample{Arrangement_on_surface_2/isolated_vertices.cpp} - + \subsection arr_sssecmf_halfedges Manipulating Halfedges - + While reading the previous subsection you learned how to insert new points that induce isolated vertices into the arrangement. You may @@ -1136,7 +1137,7 @@ Arrangement_on_surface_2::remove_edge `remove_edge()`\endlink indicating whether the source or the target vertices are to be removed should they become isolated. - + \cgalFigureBegin{aos_fig-edge_manipulation,edge_manipulation.png} The three steps of the example program \ref Arrangement_on_surface_2/edge_manipulation.cpp. In Step (a) it @@ -1148,7 +1149,7 @@ arrangement, rendering its end vertices \f$u_1\f$ and \f$u_2\f$ redundant. We therefore remove these vertices by merging their incident edges and go back to the arrangement depicted in (a). \cgalFigureEnd - + The following example program shows how the edge-manipulation functions can be used. The program works in three steps, as @@ -1188,7 +1189,7 @@ functions are of little use. However, you should keep in mind that there may be extraneous data (probably non-geometric) associated with the point objects or with the curve objects, as defined by the traits class. With these two functions you can modify this data; see more -details in Section \ref arr_ssecmeta_tr. In addition, you can use +details in Section \ref arr_sssec_tr_data_decorators. In addition, you can use these functions to replace a geometric object (a point or a curve) with an equivalent object that has a more compact representation. For example, if we use some simple rational-number type to represent the @@ -1197,9 +1198,9 @@ point coordinates, we can replace the point \f$(\frac{20}{40}, equivalent point with normalized coordinates, namely \f$(\frac{1}{2}, 3)\f$. - + \subsection arr_sssecadv_insert Advanced Insertion Functions - + \cgalAdvancedBegin @@ -1255,14 +1256,14 @@ respectively, that correspond to the curve endpoints. The other one accepts a handle to one vertex and a handle to the predecessor halfedge around the other vertex. - + \cgalFigureBegin{aos_fig-special_edge_insertion,special_edge_insertion.png} An arrangement of line segments, as constructed in \ref Arrangement_on_surface_2/special_edge_insertion.cpp. Note that \f$p_0\f$ is initially inserted as an isolated point and later on connected to the other four vertices. \cgalFigureEnd - + The following program shows how to construct the arrangement depicted in \cgalFigureRef{aos_fig-special_edge_insertion} using the specialized @@ -1279,9 +1280,9 @@ in the public interface of the arrangement class. Instead, the arrangement operations; see more details in the Reference Manual. \cgalAdvancedEnd - + \section arr_secqueries Issuing Queries on an Arrangement - + One of the most useful query types defined on arrangements is the point-location query: Given a point, find the arrangement @@ -1295,9 +1296,9 @@ play an important role in the incremental construction of arrangements Section \ref arr_secgl_funcs). Therefore, it is crucial to have the ability to answer such queries effectively. - + \subsection arr_ssecpl Point-Location Queries - + Recall that the arrangement representation is decoupled from the geometric algorithms that operate on it. Thus, the `Arrangement_2` @@ -1397,9 +1398,9 @@ void print_point_location } \endcode - + \subsection aos_sssec-pl_strategy Choosing a Point-Location Strategy - + Each of the various point-location class templates employs a different algorithm or strategy\cgalFootnote{The term strategy @@ -1437,14 +1438,15 @@ vary according to the user choice.} for answering queries: points or choosing points on a grid, are also available; see the Reference Manual for more details. - The landmark strategy requires that the type of the attached - arrangement be an instance of the `Arrangement_2` class - template, where the `Traits` parameter is substituted by a - geometry-traits class that models the `ArrangementLandmarkTraits_2` - concept, which refines the basic `ArrangementBasicTraits_2` concept; - see Section \ref aos_sssec-tr_landmarks_concept for details. Most - traits classes included in the \ref PkgArrangementOnSurface2 package - are models of this refined concept. + The arrangement attached to the landmark strategy must be either (i) + an instance of the `Arrangement_2` class template, where + the `Traits` parameter is substituted by a geometry-traits class + that models the `ArrangementLandmarkTraits_2` concept, or (ii) an + instance of the `Arrangement_on_surface_2` + class template, where the `GeomTraits` is similarly substituted; + see Section \ref aos_sssec-tr_landmarks_concept for details about + this concept. Most traits classes included in the \ref + PkgArrangementOnSurface2 package are models of this refined concept.
  • `Arr_trapezoid_ric_point_location` implements an improved variant of Mulmuley's point-location algorithm @@ -1491,7 +1493,7 @@ educational purposes, and thus we do not elaborate on this strategy. The data structure needed by the landmark and the trapezoidal map RIC strategies can be constructed in \cgalBigO{N \log N} time, where \f$N\f$ is the overall number of edges in the arrangement, but the constant -hidden in the \cgalBigO{ } notation for the trapezoidal map RIC strategy +hidden in the \cgalBigO{~} notation for the trapezoidal map RIC strategy is much larger. Thus, construction needed by the landmark algorithm is in practice significantly faster than the construction needed by the trapezoidal map RIC strategy. In addition, although both resulting @@ -1519,7 +1521,7 @@ dynamic and is frequently going through changes, the `Arr_trapezoid_ric_point_location` class template should be the selected point-location strategy. - + \cgalFigureBegin{aos_fig-point_location,point_location.png} The arrangement of line segments, as constructed in \ref Arrangement_on_surface_2/point_location.cpp, \ref @@ -1528,7 +1530,7 @@ Arrangement_on_surface_2/batched_point_location.cpp. The arrangement vertices are drawn as small rings, while the query points \f$q_1, \ldots, q_6\f$ are drawn as crosses. \cgalFigureEnd - + The program listed below constructs a simple arrangement of five line segments that form a pentagonal face, with a single isolated @@ -1546,9 +1548,9 @@ Note that the program uses the `locate_point()` function template to locate a point and nicely print the result of each query; see \ref lst_pl "code example" in Section \ref arr_ssecpl. - + \subsection arr_ssecray_shoot Vertical Ray Shooting - + Another query frequently issued on arrangements is the vertical ray-shooting query: Given a query point, which arrangement cell @@ -1624,9 +1626,9 @@ arrangement and the query points are exactly the same as in \cgalFigureRef{aos_fig-point_location}. \cgalExample{Arrangement_on_surface_2/vertical_ray_shooting.cpp} - + \subsection arr_ssecbatched_pl Batched Point-Location - + Suppose that at a given moment our application has to issue a relatively large number \f$m\f$ of point-location queries on a @@ -1666,9 +1668,9 @@ is essentially equivalent to the six separate queries performed in \ref arr_ssecpl. \cgalExample{Arrangement_on_surface_2/batched_point_location.cpp} - + \section arr_secgl_funcs Free Functions - + The `Arrangement_on_surface_2` class template is used to represent subdivisions of two-dimensional surfaces induced by curves that lie on @@ -1689,9 +1691,9 @@ defines the minimal set of geometric primitives, among other things, required to perform the algorithms of the surface-sweep and zone-construction frameworks. - + \subsection arr_ssec_zone The Zone Construction Algorithm - + Given an arrangement of curves \f$\mathcal{A} = \mathcal{A}(\mathcal{C})\f$ embedded in a two-dimensional surface, the @@ -1710,9 +1712,9 @@ operations that incrementally construct arrangements induced by sets of curves that lie in two-dimensional surfaces. For simplicity, however, we continue to consider arrangements embedded in the plane. - + - + Section \ref aos_ssec-basic-arr_class explains how to construct arrangements of \f$x\f$-monotone curves that are pairwise disjoint in @@ -1721,9 +1723,9 @@ arrangement is known. Here we relax this constraint, and allow the location of the inserted \f$x\f$-monotone curve endpoints to be unknown at the time of insertion. - + \subsubsection arr_sssecinsert_non_x Inserting Pairwise Disjoint Curves - + We retain, for the moment, the requirement that the interior of the inserted curve is disjoint from all existing arrangement edges and @@ -1764,9 +1766,9 @@ the walk point-location type, namely, an instance of the `Arr_walk_along_line_point_location` class template, and uses it to insert the curve. - + \subsubsection arr_sssecinsert_x_mon Inserting X-monotone Curves - + The time it takes to insert a curve \f$c\f$ using the `insert_non_intersecting_curve()` function template is the sum of the @@ -1800,7 +1802,7 @@ the variant `CGAL::insert<>(arr, c)` is also available). The running-time of this insertion function is proportional to the complexity of the zone of the curve \f$c\f$. - + \cgalAdvancedBegin In some cases users may have a prior knowledge of the location of the left endpoint of the \f$x\f$-monotone curve \f$c\f$ they wish to insert, so they can perform the insertion without @@ -1817,11 +1819,11 @@ Arrangement_on_surface_2::Halfedge_const_handle Arrangement_on_surface_2::Face_const_handle `Face_const_handle`\endlink; see also Section \ref arr_ssecpl. \cgalAdvancedEnd - + - + \subsubsection aos_ssec-insert_gen Inserting General Curves - + So far, all the examples have constructed arrangements of line segments, where the `Arrangement_2` template was instantiated with an @@ -1863,9 +1865,9 @@ performs the insertion of the curve \f$c\f$ that does not need to be `pl`, or use the default walk point-location strategy by calling `CGAL::insert<>(arr, c)`. - + \subsubsection arr_sssecinsert_point Inserting Points - + The `Arrangement_2` class template has a member function that inserts a point as an isolated vertex in a given face. The free function @@ -1895,11 +1897,11 @@ template instantiated with a traits class that models the `ArrangementXMonotoneTraits_2` concept, as the insertion operation may involve the splitting of curves. - + \subsubsection arr_sssecinsert_ex Inserting Intersecting Line Segments (code example) - + - + \cgalFigureBegin{aos_fig-incremental_insertion,incremental_insertion.png} An arrangement of five intersecting line segments, as constructed in \ref Arrangement_on_surface_2/incremental_insertion.cpp and @@ -1909,7 +1911,7 @@ vertices that correspond to intersection points are marked by circles. The query point \f$q\f$ is marked with a cross and the face that contains it is shaded. \cgalFigureEnd - + The program below constructs an arrangement of five intersecting line-segments \f$s_1, \ldots, s_5\f$. It is known that \f$s_1\f$ and @@ -1943,9 +1945,9 @@ quantitative measures of the arrangement; see \ref lst_paz \cgalExample{Arrangement_on_surface_2/incremental_insertion.cpp} - + \subsection arr_ssseczone Other Zone Related Functions - + In this section we have described so far free functions that insert curves and points into a given arrangement. Now we describe functions @@ -1988,9 +1990,9 @@ instance of the `Arr_walk_along_line_point_location` class template, and uses it to locate the endpoint. The traits type must model the `ArrangementXMonotoneTraits_2` concept. - + \subsection arr_ssec_sweep The Surface-Sweep Algorithm - + The famous plane-sweep algorithm introduced by Bentley and Ottmann was originally formulated for sets of line segments in the plane. The \ref @@ -2007,9 +2009,9 @@ this section, such as aggregately constructing an arrangement induced by a set of curves that lie in a two-dimensional surface and outputting the overlay of two arrangements. - + - + Given a set of \f$n\f$ input curves, you can insert the curves in the set into an arrangement incrementally one by one. However, the \ref @@ -2038,8 +2040,8 @@ so it must be construct from scratch. In the first case, we sweep over the input curves, compute their intersection points, and construct the \dcel that represents their -arrangement. This process is performed in \cgalBigO{left((n + k)\log -n\right} time, where \f$k\f$ is the total number of intersection +arrangement. This process is performed in \cgalBigO{(n + k)\log +n} time, where \f$k\f$ is the total number of intersection points. The running time is asymptotically better than the time needed for incremental insertion if the arrangement is relatively sparse (when \f$k\f$ is \cgalBigO{\frac{n^2}{\log n}}), but it is recommended @@ -2074,7 +2076,7 @@ edges in the arrangement. If \f$n\f$ is very small compared to insert the curves one by one. For larger input sets, we use the aggregate insertion procedures. - + \cgalFigureBegin{aos_fig-global_insertion,global_insertion.png} An arrangement of intersecting line segments, as constructed in \ref Arrangement_on_surface_2/global_insertion.cpp. The segments of @@ -2082,7 +2084,7 @@ Arrangement_on_surface_2/global_insertion.cpp. The segments of \f$\mathcal{S}_2\f$ are drawn in dark dashed lines. Note that the segment \f$ s\f$ (light dashed line) overlaps one of the segments in \f$\mathcal{S}_1\f$. \cgalFigureEnd - + The program below aggregately construct an arrangement of a set \f$\mathcal{S}_1\f$ containing five line segments (drawn as solid @@ -2127,9 +2129,9 @@ The `CGAL::insert_non_intersecting_curves<>()` function template aggregately inserts a set of \f$x\f$-monotone pairwise interior-disjoint curves into an arrangement. - + \subsection arr_ssecgl_remove Removing Vertices and Edges - + The free functions `remove_vertex()` and `remove_edge()` handle the removal of vertices and edges from an arrangement, respectively. The @@ -2173,9 +2175,9 @@ and \f$s_4\f$. \cgalExample{Arrangement_on_surface_2/global_removal.cpp} - + \subsection arr_ssec_decompose Vertical Decomposition - + As you have already seen, an arrangement face may have a fairly complicated structure; its outer boundary may be very large, and it @@ -2210,7 +2212,7 @@ vertex and the remaining one is vertical. - + \cgalFigureBegin{aos_fig-bounded_vd,bounded_vertical_decomposition.png} An arrangement of four line segments and its vertical decomposition into pseudo trapezoids, as constructed in \ref @@ -2218,7 +2220,7 @@ Arrangement_on_surface_2/bounded_vertical_decomposition.cpp. The segments of the arrangement are drawn in solid blue lines and the segments of the vertical decomposition are drawn in dark dotted lines. \cgalFigureEnd - + In the case of an arrangement of line segments, two-dimensional cells of the former type are trapezoids (as they have a pair of parallel @@ -2290,9 +2292,9 @@ above (respectively below) \f$v\f$ returned by the function template \cgalAdvancedEnd - + \section aos_sec-unbounded Arrangements of Unbounded Curves - + All the arrangements constructed and manipulated in previous chapters were induced only by line segments, which are, in particular, bounded @@ -2304,9 +2306,9 @@ this section to lines and rays. However, the discussion in this section, as well as the software described, apply more generally to arbitrary curves in two-dimensional surfaces. - + \subsection aos_ssec-unbounded-rep Representing Arrangements of Unbounded Curves - + Given a set \f$\mathcal{C}\f$ of unbounded curves, a simple approach for representing the arrangement induced by \f$\mathcal{C}\f$ would be @@ -2321,7 +2323,7 @@ we are not given all the curves inducing the arrangement in advance, then the choice of a good bounding rectangle may change as more curves are introduced. - + \cgalFigureBegin{aos_fig-unb_dcel,unb_dcel.png} A \dcel representing an arrangement of four lines. Halfedges are drawn as thin arrows. The vertices \f$v_1, \ldots, v_8\f$ lie at @@ -2333,7 +2335,7 @@ that bounds the actual arrangement. The four fictitious vertices \f$v_{\rm bl}, v_{\rm tl}, v_{\rm br}\f$ and \f$v_{\rm tr}\f$ represent the four corners of the imaginary bounding rectangle. \cgalFigureEnd - + Instead of an explicit approach, we use an implicit bounding rectangle embedded in the \dcel structure. \cgalFigureRef{aos_fig-unb_dcel} @@ -2405,13 +2407,13 @@ bounding rectangle as follows: - + \cgalFigureBegin{aos_fig-unb_asymptote,unb_asymptote.png} The portions of a horizontal line, a vertical line, and two rectangular hyperbolas with horizontal and vertical asymptotes confined to the imaginary bounding rectangle. \cgalFigureEnd - + A vertex (at infinity) of Type 2 or Type 3 above always has three incident edges---one concrete edge that is associated with an @@ -2437,9 +2439,9 @@ that all input curves that induce a particular arrangement are bounded, define your arrangement accordingly. That is, use a traits class that does not support unbounded curves. - + \subsubsection arr_sssecunb_basic Basic Manipulation and Traversal Methods - + The types \link Arrangement_on_surface_2::Vertex `Vertex`\endlink, \link Arrangement_on_surface_2::Halfedge `Halfedge`\endlink, and \link @@ -2642,12 +2644,12 @@ defined by the traits class-template `Arr_linear_traits_2` to be the corresponding types of the kernel used to instantiate the traits class-template; see Paragraph \ref arr_sssectr_linear. - + \cgalFigureBegin{aos_fig-unbounded_non_intersecting,unbounded_non_intersecting.png} An arrangement of unbounded linear objects, as constructed in \ref Arrangement_on_surface_2/unbounded_non_intersecting.cpp. \cgalFigureEnd - + The first three curves, \f$c_1\f$, \f$c_2\f$, and \f$c_3\f$, are inserted using the specialized insertion functions for @@ -2696,9 +2698,9 @@ typedef Arrangement::Halfedge_handle Halfedge_handle; typedef Arrangement::Face_handle Face_handle; \endcode - + \subsubsection arr_sssec-unb_global Free Functions - + All the free functions that operate on arrangements of bounded curves (see Section \ref arr_secgl_funcs) can also be applied to arrangements @@ -2724,9 +2726,9 @@ point has finite coordinates. Note that all the point-location strategies mentioned above, except the trapezoidal map strategy, are capable of handling arrangements of unbounded curves. - + \subsection arr_ssec-unb_duality Point-Line Duality - + In the following example we show how an arrangement of unbounded lines is utilized to solve the following problem: Given a set of points, @@ -2752,9 +2754,9 @@ introduced, and inserted into the arrangement. This operation is followed by a test that verifies that a vertex of degree greater than \f$4\f$ exists. - + \section aos_sec-curved_surfaces Arrangements on Curved Surfaces - + We are given a surface \f$S\f$ in \f$\mathbb{R}^3\f$ and a set \f$\mathcal{C}\f$ of curves embedded in this surface. The curves @@ -2798,9 +2800,9 @@ Various two-dimensional parametric surfaces, arrangements on which are supported by the framework. \cgalFigureCaptionEnd - + \subsection aos_ssec-curved_surfaces-parameteric Parametric Surfaces - + We use \f$\overline{\mathbb{R}}\f$ to denote the compactified real line \f$\mathbb{R} \cup \{-\infty,+\infty\}\f$. The mapping @@ -2939,9 +2941,9 @@ t_2\f$. For instance, every Meridian curve of a sphere parameterized as above is vertical. An \f$x\f$-monotone curve is either vertical or strongly \f$x\f$-monotone. - + \subsection aos_ssec-curved_surfaces-aos_class The Arrangement on Surface Class Template - + The class template `Arrangement_on_surface_2` can be used to represent a 2D arrangement embedded in a 3D @@ -3005,9 +3007,9 @@ Sites are drawn in red and Voronoi edges are drawn in blue. (d) A degenerate power diagram of 14 sites on the sphere. \cgalFigureCaptionEnd - + \subsection aos_ssec-curved_surfaces-basic Basic Manipulation and Traversal Methods - + The types \link Arrangement_on_surface_2::Vertex `Vertex`\endlink, \link Arrangement_on_surface_2::Halfedge `Halfedge`\endlink, and \link @@ -3184,9 +3186,9 @@ bool is_in_x_range(const typename GeometryTraits::X_monotone_curve_2& c, \cgalAdvancedEnd - + \section aos_sec-geom_traits The Geometry Traits - + A geometry traits class encapsulates the definitions of the geometric entities and the implementation of the geometric predicates and @@ -3227,9 +3229,9 @@ geometric traits classes. A decorator of a traits class attaches auxiliary data to the geometric objects handled by the original traits class, thereby extending it. - + \subsection aos_ssec-geom_traits-concepts The Hierarchy of the Geometry Traits Concepts - + A hierarchy of related concepts can be viewed as a directed acyclic graph, where a node of the graph represents a concept and an arc @@ -3243,15 +3245,15 @@ clusters of the graph and describe the relations between them. \cgalFigureRef{aos_fig-central_concept_cluster} depicts the central cluster. - + \cgalFigureBegin{aos_fig-central_concept_cluster,central_concept_cluster.png} The hierarchy of the main geometry traits concepts. \cgalFigureEnd - + - + \subsubsection aos_sssec-geom_traits-concepts_basic The Basic Concept - + A model of the basic concept `ArrangementBasicTraits_2` needs to define the types \link ArrangementBasicTraits_2::Point_2 @@ -3358,9 +3360,9 @@ Each of those types must be convertible to the type `Arr_oblivious_side_tag` for the class to be a model of the concept `ArrangementBasicTraits_2`. - + \subsubsection aos_sssec-geom_traits-concepts_intersecting Intersections - + Constructing an arrangement induced by \f$x\f$-monotone curves that may intersect in their interior requires operations that are not part @@ -3436,9 +3438,9 @@ Otherwise, it is not possible to merge \f$x\f$-monotone curve and redundant vertices may be left in the arrangement due to the removal of edges. - + \subsubsection aos_sssec-geom_traits-concepts_arbitrary Supporting Arbitrary Curves - + The concept `ArrangementTraits_2` refines the `ArrangementXMonotoneTraits_2` concept. A model of the refined concept @@ -3472,16 +3474,16 @@ ArrangementTraits_2::Curve_2 `Curve_2`\endlink or a range of objects of that type. In all other cases it is sufficient to use a model of the `ArrangementXMonotoneTraits_2` concept. - + \subsubsection aos_sssec-tr_landmarks_concept The Landmark Concept - + - + \cgalFigureBegin{aos_fig-landmark_concept_cluster,landmark_concept_cluster.png} The traits-concept hierarchy for arrangements associated with the landmark point-location strategy. \cgalFigureEnd - + The type of an arrangement associated with the landmark point-location strategy (see Section \ref arr_ssecpl) must be an instance of the @@ -3528,9 +3530,9 @@ an \f$x\f$-monotone curve connecting \f$p_1\f$ and \f$p_2\f$. Most traits classes model the `ArrangementTraits_2` concept, and some also model the `ArrangementLandmarkTraits_2` concept. - + \subsubsection aos_sssec-tr_additional_concepts The Construct Curve Concept - + The concept `ArrangementConstructCurveTraits_2` refines the concept `ArrangementTraits_2`. A model of the @@ -3551,9 +3553,9 @@ when `Arr_polyline_traits_2` is instantiated must be a geometry-traits class that models the concept `ArrangementConstructCurveTraits_2` to enable the construction of polylines from a sequence of two or more points. - + \subsubsection aos_ssec-traits-curved Supporting Unbounded Curves or Curved Surfaces - + We descend to the bottom level of the hierarchy. The refinements described in this section provide the requirements imposed on traits @@ -3625,13 +3627,13 @@ Section \ref arr_ssectr_segs) only handle bounded curves. Thus, the four category types nested in these models are defined to be `Arr_oblivious_side_tag`. - + \cgalFigureBegin{aos_fig-open_concept_hierarchy,open_concept_hierarchy.png} Bottom portion of the refinement hierarchy of the geometry-traits concepts for curves embedded in an open surface, for instance, the entire plane. \cgalFigureEnd - + Several predicates are required to handle \f$x\f$-monotone curves that approach the boundary of the parameter space. These predicates are @@ -3653,12 +3655,12 @@ instantiated with a model of the `ArrangementOpenBoundaryTraits_2` concept.\cgalFootnote{A curve that reaches the boundary of the parameter space in this case is open and unbounded.} - + \cgalFigureBegin{aos_fig-spherical_concept_hierarchy,spherical_concept_hierarchy.png} Bottom portion of the refinement hierarchy of the geometry-traits concepts for curves embedded in a sphere-like parameterized surface \cgalFigureEnd - + A suitable geometry-traits component for arrangements embedded in surfaces homeomorphic to a sphere is a model of the combined concept @@ -3667,14 +3669,14 @@ surfaces homeomorphic to a sphere is a model of the combined concept vertical sides of the parameter space are identified and the two horizontal sides are contracted. - + \cgalFigureBegin{aos_fig-left_side_cluster,left_side_cluster.png} Top portion of the refinement hierarchy of the geometry-traits concepts for curves that either reach the left side of the boundary of the parameter space or approach it. A similar hierarchy also exists for the right, bottom, and top sides. \cgalFigureEnd - + The shared requirements for the four options of a side are collected in abstract layers called `ArrangementLeftSideTraits_2`, @@ -3682,14 +3684,14 @@ in abstract layers called `ArrangementLeftSideTraits_2`, `ArrangementTopSideTraits_2`; see, e.g., \cgalFigureRef{aos_fig-left_side_cluster}. - + \cgalFigureBegin{aos_fig-side_clusters,side_clusters.png} Top portion of the refinement hierarchy of the geometry-traits concepts for curves that either reach the vertical sides of the boundary of the parameter space or approach it, and similarly for curves that either reach or approach horizontal sides. \cgalFigureEnd - + The shared requirements for the options of opposite sides are collected in two additional abstract layers called @@ -3697,14 +3699,14 @@ collected in two additional abstract layers called `ArrangementHorizontalSideTraits_2`; see \cgalFigureRef{aos_fig-side_clusters}. - + \cgalFigureBegin{aos_fig-identified_clusters,identified_clusters.png} Top portion of the refinement hierarchy of the geometry-traits concepts for curves that reach the identified vertical sides of the parameter space and for curves that reach the identified horizontal sides of the parameter space. \cgalFigureEnd - + Individual concepts for curves that reach the identified left side of the parameter space and for curves that reach the identified right @@ -4019,9 +4021,9 @@ boundary. - + \subsection aos_ssec-geom_traits-models Models of the Geometry Traits Concepts - + In this section we review the traits classes that are models of concepts introduced in the previous sections. They handle line @@ -4031,9 +4033,9 @@ subsection describes decorators for geometric traits classes distributed with \cgal, which extend geometric traits-classes by attaching auxiliary data with the geometric objects. - + \subsubsection arr_ssectr_segs Traits Classes for Line Segments and Linear Objects - + There are two distinct traits classes that handle line segments. One caches information in the curve records (see Section \ref @@ -4046,9 +4048,9 @@ intersections). Another model handles not only (bounded) line segments, but also rays and lines; see Section \ref arr_sssectr_linear. - + \paragraph arr_sssectr_caching_segs The Caching Segment-Traits Class - + An instance of the `Arr_segment_traits_2` class template used in most example programs so far is instantiated by substituting the @@ -4112,13 +4114,13 @@ predefined filtered kernel `Exact_predicates_exact_constructions_kernel` is used to instantiate the line-segment traits class. - + \cgalFigureBegin{aos_figpredef_kernels,fan_grids.png,Europe.png} (a) An arrangement of \f$104\f$ line segments from the input file `fan_grids.dat`. (b) An arrangement of more than \f$3000\f$ interior disjoint line segments, defined in the input file `Europe.dat`. \cgalFigureEnd - + In the following example we use the predefined `Exact_predicates_exact_constructions_kernel` for instantiating our @@ -4132,9 +4134,9 @@ in \cgalFigureRef{aos_figpredef_kernels} (a): \cgalExample{Arrangement_on_surface_2/predefined_kernel.cpp} - + \paragraph arr_sssectr_non_caching_segs The Non-Caching Segment-Traits Class - + The arrangement package offers an alternative segment-traits class template that handles line segments, namely the @@ -4187,9 +4189,9 @@ the map of Europe, as depicted in \cgalExample{Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp} - + \paragraph arr_sssectr_linear The Linear-Traits Class - + The `Arr_linear_traits_2` class used in Section \ref aos_sec-unbounded for demonstrating the construction of arrangements @@ -4214,9 +4216,9 @@ cast a curve into a `Kernel::Line_2`, a `Kernel::Ray_2`, or a class, the linear-curve traits class uses caching techniques to speed up its predicate evaluations and object constructions. - + \subsubsection arr_ssectr_polylines The Polyline and Polycurve Traits Classes - + Polylines are continuous piecewise linear curves. Polylines are of particular interest, as they can be used to approximate more complex @@ -4233,9 +4235,9 @@ handles continuous piecewise curves that are not necessarily linear and are not subject to the aforementioned constraint; see Section \ref arr_sssectr_polycurves. - + \paragraph arr_sssectr_polylines The Polyline Traits Class - + The `Arr_polyline_traits_2` class template handles polylines. It models the following four concepts: @@ -4351,14 +4353,15 @@ size \f$m\f$ typically take \cgalBigO{\log m} time. You are free to choose the underlying segment traits class. Your decision could be based, for example, on the number of expected -intersection points; see Section \ref arr_ssectr_segs. Moreover, it -is possible to substitute the `SubcurveTraits_2` template parameter -with a traits class that handles segments with some additional data -attached to each individual segment; see Section -\ref arr_ssecmeta_tr. This makes it possible to associate different -data objects with the different segments that compose a polyline. +intersection points; see Section \ref arr_ssectr_segs. Moreover, it is +possible to substitute the `SubcurveTraits_2` template parameter with +a traits class that handles segments with some additional data +attached to each individual segment; see Section \ref +arr_sssec_tr_data_decorators. This makes it possible to associate +different data objects with the different segments that compose a +polyline. - + \cgalFigureBegin{aos_fig-polylines,polylines.png} An arrangement of three polylines, as constructed in \ref @@ -4370,7 +4373,7 @@ the polyline \f$\pi_2\f$ is split into three \f$x\f$-monotone polylines, and that the two curves \f$\pi_1\f$ and \f$\pi_3\f$ have two overlapping sections---an impossible scenario in arrangements of line segments. \cgalFigureEnd - + The following example program constructs an arrangement of three polylines, \f$\pi_1\f$, \f$\pi_2\f$, and \f$\pi_3\f$, as depicted in @@ -4410,9 +4413,9 @@ typedef Traits::Curve_2 Polyline; typedef CGAL::Arrangement_2 Arrangement; \endcode - + \paragraph arr_sssectr_polycurves The Polycurve Traits Class - + The traits class `Arr_polycurve_traits_2` handles piecewise curves that are not necessarily linear, such as conic arcs, @@ -4432,9 +4435,9 @@ it does not support the operations that (i) construct a polycurve from a sequence of points, and (ii) push a point at the back or at the front of a non-empty polycurve. - + \subsubsection arr_ssectr_algebraic Traits Classes for Algebraic Curves - + A curve in our context is typically (but not necessarily) defined as the zero set of a bivariate nonzero polynomial with rational (or, @@ -4466,9 +4469,9 @@ developed. As a general rule, you should always use the minimal traits model that still satisfies your needs, as the most dedicated model is most likely to be the most efficient. - + \paragraph arr_sssectr_circ_seg Circular Arcs and Line Segments - + Arrangement of circular arcs and of line segments are very useful and frequently arise in applications, where curves of interleaved line @@ -4552,7 +4555,7 @@ typically algebraic numbers of degree 2, is \a not the same as the `Kernel::Point_2` type. The coordinates of a point are represented using the number type `CoordNT`, nested in the traits class-template. - + \cgalFigureBegin{aos_fig-circles,circles.png} An arrangement of three circles constructed in \ref Arrangement_on_surface_2/circles.cpp. Each circle is split into two @@ -4561,7 +4564,7 @@ disks. Rings mark vertices that correspond to intersection points. The vertex \f$v_{\rm max}\f$ is a common intersection point of all three circles. \cgalFigureEnd - + In the following example an arrangement of three full circles is constructed, as shown in \cgalFigureRef{aos_fig-circles}. Each Index is @@ -4628,14 +4631,14 @@ interior point that lies on the arc in between its endpoints. In this case, all three points are required to have rational coordinates; namely, they are all given as `Kernel::Point_2` objects. - + \cgalFigureBegin{aos_fig-circular_arcs,circular_arcs.png} An arrangement of two full circles, two line segments, and three circular arcs as constructed in \ref Arrangement_on_surface_2/circular_arcs.cpp. Endpoints are drawn as red disks and intersection points are drawn as rings. \cgalFigureEnd - + The following example demonstrates the usage of the various construction methods for circular arcs and line segments. The @@ -4665,9 +4668,9 @@ their performance, and use the most suitable for your case. which I should choose one over the other --> - + \paragraph arr_sssectr_conic A Traits Class for Conic Arcs - + A conic curve is an algebraic curve of degree 2. Namely, it is the locus of all points \f$(x,y)\f$ satisfying the equation \f$c:\ @@ -4783,11 +4786,11 @@ Arr_conic_traits_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink classes also support basic access functions such as `source()`, `target()`, and `%orientation()`. - + \cgalFigureBegin{aos_fig-conics,conics.png} An arrangement of mixed conic arcs, as constructed in conics.cpp \cgalFigureEnd - + The following example demonstrates the usage of the various constructors for conic arcs. The resulting arrangement is depicted in @@ -4835,12 +4838,12 @@ using X_monotone_conic_arc = Traits::X_monotone_curve_2; using Arrangement = CGAL::Arrangement_2; \endcode - + \cgalFigureBegin{aos_fig-conic_multiplicities,conic_multiplicities.png} An arrangement of a circular arc and an hyperbolic arc, as constructed in \ref Arrangement_on_surface_2/conic_multiplicities.cpp. \cgalFigureEnd - + The last example in this section demonstrates how the conic-traits class can handle intersection points with multiplicity. The resulting @@ -4858,9 +4861,9 @@ they have another intersection point at \cgalExample{Arrangement_on_surface_2/conic_multiplicities.cpp} - + \paragraph arr_sssectr_ratfunc A Traits Class for Arcs of Rational Functions - + A rational function is given by the equation \f$y = \frac{P(x)}{Q(x)}\f$, where \f$P\f$ and \f$Q\f$ are polynomials of @@ -4889,12 +4892,12 @@ Note that it is not a model of `ArrangementLandmarkTraits_2` concept, so it is impossible to use the landmark point-location strategy with this traits class. - + \cgalFigureBegin{aos_fig-rat_func_singular,rational_function_singular.png} An arrangement of an arc of a rational functions that has singularities at \f$x = 1\f$ and at \f$x = 2\f$. \cgalFigureEnd - + A rational arc is always \f$x\f$-monotone in the mathematical sense. However, it is not necessarily continuous, as it may have @@ -4985,12 +4988,12 @@ cache is automatically cleaned up from time to time. The amortized clean up costs are constant. In addition, there is also a separate member function that cleans up the cache upon request. - + \cgalFigureBegin{aos_fig-rational_functions,rational_functions.png} An arrangement of four arcs of rational functions, as constructed in \ref Arrangement_on_surface_2/rational_functions.cpp. \cgalFigureEnd - + The following example demonstrates the construction of an arrangement induced by rational arcs depicted in @@ -4999,12 +5002,12 @@ for polynomial arcs and for rational arcs. \cgalExample{Arrangement_on_surface_2/rational_functions.cpp} - + \cgalFigureBegin{aos_fig-unbounded_rational_functions,unbounded_rational_functions.png} An arrangement of six arcs of rational functions, as constructed in \ref Arrangement_on_surface_2/unbounded_rational_functions.cpp. \cgalFigureEnd - + The following example demonstrates the construction of an arrangement of six rational arcs, four unbounded arcs and two bounded ones, as @@ -5036,9 +5039,9 @@ polynomial coefficients as well as polynomials. The coefficients in a given range must be in the order of the degrees of the corresponding variables starting from the constant term. - + \paragraph arr_sssectr_bez A Traits Class for Planar Bézier Curves - + A planar Bézier curve \f$B\f$ is a parametric curve defined by a sequence of control points \f$p_0, \ldots, @@ -5116,12 +5119,12 @@ models the concept `ArrangementTraits_2` (but it does not model the concept `ArrangementDirectionalXMonotoneTraits_2`, which enables Boolean set operations; see Package \ref PkgBooleanSetOperations2Ref. - + \cgalFigureBegin{aos_fig-bezier_curves,bezier_curves.png} An arrangement of ten Bézier curves of degree \f$5\f$, as constructed in \ref Arrangement_on_surface_2/Bezier_curves.cpp. \cgalFigureEnd - + The following example reads a set of Bézier curves from an input file, where each file is specified by an integer stating its @@ -5133,9 +5136,9 @@ each; their resulting arrangement is depicted in \cgalExample{Arrangement_on_surface_2/Bezier_curves.cpp} - + \paragraph arr_sssectr_alg A Traits Class for Planar Algebraic Curves of Arbitrary Degree - + The traits class, namely `Arr_algebraic_segment_traits_2`, is based on the `Algebraic_kernel_d_1` class template, which models the @@ -5201,13 +5204,13 @@ constructed in a few convenient ways, some are exemplified by the programs listed below. Consult the reference guide for the complete set of options. - + \cgalFigureBegin{aos_fig-algebraic_curves,algebraic_curves.png} An arrangement of algebraic curves of degrees \f$1\f$, \f$2\f$, \f$3\f$, and \f$6\f$, as constructed in \ref Arrangement_on_surface_2/algebraic_curves.cpp. \cgalFigureEnd - + The following examples computes the arrangement depicted in in \cgalFigureRef{aos_fig-algebraic_curves}. The arrangement is induced @@ -5298,7 +5301,7 @@ segments. Notice that six vertices split the curve into the corresponding \f$x\f$-monotone segments into terminal segments. \cgalAdvancedEnd - + \cgalFigureBegin{aos_fig-algebraic_curves_decomposition,algebraic_curves_decomposition.png} The critical \f$x\f$-coordinates of an algebraic curve (dashed @@ -5306,7 +5309,7 @@ lines), and its decomposition into terminal segments (in different colors). The segment from \f$p\f$ to \f$q\f$ consists of the union of three terminal segments. \cgalFigureEnd - + The type `Algebraic_real_1` must be defined by any model of the `AlgebraicKernel_d_1` concept. The traits class-template @@ -5347,13 +5350,13 @@ type `Algebraic_real_1` can be obtained, we advise caution with that option, since computing an explicit representation of the \f$y\f$-coordinate can be rather expensive. - + \cgalFigureBegin{aos_fig-algebraic_segments,algebraic_segments.png} An arrangement of algebraic segments (solid lines), as constructed in \ref Arrangement_on_surface_2/algebraic_segments.cpp. The supporting curves are drawn as dashed lines. \cgalFigureEnd - + The following code exemplifies the method to construct points and the various methods to construct algebraic segments. The computed @@ -5361,9 +5364,9 @@ arrangement is depicted in \cgalFigureRef{aos_fig-algebraic_segments}. \cgalExample{Arrangement_on_surface_2/algebraic_segments.cpp} - + \subsubsection arr_ssectr_spherical Arcs of Great Circles Embedded in the Sphere - + A great circle of a sphere is the intersection of the sphere and a plane that passes through the center point of the sphere. For all @@ -5422,7 +5425,7 @@ The following example constructs an arrangement induced by 12 arcs of great circles embedded in the sphere. The arrangement is depicted in \cgalFigureRef{spherical_insert}. - + \cgalFigureBegin{spherical_insert,spherical_insert.png} An arrangement induced by 12 arcs of great circles, as constructed in \ref Arrangement_on_surface_2/spherical_insert.cpp. The number of @@ -5433,7 +5436,7 @@ with the identification curve induces a vertex at in green. The north and south poles are drawn as little spheres. The identification curve is drawn as a gray tube. \cgalFigureEnd - + \cgalExample{Arrangement_on_surface_2/spherical_insert.cpp} @@ -5457,17 +5460,27 @@ point of the arc. See \cgalFigureRef{aos_fig-right_hand_rule} for an illustration of the right-hand rule, which depicts the relation between the arc and the normal. - + \cgalFigureBegin{aos_fig-right_hand_rule,right_hand_rule.png} To use the right hand rule, point your right thumb in the direction of the normal and curl your fingers in the direction of the arc starting with source endpoint and ending at the target endpoint. \cgalFigureEnd - + - -\subsection arr_ssecmeta_tr Traits-Class Decorators - + +\subsection arr_ssec_tr_decorators Traits-Class Decorators + + +Decorator is a structural pattern that allows adding new behaviors to +objects by placing them inside special wrapper objects, called +decorators. One type of decorators attaches auxiliary data to the +geometric objects handled by the original traits. Another type enables +the retrieval of debugging and informative metadata. + + +\subsubsection arr_sssec_tr_data_decorators Data Decorators + Geometric traits-class decorators allow you to attach auxiliary data to the geometric objects (curves and to points). The data is @@ -5579,14 +5592,14 @@ and \f$c_2\f$ with associated data sets \f$S_1\f$ and \f$S_2\f$, respectively, the overlapping subcurve is associated with the consolidated set \f$S_1 \cup S_2\f$. - + \cgalFigureBegin{aos_fig-consolidated_curve_data,consolidated_curve_data.png} An arrangement of six red and blue segments, as constructed in \ref Arrangement_on_surface_2/consolidated_curve_data.cpp. Disks correspond to red-blue intersection points, while circles mark the endpoints of red-blue overlaps. \cgalFigureEnd - + The following example uses `Arr_segment_traits_2` as the base-traits class, attaching an additional color field to the segments @@ -5602,12 +5615,12 @@ endpoints are also drawn as black discs) \cgalExample{Arrangement_on_surface_2/consolidated_curve_data.cpp} - + \cgalFigureBegin{aos_fig-generic_curve_data,generic_curve_data.png} An arrangement of four polylines, named A-D, as constructed in \ref Arrangement_on_surface_2/generic_curve_data.cpp. \cgalFigureEnd - + The following example uses `Arr_polyline_traits_2` as the base-traits class, attaching an additional name field to each polyline @@ -5640,9 +5653,36 @@ the curve-data traits: \cgalExample{Arrangement_on_surface_2/dual_with_data.cpp} - + +\subsubsection arr_sssec_tr_metadata_decorators Metadata Decorators + + +The package provides two traits-class decorators, namely +`Arr_counting_traits_2` and +`Arr_tracing_traits_2`, that can be used to insert +debugging and informative metadata to an output stream. The former is +used to count the number of invocations of traits-class functors, and +the latter is used to trace these invocations. Note that the +constructors of each of these class templates apply perfect +forwarding. The counting traits also exports the count of traits-class +objects of specific types constructed during the execution of the +program. The tracing traits supports filtering of traced functors. The +calls `traits.enable_trace(id)` and `traits.disable_trace(id)` enables +and disables the tracing of a functor identified by `id`, +respectively. A functor is identified by an enumeration. For example, +the functor \link ArrangementTraits_2::Make_x_monotone_2 +`Make_x_monotone_2`\endlink is identified by the enumeration +`Arr_tracing_traits_2::MAKE_X_MONOTONE_OP`. The calls +`traits.enable_all_traces()` and `traits.disable_all_traces()` enables +and disables the traces of all functors, respectively. The example +program listed below demonstrates the use of both of these metadata +decorators. + +\cgalExample{Arrangement_on_surface_2/count_and_trace.cpp} + + \section aos_sec-topol_traits The Topology Traits - + A topology traits class encapsulates the definitions of the topological entities and the implementation of the functions that handle these topological entities, used by the @@ -5674,9 +5714,9 @@ arrangement embedded on a sphere defined over a parameter space, the left and right boundary sides of which are identified, and the top and bottom boundary sides are contracted. - + \section arr_sec_extending Extending the Arrangement - + Developing applications that use arrangements to solve problems that are a bit more complicated than the problems presented in previous @@ -5686,9 +5726,9 @@ arrangement with auxiliary, usually non-geometric, data. In this chapter we describe several ways to extend an arrangement data structure. - + \subsection arr_ssecnotif The Notification Mechanism - + In some cases it is essential to know exactly what happens inside a specific arrangement object. For example, when a new curve is inserted @@ -5826,14 +5866,14 @@ up-to-date. In addition, you can define your own observer classes, inheriting from the base observer class and overriding the relevant notification functions, as required by their applications. - + \cgalFigureBegin{aos_fig-observer,observer.png} An arrangement of six line segments, as constructed in \ref Arrangement_on_surface_2/observer.cpp. The halfedge \f$e_v\f$ (dashed) is eventually removed, so that the final arrangement consists of four faces (one unbounded and three bounded ones). \cgalFigureEnd - + The following example shows how to define and use an observer class. The observer in the example responds to changes in the @@ -5860,9 +5900,9 @@ Observers are especially useful when the \dcel records are extended and store additional data-fields, since they help update this data stored in these fields, as the following sections reveal. - + \subsection arr_ssecex_dcel Extending the DCEL - + For many applications of the \ref PkgArrangementOnSurface2 package it is necessary to store additional information (perhaps of non-geometric @@ -5872,7 +5912,7 @@ edges (halfedge pairs) are associated with \link Arrangement_on_surface_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink objects, both defined by the traits class. Extending the geometric traits-class types by using a -traits-class decorator, as explained in Section \ref arr_ssecmeta_tr, +traits-class decorator, as explained in Section \ref arr_ssec_tr_decorators, might be a sufficient solution for some applications. However, the \dcel faces are not associated with any geometric object, so traits-class decorators cannot help here. Extending the \dcel face @@ -5890,9 +5930,9 @@ class associates points with vertices and \f$x\f$-monotone curves with halfedges, but nothing more. In this section we show how to use alternative \dcel types to extend the desired \dcel records. - + \subsubsection arr_sssecex_dcel_face Extending the DCEL Faces - + The `Arr_face_extended_dcel` class-template is used to associate auxiliary data field of type `FaceData` to each face @@ -5912,7 +5952,7 @@ face or merged with another face). In such cases one can use an arrangement observer tailored for this task, which receives updates whenever a face is modified and sets its data field accordingly. - + \cgalFigureBegin{aos_fig-dcel_extension,dcel_extension.png} An arrangement of six line segments, as constructed in \ref Arrangement_on_surface_2/face_extension.cpp and \ref @@ -5922,7 +5962,7 @@ directed, so they are drawn as arrows directed from the source to the target). The indices associated with the halfedges in \ref Arrangement_on_surface_2/face_extension.cpp are shown in brackets. \cgalFigureEnd - + The next example constructs an arrangement that contains seven bounded faces induced by six line segments, \f$s_1, \ldots, s_6\f$, as shown @@ -5939,9 +5979,9 @@ similar observer to a non-empty arrangement.} \cgalExample{Arrangement_on_surface_2/face_extension.cpp} - + \subsubsection arr_sssecex_dcel_all Extending All DCEL Records - + As you continue to use arrangements to solve various problems you will find out that the ability to extend the face records is @@ -6062,9 +6102,9 @@ class Arr_map_dcel : public \cgalAdvancedEnd - + \subsection arr_ssecoverlay Overlaying Arrangements - + Assume that we are given two geographic maps represented as arrangements, with some data objects attached to their faces, @@ -6089,7 +6129,7 @@ The overlay of two given arrangements, conveniently referred to as the algorithm employing a dedicated visitor; see Section \ref arr_ssec_sweep. The \f$x\f$-monotone curve type is extended with a color attribute (whose value is either blue or red); see Section \ref -arr_ssecmeta_tr. With the help of the extended type unnecessary +arr_ssec_tr_decorators. With the help of the extended type unnecessary computations are filtered out while the plane is swept, yielding an efficient process. For example, monochromatic intersections are not computed. @@ -6129,7 +6169,7 @@ is possible to obtain the same result using the standard insertion-operations instead, but, as mentioned above, this is less efficient. - + \cgalFigureBegin{aos_figex_overlay,overlay.png} Overlaying two simple arrangements of line segments, as done in \ref Arrangement_on_surface_2/overlay.cpp and \ref @@ -6138,7 +6178,7 @@ Arrangement_on_surface_2/face_extension_overlay.cpp the two bounded faces are considered as marked, and the octagonal face which is the intersection of the two marked faces is denoted by \f$f_0\f$. \cgalFigureEnd - + The next program constructs two simple arrangements; each comprises four line segments that form a square, as depicted in @@ -6222,12 +6262,12 @@ arrangement depicted in \cgalFigureRef{aos_figex_overlay}. \cgalExample{Arrangement_on_surface_2/face_extension_overlay.cpp} - + \cgalFigureBegin{aos_figex_overlay_unbounded,overlay_unbounded.png} Overlaying two arrangements of lines that have unbounded faces, as done in \ref Arrangement_on_surface_2/overlay_unbounded.cpp. \cgalFigureEnd - + The next example, depicted in \cgalFigureRef{aos_figex_overlay_unbounded}, demonstrates the face @@ -6357,7 +6397,7 @@ template struct Overlay_color_traits { }; \endcode - + \cgalFigureBegin{aos_figex_overlay_color,overlay_color.png} The overlay of two extended arrangements]{The overlay (c) of two @@ -6366,7 +6406,7 @@ with a color. The color of each feature of the overlay arrangement is the blend of the colors of the two inducing features. \cgalFigureEnd - + The example program listed below computes the overlay, depicted in \cgalFigureRef{aos_figex_overlay_color}, of the two arrangements @@ -6382,9 +6422,9 @@ of the colors attached to the inducing features. \cgalExample{Arrangement_on_surface_2/overlay_color.cpp} - + \subsection arr_ssecarr_with_hist Storing the Curve History - + When you constructs an arrangement induced by a set \f$\mathcal{C}\f$ of arbitrary two-dimensional curves, you end up with a collection @@ -6422,9 +6462,9 @@ arrangements with history. However, the explanation applies also to `Arrangement_on_surface_with_history_2<>`, as the type of the embedding surface is irrelevant to the discussion. - + \subsubsection arr_sssecarrwh_traverse Traversing an Arrangement with History - + The `Arrangement_with_history_2` class template extends the `Arrangement_2` class template. Thus, all the iterator and circulator @@ -6497,9 +6537,9 @@ edges and the consolidated curve-set. You may also employ an overlay-traits class to maintain any type of auxiliary data stored with the \dcel cells; see Section \ref arr_ssecoverlay. - + \subsubsection arr_sssecmodif_traverse Modifying an Arrangement with History - + The `Arrangement_with_history_2` class template extends the `Arrangement_2` class template; thus, it inherits the fundamental @@ -6572,14 +6612,14 @@ arrangement-with-history object in order to get detailed notifications of the changes the arrangements undergoes; see Section \ref arr_ssecnotif for the details). - + \cgalFigureBegin{aos_fig-curve_history,curve_history.png} An arrangement with history as constructed in \ref Arrangement_on_surface_2/curve_history.cpp. Note that \f$s_1\f$ and \f$s_3\f$ overlap over two edges. The point-location query points \f$q_1\f$, \f$q_2\f$, and \f$q_3\f$ are drawn as lightly shaded dots. \cgalFigureEnd - + In the following example we construct a simple arrangement of six line segments, as depicted in \cgalFigureRef{aos_fig-curve_history}, while @@ -6593,7 +6633,7 @@ auxiliary function `locate_point()` defined in the header file \cgalExample{Arrangement_on_surface_2/curve_history.cpp} - + \cgalFigureBegin{aos_fig-edge_manipulation_curve_hostory,edge_manipulation_curve_history.png} An arrangement with history of nine circles as constructed in \ref Arrangement_on_surface_2/edge_manipulation_curve_history.cpp. Note the @@ -6602,7 +6642,7 @@ subdivide this circle into an upper half and a lower half, each consists of 9 edges. The large circle \f$c_0\f$ is eventually removed from the arrangement, with all 18 edges it induces. \cgalFigureEnd - + The following example demonstrates the usage of the free `remove_curve()` function. We construct an arrangement of nine @@ -6616,9 +6656,9 @@ member functions when operating on an arrangement-with-history object. \cgalExample{Arrangement_on_surface_2/edge_manipulation_curve_history.cpp} - + \section aos_sec-io Input/Output Streams and Visualization - + In some cases, one would like to save an arrangement object constructed by some application, so that later on it can be @@ -6626,9 +6666,9 @@ restored. In other cases one would like to create nice drawings that represent arrangements constructed by some application. These drawings can be hard printed or displayed on a computer screen. - + \subsection aos_ssec-io-stream Input/Output Stream - + Consider an arrangement that represents a very complicated geographical map, and assume that there are various applications that need to answer @@ -6665,9 +6705,9 @@ a file. \cgalExample{Arrangement_on_surface_2/io.cpp} - + \subsection arr_ssecarr_io_aux_data Arrangements with Auxiliary Data - + \cgalAdvancedBegin The inserter and extractor both ignore any auxiliary data stored with the arrangement features. Thus, they are @@ -6721,9 +6761,9 @@ Doing so, you can define other I/O formats, such as an XML-based format or a binary format. \cgalAdvancedEnd - + \subsection arr_ssecarr_io_hist Arrangements with Curve History - + Section \ref arr_ssecarr_with_hist introduces the `Arrangement_with_history_2` class, which saves the @@ -6762,9 +6802,9 @@ arrangement formatter class (see Section \ref arr_ssecarr_io_aux_data) and defines a simple textual input/output format. \cgalAdvancedEnd - + \subsection arr_ssecarr_io_vis Drawing an Arrangement - + An arrangement data structure can be visualized by calling the \link PkgArrangementOnSurface2Draw CGAL::draw() \endlink function as shown in the following example. This function opens a new window showing the given arrangement. A call to this function is blocking; that is, the program continues execution only after the user closes the window. @@ -6780,9 +6820,9 @@ of 14 vertices, 15 edges, and 3 faces. Notice that the colors are generated at r \cgalFigureEnd - + \section aos_sec-bgl Adapting to Boost Graphs - + \boost\cgalFootnote{See also \boost's homepage at: \cgalFootnoteCode{www.boost.org}.} is a collection of portable \cpp libraries @@ -6806,9 +6846,9 @@ graph vertex with each \dcel face, such that two vertices are connected, iff there is a \dcel halfedge that connects the two corresponding faces. - + \subsection arr_ssecbgl_primal The Primal Arrangement Representation - + Arrangement instances are adapted to \boost graphs by specializing the \link BGLArgtGT `boost::graph_traits` \endlink template for @@ -6913,13 +6953,13 @@ template struct Edge_length { }; \endcode - + \cgalFigureBegin{aos_fig-bgl_primal_adapter,bgl_primal_adapter.png} An arrangement of seven line segments, as constructed by \ref Arrangement_on_surface_2/bgl_primal_adapter.cpp and \ref Arrangement_on_surface_2/bgl_dual_adapter.cpp. \cgalFigureEnd - + In the following example we construct an arrangement of seven line segments, as shown in \cgalFigureRef{aos_fig-bgl_primal_adapter}. @@ -6935,9 +6975,9 @@ squared distances of the vertex from \f$v_0\f$. \cgalExample{Arrangement_on_surface_2/bgl_primal_adapter.cpp} - + \subsection arr_ssecbgl_dual The Dual Arrangement Representation - + An arrangement instance can be represented as a graph other than the one described in the previous section. A dual-graph representation @@ -7002,7 +7042,7 @@ public: }; \endcode - + \cgalFigureBegin{aos_fig-bgl_dual_adapter,bgl_dual_adapter.png} An arrangement of seven line segments, as constructed by \ref Arrangement_on_surface_2/bgl_dual_adapter.cpp and its dual face graph, @@ -7010,7 +7050,7 @@ where every arrangement face is a vertex of the graph. The index of a dual vertex is the discovery time of a breadth-first search applied to the face graph, starting from the unbounded face \f$f_0\f$. \cgalFigureEnd - + The following example constructs the same arrangement constructed by the program coded in \ref @@ -7029,9 +7069,9 @@ is discovered at time \f$0\f$, the neighboring faces \f$f_1\f$, \cgalExample{Arrangement_on_surface_2/bgl_dual_adapter.cpp} - + \section aos_sec-tips How To Speed Up Your Computation - + Before the specific tips, we remind you that compiling programs with debug flags disabled and with optimization flags enabled significantly @@ -7132,9 +7172,9 @@ be avoided by storing the results obtained by the first call, and reusing them when needed. - + \section aos_sec-design Design and Implementation History - + The code of this package is the result of a long development process. Initially (and until version 3.1), the code was spread among several diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h index 5007dce85f5..27fcce4bb1e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h @@ -1,355 +1,343 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2TraitsClasses +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * The traits class `Arr_algebraic_segment_traits_2` is a model of the + * `ArrangementTraits_2` concept that handles planar algebraic curves of + * arbitrary degree, and \f$ x\f$-monotone of such curves. A planar (real) + * algebraic curve is the vanishing set of a polynomial in two variables, + * that is, the curve is defined by the defining equation \f[ + * f(x):=\sum_{i+j\leq n} a_{ij} x^i y^j =0, \f] where \f$ n\f$ is the degree of + * the curve. + * + * The traits class allows the construction of algebraic curves, by specifying + * their implicit equation. \f$ x\f$-monotone and vertical segments of a curve + * can also be defined; unbounded curves and segments are supported. The + * template parameter `Coefficient` defines the innermost coefficient type of + * the polynomials. Currently, the types `leda::integer` and `CORE::BigInt` are + * supported as well as any instance of `CGAL::Sqrt_extension` that is + * instantiated with one of the integral types above. + * + * \cgalModels{ArrangementTraits_2} + */ -The traits class `Arr_algebraic_segment_traits_2` is a model of the `ArrangementTraits_2` -concept that handles planar algebraic curves of arbitrary degree, -and \f$ x\f$-monotone of such curves. -A planar (real) algebraic curve -is the vanishing set of a polynomial in two variables, that is, the -curve is defined by the defining equation -\f[ f(x):=\sum_{i+j\leq n} a_{ij} x^i y^j =0, \f] -where \f$ n\f$ is the degree of the curve. - -The traits class allows the construction of algebraic curves, -by specifying their implicit equation. \f$ x\f$-monotone and vertical segments -of a curve can also be defined; unbounded curves and segments are supported. -The template parameter `Coefficient` defines -the innermost coefficient type of the polynomials. Currently, -the types `leda::integer` and `CORE::BigInt` are supported as well -as any instance of `CGAL::Sqrt_extension` that is instantiated with -one of the integral types above. - -\cgalModels{ArrangementTraits_2} - - -*/ template class Arr_algebraic_segment_traits_2 { public: -/// \name Types -/// @{ - -/*! Value to specify whether a point should be in the interior of a segment, or - * its minimal point, or its maximal point in lexicographic order. - */ -enum Site_of_point { POINT_IN_INTERIOR = 0, MIN_ENDPOINT = -1, MAX_ENDPOINT = 1 }; - -/*! the type for bivariate polynomials, with innermost coefficient type - * `Coefficient`. Constitutes a model of the concept `Polynomial_d` with two - * variables. - * - * \sa `CGAL::Polynomial_d` - */ -typedef unspecified_type Polynomial_2; - -/*! model for the concept `AlgebraicKernel_1` - */ -typedef unspecified_type Algebraic_kernel_1; - -/*! represents coordinates of points. - * Typedef from `Algebraic_kernel_1::Algebraic_real_1` - */ -typedef unspecified_type Algebraic_real_1; - -/*! Typedef from `Algebraic_kernel_1::Bound` - */ -typedef unspecified_type Bound; - -/// @} - -/// \name Accessing functor objects -/// @{ - -/*! - - */ -Construct_curve_2 construct_curve_2_object() const; - -/*! - - */ -Construct_point_2 construct_point_2_object() const; - -/*! - - */ -Construct_x_monotone_segment_2 construct_x_monotone_segment_2_object() const; - -/// @} - -/*! - - */ -class Construct_curve_2 { -public: - -/// \name Object Creation Functors -/// @{ - -/*! Returns a `Curve_2` object that represents the curve defined by the - * polynomial `p` - */ -Curve_2 operator() (Polynomial_2 p); - -/*! Returns a `Curve_2` object specified by `s`. The passed string represents - * the defining polynomial of the curve and must be given in a MAPLE-readable - * format using "x" as first and "y" as second variable, e.g., - * \f$(x^3*y-2*x)*(-6*x-y^3*x^6)\f$ for integer coefficients, and - * \f$3/2*x*y^4-5/7*x^2+3/1\f$ for rational coefficients. - */ -Curve_2 operator() (std::string s); - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Construct_curve_2 */ - -/*! - - */ -class Construct_point_2 { -public: - -/// \name Object Creation Functors -/// @{ - -/*! Returns a `Point_2` object that represents the `arcno`-th - * point in the fiber of `cv` at \f$ x\f$-coordinate `x`, - * counted from the bottom, starting with zero. - * \pre (`cv` must not have a vertical line at `x`, - * and \f$ 0\leq arcno < c\f$, where \f$ c\f$ is the number of points - * in the fiber of `cv` at `x`.) - */ -Point_2 operator() (Algebraic_real_1 x, Curve_2 cv, int arcno); - -/*! Returns a `Point_2` object that represents the - * point on `xcv` at \f$ x\f$-coordinate `x` - * \pre (`x` is in the \f$ x\f$-range of `xcv`.) - */ -Point_2 operator() (Algebraic_real_1 x, X_monotone_curve_2 xcv); - -/*! Returns a `Point_2` object that represents (x,y) - */ -Point_2 operator() (Algebraic_real_1 x, Algebraic_real_1 y); - -/*! Returns a `Point_2` object that represents (x,y) - */ -Point_2 operator() (Coefficient x, Coefficient y); - -/*! Returns a `Point_2` object that represents (x,y) - */ -Point_2 operator() (Bound x, Bound y); - -/*! Returns a `Point_2` object that represents (x,y) - */ -Point_2 operator() (int x, int y); - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Construct_point_2 */ - -/*! - - */ -class Construct_x_monotone_segment_2 { -public: - -/// \name Object Creation Functors -/// @{ - -/*! inserts a sequence of `X_monotone_curve_2` objects (terminal segments) into - * an output container given through an output iterator. These terminal segments - * compose an \f$x\f$-monotone (or vertical) segment of a given curve that - * starts in `end_min`, and ends in `end_max`. - * - * \param cv The input curve. - * \param end_min The starting point. - * \param end_max The ending point. - * \param oi The output iterator that points at the output container. - * \return The past-the-end iterator of the output container. - * - * \pre `end_min` must have a unique \f$x\f$-monotone segment to its right, or - * `end_max` must have a unique \f$x\f$-monotone segment to its left. - * Furthermore, `end_min` and `end_max` must be connected by an - * \f$x\f$-monotone segment of `cv`) - */ -template -OutputIterator operator() (Curve_2 cv, Point_2 end_min, Point_2 end_max, - OutputIterator oi); - -/*! inserts a sequence of `X_monotone_curve_2` objects into an output container - * given through an output iterator. These segments form an \f$x\f$-monotone - * (or vertical) segment of the curve `cv`. - * - * If `site_of_p==POINT_IN_INTERIOR`, the maximal segment is - * returned that contains `p` in its interior. - * - * returned that contains `p` as its left endpoint. - * - * returned that contains `p` as its left endpoint. - * - * \pre (If `site_of_p==POINT_IN_INTERIOR`, `p` - * must be an interior point of an \f$x\f$-monotone or a vertical - * segment. - * must either have a unique \f$x\f$-monotone segment to the right, - * or a vertical segment from `p` upwards. - * must either have a unique \f$x\f$-monotone segment to the left, - * or a vertical segment from `p` downwards.) - */ -template -OutputIterator operator() (Curve_2 cv, Point_2 p, Site_of_point site_of_p, - OutputIterator out); - -/*! inserts a sequence of `X_monotone_curve_2` objects into an output container - * given through an output iterator. These segments form a straight-line - * segment connecting the points `p` and `q`. If `p` and `q` share the same - * \f$x\f$-coordinate, the constructed vertical segment consists of only one - * `X_monotone_curve_2` object and can be computed efficiently. In the - * non-vertical case, the construction is only possible if `p` and `q` have both - * rational x- and y-coordinates. - * - * \pre (`p` must not be equal to `q`.) - */ -template -OutputIterator operator() (Point_2 p, Point_2 q, OutputIterator out); - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Construct_x_monotone_segment_2 */ - -/*! Models the `ArrangementTraits_2::Curve_2` concept. - * Represents algebraic curves. Internally, the type stores - * topological-geometric information about the particular curve. - * In order to use internal caching, instances should only be created - * using the `Construct_curve_2` functor of the traits class. - */ -class Curve_2 { -public: - -/// \name Modifiers -/// @{ - -/*! returns the defining polynomial of the curve. -*/ -Polynomial_2 polynomial () const; - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Curve_2 */ - -/*! Models the `ArrangementBasicTraits_2::Point_2` concept. - * Represents points in \f$ \mathbb{R}^2\f$. Intersection points of algebraic - * curves are in general non-rational, so we need a data structure that is - * capable of representing arbitrary points with algebraic coordinates. - * - * The traits class represents algebraic coordinates by the type - * `Algebraic_real_1`, which is a model of the `AlgebraicReal_1` concept. - * A point \f$ p\f$ is stored by a triple \f$ (x,cv,arcno)\f$, - * where \f$ x\f$ is the \f$ x\f$-coordinate of a point, \f$ cv\f$ is an instance - * of `Curve_2` that contains the point, (and has no vertical line at \f$ x\f$), - * and \f$ arcno\f$ is an `int`, denoting that \f$ p\f$ is met as the - * \f$arcno\f$-th point when shooting a vertical ray at \f$ x\f$, starting from - * \f$-\infty\f$ (where counting starts with \f$ 0\f$). - * - * In addition to the methods listed below, the copy constructor and assignment - * operator for `Point_2` objects are also supported. - * - * The functor `Construct_point_2` constructs `Point_2` instances. - */ - -class Point_2 { -public: - -/// \name Modifiers -/// @{ - -/*! returns the \f$ x\f$-coordinate of `p`. - */ -Algebraic_real_1 x () const; - -/*! returns the \f$ y\f$-coordinates of `p`. - * - * Attention: As described above, points are not stored - * by their \f$ y\f$-coordinate in `Algebraic_real_1` representation. In fact, - * this representation must be computed on demand, and might become quite - * costly for points defined by high-degree polynomials. Therefore, it is - * recommended to avoid to call this function as much as possible. - */ -Algebraic_real_1 y () const; - -/*! returns a `Curve_2` instance that `p`is part of. - */ -Curve_2 curve () const; - -/*! returns the arc number of `p`. - */ -int arcno () const; - -/*! returns double-approximations of the \f$ x\f$- and \f$ y\f$-coordinates. - */ -std::pair to_double () const; - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Point_2 */ - -/*! Models the `ArrangementBasicTraits_2::X_monotone_curve_2` concept. - * Represents terminal segments of an algebraic curves, that means vertical - * segments or \f$ x\f$-monotone segments with no critical \f$ x\f$-coordinate - * in the interior of their \f$ x\f$-range. Terminal segments might either be - * bounded or unbounded. By definition, each interior point of a non-vertical - * segment has the same arc number (see the documentation of type `Point_2` - * above, which is called the arc number of the segment (note the arc - * number at the endpoints might differ). Such segments are represented - * internally by a 4-tuple \f$ (p,q,cv,arcno)\f$, where \f$ p\f$ and \f$ q\f$ - * are the endpoints, \f$ cv\f$ is the supporting curve that the segment - * belongs to, and arcno is the arc number of the segment. - * - * Arbitrary (weakly) \f$ x\f$-monotone segments are presented by a range - * of `X_monotone_curve_2` instances, whose union equals the segment. - * The functor `Construct_x_monotone_segment_2` allows their construction. - * To construct all (maximal) terminal segments of a curve, - * use the `Make_x_monotone_2` functor supplied by the traits class. - */ -class X_monotone_curve_2 { -public: - -/// \name Modifiers -/// @{ - -/*! returns the supporting algebraic curve of `s`. - */ -Curve_2 curve () const; - -/*! returns whether `s` is a vertical segment. - */ -bool is_vertical () const; - -/*! returns whether `s` has a finite endpoint on the left - */ -bool is_finite (CGAL::Arr_curve_end ce) const; - -/*! \pre (The corresponding curve end is finite) - */ -Point_2 curve_end (CGAL::Arr_curve_end ce) const; - -/*! returns the arc number of the segment. - * \pre (The segment is non-vertical) - */ -int arcno () const; - -/*! -returns the \f$ x\f$-coordinate of a vertical segment. -\pre (The segment is vertical) -*/ -Algebraic_real_1 x () const; - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::X_monotone_curve_2 */ + /// \name Types + /// @{ + + /*! Value to specify whether a point should be in the interior of a segment, or + * its minimal point, or its maximal point in lexicographic order. + */ + enum Site_of_point { POINT_IN_INTERIOR = 0, MIN_ENDPOINT = -1, MAX_ENDPOINT = 1 }; + + /*! the type for bivariate polynomials, with innermost coefficient type + * `Coefficient`. Constitutes a model of the concept `Polynomial_d` with two + * variables. + * + * \sa `CGAL::Polynomial_d` + */ + typedef unspecified_type Polynomial_2; + + /*! model for the concept `AlgebraicKernel_1` + */ + typedef unspecified_type Algebraic_kernel_1; + + /*! represents coordinates of points. + * Typedef from `Algebraic_kernel_1::Algebraic_real_1` + */ + typedef unspecified_type Algebraic_real_1; + + /*! Typedef from `Algebraic_kernel_1::Bound` + */ + typedef unspecified_type Bound; + + /// @} + + /// \name Accessing functor objects + /// @{ + + /*! + */ + Construct_curve_2 construct_curve_2_object() const; + + /*! + */ + Construct_point_2 construct_point_2_object() const; + + /*! + */ + Construct_x_monotone_segment_2 construct_x_monotone_segment_2_object() const; + + /// @} + + /*! + */ + class Construct_curve_2 { + public: + + /// \name Object Creation Functors + /// @{ + + /*! returns a `Curve_2` object that represents the curve defined by the + * polynomial `p` + */ + Curve_2 operator() (Polynomial_2 p); + + /*! returns a `Curve_2` object specified by `s`. The passed string represents + * the defining polynomial of the curve and must be given in a MAPLE-readable + * format using "x" as first and "y" as second variable, e.g., + * \f$(x^3*y-2*x)*(-6*x-y^3*x^6)\f$ for integer coefficients, and + * \f$3/2*x*y^4-5/7*x^2+3/1\f$ for rational coefficients. + */ + Curve_2 operator() (std::string s); + + /// @} + + }; /* end Arr_algebraic_segment_traits_2::Construct_curve_2 */ + + /*! + */ + class Construct_point_2 { + public: + + /// \name Object Creation Functors + /// @{ + + /*! returns a `Point_2` object that represents the `arcno`-th + * point in the fiber of `cv` at \f$ x\f$-coordinate `x`, + * counted from the bottom, starting with zero. + * \pre (`cv` must not have a vertical line at `x`, + * and \f$ 0\leq arcno < c\f$, where \f$ c\f$ is the number of points + * in the fiber of `cv` at `x`.) + */ + Point_2 operator() (Algebraic_real_1 x, Curve_2 cv, int arcno); + + /*! returns a `Point_2` object that represents the + * point on `xcv` at \f$ x\f$-coordinate `x` + * \pre (`x` is in the \f$ x\f$-range of `xcv`.) + */ + Point_2 operator() (Algebraic_real_1 x, X_monotone_curve_2 xcv); + + /*! returns a `Point_2` object that represents (x,y) + */ + Point_2 operator() (Algebraic_real_1 x, Algebraic_real_1 y); + + /*! returns a `Point_2` object that represents (x,y) + */ + Point_2 operator() (Coefficient x, Coefficient y); + + /*! returns a `Point_2` object that represents (x,y) + */ + Point_2 operator() (Bound x, Bound y); + + /*! returns a `Point_2` object that represents (x,y) + */ + Point_2 operator() (int x, int y); + + /// @} + + }; /* end Arr_algebraic_segment_traits_2::Construct_point_2 */ + + /*! + */ + class Construct_x_monotone_segment_2 { + public: + + /// \name Object Creation Functors + /// @{ + + /*! inserts a sequence of `X_monotone_curve_2` objects (terminal segments) into + * an output container given through an output iterator. These terminal segments + * compose an \f$x\f$-monotone (or vertical) segment of a given curve that + * starts in `end_min`, and ends in `end_max`. + * + * \param cv The input curve. + * \param end_min The starting point. + * \param end_max The ending point. + * \param oi The output iterator that points at the output container. + * \return The past-the-end iterator of the output container. + * + * \pre `end_min` must have a unique \f$x\f$-monotone segment to its right, or + * `end_max` must have a unique \f$x\f$-monotone segment to its left. + * Furthermore, `end_min` and `end_max` must be connected by an + * \f$x\f$-monotone segment of `cv`) + */ + template + OutputIterator operator() (Curve_2 cv, Point_2 end_min, Point_2 end_max, + OutputIterator oi); + + /*! inserts a sequence of `X_monotone_curve_2` objects into an output container + * given through an output iterator. These segments form an \f$x\f$-monotone + * (or vertical) segment of the curve `cv`. + * + * If `site_of_p==POINT_IN_INTERIOR`, the maximal segment is + * returned that contains `p` in its interior. + * + * returned that contains `p` as its left endpoint. + * + * returned that contains `p` as its left endpoint. + * + * \pre (If `site_of_p==POINT_IN_INTERIOR`, `p` + * must be an interior point of an \f$x\f$-monotone or a vertical + * segment. + * must either have a unique \f$x\f$-monotone segment to the right, + * or a vertical segment from `p` upwards. + * must either have a unique \f$x\f$-monotone segment to the left, + * or a vertical segment from `p` downwards.) + */ + template + OutputIterator operator() (Curve_2 cv, Point_2 p, Site_of_point site_of_p, + OutputIterator out); + + /*! inserts a sequence of `X_monotone_curve_2` objects into an output container + * given through an output iterator. These segments form a straight-line + * segment connecting the points `p` and `q`. If `p` and `q` share the same + * \f$x\f$-coordinate, the constructed vertical segment consists of only one + * `X_monotone_curve_2` object and can be computed efficiently. In the + * non-vertical case, the construction is only possible if `p` and `q` have both + * rational x- and y-coordinates. + * + * \pre (`p` must not be equal to `q`.) + */ + template + OutputIterator operator() (Point_2 p, Point_2 q, OutputIterator out); + + /// @} + + }; /* end Arr_algebraic_segment_traits_2::Construct_x_monotone_segment_2 */ + + /*! A model of the the `ArrangementTraits_2::Curve_2` concept. + * Represents algebraic curves. Internally, the type stores + * topological-geometric information about the particular curve. + * In order to use internal caching, instances should only be created + * using the `Construct_curve_2` functor of the traits class. + */ + class Curve_2 { + public: + + /// \name Modifiers + /// @{ + + /*! returns the defining polynomial of the curve. + */ + Polynomial_2 polynomial () const; + + /// @} + + }; /* end Arr_algebraic_segment_traits_2::Curve_2 */ + + /*! A model of the `ArrangementBasicTraits_2::Point_2` concept. + * Represents points in \f$ \mathbb{R}^2\f$. Intersection points of algebraic + * curves are in general non-rational, so we need a data structure that is + * capable of representing arbitrary points with algebraic coordinates. + * + * The traits class represents algebraic coordinates by the type + * `Algebraic_real_1`, which is a model of the `AlgebraicReal_1` concept. + * A point \f$ p\f$ is stored by a triple \f$ (x,cv,arcno)\f$, + * where \f$ x\f$ is the \f$ x\f$-coordinate of a point, \f$ cv\f$ is an instance + * of `Curve_2` that contains the point, (and has no vertical line at \f$ x\f$), + * and \f$ arcno\f$ is an `int`, denoting that \f$ p\f$ is met as the + * \f$arcno\f$-th point when shooting a vertical ray at \f$ x\f$, starting from + * \f$-\infty\f$ (where counting starts with \f$ 0\f$). + * + * In addition to the methods listed below, the copy constructor and assignment + * operator for `Point_2` objects are also supported. + * + * The functor `Construct_point_2` constructs `Point_2` instances. + */ + + class Point_2 { + public: + + /// \name Modifiers + /// @{ + + /*! returns the \f$ x\f$-coordinate of `p`. + */ + Algebraic_real_1 x () const; + + /*! returns the \f$ y\f$-coordinates of `p`. + * + * Attention: As described above, points are not stored + * by their \f$ y\f$-coordinate in `Algebraic_real_1` representation. In fact, + * this representation must be computed on demand, and might become quite + * costly for points defined by high-degree polynomials. Therefore, it is + * recommended to avoid to call this function as much as possible. + */ + Algebraic_real_1 y () const; + + /*! returns a `Curve_2` instance that `p`is part of. + */ + Curve_2 curve () const; + + /*! returns the arc number of `p`. + */ + int arcno () const; + + /*! returns double-approximations of the \f$ x\f$- and \f$ y\f$-coordinates. + */ + std::pair to_double () const; + + /// @} + + }; /* end Arr_algebraic_segment_traits_2::Point_2 */ + + /*! A model of the `ArrangementBasicTraits_2::X_monotone_curve_2` concept. + * Represents terminal segments of an algebraic curves, that means vertical + * segments or \f$ x\f$-monotone segments with no critical \f$ x\f$-coordinate + * in the interior of their \f$ x\f$-range. Terminal segments might either be + * bounded or unbounded. By definition, each interior point of a non-vertical + * segment has the same arc number (see the documentation of type `Point_2` + * above, which is called the arc number of the segment (note the arc + * number at the endpoints might differ). Such segments are represented + * internally by a 4-tuple \f$ (p,q,cv,arcno)\f$, where \f$ p\f$ and \f$ q\f$ + * are the endpoints, \f$ cv\f$ is the supporting curve that the segment + * belongs to, and arcno is the arc number of the segment. + * + * Arbitrary (weakly) \f$ x\f$-monotone segments are presented by a range + * of `X_monotone_curve_2` instances, whose union equals the segment. + * The functor `Construct_x_monotone_segment_2` allows their construction. + * To construct all (maximal) terminal segments of a curve, + * use the `Make_x_monotone_2` functor supplied by the traits class. + */ + class X_monotone_curve_2 { + public: + + /// \name Modifiers + /// @{ + + /*! returns the supporting algebraic curve of `s`. + */ + Curve_2 curve () const; + + /*! returns whether `s` is a vertical segment. + */ + bool is_vertical () const; + + /*! returns whether `s` has a finite endpoint on the left + */ + bool is_finite (CGAL::Arr_curve_end ce) const; + + /*! \pre (The corresponding curve end is finite) + */ + Point_2 curve_end (CGAL::Arr_curve_end ce) const; + + /*! returns the arc number of the segment. + * \pre (The segment is non-vertical) + */ + int arcno () const; + + /*! returns the \f$ x\f$-coordinate of a vertical segment. + * \pre (The segment is vertical) + */ + Algebraic_real_1 x () const; + + /// @} + + }; /* end Arr_algebraic_segment_traits_2::X_monotone_curve_2 */ }; /* end Arr_algebraic_segment_traits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h index 9bda6a296b9..862416a2fa3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h @@ -49,10 +49,10 @@ public: /// \name Creation /// @{ - /*! Default constructor. */ + /*! constructs default */ Arr_bounded_planar_topology_traits_2(); - /*! Constructor from a geometry-traits object. + /*! constructs from a geometry-traits object. * \param traits the traits. */ Arr_bounded_planar_topology_traits_2(const GeometryTraits_2* traits); @@ -62,16 +62,16 @@ public: /// \name Accessors /// @{ - /*! Obtain the DCEL (const version). */ + /*! obtains the DCEL (const version). */ const Dcel& dcel() const; - /*! Obtain the DCEL (non-const version). */ + /*! obtains the DCEL (non-const version). */ Dcel& dcel(); - /*! Obtain the unbounded face (const version). */ + /*! obtains the unbounded face (const version). */ const Face* unbounded_face() const; - /*! Obtain the unbounded face (non-const version). */ + /*! obtains the unbounded face (non-const version). */ Face* unbounded_face(); /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h index 303a00ded01..b3a39fc3e07 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h @@ -35,7 +35,7 @@ namespace CGAL { * \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2} * */ -template< typename Kernel > +template class Arr_circle_segment_traits_2 { public: @@ -133,7 +133,7 @@ public: /*! returns the target point. * * \pre `cv` is not a full circle. - */ + */ const Point_2& target() const; /*! returns the orientation of the curve (`COLLINEAR` in case of line @@ -189,7 +189,7 @@ public: /// \name Creation /// @{ - /*! default constructor. + /*! constructs default */ Point_2(); @@ -323,15 +323,15 @@ public: /// \name Creation /// @{ - /*! Trims the given x-monotone curve to an from src to tgt. + /*! trims the given x-monotone curve to an from src to tgt. * \ pre `src` and `tgt` lies on the curve */ X_monotone_curve_2(const X_monotone_curve_2& xcv, const Point_2& src, - const Point_2& tgt)const + const Point_2& tgt) const /// @} - } /* end Arr_circle_segment_traits_2::Trim_2 */ + } /* end Arr_circle_segment_traits_2::Trim_2 */ }; /* end Arr_circle_segment_traits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h index 2db8001f4b1..a68feead26c 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h @@ -260,11 +260,11 @@ public: /// \name Creation /// @{ - /*! construct a default point. + /*! constructs a default point. */ Point_2(); - /*! construct a point from an algebraic point. + /*! constructs a point from an algebraic point. */ Point_2(const typename Alg_kernel::Point_2& p); @@ -401,7 +401,7 @@ public: */ X_monotone_curve_2 operator()(const Curve_2& cv) const; - /*! Constructs an \f$x\f$-monotone curve connecting the two given endpoints. + /*! constructs an \f$x\f$-monotone curve connecting the two given endpoints. * \param source The first point. * \param target The second point. * \pre `source` and `target` must not be the same. @@ -409,7 +409,7 @@ public: */ X_monotone_curve_2 operator()(const Point_2& source, const Point_2& target) const; - /*! Constructs a special segment of a given line connecting to given + /*! constructs a special segment of a given line connecting to given * endpoints. * \param a, b, c The coefficients of the supporting line (\f$ax + by + c = 0\f$). * \param source The source point. @@ -427,33 +427,34 @@ public: */ class Construct_bbox_2 { public: - /*! Obtain a bounding box for a conic arc. + /*! obtains a bounding box for a conic arc. * \param cv The conic arc. * \return The bounding box. */ Bbox_2 operator()(const Curve_2& cv) const { return bbox(cv); } - /*! Obtain a bounding box for an \f$x\f$-monotone conic arc. + /*! obtains a bounding box for an \f$x\f$-monotone conic arc. * \param xcv The \f$x\f$-monotone conic arc. * \return The bounding box. */ Bbox_2 operator()(const X_monotone_curve_2& xcv) const { return bbox(xcv); } }; - /*! \name Auxiliary Functor definitions, used gor, e.g., the landmarks + /*! \name Auxiliary Functor definitions, used gor, e.g., the landmarks \ * point-location strategy and the drawing function. */ //@{ typedef double Approximate_number_type; typedef CGAL::Cartesian Approximate_kernel; typedef Approximate_kernel::Point_2 Approximate_point_2; + //@} /*! \class Approximate_2 * A functor that approximates a point and an \f$x\f$-monotone curve. */ class Approximate_2 { public: - /*! Obtain an approximation of a point coordinate. + /*! obtains an approximation of a point coordinate. * \param p The exact point. * \param i The coordinate index (either 0 or 1). * \pre `i` is either 0 or 1. @@ -462,7 +463,7 @@ public: */ Approximate_number_type operator()(const Point_2& p, int i) const; - /*! Obtain an approximation of a point. + /*! obtains an approximation of a point. * \param p The exact point. */ Approximate_point_2 operator()(const Point_2& p) const; @@ -496,7 +497,7 @@ public: */ class Trim_2 { public: - /*! Trims the given \f$x\f$-monotone arc to new endpoints. + /*! trims the given \f$x\f$-monotone arc to new endpoints. * \param xcv The \f$x\f$-monotone arc * \param source The new source point. * \param target The new target point. @@ -505,28 +506,28 @@ public: X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv, const Point_2& source, const Point_2& target) const; - }; /// \name Accessing Functor Objects /// @{ - /*! Obtain a `Construct_curve_2` functor. */ + /*! obtains a `Construct_curve_2` functor. */ Construct_curve_2 construct_curve_2_object() const; - /*! Obtain a `Construct_x_monotone_curve_2` functor. */ + /*! obtains a `Construct_x_monotone_curve_2` functor. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const; - /*! Obtain a `Bbox_2` functor. */ + /*! obtains a `Bbox_2` functor. */ Construct_bbox_2 construct_bbox_2_object() const; - /*! Obtain a `Trim_2` functor. */ + /*! obtains a `Trim_2` functor. */ Trim_2 trim_2_object() const; - /*! Obtain an `Approximate_2` functor. */ + /*! obtains an `Approximate_2` functor. */ Approximate_2 approximate_2_object() const; /// @} }; /* end Arr_conic_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_consolidated_curve_data_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_consolidated_curve_data_traits_2.h index 2ed18e6be6b..c554bc499c2 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_consolidated_curve_data_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_consolidated_curve_data_traits_2.h @@ -1,30 +1,28 @@ namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2TraitsClasses - -The class `Arr_consolidated_curve_data_traits_2` is a model of the concept `ArrangementTraits_2`, -and serves as a decorator class that enables the extension of the curve -type defined by the `Traits` parameter. The traits class inherits its -point type from `Traits::Point_2`, and defines the types -`Curve_2` and `X_monotone_curve_2` extended with extraneous data -fields of type `Data`. - -Each `Curve_2` object is associated with a single data field of type -`Data`, and each `X_monotone_curve_2` object is associated with -a set of unique data objects. When a curve is subdivided into \f$ x\f$-monotone -subcurves, all resulting subcurves are associated with a list containing -a single data object, copied from the inducing curve. When an \f$ x\f$-monotone -curve is split, its data set is duplicated, and inserted into the sets of -both resulting subcurves. In case two (or more) \f$ x\f$-monotone curves -overlap, their data sets are consolidated, and are inserted into the set -of the \f$ x\f$-monotone curve that represents the overlap. - -\cgalModels{ArrangementTraits_2} - -*/ -template< typename Traits, typename Data > +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * The class `Arr_consolidated_curve_data_traits_2` is a model of the concept + * `ArrangementTraits_2`, and serves as a decorator class that enables the + * extension of the curve type defined by the `Traits` parameter. The traits + * class inherits its point type from `Traits::Point_2`, and defines the types + * `Curve_2` and `X_monotone_curve_2` extended with extraneous data fields of + * type `Data`. + * + * Each `Curve_2` object is associated with a single data field of type `Data`, + * and each `X_monotone_curve_2` object is associated with a set of unique data + * objects. When a curve is subdivided into \f$ x\f$-monotone subcurves, all + * resulting subcurves are associated with a list containing a single data + * object, copied from the inducing curve. When an \f$ x\f$-monotone curve is + * split, its data set is duplicated, and inserted into the sets of both + * resulting subcurves. In case two (or more) \f$ x\f$-monotone curves overlap, + * their data sets are consolidated, and are inserted into the set of the \f$ + * x\f$-monotone curve that represents the overlap. + * + * \cgalModels{ArrangementTraits_2} + */ +template class Arr_consolidated_curve_data_traits_2 : public Arr_curve_data_traits_2, _Consolidate_unique_lists, @@ -32,139 +30,106 @@ class Arr_consolidated_curve_data_traits_2 { public: -/// \name Types -/// @{ + /// \name Types + /// @{ -/*! -the base traits-class. -*/ -typedef Traits Base_traits_2; + //! the base traits-class. + typedef Traits Base_traits_2; -/*! -the base curve. -*/ -typedef typename Base_traits_2::Curve_2 Base_curve_2; + //! the base curve. + typedef typename Base_traits_2::Curve_2 Base_curve_2; -/*! -the base \f$ x\f$-monotone curve curve. -*/ -typedef typename Base_traits_2::X_monotone_curve_2 Base_x_monotone_curve_2; + //! the base \f$ x\f$-monotone curve curve. + typedef typename Base_traits_2::X_monotone_curve_2 Base_x_monotone_curve_2; -/*! -a set of data objects that is associated with an \f$ x\f$-monotone curve. -*/ -typedef unspecified_type typedef Data_container; + //! a set of data objects that is associated with an \f$ x\f$-monotone curve. + typedef unspecified_type typedef Data_container; -/*! -a non-mutable iterator for the data objects in the data container. -*/ -typedef unspecified_type typedef Data_iterator; + //! a non-mutable iterator for the data objects in the data container. + typedef unspecified_type typedef Data_iterator; -/// @} + /// @} + /*! The `Data_container` class nested within the consolidated + * curve-data traits and associated with the `Traits::X_monotone_curve_2` type + * is maintained as a list with unique data objects. This representation is + * simple and efficient in terms of memory consumption. It also requires that + * the `Data` class supports only the equality operator. Note however that + * most set operations require linear time. + */ + class Data_container { + public: -/*! + /// \name Creation + /// @{ + /*! constructs default */ + Data_container(); -The `Data_container` class nested within the consolidated -curve-data traits and associated with the `Traits::X_monotone_curve_2` -type is maintained as a list with unique data objects. This representation is -simple and efficient in terms of memory consumption. It also requires that -the `Data` class supports only the equality operator. Note however that -most set operations require linear time. + /*! constructs set containing a single `data` object. */ + Data_container(const Data& data); -*/ -class Data_container { -public: + /// @} -/// \name Creation -/// @{ + /// \name Access Functions + /// @{ -/*! -default constructor. -*/ -Data_container (); + /*! returns the number of data objects in the set. */ + std::size_t size() const; -/*! -constructs set containing a single `data` object. -*/ -Data_container (const Data& data); + /*! returns an iterator pointing to the first data object. */ + Data_iterator begin() const; -/// @} + /*! returns a past-the-end iterator for the data objects. */ + Data_iterator end() const; -/// \name Access Functions -/// @{ + /*! returns the first data object inserted into the set. + * \pre The number of data objects is not \f$ 0\f$. + */ + const Data& front() const; -/*! -returns the number of data objects in the set. -*/ -std::size_t size () const; + /*! returns the last data object inserted into the set. + * \pre The number of data objects is not \f$ 0\f$. + */ + const Data& back() const; -/*! -returns an iterator pointing to the first data object. -*/ -Data_iterator begin () const; + /// @} -/*! -returns a past-the-end iterator for the data objects. -*/ -Data_iterator end () const; + /// \name Predicates + /// @{ -/*! -returns the first data object inserted into the set. -\pre The number of data objects is not \f$ 0\f$. -*/ -const Data& front () const; + /*! checks whether the two sets contain the same data objects (regardless of + * order). + */ + bool operator==(const Data_container& other) const; -/*! -returns the last data object inserted into the set. -\pre The number of data objects is not \f$ 0\f$. -*/ -const Data& back () const; + /*! finds the given `data` object in the set and returns an iterator + * for this object, or `end()` if it is not found. + */ + Data_iterator find(const Data& data); -/// @} + /// @} -/// \name Predicates -/// @{ + /// \name Modifiers + /// @{ -/*! -check if the two sets contain the same data objects (regardless of order). -*/ -bool operator== (const Data_container& other) const; + /*! inserts the given `data` object into the set. Returns `true` on + * success, or `false` if the set already contains the object. + */ + bool insert(const Data& data); -/*! -find the given `data` object in the set and returns an iterator -for this object, or `end()` if it is not found. -*/ -Data_iterator find (const Data& data); + /*! erases the given `data` object from the set. Returns `true` on + * success, or `false` if the set does not contain the object. + */ + bool erase(const Data& data); -/// @} - -/// \name Modifiers -/// @{ - -/*! -inserts the given `data` object into the set. Returns `true` on -success, or `false` if the set already contains the object. -*/ -bool insert (const Data& data); - -/*! -erases the given `data` object from the set. Returns `true` on -success, or `false` if the set does not contain the object. -*/ -bool erase (const Data& data); - -/*! -clears the set. -*/ -void clear (); - -/// @} - -}; /* end Arr_consolidated_curve_data_traits_2::Data_container */ + /*! clears the set. */ + void clear(); + /// @} + }; /* end Arr_consolidated_curve_data_traits_2::Data_container */ }; /* end Arr_consolidated_curve_data_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h new file mode 100644 index 00000000000..b4f5883c458 --- /dev/null +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h @@ -0,0 +1,145 @@ +// Copyright (c) 2005,2007,2009,2010,2011 Tel-Aviv University (Israel). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s): Efi Fogel +// Eric Berberich + +namespace CGAL { + +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * A metadata traits-class decorator for the arrangement package. It counts the + * number of invocations of traits-class functors. It is parameterized with + * another traits class and inherits from it. For each traits method it + * maintains a counter that counts the number of invocations into the method. + * + * It models all the concepts that the original traits models. + */ + +template +class Arr_counting_traits_2 : public BaseTraits { +public: + enum Operation_id { + COMPARE_X_2_OP = 0, + COMPARE_XY_2_OP, + CONSTRUCT_MIN_VERTEX_2_OP, + CONSTRUCT_MAX_VERTEX_2_OP, + IS_VERTICAL_2_OP, + COMPARE_Y_AT_X_2_OP, + EQUAL_2_POINTS_OP, + EQUAL_2_CURVES_OP, + COMPARE_Y_AT_X_LEFT_2_OP, + COMPARE_Y_AT_X_RIGHT_2_OP, + MAKE_X_MONOTONE_2_OP, + SPLIT_2_OP, + INTERSECT_2_OP, + ARE_MERGEABLE_2_OP, + MERGE_2_OP, + CONSTRUCT_2_OPPOSITE_2_OP, + COMPARE_ENDPOINTS_XY_2_OP, + APPROXIMATE_2_COORD_OP, + APPROXIMATE_2_POINT_OP, + APPROXIMATE_2_CURVE_OP, + PARAMETER_SPACE_IN_X_2_CURVE_END_OP, + PARAMETER_SPACE_IN_X_2_POINT_OP, + IS_ON_X_IDENTIFICATION_POINT_2_OP, + IS_ON_X_IDENTIFICATION_CURVE_2_OP, + COMPARE_Y_ON_BOUNDARY_2_OP, + COMPARE_Y_NEAR_BOUNDARY_2_OP, + PARAMETER_SPACE_IN_Y_2_CURVE_END_OP, + PARAMETER_SPACE_IN_Y_2_POINT_OP, + IS_ON_Y_IDENTIFICATION_2_POINT_OP, + IS_ON_Y_IDENTIFICATION_2_CURVE_OP, + COMPARE_X_ON_BOUNDARY_2_POINTS_OP, + COMPARE_X_ON_BOUNDARY_2_POINT_CURVE_END_OP, + COMPARE_X_ON_BOUNDARY_2_CURVE_ENDS_OP, + COMPARE_X_NEAR_BOUNDARY_2_OP, + NUMBER_OF_OPERATIONS + }; + + /// \name Creation + /// @{ + + /*! constructs default */ + template + Arr_counting_traits_2(Args ... args) : Base(std::forward(args)...) {} + + /*! disables copy constructor. */ + Arr_counting_traits_2(const Arr_counting_traits_2&) = delete; + + /// @} + + /*! obtains the counter of the given operation */ + std::size_t count(Operation_id id) const; + + /*! prints the counter associated with an operation. */ + template + OutStream& print(OutStream& os, Operation_id id) const; + + /// \name Types and functors inherited from `BaseTraits` + /// @{ + + using Has_left_category = typename Base::Has_left_category; + using Has_merge_category = typename Base::Has_merge_category; + using Has_do_intersect_category = typename Base::Has_do_intersect_category; + + using Left_side_category = + typename internal::Arr_complete_left_side_category::Category; + using Bottom_side_category = + typename internal::Arr_complete_bottom_side_category::Category; + using Top_side_category = + typename internal::Arr_complete_top_side_category::Category; + using Right_side_category = + typename internal::Arr_complete_right_side_category::Category; + + using Point_2 = typename Base::Point_2; + using X_monotone_curve_2 = typename Base::X_monotone_curve_2; + using Curve_2 = typename Base::Curve_2; + + /// @} + + /// \name Obtain the appropriate functor + /// @{ + + Compare_x_2 compare_x_2_object() const; + Compare_xy_2 compare_xy_2_object() const; + Construct_min_vertex_2 construct_min_vertex_2_object() const; + Construct_max_vertex_2 construct_max_vertex_2_object() const; + Is_vertical_2 is_vertical_2_object() const; + Compare_y_at_x_2 compare_y_at_x_2_object() const; + Equal_2 equal_2_object() const; + Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const; + Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const; + Make_x_monotone_2 make_x_monotone_2_object() const; + Split_2 split_2_object() const; + Intersect_2 intersect_2_object() const; + Are_mergeable_2 are_mergeable_2_object() const; + Merge_2 merge_2_object() const; + Construct_opposite_2 construct_opposite_2_object() const; + Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const; + Approximate_2 approximate_2_object() const; + Parameter_space_in_x_2 parameter_space_in_x_2_object() const; + Is_on_x_identification_2 is_on_x_identification_2_object() const; + Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const; + Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const; + Parameter_space_in_y_2 parameter_space_in_y_2_object() const; + Is_on_y_identification_2 is_on_y_identification_2_object() const; + Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const; + Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const; + + /// @} + + /*! cleans all operation counters */ + void clear_counters(); +}; + +template +inline OutStream& operator<<(OutStream& os, + const Arr_counting_traits_2& traits); +} // namespace CGAL diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h index e75623e8cd7..c185f3f12fd 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h @@ -101,8 +101,7 @@ public: /// \name Creation /// @{ - /*! default constructor. - */ + /*! constructs default */ Curve_2(); /*! constructs curve from the given `base` curve with uninitialized @@ -131,49 +130,49 @@ public: /// @} -}; /* end Arr_curve_data_traits_2::Curve_2 */ + }; /* end Arr_curve_data_traits_2::Curve_2 */ -/*! The `X_monotone_curve_2` class nested within the curve-data traits extends - * the `Base_traits_2::X_monotone_curve_2` type with an extra data field. - */ -class X_monotone_curve_2 : public Base_x_monotone_curve_2 { -public: - - /// \name Creation - /// @{ - - /*! default constructor. + /*! The `X_monotone_curve_2` class nested within the curve-data traits extends + * the `Base_traits_2::X_monotone_curve_2` type with an extra data field. */ - X_monotone_curve_2(); + class X_monotone_curve_2 : public Base_x_monotone_curve_2 { + public: - /*! constructs an \f$ x\f$-monotone curve from the given `base` curve with - * uninitialized data field. - */ - X_monotone_curve_2(const Base_x_monotone_curve_2& base); + /// \name Creation + /// @{ - /*! constructs an \f$ x\f$-monotone curve from the given `base` \f$ - * x\f$-monotone curve with an attached `data` field. - */ - X_monotone_curve_2(const Base_x_monotone_curve_2& base, - const X_monotone_curve_data& data); + /*! constructs default */ + X_monotone_curve_2(); - /// @} + /*! constructs an \f$ x\f$-monotone curve from the given `base` curve with + * uninitialized data field. + */ + X_monotone_curve_2(const Base_x_monotone_curve_2& base); - /// \name Access Functions - /// @{ + /*! constructs an \f$ x\f$-monotone curve from the given `base` \f$ + * x\f$-monotone curve with an attached `data` field. + */ + X_monotone_curve_2(const Base_x_monotone_curve_2& base, + const X_monotone_curve_data& data); - /*! returns the field (a non-const version, which returns a reference - * to the data object, is also available). - */ - const X_monotone_curve_data& data() const; + /// @} - /*! sets the data field. - */ - void set_data(const X_monotone_curve_data& data); + /// \name Access Functions + /// @{ - /// @} + /*! returns the field (a non-const version, which returns a reference + * to the data object, is also available). + */ + const X_monotone_curve_data& data() const; -}; /* end Arr_curve_data_traits_2::X_monotone_curve_2 */ + /*! sets the data field. + */ + void set_data(const X_monotone_curve_data& data); + + /// @} + + }; /* end Arr_curve_data_traits_2::X_monotone_curve_2 */ }; /* end Arr_curve_data_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h index d34b40072a9..8c766b7783e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h @@ -82,7 +82,7 @@ namespace CGAL { /// \name Creation /// @{ - /*! Constructs a point from a direction and a location. + /*! constructs a point from a direction and a location. * \param[in] dir the direction. * \param[in] location indicates the location of the point pre-image * in the parameter space. @@ -94,13 +94,13 @@ namespace CGAL { /// \name Operations /// @{ - /*! Set the location of the point pre-image in the parameter space. + /*! sets the location of the point pre-image in the parameter space. * \param[in] location the updated location of the point pre-image in * the parameter space. */ void set_location(Location_type location); - /*! Obtain the location of the point. + /*! obtains the location of the point. * \return the location of the point pre-image in the parameter space. */ Location_type location() const; @@ -126,7 +126,7 @@ namespace CGAL { /// \name Creation /// @{ - /*! Constructs an \f$x\f$-monotone geodesic arc. + /*! constructs an \f$x\f$-monotone geodesic arc. * \param[in] source the source point of the arc. * \param[in] target the target point of the arc. * \param[in] normal the normal of the plane that contains the arc. @@ -146,7 +146,7 @@ namespace CGAL { bool is_degenerate = false, bool is_empty = false); - /*! Construct an \f$x\f$-monotone geodesic arc. + /*! construct an \f$x\f$-monotone geodesic arc. * \param[in] normal the normal of the plane containing the arc. * \param[in] source the source-point direction. * \param[in] target the target-point direction. @@ -156,7 +156,7 @@ namespace CGAL { const Point_2& target, const Direction_3& normal); - /*! Construct a full great-circle. + /*! construct a full great-circle. * \param[in] point the endpoint of the full great-circle. * \param[in] normal the normal of the plane containing the arc. * \pre the point lies on the given plane. @@ -171,90 +171,90 @@ namespace CGAL { /// \name Operations /// @{ - /*! Sets the source endpoint. + /*! sets the source endpoint. * \param[in] source the updated source endpoint. */ void set_source(const Point_2& source); - /*! Sets the target endpoint. + /*! sets the target endpoint. * \param[in] target the updated target endpoint. */ void set_target(const Point_2& target); - /*! Sets the normal of the underlying plane. + /*! sets the normal of the underlying plane. * \param[in] normal the updated normal of the underlying plane. */ void set_normal(const Direction_3& normal); - /*! Sets the flag that indicates whether the arc is vertical. + /*! sets the flag that indicates whether the arc is vertical. * \param[in] flag indicates whether the arc pre-image in the parameter * space is vertical. */ void set_is_vertical(bool flag); - /*! Sets the flag that indicates whether the direction of the arc + /*! sets the flag that indicates whether the direction of the arc * pre-image in the parameter space is from left to right. * \param flag indicates whether the arc pre-image in the parameter * space is from left to right. */ void set_is_directed_right(bool flag); - /*! Sets the flag that indicates whether the arc is a full great circle. + /*! sets the flag that indicates whether the arc is a full great circle. * \param[in] flag indicates whether the arc is a full great circle. */ void set_is_full(bool flag); - /*! Sets the flag that indicates whether the arc degenerates to a point. + /*! sets the flag that indicates whether the arc degenerates to a point. * \param[in] flag indicates whether the arc degenerates to a point. */ void set_is_degenerate(bool flag); - /*! Sets the flag that indicates whether the arc is empty. + /*! sets the flag that indicates whether the arc is empty. * \param[in] flag indicates whether the arc is empty. */ void set_is_empty(bool flag); - /*! Obtains the source point. + /*! obtains the source point. */ const Point_2& source() const; - /*! Obtains the target point. + /*! obtains the target point. */ const Point_2& target() const; - /*! Obtains the normal to the containing plane. + /*! obtains the normal to the containing plane. */ const Direction_3& normal() const; - /*! Obtains the (lexicographically) left endpoint direction. + /*! obtains the (lexicographically) left endpoint direction. */ const Point_2& left() const; - /*! Obtains the (lexicographically) right endpoint. + /*! obtains the (lexicographically) right endpoint. */ const Point_2& right() const; - /*! Determines whether the arc is vertical. + /*! determines whether the arc is vertical. */ bool is_vertical() const; - /*! Determines whether the arc is directed lexicographically from left to + /*! determines whether the arc is directed lexicographically from left to * right. */ bool is_directed_right() const; - /*! Determines whether the arc is a great circle. + /*! determines whether the arc is a great circle. */ bool is_full() const; - /*! Determines whether the arc is degenerate. + /*! determines whether the arc is degenerate. */ bool is_degenerate() const; - /*! Determines whether the arc is empty. */ + /*! determines whether the arc is empty. */ bool is_empty() const; - /*! Determines whether the arc is a meridian. + /*! determines whether the arc is a meridian. */ bool is_meridian() const; @@ -283,6 +283,7 @@ namespace CGAL { * * \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableTernaryFunction} */ + /*! */ class Construct_point_2 { @@ -297,7 +298,7 @@ namespace CGAL { /// \name Operations /// @{ - /*! Construct a point on the sphere from three coordinates, which define + /*! constructs a point on the sphere from three coordinates, which define * a (not necessarily normalized) direction. * \param[in] x the x coordinate * \param[in] y the y coordinate @@ -305,7 +306,7 @@ namespace CGAL { */ Point_2 operator()(const FT& x, const FT& y, const FT& z); - /*! Construct a point on the sphere from a (not necessarily normalized) + /*! constructs a point on the sphere from a (not necessarily normalized) * direction. * \param other the other direction */ @@ -331,7 +332,7 @@ namespace CGAL { /// \name Operations /// @{ - /*! Construct the minor geodesic arc from two endpoints. The minor arc + /*! constructs the minor geodesic arc from two endpoints. The minor arc * is the one with the smaller angle among the two geodesic arcs with * the given endpoints. * 1. Find out whether the arc is x-monotone. @@ -351,7 +352,7 @@ namespace CGAL { */ X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q); - /*! Construct a full great circle from a normal to a plane. + /*! constructs a full great circle from a normal to a plane. * Observe that the constructed arc has one endpoint that lies on * the identification curve. This point is considered both the source and * target (and also the left and right) point of the arc. @@ -360,7 +361,7 @@ namespace CGAL { */ X_monotone_curve_2 operator()(const Direction_3& normal); - /*! Construct a geodesic arc from two endpoints and a normal to the plane + /*! constructs a geodesic arc from two endpoints and a normal to the plane * containing the arc. The two endpoints determine the plane. The normal * determines the orientation of the plane and the final arc (whether its * the minor arc or the major arc). The right-hand rule can be used @@ -395,12 +396,12 @@ namespace CGAL { /// \name Operations /// @{ - /*! Construct a full great circle from a normal to a plane. + /*! constructs a full great circle from a normal to a plane. * \param normal the normal to the plane containing the great circle. */ X_monotone_curve_2 operator()(const Direction_3& normal); - /*! Construct the minor geodesic arc from two endpoints. The minor arc + /*! constructs the minor geodesic arc from two endpoints. The minor arc * is the one with the smaller angle among the two geodesic arcs with * the given endpoints. * 1. Find out whether the arc is x-monotone. @@ -419,7 +420,7 @@ namespace CGAL { */ Curve_2 operator()(const Point_2& p, const Point_2& q); - /*! Construct a geodesic arc from two endpoints and a normal to the plane + /*! constructs a geodesic arc from two endpoints and a normal to the plane * containing the arc. The two endpoints determine the plane. The normal * determines the orientation of the plane and the final arc (whether its * the minor arc or the major arc). The right-hand rule can be used @@ -434,15 +435,15 @@ namespace CGAL { /// @} }; - /*! Returns an instance of `Construct_point_2`. + /*! returns an instance of `Construct_point_2`. */ Construct_point_2 construct_point_2_object() const; - /*! Returns an instance of `Construct_x_monotone_curve_2`. + /*! returns an instance of `Construct_x_monotone_curve_2`. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const; - /*! Returns an instance of `Construct_curve_2`. + /*! returns an instance of `Construct_curve_2`. */ Construct_curve_2 construct_curve_2_object() const; }; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h index 7f1d5825c01..9a842135e7c 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h @@ -23,7 +23,7 @@ namespace CGAL { * * \cgalModels{ArrangementTraits_2,ArrangementLandmarkTraits_2,ArrangementOpenBoundaryTraits_2} */ -template< typename Kernel > +template class Arr_linear_traits_2 { public: @@ -147,7 +147,7 @@ public: /// \name Creation /// @{ - /*! Trims the given x-monotone curve to an from src to tgt. + /*! trims the given x-monotone curve to an from src to tgt. * \ pre `src` and `tgt` lies on the curve */ X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv, diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h index 8c1db150c3b..cedf54756da 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h @@ -93,6 +93,7 @@ namespace CGAL { /// \name Types /// @{ + /*! */ // TODO: Have to turn these into links, so whenever I mention Point_2 it @@ -119,14 +120,14 @@ namespace CGAL { /// \name Operations /// @{ - /*! Obtain a polycurve that comprises of one given subcurve. + /*! obtains a polycurve that comprises of one given subcurve. * \param subcurve input subcurve. * \pre `subcurve` is not degenerated (not tested). * \return A polycurve with one subcurve, namely `subcurve`. */ Curve_2 operator()(const Subcurve_2& subcurve) const; - /*! Construct a well-oriented polycurve from a range of either + /*! constructs a well-oriented polycurve from a range of either * `SubcurveTraits_2::Point_2` or `SubcurveTraits_2::Curve_2`. * * \param begin iterator pointing to the first element in the @@ -169,17 +170,17 @@ namespace CGAL { /// \name Operations /// @{ - /*! Append a subcurve `subcurve` to an existing polycurve `cv` at the back. - * If `cv` is empty, `subcurve` will be its first subcurve. + /*! appends a subcurve `subcurve` to an existing polycurve `cv` at the + * back. If `cv` is empty, `subcurve` will be its first subcurve. * \param cv a polycurve. Note, `cv` is (not necessarily) \f$x\f$-monotone. * \param subcurve a subcurve (not necessarily \f$x\f$-monotone) to be * appended to `cv` */ void operator()(Curve_2& cv, const Subcurve_2& subcurve) const; - /*! Append a subcurve `subcurve` to an existing \f$x\f$-monotone polycurve - * `xcv` at the back. If `xcv` is empty, `subcurve` will be its first - * subcurve. + /*! appends a subcurve `subcurve` to an existing \f$x\f$-monotone + * polycurve `xcv` at the back. If `xcv` is empty, `subcurve` will be its + * first subcurve. * \param xcv existing \f$x\f$-monotone polycurve * \param subcurve the subcurve to be added * \pre If `xcv` is not empty then `subcurve` extends `xcv` to the right @@ -201,7 +202,7 @@ namespace CGAL { /// \name Operations /// @{ - /*! Append a subcurve `subcurve` to an existing polycurve `cv` at the + /*! appends a subcurve `subcurve` to an existing polycurve `cv` at the * front. If `cv` is empty, `subcurve` will be its first subcurve. * \param cv a polycurve. Note, `cv` is (not necessarily) \f$x\f$-monotone. * \param subcurve a subcurve (not necessarily \f$x\f$-monotone) to be @@ -209,9 +210,9 @@ namespace CGAL { */ void operator()(Curve_2& cv, const Subcurve_2& subcurve) const; - /*! Append a subcurve `subcurve` to an existing \f$x\f$-monotone polycurve - * `xcv` at the front. If `xcv` is empty, `subcurve` will be its first - * subcurve. + /*! appends a subcurve `subcurve` to an existing \f$x\f$-monotone + * polycurve `xcv` at the front. If `xcv` is empty, `subcurve` will be its + * first subcurve. * \param xcv existing \f$x\f$-monotone polycurve * \param subcurve the subcurve to be added * \pre If `xcv` is not empty then `subcurve` extends `xcv` to the left if @@ -228,7 +229,7 @@ namespace CGAL { class Trim_2 { public: - /*! Obtain a trimmed version of the polycurve with src and tgt as end + /*! obtains a trimmed version of the polycurve with src and tgt as end * vertices. * Src and tgt will be swapped if they do not conform to the direction of * the polycurve. @@ -238,7 +239,7 @@ namespace CGAL { const Point_2& tgt) const; }; - /*! Subdivide a given subcurve into \f$x\f$-monotone subcurves and + /*! subdivides a given subcurve into \f$x\f$-monotone subcurves and * isolated points, and insert them into an output container. An object in * the output container is represented by a discriminated union container * that holds either a point or an \f$x\f$-monotone curve. @@ -273,10 +274,10 @@ namespace CGAL { * * The copy and default constructor as well as the assignment operator are * provided for polycurve subcurves. In addition, an \link - * PkgArrangementOnSurface2op_left_shift `operator<<` \endlink for the subcurves is - * defined for standard output streams, and an \link - * PkgArrangementOnSurface2op_right_shift `operator>>` \endlink for the subcurves is - * defined for standard input streams. + * PkgArrangementOnSurface2op_left_shift `operator<<` \endlink for the + * subcurves is defined for standard output streams, and an \link + * PkgArrangementOnSurface2op_right_shift `operator>>` \endlink for the + * subcurves is defined for standard input streams. */ template class Curve_2 { @@ -323,15 +324,15 @@ namespace CGAL { /// \name Creation /// @{ - /*! Default constructor that constructs an empty polycurve. + /*! constructs Default; constructs an empty polycurve. */ Curve_2(); - /*! Construct a polycurve from one subcurve. + /*! constructs a polycurve from one subcurve. */ Curve_2(const Subcurve_2 subcurve); - /*! Construct a polycurve defined by the given range of subcurves + /*! constructs a polycurve defined by the given range of subcurves * `[first, last)` (the value-type of `InputIterator` must be * `SubcurveTraits_2::Curve_2`. In general, the subcurves might not * be \f$x\f$-monotone, furthermore, they might not form a @@ -357,7 +358,7 @@ namespace CGAL { /// @{ /*! \deprecated - * Obtain the number of subcurve end-points that comprise the polycurve. + * obtains the number of subcurve end-points that comprise the polycurve. * Note that for a bounded polycurve, if there are \f$ n\f$ points in the * polycurve, it comprises \f$ (n - 1)\f$ subcurves. * Currently, only bounded polycurves are supported. @@ -365,20 +366,21 @@ namespace CGAL { unsigned_int points() const; /*! \deprecated - * Obtain an iterator pointing at the source point of the polycurve. + * obtains an iterator pointing at the source point of the polycurve. */ const_iterator begin() const; - /*! Obtain an iterator pointing at the first subcurve of the polycurve. + /*! obtains an iterator pointing at the first subcurve of the polycurve. */ Subcurve_const_iterator begin_subcurves() const; /*! \deprecated - * Obtain an iterator pointing after the end of the polycurve. + * obtains an iterator pointing after the end of the polycurve. */ const_iterator end() const; - /*! Get an iterator pointing at the past-the-end subcurve of the polycurve. + /*! obtains an iterator pointing at the past-the-end subcurve of the + * polycurve. */ Subcurve_const_iterator end_subcurves() const; @@ -387,38 +389,38 @@ namespace CGAL { */ const_iterator rbegin() const; - /*! Obtain an iterator pointing at the last subcurve of the polycurve. + /*! obtains an iterator pointing at the last subcurve of the polycurve. */ Subcurve_const_reverse_iterator rbegin_subcurves() const; /*! \deprecated - * Obtain an iterator pointing before the beginning of the polycurve. + * obtains an iterator pointing before the beginning of the polycurve. */ const_iterator rend() const; - /*! Obtain an iterator pointing at the past-the-end subcurve of + /*! obtains an iterator pointing at the past-the-end subcurve of * the polycurve in reverse order. */ Subcurve_const_reverse_iterator rend_subcurves() const; /*! \deprecated - * Obtain the number of subcurves composing the polycurve + * obtains the number of subcurves composing the polycurve * (equivalent to `pi.points() - 1`). Was replaced by number_of_subcurves() */ size_type size() const; - /*! Obtain the number of subcurves that comprise the polycurve. + /*! obtains the number of subcurves that comprise the polycurve. */ size_type number_of_subcurves() const; - /*! Obtain the \f$ k\f$th subcurve of the polycurve. + /*! obtains the \f$ k\f$th subcurve of the polycurve. * \pre \f$k\f$ is not greater than or equal to \f$n-1\f$, where * \f$n\f$ is the number of subcurves. */ typename SubcurveTraits_2::X_monotone_curve_2 operator[](size_t k) const; - /*! Obtain the bounding box of the polycurve. + /*! obtains the bounding box of the polycurve. */ Bbox_2 bbox() const; @@ -427,7 +429,7 @@ namespace CGAL { /// \name Operations /// @{ - /*! Append a subcurve to the polycurve at the back. + /*! appends a subcurve to the polycurve at the back. * \a Warning: This function does not perform the precondition test * that the `Push_back_2` functor does. Thus, it is * recommended to use the latter. @@ -438,7 +440,7 @@ namespace CGAL { */ inline void push_back(const Subcurve_2& subcurve); - /*! Append a subcurve to the polycurve at the front. + /*! appends a subcurve to the polycurve at the front. * \a Warning: This is a risky function! Don't use it! Prefer the * corresponding functor which is provided in the traits * class. @@ -450,12 +452,12 @@ namespace CGAL { inline void push_front(const Subcurve_2& subcurve); /*! \deprecated - * Add a new point to the polycurvs, which becomes the new target point + * adds a new point to the polycurvs, which becomes the new target point * of `pi`. */ void push_back(const Point_2 & p); - /*! Reset the polycurve. + /*! resets the polycurve. */ void clear(); @@ -463,7 +465,6 @@ namespace CGAL { }; /* end Arr_polycurve_traits_2::Curve_2 */ - /*! The `X_monotone_curve_2` class nested within the polycurve * traits is used to represent \f$ x\f$-monotone piecewise linear subcurves. * @@ -518,4 +519,5 @@ namespace CGAL { /// @} /* End Accessing Functor Objects */ }; /* end Arr_polycurve_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h index c9cc6f5def6..5f6614a6ada 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h @@ -149,7 +149,7 @@ public: //! obtains the past-the-end reverse iterator for the polyline points. Segment_const_reverse_iterator rend_segments() const; - /*! Obtain the number of subcurves that comprise the poyline. + /*! obtains the number of subcurves that comprise the poyline. * \return The number of subcurves. */ Segments_size_type number_of_segments() const; @@ -169,13 +169,13 @@ public: typedef std::reverse_iterator Segment_const_reverse_iterator; - /*! Construct default. */ + /*! constructs default. */ X_monotone_curve_2(); - /*! Construct from a subcurve. */ + /*! constructs from a subcurve. */ X_monotone_curve_2(X_monotone_segment_2 seg); - /*! Construct from a range. Similar to the constructor of a general + /*! constructs from a range. Similar to the constructor of a general * polycurve. Like in the case of general polycurve, for the sake of * backwards compatibility we have to keep an implementation of construction * from a range of points. DO NOT USE THIS CONSTRUCTION. @@ -183,23 +183,23 @@ public: template X_monotone_curve_2(InputIterator begin, InputIterator end); - /*! Obtain the first iterator of the polyline subcurves. + /*! obtains the first iterator of the polyline subcurves. */ Segment_const_iterator begin_segments() const; - /*! Obtain the past-the-end iterator of the polyline subcurves. + /*! obtains the past-the-end iterator of the polyline subcurves. */ Segment_const_iterator end_segments() const; - /*! Obtain the first reverse iterator of the polyline subcurves. + /*! obtains the first reverse iterator of the polyline subcurves. */ Segment_const_reverse_iterator rbegin_segments() const; - /*! Obtain the past-the-end reverse iterator for the polyline points. + /*! obtains the past-the-end reverse iterator for the polyline points. */ Segment_const_reverse_iterator rend_segments() const; - /*! Obtain the number of subcurves that comprise the poyline. + /*! obtains the number of subcurves that comprise the poyline. * \return The number of subcurves. */ Segments_size_type number_of_segments() const; @@ -219,7 +219,7 @@ public: /// \name Operations /// @{ - /*! Obtain a polyline connecting the two given endpoints. + /*! obtains a polyline connecting the two given endpoints. * \param p The first point. * \param q The second point. * \pre `p` and `q` are distinct. @@ -227,14 +227,14 @@ public: */ Curve_2 operator()(const Point_2& p, const Point_2& q) const; - /*! Obtain a polyline that comprises of one given segment. + /*! obtains a polyline that comprises of one given segment. * \param seg input segment * \pre `seg` is not degenerated (not tested) * \return A polyline with one segment, namely `seg`. */ Curve_2 operator()(const Segment_2& seg) const; - /*! Construct a well-oriented polyline from a range of either + /*! constructs a well-oriented polyline from a range of either * `SegmentTraits_2::Point_2` or `SegmentTraits_2::Segment_2`. * * \param begin iterator pointing to the first element in the range. @@ -270,7 +270,7 @@ public: /// \name Operations /// @{ - /*! Append a point `p` to an existing polyline `cv` at the back. + /*! appends a point `p` to an existing polyline `cv` at the back. * \param cv a polyline. Note, `cv` is not (necessarily) * \f$ x\f$-monotone. * \param p a point to be appended to `cv` at the back. @@ -278,7 +278,7 @@ public: */ void operator()(Curve_2& cv, const Point_2& p) const; - /*! Append a segment `seg` to an existing polyline `cv` at the back. + /*! appends a segment `seg` to an existing polyline `cv` at the back. * If `cv` is empty, `seg` will be its first segment. * \param cv a polyline. Note, `cv` is (not necessarily) \f$x\f$-monotone. * \param seg a segment (not necessarily \f$x\f$-monotone) to be appended @@ -286,7 +286,7 @@ public: */ void operator()(Curve_2& cv, const Segment_2& seg) const; - /*! Append a point `p` to an existing \f$x\f$-monotone polyline `xcv` at + /*! appends a point `p` to an existing \f$x\f$-monotone polyline `xcv` at * the back. * \param xcv the existing \f$x\f$-monotone polyline * \param p the point to be pushed back. @@ -297,7 +297,7 @@ public: */ void operator()(const X_monotone_curve_2& xcv, Point_2& p) const; - /*! Append a segment `seg` to an existing \f$x\f$-monotone polyline `xcv` + /*! appends a segment `seg` to an existing \f$x\f$-monotone polyline `xcv` * at the back. If `xcv` is empty, `seg` will be its first segment. * \param xcv existing \f$x\f$-monotone polyline * \param seg the segment to be added @@ -320,7 +320,7 @@ public: /// \name Operations /// @{ - /*! Append a point `p` to an existing polyline `cv` at the front. + /*! appends a point `p` to an existing polyline `cv` at the front. * \param cv a polyline. Note, `cv` is not (necessarily) * \f$ x\f$-monotone. * \param p a point to be appended to `cv` at the back. @@ -328,7 +328,7 @@ public: */ void operator()(Curve_2& cv, const Point_2& p) const; - /*! Append a segment `seg` to an existing polyline `cv` at the front. + /*! appends a segment `seg` to an existing polyline `cv` at the front. * If `cv` is empty, `seg` will be its first segment. * \param cv a polyline. Note, `cv` is (not necessarily) \f$x\f$-monotone. * \param seg a segment (not necessarily \f$x\f$-monotone) to be appended @@ -336,7 +336,7 @@ public: */ void operator()(Curve_2& cv, const Segment_2& seg) const; - /*! Append a point `p` to an existing \f$x\f$-monotone polyline `xcv` at + /*! appends a point `p` to an existing \f$x\f$-monotone polyline `xcv` at * the front. * \param xcv the existing \f$x\f$-monotone polyline * \param p the point to be pushed back. @@ -347,7 +347,7 @@ public: */ void operator()(const X_monotone_curve_2& xcv, Point_2& p) const; - /*! Append a segment `seg` to an existing \f$x\f$-monotone polyline `xcv` + /*! appends a segment `seg` to an existing \f$x\f$-monotone polyline `xcv` * at the front. If `xcv` is empty, `seg` will be its first segment. * \param xcv existing \f$x\f$-monotone polyline * \param seg the segment to be added diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h index d722a3ae285..21f976db116 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h @@ -1,88 +1,79 @@ namespace CGAL { -/*! - \ingroup PkgArrangementOnSurface2TraitsClasses - - The traits class `Arr_rational_function_traits_2` is a model of the `ArrangementTraits_2` - concept. It handles bounded and unbounded arcs of rational functions, - referred to as rational arcs (in particular, such an arc may correspond to the - entire graph of a rational function). It supports bounded and - unbounded arcs. Thus, it is also a model of the concept - `ArrangementOpenBoundaryTraits_2`. The traits class enables - the construction and maintenance of arrangements of such arcs. - - A rational function \f$ y = \frac{P(x)}{Q(x)}\f$ is defined by two polynomials - \f$ P\f$ and \f$ Q\f$ of arbitrary degrees. - If \f$ Q(x) = 1\f$ then the function is a simple polynomial function. - Usually the domain is \f$ \mathbb{R}\f$ but the function may also be - restricted to a bounded interval \f$ [x_{\rm min}, x_{\rm max}]\f$ - or defined over a ray \f$ (-\infty, x_{\rm max}]\f$ or over \f$ [x_{\rm min}, \infty)\f$. - Rational functions are represented by the nested type `Curve_2`. - Note that a rational function may be not continuous since roots of \f$ Q\f$ induce - vertical asymptotes, which would contradict the notion of an \f$ x\f$-monotone curve - as it is introduced by the `ArrangementTraits_2` concept. - Thus, continuous portions of rational functions are represented by the nested - type `X_monotone_curve_2`, which is different from `Curve_2`. - Constructors for both classes are provided by the traits. - A `Curve_2` may be split up into several `X_monotone_curve_2` - using `Make_x_monotone_2`. - - The template parameter of the traits must be a model of the - concept `AlgebraicKernel_d_1`. - A rational function is then represented by two polynomials \f$ P\f$ and \f$ Q\f$ of type - `AlgebraicKernel_d_1::Polynomial_1`. - A point is represented by a rational function and its \f$ x\f$-coordinate, which is - of type `AlgebraicKernel_d_1::Algebraic_real_1`. - Note that an explicit representation of the \f$ y\f$-coordinate is only computed upon - request, which can be a rather costly operation. - - The constructed rational functions are cached by the traits class. - The cache is local to each traits class object. - It is therefore necessary to construct the curves using the constructor - objects provided by member functions of the traits class. - Moreover, a curve must only be used with its own traits. - The cache is automatically cleaned up from time to time. - The amortized clean up costs are constant. However, there is also a - separate member function that cleans up the cache on demand. - - While `Arr_rational_function_traits_2` models the concept - `ArrangementDirectionalXMonotoneTraits_2`, the implementation of - the `Are_mergeable_2` operation does not enforce the input curves - to have the same direction as a precondition. Moreover, `Arr_rational_function_traits_2` - supports the merging of curves of opposite directions. - - \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2,ArrangementOpenBoundaryTraits_2} -*/ -template< typename AlgebraicKernel_d_1 > +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * The traits class `Arr_rational_function_traits_2` is a model of the + * `ArrangementTraits_2` concept. It handles bounded and unbounded arcs of + * rational functions, referred to as rational arcs (in particular, such + * an arc may correspond to the entire graph of a rational function). It + * supports bounded and unbounded arcs. Thus, it is also a model of the concept + * `ArrangementOpenBoundaryTraits_2`. The traits class enables the construction + * and maintenance of arrangements of such arcs. + * + * A rational function \f$y = \frac{P(x)}{Q(x)}\f$ is defined by two polynomials + * \f$P\f$ and \f$Q\f$ of arbitrary degrees. If \f$Q(x) = 1\f$ then the + * function is a simple polynomial function. Usually the domain is + * \f$\mathbb{R}\f$ but the function may also be restricted to a bounded + * interval \f$[x_{\rm min}, x_{\rm max}]\f$ or defined over a ray \f$(-\infty, + * x_{\rm max}]\f$ or over \f$[x_{\rm min}, \infty)\f$. Rational functions are + * represented by the nested type `Curve_2`. Note that a rational function may + * be not continuous since roots of \f$Q\f$ induce vertical asymptotes, which + * would contradict the notion of an \f$x\f$-monotone curve as it is introduced + * by the `ArrangementTraits_2` concept. Thus, continuous portions of rational + * functions are represented by the nested type `X_monotone_curve_2`, which is + * different from `Curve_2`. Constructors for both classes are provided by the + * traits. A `Curve_2` may be split up into several `X_monotone_curve_2` using + * `Make_x_monotone_2`. + * + * The template parameter of the traits must be a model of the concept + * `AlgebraicKernel_d_1`. A rational function is then represented by two + * polynomials \f$P\f$ and \f$Q\f$ of type + * `AlgebraicKernel_d_1::Polynomial_1`. A point is represented by a rational + * function and its \f$x\f$-coordinate, which is of type + * `AlgebraicKernel_d_1::Algebraic_real_1`. Note that an explicit + * representation of the \f$y\f$-coordinate is only computed upon request, + * which can be a rather costly operation. + * + * The constructed rational functions are cached by the traits class. The cache + * is local to each traits class object. It is therefore necessary to construct + * the curves using the constructor objects provided by member functions of the + * traits class. Moreover, a curve must only be used with its own traits. The + * cache is automatically cleaned up from time to time. The amortized clean up + * costs are constant. However, there is also a separate member function that + * cleans up the cache on demand. + * + * While `Arr_rational_function_traits_2` models the concept + * `ArrangementDirectionalXMonotoneTraits_2`, the implementation of the + * `Are_mergeable_2` operation does not enforce the input curves to have the + * same direction as a precondition. Moreover, `Arr_rational_function_traits_2` + * supports the merging of curves of opposite directions. + * + * \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2,ArrangementOpenBoundaryTraits_2} + */ +template class Arr_rational_function_traits_2 { public: - /// \name Types /// @{ /*! - */ typedef AlgebraicKernel_d_1 Algebraic_kernel_d_1; /*! - */ typedef AlgebraicKernel_d_1::Coefficient Coefficient; /*! - */ typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; /*! - */ typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; /*! - */ typedef AlgebraicKernel_d_1::Bound Bound; @@ -91,10 +82,9 @@ public: /// \name Creation /// @{ - /*! - constructs an empty traits that uses the kernel pointed by `kernel` - for performing algebraic operations. - */ + /*! constructs an empty traits that uses the kernel pointed by `kernel` + * for performing algebraic operations. + */ Arr_rational_function_traits_2(const Algebraic_kernel_d_1* kernel); /// @} @@ -102,673 +92,592 @@ public: /// \name Operations /// @{ - /*! - Returns an instance of `Construct_curve_2`. - */ + /*! returns an instance of `Construct_curve_2`. + */ Construct_curve_2 construct_curve_2_object() const; - /*! - Returns an instance of `Construct_x_monotone_curve_2`. - */ + /*! returns an instance of `Construct_x_monotone_curve_2`. + */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const; - /*! - Deletes all curves from the cache that exist only there. - */ + /*! deletes all curves from the cache that exist only there. + */ void cleanup_cache() const; - /*! - Returns a pointer to the used algebraic kernel object. - */ + /*! returns a pointer to the used algebraic kernel object. + */ const Algebraic_kernel_d_1* algebraic_kernel_d_1() const; /// @} - -/*! - - -Functor to construct a `Curve_2`. To enable caching the class is not -default constructible and must be obtained via the function -`construct_curve_2_object()`, which is a member of the traits. - -\cgalModels{Assignable,CopyConstructible,AdaptableBinaryFunction,AdaptableUnaryFunction} - -*/ -class Construct_curve_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/*! - -*/ -typedef Arr_rational_function_traits_2::Curve_2 result_type; - -/*! - -*/ -typedef Polynomial_1 argument_type; - -/*! - -*/ -typedef Polynomial_1 first_argument_type; - -/*! - -*/ -typedef Polynomial_1 second_argument_type; - -/// @} - -/// \name Operations -/// @{ - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$. -*/ -Curve_2 operator()(Polynomial_1 P) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$. -The function is defined over the interval \f$ [x,+\infty)\f$ if \f$ right\f$ is true -and \f$ (-\infty,x]\f$ otherwise. -*/ -Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& x, bool right) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$. -The function is defined over the interval \f$ [lower,upper]\f$. -*/ -Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& lower, const Algebraic_real_1& upper) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$. -*/ -Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$. -The function is defined over the interval \f$ I=[x,+\infty)\f$ if \f$ right\f$ is -true and \f$ I=(-\infty,x]\f$ otherwise. -*/ -Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, const Algebraic_real_1& x, bool right) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$. -The function is defined over the interval \f$ I=[lower,upper]\f$. -*/ -Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, const Algebraic_real_1& lower, const Algebraic_real_1& upper) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$, where -the coefficients of \f$ P\f$ are given in the range `[begin,end)`. -*/ -template -Curve_2 operator()(InputIterator begin, InputIterator end) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$, where -the coefficients of \f$ P\f$ are given in the range `[begin,end)`. The -function is defined over the interval \f$ [x,+\infty)\f$ if \f$ right\f$ is true -and \f$ (-\infty,x]\f$ otherwise. -*/ -template -Curve_2 operator()(InputIterator begin, InputIterator end, -const Algebraic_real_1& x, bool right) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$, where -the coefficients of \f$ P\f$ are given in the range `[begin,end)`. The -function is defined over the interval \f$ [lower,upper]\f$. -*/ -template -Curve_2 operator()(InputIterator begin, InputIterator end, -const Algebraic_real_1& lower, -const Algebraic_real_1& upper) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$, -where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the ranges -`[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. -*/ -template -Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$, -where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the ranges -`[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. The function is defined over the interval \f$ I=[x,+\infty)\f$ -if \f$ right\f$ is true and \f$ I=(-\infty,x]\f$ otherwise. -*/ -template -Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom, -const Algebraic_real_1& x, bool right) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$, -where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the ranges -`[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. The function is defined over the interval \f$ I=[lower,upper]\f$. -*/ -template -Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom, -const Algebraic_real_1& lower, -const Algebraic_real_1& upper) const; - -/// @} - -}; /* end Arr_rational_function_traits_2::Construct_curve_2 */ - -/*! - - -Functor to construct a `X_monotone_curve_2`. To enable caching the class -is not default constructible and must be obtained via the function -`construct_x_monotone_curve_2_object()`, which is a member of the traits. - -\cgalModels{Assignable,CopyConstructible,AdaptableBinaryFunction,AdaptableUnaryFunction} - -*/ -class Construct_x_monotone_curve_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/*! - -*/ -typedef Arr_rational_function_traits_2::X_monotone_curve_2 result_type; - -/*! - -*/ -typedef Polynomial_1 argument_type; - -/*! - -*/ -typedef Polynomial_1 first_argument_type; - -/*! - -*/ -typedef Polynomial_1 second_argument_type; - -/// @} - -/// \name Operations -/// @{ - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P) const; - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$. The function is defined over the interval \f$ [x,+\infty)\f$ if -\f$ right\f$ is true and \f$ (-\infty,x]\f$ otherwise. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, -const Algebraic_real_1& x, -bool right) const; - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$. The function is defined over the interval \f$ [lower,upper]\f$. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, -const Algebraic_real_1& lower, -const Algebraic_real_1& upper); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$. -\pre \f$ Q\f$ has no real roots. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$. The function is defined over the interval \f$ I=[x,+\infty)\f$ -if \f$ right\f$ is true and \f$ I=(-\infty,x]\f$ otherwise. -\pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, -const Algebraic_real_1& x, -bool right); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$. The function is defined over the interval \f$ I=[lower,upper]\f$. -\pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, -const Algebraic_real_1& lower, -const Algebraic_real_1& upper); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$, where the coefficients of \f$ P\f$ are given in the range -`[begin,end)`. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin, InputIterator end) const; - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$, where the coefficients of \f$ P\f$ are given in the range -`[begin,end)`. The function is defined over the interval \f$ [x,+\infty)\f$ -if \f$ right\f$ is true and \f$ (-\infty,x]\f$ otherwise. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin, InputIterator end, -const Algebraic_real_1& x, bool right) const; - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$, where the coefficients of \f$ P\f$ are given in the range -`[begin,end)`. The function is defined over the interval -\f$ [lower,upper]\f$. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin, InputIterator end -const Algebraic_real_1& lower, -const Algebraic_real_1& upper); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$, where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the -ranges `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. -\pre \f$ Q\f$ has no real roots. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$, where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the -ranges `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. The function is defined over the interval \f$ I=[x,+\infty)\f$ -if \f$ right\f$ is true and \f$ I=(-\infty,x]\f$ otherwise. -\pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom, -const Algebraic_real_1& x, bool right); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$, where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the -ranges `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. The function is defined over the interval \f$ I=[lower,upper]\f$. -\pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom, -const Algebraic_real_1& lower, const Algebraic_real_1& upper); const - -/// @} - -}; /* end Arr_rational_function_traits_2::Construct_x_monotone_curve_2 */ - -/*! - - -The `Curve_2` class nested within the traits is used -to represent rational functions which may be restricted to a certain x-range. - -\cgalModels{ArrTraits::Curve_2} - -*/ -class Curve_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/// @} - -/// \name Operations -/// @{ - -/*! -returns the numerator of the supporting rational function. -*/ -const Polynomial_1& numerator () const; - -/*! -returns the denominator of the supporting rational function. -*/ -const Polynomial_1& denominator () const; - -/*! -returns whether çurve is continuous, namely whether it does not -contains any vertical asymptotes in its interior. -*/ -bool is_continuous() const; - -/*! -returns whether the \f$ x\f$-coordinate of çurve's left end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space left_parameter_space_in_x () const; - -/*! -returns whether the \f$ x\f$-coordinate of çurve's right end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space right_parameter_space_in_x () const; - -/*! -returns the \f$ x\f$-coordinate of the left end. -\pre left_boundary_in_x()==ARR_INTERIOR -*/ -Algebraic_real_1 left_x() const; - -/*! -returns the \f$ x\f$-coordinate of the right end. -\pre right_boundary_in_x()==ARR_INTERIOR -*/ -Algebraic_real_1 right_x() const; - -/// @} - -}; /* end Arr_rational_function_traits_2::Curve_2 */ - -/*! - - -\cgalModels{ArrTraits::Point_2} - -*/ -class Point_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Bound Bound; - -/// @} - -/// \name Operations -/// @{ - -/*! -returns the numerator of the supporting rational function. -*/ -Polynomial_1 numerator () const; - -/*! -returns the denominator of the supporting rational function. -*/ -Polynomial_1 denominator () const; - -/*! -returns double-approximations of the x- and y-coordinates. -*/ -std::pair to_double() const; - -/*! -returns the \f$ x\f$-coordinate of the point. -*/ -Algebraic_real_1 x() const; - -/*! -obtains the y-coordinates of the point. Attention: As described above, -points are not stored by their y-coordinate in `Algebraic_real_1` -representation. In fact, this representation must be computed on demand, and -might become quite costly for points defined by high-degree polynomials. -Therefore, it is recommended to avoid calls to this function as much as -possible. -*/ -Algebraic_real_1 y() const; - -/*! -Computes a pair \f$ p\f$ approximating the \f$ x\f$-coordinate with -respect to the given absolute precision \f$ a\f$. -\post \f$ p.first \leq x \leq p.second \f$ -\post \f$ p.second - p.first \leq2^{-a} \f$ -*/ -std::pair approximate_absolute_x(int a) const; - -/*! -Computes a pair \f$ p\f$ approximating the \f$ y\f$-coordinate with -respect to the given absolute precision \f$ a\f$. -\post \f$ p.first \leq y \leq p.second \f$ -\post \f$ p.second - p.first \leq2^{-a} \f$ -*/ -std::pair approximate_absolute_y(int a) const; - -/*! -Computes a pair \f$ p\f$ approximating the \f$ x\f$-coordinate with -respect to the given relative precision \f$ r\f$. -\post \f$ p.first \leq x \leq p.second \f$ -\post \f$ p.second - p.first \leq2^{-r}|x| \f$ -*/ -std::pair approximate_relative_x(int r) const; - -/*! -Computes a pair \f$ p\f$ approximating the \f$ y\f$-coordinate with -respect to the given relative precision \f$ r\f$. -\post \f$ p.first \leq y \leq p.second \f$ -\post \f$ p.second - p.first \leq2^{-r}|y| \f$ -*/ -std::pair approximate_relative_y(int r) const; - -/// @} - -}; /* end Arr_rational_function_traits_2::Point_2 */ - -/*! - - -The `X_monotone_curve_2` class nested within the traits is used -to represent \f$ x\f$-monotone parts of rational functions. In particular, such an \f$ x\f$-monotone curve -may not contain a vertical asymptote in its interior \f$ x\f$-range. - -\cgalModels{ArrTraits::XMonotoneCurve_2} - -*/ -class X_monotone_curve_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/*! - -*/ -typedef Arr_rational_function_traits_2::Point_2 Point_2; - -/// @} - -/// \name Operations -/// @{ - -/*! -returns the numerator of the supporting rational function. -*/ -const Polynomial_1& numerator () const; - -/*! -returns the denominator of the supporting rational function. -*/ -const Polynomial_1& denominator () const; - -/*! -returns whether the \f$ x\f$-coordinate of the source is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space source_parameter_space_in_x () const; - -/*! -returns whether the \f$ y\f$-coordinate of the source is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space source_parameter_space_in_y () const; - -/*! -returns the source point of the arc. -\pre Both the \f$ x\f$- and \f$ y\f$-coordinates of the source point is finite. -*/ -const Point_2& source() const; - -/*! -returns the \f$ x\f$-coordinate of the source point. -\pre The \f$ x\f$-coordinate of the source point is finite. -*/ -Algebraic_real_1 source_x() const; - -/*! -returns whether the \f$ x\f$-coordinate of the target is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space target_parameter_space_in_x () const; - -/*! -returns whether the \f$ y\f$-coordinate of the target is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space target_parameter_space_in_y () const; - -/*! -returns the target point of the arc. -\pre Both the \f$ x\f$- and \f$ y\f$-coordinates of the target point is finite. -*/ -const Point_2& target() const; - -/*! -returns the \f$ x\f$-coordinate of the target point. -\pre The \f$ x\f$-coordinate of the target point is finite. -*/ -Algebraic_real_1 target_x() const; - -/*! -returns whether the \f$ x\f$-coordinate of the left curve end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space left_parameter_space_in_x () const; - -/*! -returns whether the \f$ y\f$-coordinate of the left curve end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space left_parameter_space_in_y () const; - -/*! -returns the left point of the arc. -\pre Both the \f$ x\f$- and \f$ y\f$-coordinates of the left point is finite. -*/ -const Point_2& left() const; - -/*! -returns the \f$ x\f$-coordinate of the left point. -\pre The \f$ x\f$-coordinate of the left point is finite. -*/ -Algebraic_real_1 left_x() const; - -/*! -returns whether the \f$ x\f$-coordinate of the right curve end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space right_parameter_space_in_x () const; - -/*! -returns whether the \f$ y\f$-coordinate of the right curve end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space right_parameter_space_in_y () const; - -/*! -returns the right point of the arc. -\pre Both the \f$ x\f$- and \f$ y\f$-coordinates of The right point is finite. -*/ -const Point_2& right() const; - -/*! -returns the \f$ x\f$-coordinate of the right point. -\pre The \f$ x\f$-coordinate of the right point is finite. -*/ -Algebraic_real_1 right_x() const; - -/*! -returns whether the curve is oriented from left to right. -*/ -bool is_left_to_right () const; - -/// @} - -}; /* end Arr_rational_function_traits_2::X_monotone_curve_2 */ - + /*! Functor to construct a `Curve_2`. To enable caching the class is not + * default constructible and must be obtained via the function + * `construct_curve_2_object()`, which is a member of the traits. + * + * \cgalModels{Assignable,CopyConstructible,AdaptableBinaryFunction,AdaptableUnaryFunction} + */ + + class Construct_curve_2 { + public: + /// \name Types + /// @{ + + /*! + */ + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /*! + */ + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /*! + */ + typedef Arr_rational_function_traits_2::Curve_2 result_type; + + /*! + */ + typedef Polynomial_1 argument_type; + + /*! + */ + typedef Polynomial_1 first_argument_type; + + /*! + */ + typedef Polynomial_1 second_argument_type; + + /// @} + + /// \name Operations + /// @{ + + /*! constructs a curve representing the polynomial function \f$y = P(x)\f$. + */ + Curve_2 operator()(Polynomial_1 P) const; + + /*! constructs a curve representing the polynomial function \f$y = P(x)\f$. + * The function is defined over the interval \f$[x,+\infty)\f$ if \f$ right\f$ + * is true and \f$(-\infty,x]\f$ otherwise. + */ + Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& x, + bool right) const; + + /*! constructs a curve representing the polynomial function \f$y = P(x)\f$. + * The function is defined over the interval \f$[lower,upper]\f$. + */ + Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$. + */ + Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q) const; + + /*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$. + * The function is defined over the interval + * \f$ I=[x,+\infty)\f$ if \f$ right\f$ is true and + * \f$ I=(-\infty,x]\f$ otherwise. + */ + Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, + const Algebraic_real_1& x, bool right) const; + + /*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$. + * The function is defined over the interval \f$I=[lower,upper]\f$. + */ + Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! constructs a curve representing the polynomial function \f$y = P(x)\f$, + * where the coefficients of \f$P\f$ are given in the range `[begin,end)`. + */ + template + Curve_2 operator()(InputIterator begin, InputIterator end) const; + + /*! constructs a curve representing the polynomial function \f$y = P(x)\f$, + * where the coefficients of \f$P\f$ are given in the range `[begin,end)`. + * The function is defined over the interval + * \f$[x,+\infty)\f$ if \f$ right\f$ is true and \f$(-\infty,x]\f$ + * otherwise. + */ + template + Curve_2 operator()(InputIterator begin, InputIterator end, + const Algebraic_real_1& x, bool right) const; + + /*! constructs a curve representing the polynomial function \f$y = P(x)\f$, + * where the coefficients of \f$P\f$ are given in the range `[begin,end)`. + * The function is defined over the interval \f$[lower,upper]\f$. + */ + template + Curve_2 operator()(InputIterator begin, InputIterator end, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$, + * where the coefficients of \f$P\f$ and \f$Q\f$ are given in the ranges + * `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, respectively. + */ + template + Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, + InputIterator begin_denom, InputIterator end_denom) const; + + /*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$, + * where the coefficients of \f$P\f$ and \f$ Q\f$ are given in the ranges + * `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, respectively. + * The function is defined over the interval \f$I=[x,+\infty)\f$ + * if \f$right\f$ is true and \f$I=(-\infty,x]\f$ otherwise. + */ + template + Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, + InputIterator begin_denom, InputIterator end_denom, + const Algebraic_real_1& x, bool right) const; + + /*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$, + * where the coefficients of \f$P\f$ and \f$Q\f$ are given in the ranges + * `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, respectively. + * The function is defined over the interval \f$I=[lower,upper]\f$. + */ + template + Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, + InputIterator begin_denom, InputIterator end_denom, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /// @} + + }; /* end Arr_rational_function_traits_2::Construct_curve_2 */ + + /*! Functor to construct a `X_monotone_curve_2`. To enable caching the class is + * not default constructible and must be obtained via the function + * `construct_x_monotone_curve_2_object()`, which is a member of the traits. + * + * \cgalModels{Assignable,CopyConstructible,AdaptableBinaryFunction,AdaptableUnaryFunction} + */ + class Construct_x_monotone_curve_2 { + public: + + /// \name Types + /// @{ + + /*! + */ + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /*! + */ + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /*! + */ + typedef Arr_rational_function_traits_2::X_monotone_curve_2 result_type; + + /*! + */ + typedef Polynomial_1 argument_type; + + /*! + */ + typedef Polynomial_1 first_argument_type; + + /*! + */ + typedef Polynomial_1 second_argument_type; + + /// @} + + /// \name Operations + /// @{ + + /*! constructs an \f$ x\f$-monotone curve supported by the polynomial function + * \f$ y = P(x)\f$. + */ + X_monotone_curve_2 operator()(Polynomial_1 P) const; + + /*! constructs an \f$x\f$-monotone curve supported by the polynomial function + * \f$y = P(x)\f$. The function is defined over the interval + * \f$[x,+\infty)\f$ if \f$ right\f$ is true and \f$(-\infty,x]\f$ + * otherwise. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, + const Algebraic_real_1& x, + bool right) const; + + /*! constructs an \f$x\f$-monotone curve supported by the polynomial function + * \f$y = P(x)\f$. The function is defined over the interval + * \f$[lower,upper]\f$. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$. + * \pre \f$Q\f$ has no real roots. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q) const; + + /*! constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$. The function is defined over the interval + * \f$I=[x,+\infty)\f$ if \f$ right\f$ is true and \f$I=(-\infty,x]\f$ + * otherwise. + * \pre \f$Q\f$ has no real roots in the interior of \f$I\f$. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, + const Algebraic_real_1& x, + bool right) const; + + /*! constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$. The function is defined over the interval + * \f$I=[lower,upper]\f$. + * \pre \f$Q\f$ has no real roots in the interior of \f$I\f$. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! constructs an \f$ x\f$-monotone curve supported by the polynomial function + * \f$ y = P(x)\f$, where the coefficients of \f$P\f$ are given in the range + * `[begin,end)`. + */ + template + X_monotone_curve_2 operator()(InputIterator begin, InputIterator end) const; + + /*! constructs an \f$x\f$-monotone curve supported by the polynomial function + * \f$y = P(x)\f$, where the coefficients of \f$P\f$ are given in the range + * `[begin,end)`. The function is defined over the interval \f$[x,+\infty)\f$ + * if \f$right\f$ is true and \f$(-\infty,x]\f$ otherwise. + */ + template + X_monotone_curve_2 operator()(InputIterator begin, InputIterator end, + const Algebraic_real_1& x, bool right) const; + + /*! constructs an \f$x\f$-monotone curve supported by the polynomial function + * \f$y = P(x)\f$, where the coefficients of \f$P\f$ are given in the range + * `[begin,end)`. The function is defined over the interval + * \f$[lower,upper]\f$. + */ + template + X_monotone_curve_2 operator()(InputIterator begin, InputIterator end + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$, where the coefficients of \f$P\f$ and \f$Q\f$ are + * given in the ranges `[begin_numer,end_numer)` and + * `[begin_denom,end_denom)`, respectively. + * \pre \f$Q\f$ has no real roots. + */ + template + X_monotone_curve_2 operator()(InputIterator begin_numer, + InputIterator end_numer, + InputIterator begin_denom, + InputIterator end_denom) const; + + /*! constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$, where the coefficients of \f$P\f$ and \f$Q\f$ are + * given in the ranges `[begin_numer,end_numer)` and + * `[begin_denom,end_denom)`, respectively. The function is defined over the + * interval \f$ I=[x,+\infty)\f$ if \f$ right\f$ is true and + * \f$ I=(-\infty,x]\f$ otherwise. + * \pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$. + */ + template + X_monotone_curve_2 operator()(InputIterator begin_numer, + InputIterator end_numer, + InputIterator begin_denom, + InputIterator end_denom, + const Algebraic_real_1& x, bool right) const; + + /*! constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$, where the coefficients of \f$ P\f$ and \f$Q\f$ are + * given in the ranges `[begin_numer,end_numer)` and + * `[begin_denom,end_denom)`, respectively. The function is defined over the + * interval \f$I=[lower,upper]\f$. + * \pre \f$Q\f$ has no real roots in the interior of \f$I\f$. + */ + template + X_monotone_curve_2 operator()(InputIterator begin_numer, + InputIterator end_numer, + InputIterator begin_denom, + InputIterator end_denom, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /// @} + + }; /* end Arr_rational_function_traits_2::Construct_x_monotone_curve_2 */ + + /*! The `Curve_2` class nested within the traits is used to represent rational + * functions which may be restricted to a certain \f$x\f$-range. + * + * \cgalModels{ArrTraits::Curve_2} + */ + class Curve_2 { + public: + + /// \name Types + /// @{ + + /*! + */ + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /*! + */ + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /// @} + + /// \name Operations + /// @{ + + /*! returns the numerator of the supporting rational function. + */ + const Polynomial_1& numerator () const; + + /*! returns the denominator of the supporting rational function. + */ + const Polynomial_1& denominator () const; + + /*! returns whether çurve is continuous, namely whether it does not + * contains any vertical asymptotes in its interior. + */ + bool is_continuous() const; + + /*! returns whether the \f$x\f$-coordinate of çurve's left end is + * finite or whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space left_parameter_space_in_x () const; + + /*! returns whether the \f$x\f$-coordinate of çurve's right end is + * finite or whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space right_parameter_space_in_x () const; + + /*! returns the \f$x\f$-coordinate of the left end. + * \pre `left_boundary_in_x()` == `ARR_INTERIOR` + */ + Algebraic_real_1 left_x() const; + + /*! returns the \f$x\f$-coordinate of the right end. + * \pre `right_boundary_in_x()` == `ARR_INTERIOR` + */ + Algebraic_real_1 right_x() const; + + /// @} + + }; /* end Arr_rational_function_traits_2::Curve_2 */ + + /*! \cgalModels{ArrTraits::Point_2} + */ + class Point_2 { + public: + + /// \name Types + /// @{ + + /*! + */ + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /*! + */ + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /*! + */ + typedef AlgebraicKernel_d_1::Bound Bound; + + /// @} + + /// \name Operations + /// @{ + + /*! returns the numerator of the supporting rational function. + */ + Polynomial_1 numerator () const; + + /*! returns the denominator of the supporting rational function. + */ + Polynomial_1 denominator () const; + + /*! returns double-approximations of the x- and y-coordinates. + */ + std::pair to_double() const; + + /*! returns the \f$ x\f$-coordinate of the point. + */ + Algebraic_real_1 x() const; + + /*! obtains the \f$y\f$-coordinates of the point. Attention: As + * described above, points are not stored by their y-coordinate in + * `Algebraic_real_1` representation. In fact, this representation must be + * computed on demand, and might become quite costly for points defined by + * high-degree polynomials. Therefore, it is recommended to avoid calls to + * this function as much as possible. + */ + Algebraic_real_1 y() const; + + /*! Computes a pair \f$p\f$ approximating the \f$x\f$-coordinate with + * respect to the given absolute precision \f$a\f$. + * \post \f$p.first \leq x \leq p.second\f$ + * \post \f$p.second - p.first \leq2^{-a}\f$ + */ + std::pair approximate_absolute_x(int a) const; + + /*! Computes a pair \f$p\f$ approximating the \f$y\f$-coordinate with + * respect to the given absolute precision \f$a\f$. + * \post \f$p.first \leq y \leq p.second\f$ + * \post \f$p.second - p.first \leq2^{-a}\f$ + */ + std::pair approximate_absolute_y(int a) const; + + /*! Computes a pair \f$p\f$ approximating the \f$x\f$-coordinate with + * respect to the given relative precision \f$r\f$. + * \post \f$p.first \leq x \leq p.second\f$ + * \post \f$p.second - p.first \leq2^{-r}|x|\f$ + */ + std::pair approximate_relative_x(int r) const; + + /*! Computes a pair \f$p\f$ approximating the \f$ y\f$-coordinate with + * respect to the given relative precision \f$r\f$. + * \post \f$p.first \leq y \leq p.second\f$ + * \post \f$p.second - p.first \leq2^{-r}|y|\f$ + */ + std::pair approximate_relative_y(int r) const; + + /// @} + + }; /* end Arr_rational_function_traits_2::Point_2 */ + + /*! The `X_monotone_curve_2` class nested within the traits is used to represent + * \f$ x\f$-monotone parts of rational functions. In particular, such an + * \f$x\f$-monotone curve may not contain a vertical asymptote in its interior + * \f$x\f$-range. + * + * \cgalModels{ArrTraits::XMonotoneCurve_2} + */ + class X_monotone_curve_2 { + public: + + /// \name Types + /// @{ + + /*! + */ + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /*! + */ + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /*! + */ + typedef Arr_rational_function_traits_2::Point_2 Point_2; + + /// @} + + /// \name Operations + /// @{ + + /*! returns the numerator of the supporting rational function. + */ + const Polynomial_1& numerator () const; + + /*! returns the denominator of the supporting rational function. + */ + const Polynomial_1& denominator () const; + + /*! returns whether the \f$x\f$-coordinate of the source is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space source_parameter_space_in_x () const; + + /*! returns whether the \f$y\f$-coordinate of the source is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space source_parameter_space_in_y () const; + + /*! returns the source point of the arc. + * \pre Both the \f$x\f$- and \f$y\f$-coordinates of the source point is + * finite. + */ + const Point_2& source() const; + + /*! returns the \f$x\f$-coordinate of the source point. + * \pre The \f$x\f$-coordinate of the source point is finite. + */ + Algebraic_real_1 source_x() const; + + /*! returns whether the \f$x\f$-coordinate of the target is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space target_parameter_space_in_x () const; + + /*! returns whether the \f$y\f$-coordinate of the target is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space target_parameter_space_in_y () const; + + /*! returns the target point of the arc. + * \pre Both the \f$x\f$- and \f$y\f$-coordinates of the target point is + * finite. + */ + const Point_2& target() const; + + /*! returns the \f$x\f$-coordinate of the target point. + * \pre The \f$x\f$-coordinate of the target point is finite. + */ + Algebraic_real_1 target_x() const; + + /*! returns whether the \f$x\f$-coordinate of the left curve end is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space left_parameter_space_in_x () const; + + /*! returns whether the \f$y\f$-coordinate of the left curve end is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space left_parameter_space_in_y () const; + + /*! returns the left point of the arc. + * \pre Both the \f$x\f$- and \f$y\f$-coordinates of the left point is finite. + */ + const Point_2& left() const; + + /*! returns the \f$x\f$-coordinate of the left point. + * \pre The \f$x\f$-coordinate of the left point is finite. + */ + Algebraic_real_1 left_x() const; + + /*! returns whether the \f$x\f$-coordinate of the right curve end is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space right_parameter_space_in_x () const; + + /*! returns whether the \f$y\f$-coordinate of the right curve end is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space right_parameter_space_in_y () const; + + /*! returns the right point of the arc. + * \pre Both the \f$x\f$- and \f$y\f$-coordinates of The right point is + * finite. + */ + const Point_2& right() const; + + /*! returns the \f$x\f$-coordinate of the right point. + * \pre The \f$x\f$-coordinate of the right point is finite. + */ + Algebraic_real_1 right_x() const; + + /*! returns whether the curve is oriented from left to right. + */ + bool is_left_to_right () const; + + /// @} + + }; /* end Arr_rational_function_traits_2::X_monotone_curve_2 */ }; /* end Arr_rational_function_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h index 37a7a6c29bd..1db9da8bc82 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_segment_traits_2.h @@ -121,6 +121,7 @@ public: X_monotone_curve_2(const X_monotone_curve_2& xcv, const Point_2& src, const Point_2& tgt) const; + //! @} } /* end Arr_segment_traits_2::Trim_2 */ }; /* end Arr_segment_traits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h index aa95832414a..a1badbde914 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h @@ -49,10 +49,10 @@ public: /// \name Creation /// @{ - /*! Default constructor. */ + /*! constructs default */ Arr_spherical_topology_traits_2(); - /*! Constructor from a geometry-traits object. + /*! constructs from a geometry-traits object. * \param traits the traits. */ Arr_spherical_topology_traits_2(const GeometryTraits_2* traits); @@ -62,36 +62,36 @@ public: /// \name Accessors /// @{ - /*! Obtain the DCEL (const version). */ + /*! obtains the DCEL (const version). */ const Dcel& dcel() const; - /*! Obtain the DCEL (non-const version). */ + /*! obtains the DCEL (non-const version). */ Dcel& dcel(); - /*! Obtain the spherical face (const version). */ + /*! obtains the spherical face (const version). */ const Face* spherical_face() const; - /*! Obtain the spherical face (non-const version). */ + /*! obtains the spherical face (non-const version). */ Face* spherical_face(); - /*! Obtain the south pole (const version). */ + /*! obtains the south pole (const version). */ const Vertex* south_pole() const; - /*! Obtain the south pole (non-const version). */ + /*! obtains the south pole (non-const version). */ Vertex* south_pole(); - /*! Obtain the north pole (const version). */ + /*! obtains the north pole (const version). */ const Vertex* north_pole() const; - /*! Obtain the north pole (non-const version). */ + /*! obtains the north pole (non-const version). */ Vertex* north_pole(); - /*! Obtain a vertex on the line of discontinuity that corresponds to + /*! obtains a vertex on the line of discontinuity that corresponds to * the given point (or return NULL if no such vertex exists). */ const Vertex* discontinuity_vertex(const Point_2& pt) const; - /*! Obtain a vertex on the line of discontinuity that corresponds to + /*! obtains a vertex on the line of discontinuity that corresponds to * the given point (or return NULL if no such vertex exists). */ Vertex* discontinuity_vertex(const Point_2& pt); diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h new file mode 100644 index 00000000000..19c12f90716 --- /dev/null +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h @@ -0,0 +1,145 @@ +/// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s): Efi Fogel + +namespace CGAL { + +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * A metadata traits-class decorator for the arrangement package. It traces the + * invocations of traits-class functors. It is parameterized with another traits + * class and inherits from it. For each traits method it prints out its input + * parameters and its output result + * + * It models all the concepts that the original traits models. + */ +template +class Arr_tracing_traits_2 : public BaseTraits { +public: + enum Operation_id { + COMPARE_X_2_OP = 0, + COMPARE_XY_2_OP, + CONSTRUCT_MIN_VERTEX_2_OP, + CONSTRUCT_MAX_VERTEX_2_OP, + IS_VERTICAL_2_OP, + COMPARE_Y_AT_X_2_OP, + EQUAL_POINTS_2_OP, + EQUAL_CURVES_2_OP, + COMPARE_Y_AT_X_LEFT_2_OP, + COMPARE_Y_AT_X_RIGHT_2_OP, + MAKE_X_MONOTONE_2_OP, + SPLIT_2_OP, + INTERSECT_2_OP, + ARE_MERGEABLE_2_OP, + MERGE_2_OP, + CONSTRUCT_2_OPPOSITE_2_OP, + COMPARE_ENDPOINTS_XY_2_OP, + APPROXIMATE_2_OP, + PARAMETER_SPACE_IN_X_2_OP, + IS_ON_X_IDENTIFICATION_2_OP, + COMPARE_Y_ON_BOUNDARY_2_OP, + COMPARE_Y_NEAR_BOUNDARY_2_OP, + PARAMETER_SPACE_IN_Y_2_OP, + IS_ON_Y_IDENTIFICATION_2_OP, + COMPARE_X_ON_BOUNDARY_2_OP, + COMPARE_X_NEAR_BOUNDARY_2_OP, + NUMBER_OF_OPERATIONS + }; + +public: + /// \name Creation + /// @{ + + /*! constructs default */ + template + Arr_tracing_traits_2(Args ... args) : Base(std::forward(args)...) {} + + /*! disables copy constructor. */ + Arr_tracing_traits_2(const Arr_tracing_traits_2&) = delete; + + /// @} + + /*! enables the trace of a traits operation + * \param id the operation identifier + */ + void enable_trace(Operation_id id); + + /*! enables the trace of all traits operations + */ + void enable_all_traces(); + + /*! disables the trace of a traits operation + * \param id the operation identifier + */ + void disable_trace(Operation_id id); + + /*! disables the trace of all traits operations + */ + void disable_all_traces(); + + /// \name Types and functors inherited from `BaseTraits` + /// @{ + + using Has_left_category = typename Base::Has_left_category; + using Has_merge_category = typename Base::Has_merge_category; + using Has_do_intersect_category = typename Base::Has_do_intersect_category; + + using Left_side_category = + typename internal::Arr_complete_left_side_category< Base >::Category; + using Bottom_side_category = + typename internal::Arr_complete_bottom_side_category< Base >::Category; + using Top_side_category = + typename internal::Arr_complete_top_side_category< Base >::Category; + using Right_side_category = + typename internal::Arr_complete_right_side_category< Base >::Category; + + using Point_2 = typename Base::Point_2; + using X_monotone_curve_2 = typename Base::X_monotone_curve_2; + using Curve_2 = typename Base::Curve_2; + using Multiplicity = typename Base::Multiplicity; + + /// @} + + /// \name Obtain the appropriate functor + /// @{ + + Compare_x_2 compare_x_2_object() const; + Compare_xy_2 compare_xy_2_object() const; + Construct_min_vertex_2 construct_min_vertex_2_object() const; + Construct_max_vertex_2 construct_max_vertex_2_object() const; + Is_vertical_2 is_vertical_2_object() const; + Compare_y_at_x_2 compare_y_at_x_2_object() const; + Equal_2 equal_2_object() const; + Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const; + Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const; + Make_x_monotone_2 make_x_monotone_2_object() const; + Split_2 split_2_object() const; + Intersect_2 intersect_2_object() const; + Are_mergeable_2 are_mergeable_2_object() const; + Merge_2 merge_2_object() const; + Construct_opposite_2 construct_opposite_2_object() const; + Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const; + Approximate_2 approximate_2_object() const; + Parameter_space_in_x_2 parameter_space_in_x_2_object() const; + Is_on_x_identification_2 is_on_x_identification_2_object() const; + Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const; + Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const; + Parameter_space_in_y_2 parameter_space_in_y_2_object() const; + Is_on_y_identification_2 is_on_y_identification_2_object() const; + Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const; + Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const; + + /// @} +}; + +template +OutputStream& operator<<(OutputStream& os, Comparison_result cr); + +} // namespace CGAL diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h index 9a3aaf14789..46eb2fbfc96 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h @@ -49,10 +49,10 @@ public: /// \name Creation /// @{ - /*! Default constructor. */ + /*! constructs default. */ Arr_unb_planar_topology_traits_2(); - /*! Constructor from a geometry-traits object. + /*! constructs from a geometry-traits object. * \param traits the traits. */ Arr_unb_planar_topology_traits_2(const GeometryTraits_2* traits); @@ -62,16 +62,16 @@ public: /// \name Accessors /// @{ - /*! Obtain the DCEL (const version). */ + /*! obtains the DCEL (const version). */ const Dcel& dcel() const; - /*! Obtain the DCEL (non-const version). */ + /*! obtains the DCEL (non-const version). */ Dcel& dcel(); - /*! Obtain the unbounded face (const version). */ + /*! obtains the unbounded face (const version). */ const Face* unbounded_face() const; - /*! Obtain the unbounded face (non-const version). */ + /*! obtains the unbounded face (non-const version). */ Face* unbounded_face(); /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Approximate_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Approximate_2.h index 3a43a08c1a2..fc450689a0d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Approximate_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Approximate_2.h @@ -16,8 +16,8 @@ public: /// A model of this concept must provide: /// @{ - /*! obtains an approximation of `p`'s \f$x\f$-coordinate (if `i == 0`), or of - * `p`'s \f$y\f$-coordinate (if `i == 1`). + /*! obtains an approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or of + * `p`'s \f$y\f$-coordinate (if `i` == 1). */ CGAL::Approximate_number_type operator()(ArrTraits::Point_2 p, int i); diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBasicTopologyTraits.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBasicTopologyTraits.h index e30fada356a..76c42cc2114 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBasicTopologyTraits.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBasicTopologyTraits.h @@ -38,10 +38,10 @@ public: /// \name Access Functions /// @{ - /*! Obtain the DCEL (const version). */ + /*! obtains the DCEL (const version). */ const Dcel& dcel() const; - /*! Obtain the DCEL (non-const version). */ + /*! obtains the DCEL (non-const version). */ Dcel& dcel(); /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBottomSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBottomSideTraits_2.h index a29b1d33531..8d2682583b8 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBottomSideTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBottomSideTraits_2.h @@ -29,6 +29,7 @@ public: /// \name Functor Types /// @{ + /// @} /// \name Accessing Functor Objects /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedBottomTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedBottomTraits_2.h index 09de38a67c5..48563de6d81 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedBottomTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedBottomTraits_2.h @@ -33,6 +33,7 @@ public: /// \name Functor Types /// @{ + /// @} /// \name Accessing Functor Objects /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedLeftTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedLeftTraits_2.h index 9a06f1e409c..de1940c372b 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedLeftTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedLeftTraits_2.h @@ -33,6 +33,7 @@ public: /// \name Functor Types /// @{ + /// @} /// \name Accessing Functor Objects /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedRightTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedRightTraits_2.h index 3f93d80deb2..a36bca2691e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedRightTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedRightTraits_2.h @@ -33,6 +33,7 @@ public: /// \name Functor Types /// @{ + /// @} /// \name Accessing Functor Objects /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedTopTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedTopTraits_2.h index be39ea2b6b1..d4a2d352af4 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedTopTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementContractedTopTraits_2.h @@ -33,6 +33,7 @@ public: /// \name Functor Types /// @{ + /// @} /// \name Accessing Functor Objects /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementLeftSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementLeftSideTraits_2.h index 3b01d80db4f..6f2d1343a85 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementLeftSideTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementLeftSideTraits_2.h @@ -29,6 +29,7 @@ public: /// \name Functor Types /// @{ + /// @} /// \name Accessing Functor Objects /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenBottomTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenBottomTraits_2.h index c53f51ef056..2298e679738 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenBottomTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenBottomTraits_2.h @@ -33,6 +33,7 @@ public: /// \name Functor Types /// @{ + /// @} /// \name Accessing Functor Objects /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenLeftTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenLeftTraits_2.h index f1b7d62ca68..b4f1b8d2ee3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenLeftTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenLeftTraits_2.h @@ -33,6 +33,7 @@ public: /// \name Functor Types /// @{ + /// @} /// \name Accessing Functor Objects /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenRightTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenRightTraits_2.h index fa8468d49dc..a5683bc1aff 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenRightTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenRightTraits_2.h @@ -33,6 +33,7 @@ public: /// \name Functor Types /// @{ + /// @} /// \name Accessing Functor Objects /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenTopTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenTopTraits_2.h index 455bef4d160..ad852c41ed3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenTopTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenTopTraits_2.h @@ -33,6 +33,7 @@ public: /// \name Functor Types /// @{ + /// @} /// \name Accessing Functor Objects /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementRightSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementRightSideTraits_2.h index 689d2b7af2d..ed6d2be0c4d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementRightSideTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementRightSideTraits_2.h @@ -29,6 +29,7 @@ public: /// \name Functor Types /// @{ + /// @} /// \name Accessing Functor Objects /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementTopSideTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementTopSideTraits_2.h index 94614dfc81a..e579a7df9ef 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementTopSideTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementTopSideTraits_2.h @@ -29,6 +29,7 @@ public: /// \name Functor Types /// @{ + /// @} /// \name Accessing Functor Objects /// @{ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt index 1a82a431b56..300970a336e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt @@ -198,46 +198,48 @@ implemented as peripheral classes or as free (global) functions. - `CGAL::Arrangement_on_surface_with_history_2` - `CGAL::Arrangement_2` - `CGAL::Arrangement_with_history_2` -- `CGAL::Arr_accessor` -- `CGAL::Aos_observer` -- `CGAL::Arr_observer` - `CGAL::Arrangement_2::Vertex` - `CGAL::Arrangement_2::Halfedge` - `CGAL::Arrangement_2::Face` +- `CGAL::Arr_accessor` +- `CGAL::Arr_algebraic_segment_traits_2` +- `CGAL::Arr_Bezier_curve_traits_2` +- `CGAL::Arr_bounded_planar_topology_traits_2` +- `CGAL::Arr_circle_segment_traits_2` +- `CGAL::Arr_circular_arc_traits_2` +- `CGAL::Arr_circular_line_arc_traits_2` +- `CGAL::Arr_conic_traits_2` +- `CGAL::Arr_consolidated_curve_data_traits_2` +- `CGAL::Arr_counting_traits_2` +- `CGAL::Arr_curve_data_traits_2` - `CGAL::Arr_dcel_base` - `CGAL::Arr_dcel` - `CGAL::Arr_default_dcel` - `CGAL::Arr_face_extended_dcel` -- `CGAL::Arr_extended_dcel` -- `CGAL::Arr_segment_traits_2` -- `CGAL::Arr_non_caching_segment_traits_2` -- `CGAL::Arr_linear_traits_2` -- `CGAL::Arr_polyline_traits_2` -- `CGAL::Arr_circle_segment_traits_2` -- `CGAL::Arr_line_arc_traits_2` -- `CGAL::Arr_circular_arc_traits_2` -- `CGAL::Arr_circular_line_arc_traits_2` -- `CGAL::Arr_conic_traits_2` -- `CGAL::Arr_rational_function_traits_2` -- `CGAL::Arr_Bezier_curve_traits_2` -- `CGAL::Arr_algebraic_segment_traits_2` -- `CGAL::Arr_geodesic_arc_on_sphere_traits_2` -- `CGAL::Arr_curve_data_traits_2` -- `CGAL::Arr_consolidated_curve_data_traits_2` -- `CGAL::Arr_text_formatter` -- `CGAL::Arr_face_extended_text_formatter` -- `CGAL::Arr_extended_dcel_text_formatter` -- `CGAL::Arr_with_history_text_formatter` -- `CGAL::Arr_naive_point_location` -- `CGAL::Arr_walk_along_line_point_location` -- `CGAL::Arr_trapezoid_ric_point_location` -- `CGAL::Arr_landmarks_point_location` -- `CGAL::Arr_vertex_index_map` - `CGAL::Arr_face_index_map` +- `CGAL::Arr_extended_dcel` +- `CGAL::Arr_extended_dcel_text_formatter` +- `CGAL::Arr_face_extended_text_formatter` +- `CGAL::Arr_geodesic_arc_on_sphere_traits_2` +- `CGAL::Arr_landmarks_point_location` +- `CGAL::Arr_line_arc_traits_2` +- `CGAL::Arr_linear_traits_2` +- `CGAL::Arr_naive_point_location` +- `CGAL::Arr_non_caching_segment_traits_2` +- `CGAL::Arr_observer` +- `CGAL::Arr_polyline_traits_2` - `CGAL::Arr_point_location_result` -- `CGAL::Arr_bounded_planar_topology_traits_2` -- `CGAL::Arr_unb_planar_topology_traits_2` +- `CGAL::Arr_rational_function_traits_2` +- `CGAL::Arr_segment_traits_2` - `CGAL::Arr_spherical_topology_traits_2` +- `CGAL::Arr_text_formatter` +- `CGAL::Arr_tracing_traits_2` +- `CGAL::Arr_trapezoid_ric_point_location` +- `CGAL::Arr_unb_planar_topology_traits_2` +- `CGAL::Arr_vertex_index_map` +- `CGAL::Arr_walk_along_line_point_location` +- `CGAL::Arr_with_history_text_formatter` +- `CGAL::Aos_observer` - `CGAL::CORE_algebraic_number_traits` \cgalCRPSection{Functions} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/examples.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/examples.txt index 1196580e382..f3d19cb4c94 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/examples.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/examples.txt @@ -12,6 +12,7 @@ \example Arrangement_on_surface_2/conics.cpp \example Arrangement_on_surface_2/conic_multiplicities.cpp \example Arrangement_on_surface_2/consolidated_curve_data.cpp +\example Arrangement_on_surface_2/count_and_trace.cpp \example Arrangement_on_surface_2/curve_history.cpp \example Arrangement_on_surface_2/dcel_extension.cpp \example Arrangement_on_surface_2/dcel_extension_io.cpp diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/CMakeLists.txt index 2784310f4ed..bb5566835ab 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Arrangement_on_surface_2_Examples) find_package(CGAL REQUIRED COMPONENTS Core OPTIONAL_COMPONENTS Qt6) diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/count_and_trace.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/count_and_trace.cpp new file mode 100644 index 00000000000..3d95cacd096 --- /dev/null +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/count_and_trace.cpp @@ -0,0 +1,80 @@ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "arr_print.h" + +using Kernel = CGAL::Exact_predicates_exact_constructions_kernel; + +using Segment_base_traits = CGAL::Arr_segment_traits_2; +using Segment_cnt_traits = CGAL::Arr_counting_traits_2; +using Segment_traits = CGAL::Arr_tracing_traits_2; +using Segment_arrangement = CGAL::Arrangement_2; +using Point = Segment_traits::Point_2; +using Segment = Segment_traits::Curve_2; + +using Geodesic_base_traits = CGAL::Arr_geodesic_arc_on_sphere_traits_2; +using Geodesic_cnt_traits = CGAL::Arr_counting_traits_2; +using Geodesic_traits = CGAL::Arr_tracing_traits_2; +using Topol_traits = CGAL::Arr_spherical_topology_traits_2; +using Geodesic_arrangement = + CGAL::Arrangement_on_surface_2; +using Geodesic_point = Geodesic_traits::Point_2; +using Geodesic_curve = Geodesic_traits::Curve_2; + +using Nt_traits = CGAL::CORE_algebraic_number_traits; +using NT = Nt_traits::Rational; +using Rational = Nt_traits::Rational; +using Algebraic = Nt_traits::Algebraic; +using Rat_kernel = CGAL::Cartesian; +using Alg_kernel = CGAL::Cartesian; +using Rat_point = Rat_kernel::Point_2; +using Bezier_base_traits = + CGAL::Arr_Bezier_curve_traits_2; +using Bezier_cnt_traits = CGAL::Arr_counting_traits_2; +using Bezier_traits = CGAL::Arr_tracing_traits_2; +using Bezier_arrangement = CGAL::Arrangement_2; + +int main() { + Segment_traits seg_traits; + seg_traits.disable_all_traces(); + seg_traits.enable_trace(Segment_traits::COMPARE_Y_AT_X_2_OP); + Segment_arrangement seg_arr(&seg_traits); + std::vector ps = { Point(0,0), Point(1,0), Point(0,1) }; + std::vector segs = + { Segment(ps[0], ps[1]), Segment(ps[1], ps[2]), Segment(ps[2], ps[0]) }; + CGAL::insert(seg_arr, segs.begin(), segs.end()); + std::cout << seg_traits; + print_arrangement_size(seg_arr); + std::cout << std::endl; + + Geodesic_traits geodesic_traits; + geodesic_traits.disable_all_traces(); + geodesic_traits.enable_trace(Geodesic_traits::COMPARE_XY_2_OP); + auto ctr_p = geodesic_traits.construct_point_2_object(); + auto ctr_cv = geodesic_traits.construct_curve_2_object(); + std::vector gps = + { ctr_p(-1,0,0), ctr_p(0,-1,0), ctr_p(0,0,-1) }; + std::vector gas = + { ctr_cv(gps[0], gps[1]), ctr_cv(gps[1], gps[2]), ctr_cv(gps[2], gps[0]) }; + Geodesic_arrangement geodesic_arr(&geodesic_traits); + CGAL::insert(geodesic_arr, gas.begin(), gas.end()); + std::cout << geodesic_traits; + print_arrangement_size(geodesic_arr); + + Bezier_traits bezier_traits; + bezier_traits.disable_all_traces(); + std::cout << bezier_traits; + + return 0; +} diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/sgm_point_location.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/sgm_point_location.cpp index 565f903cddc..8d53c465581 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/sgm_point_location.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/sgm_point_location.cpp @@ -36,13 +36,6 @@ using Trap_pl = CGAL::Arr_trapezoid_ric_point_location; using Geom_traits = Gm::Geometry_traits_2; using Point_2 = Geom_traits::Point_2; -using Point_location_result = CGAL::Arr_point_location_result; -using Query_result = std::pair; - -using Vertex_const_handle = Gm::Vertex_const_handle; -using Halfedge_const_handle = Gm::Halfedge_const_handle; -using Face_const_handle = Gm::Face_const_handle; - int main() { Gm_polyhedron p; p.make_tetrahedron(Point_3(1.0, 0.0, 0.0), Point_3(0.0, 1.0, 0.0), @@ -50,7 +43,7 @@ int main() { Gm gm; Naive_pl naive_pl(gm); - // Landmarks_pl landmarks_pl(gm); + Landmarks_pl landmarks_pl(gm); Walk_pl walk_pl(gm); // Trap_pl trap_pl(gm); @@ -70,30 +63,17 @@ int main() { locate_point(naive_pl, points[1]); locate_point(naive_pl, points[2]); + // locate_point(walk_pl, points[0]); + // locate_point(walk_pl, points[1]); + // locate_point(walk_pl, points[2]); + + locate_point(landmarks_pl, points[0]); + locate_point(landmarks_pl, points[1]); + locate_point(landmarks_pl, points[2]); + // locate_point(trap_pl, points[0]); - - //////// - std::list results; - // The following cause an assertion failure. - // CGAL::locate(gm, &points[0], &points[3], std::back_inserter(results)); - - // Print the results. - for (auto it = results.begin(); it != results.end(); ++it) { - std::cout << "The point (" << it->first << ") is located "; - if (const Face_const_handle* f = - std::get_if(&(it->second))) // inside a face - std::cout << "inside " - << (((*f)->is_unbounded()) ? "the unbounded" : "a bounded") - << " face.\n"; - else if (const Halfedge_const_handle* e = - std::get_if(&(it->second))) // on an edge - std::cout << "on an edge: " << (*e)->curve() << std::endl; - else if (const Vertex_const_handle* v = - std::get_if(&(it->second))) // on a vertex - std::cout << "on " - << (((*v)->is_isolated()) ? "an isolated" : "a") - << " vertex: " << (*v)->point() << std::endl; - } + // locate_point(trap_pl, points[1]); + // locate_point(trap_pl, points[2]); return 0; } diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/tracing_counting.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/tracing_counting.cpp index 100c8828e39..df5715628f7 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/tracing_counting.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/tracing_counting.cpp @@ -22,7 +22,7 @@ int main() { Geom_traits traits; traits.disable_all_traces(); - traits.enable_trace(Tracing_traits::INTERSECT_OP); + traits.enable_trace(Tracing_traits::INTERSECT_2_OP); // Construct an arrangement using aggregated insertion: My_arrangement arr1(&traits); diff --git a/Arrangement_on_surface_2/include/CGAL/Aos_observer.h b/Arrangement_on_surface_2/include/CGAL/Aos_observer.h index 0881fd44c8c..4c7749a25e2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Aos_observer.h +++ b/Arrangement_on_surface_2/include/CGAL/Aos_observer.h @@ -48,27 +48,27 @@ public: private: Arrangement_2* p_arr; // The associated arrangement. - /*! Copy constructor - not supported. */ + /*! Copy constructor not supported. */ Aos_observer(const Self&); - /*! Assignment operator - not supported. */ + /*! Assignment operator not supported. */ Self& operator=(const Self&); public: /// \name Construction and destruction functions. //@{ - /*! Default constructor. */ + /*! constructs defaults. */ Aos_observer() : p_arr(nullptr) {} - /*! Constructor with an associated arrangement. */ + /*! constructs with an associated arrangement. */ Aos_observer(Arrangement_2& arr) : p_arr(&arr) { // Register the observer object in the arrangement. p_arr->_register_observer(this); } - /*! Destructor. */ + /*! destructs. */ virtual ~Aos_observer() { // Unregister the observer object from the arrangement. @@ -80,13 +80,13 @@ public: /// \name Modifying the associated arrangement. //@{ - /*! Get the associated arrangement (const version). */ + /*! obtains the associated arrangement (const version). */ const Arrangement_2* arrangement() const { return (p_arr); } - /*! Get the associated arrangement (non-const version). */ + /*! obtains the associated arrangement (non-const version). */ Arrangement_2* arrangement() { return (p_arr); } - /*! Attach the observer to an arrangement. + /*! attaches the observer to an arrangement. * \pre The observer is not already attached to an arrangement. */ void attach(Arrangement_2& arr) @@ -110,7 +110,7 @@ public: after_attach(); } - /*! Detach the observer from the arrangement. */ + /*! detaches the observer from the arrangement. */ void detach() { if (p_arr == nullptr) return; @@ -564,7 +564,7 @@ public: //@} }; -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h index 461cadf34a1..330686350a7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h @@ -123,7 +123,7 @@ public: /// \name Construction. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arr_Bezier_curve_traits_2 () { p_cache = new Bezier_cache; @@ -131,14 +131,14 @@ public: m_owner = true; } - /*! Copy constructor. */ + /*! constructs copy. */ Arr_Bezier_curve_traits_2 (const Self& tr) : p_cache (tr.p_cache), p_inter_map (tr.p_inter_map), m_owner (false) {} - /*! Assignment operator. */ + /*! assigns. */ Self& operator= (const Self& tr) { if (this == &tr) @@ -150,7 +150,7 @@ public: return (*this); } - /*! Destructor. */ + /*! destructs. */ ~Arr_Bezier_curve_traits_2 () { if (m_owner) @@ -176,13 +176,12 @@ public: public: - /*! Constructor. */ + /*! constructs. */ Compare_x_2 (const Bezier_cache *cache) : p_cache (cache) {} - /*! - * Compare the x-coordinates of two points. + /*! compares the x-coordinates of two points. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2); @@ -196,7 +195,7 @@ public: } }; - /*! Get a Compare_x_2 functor object. */ + /*! obtains a `Compare_x_2` functor object. */ Compare_x_2 compare_x_2_object () const { return (Compare_x_2 (p_cache)); @@ -212,13 +211,12 @@ public: public: - /*! Constructor. */ + /*! constructs. */ Compare_xy_2 (const Bezier_cache *cache) : p_cache (cache) {} - /*! - * Compares two points lexigoraphically: by x, then by y. + /*! compares two points lexigoraphically: by x, then by y. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2); @@ -232,7 +230,7 @@ public: } }; - /*! Get a Compare_xy_2 functor object. */ + /*! obtains a `Compare_xy_2` functor object. */ Compare_xy_2 compare_xy_2_object () const { return (Compare_xy_2 (p_cache)); @@ -244,8 +242,7 @@ public: class Construct_min_vertex_2 { public: - /*! - * Get the left endpoint of the x-monotone curve (segment). + /*! obtains the left endpoint of the x-monotone curve (segment). * \param cv The curve. * \return The left endpoint. */ @@ -255,7 +252,7 @@ public: } }; - /*! Get a Construct_min_vertex_2 functor object. */ + /*! obtains a `Construct_min_vertex_2` functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object () const { return Construct_min_vertex_2(); @@ -267,8 +264,7 @@ public: class Construct_max_vertex_2 { public: - /*! - * Get the right endpoint of the x-monotone curve (segment). + /*! obtains the right endpoint of the x-monotone curve (segment). * \param cv The curve. * \return The right endpoint. */ @@ -278,7 +274,7 @@ public: } }; - /*! Get a Construct_max_vertex_2 functor object. */ + /*! obtains a `Construct_max_vertex_2` functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object () const { return Construct_max_vertex_2(); @@ -290,8 +286,7 @@ public: class Is_vertical_2 { public: - /*! - * Check whether the given x-monotone curve is a vertical segment. + /*! checks whether the given x-monotone curve is a vertical segment. * \param cv The curve. * \return (true) if the curve is a vertical segment; (false) otherwise. */ @@ -301,7 +296,7 @@ public: } }; - /*! Get an Is_vertical_2 functor object. */ + /*! obtains an `Is_vertical_2` functor object. */ Is_vertical_2 is_vertical_2_object () const { return Is_vertical_2(); @@ -317,13 +312,12 @@ public: public: - /*! Constructor. */ + /*! constructs. */ Compare_y_at_x_2 (const Bezier_cache *cache) : p_cache (cache) {} - /*! - * Return the location of the given point with respect to the input curve. + /*! returns the location of the given point with respect to the input curve. * \param cv The curve. * \param p The point. * \pre p is in the x-range of cv. @@ -339,7 +333,7 @@ public: } }; - /*! Get a Compare_y_at_x_2 functor object. */ + /*! obtains a `Compare_y_at_x_2` functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object () const { return (Compare_y_at_x_2 (p_cache)); @@ -355,13 +349,12 @@ public: public: - /*! Constructor. */ + /*! constructs. */ Compare_y_at_x_left_2 (const Bezier_cache *cache) : p_cache (cache) {} - /*! - * Compares the y value of two x-monotone curves immediately to the left + /*! compares the y value of two x-monotone curves immediately to the left * of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. @@ -380,7 +373,7 @@ public: } }; - /*! Get a Compare_y_at_x_left_2 functor object. */ + /*! obtains a `Compare_y_at_x_left_2` functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const { return (Compare_y_at_x_left_2 (p_cache)); @@ -396,13 +389,12 @@ public: public: - /*! Constructor. */ + /*! constructs. */ Compare_y_at_x_right_2 (const Bezier_cache *cache) : p_cache (cache) {} - /*! - * Compares the y value of two x-monotone curves immediately to the right + /*! compares the y value of two x-monotone curves immediately to the right * of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. @@ -421,7 +413,7 @@ public: } }; - /*! Get a Compare_y_at_x_right_2 functor object. */ + /*! obtains a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const { return (Compare_y_at_x_right_2 (p_cache)); @@ -437,13 +429,12 @@ public: public: - /*! Constructor. */ + /*! constructs. */ Equal_2 (const Bezier_cache *cache) : p_cache (cache) {} - /*! - * Check if the two x-monotone curves are the same (have the same graph). + /*! checks if the two x-monotone curves are the same (have the same graph). * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are the same; (false) otherwise. @@ -455,8 +446,7 @@ public: const_cast (*p_cache))); } - /*! - * Check if the two points are the same. + /*! checks if the two points are the same. * \param p1 The first point. * \param p2 The second point. * \return (true) if the two point are the same; (false) otherwise. @@ -468,7 +458,7 @@ public: } }; - /*! Get an Equal_2 functor object. */ + /*! obtains an `Equal_2` functor object. */ Equal_2 equal_2_object () const { return (Equal_2 (p_cache)); @@ -486,10 +476,10 @@ public: Bezier_cache* p_cache; public: - /*! Constructor. */ + /*! constructs. */ Make_x_monotone_2(Bezier_cache* cache) : p_cache(cache) {} - /*! Subdivide a given Bezier curve into x-monotone subcurves and insert them + /*! subdivides a given Bezier curve into x-monotone subcurves and insert them * into a given output iterator. * \param cv the curve. * \param oi an output iterator for the result. Its value type is a variant @@ -600,7 +590,7 @@ public: } }; - /*! Get a Make_x_monotone_2 functor object. */ + /*! obtains a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return (Make_x_monotone_2 (p_cache)); } @@ -610,8 +600,7 @@ public: class Split_2 { public: - /*! - * Split a given x-monotone curve at a given point into two sub-curves. + /*! splits a given x-monotone curve at a given point into two sub-curves. * \param cv The curve to split * \param p The split point. * \param c1 Output: The left resulting subcurve (p is its right endpoint). @@ -626,7 +615,7 @@ public: } }; - /*! Get a Split_2 functor object. */ + /*! obtains a `Split_2` functor object. */ Split_2 split_2_object () const { return Split_2(); @@ -643,14 +632,13 @@ public: public: - /*! Constructor. */ + /*! constructs. */ Intersect_2 (Bezier_cache *cache, Intersection_map *imap) : p_cache (cache), p_imap (imap) {} - /*! - * Find the intersections of the two given curves and insert them to the + /*! finds the intersections of the two given curves and insert them to the * given output iterator. * \param cv1 The first curve. * \param cv2 The second curve. @@ -666,7 +654,7 @@ public: } }; - /*! Get an Intersect_2 functor object. */ + /*! obtains an `Intersect_2` functor object. */ Intersect_2 intersect_2_object () const { return (Intersect_2 (p_cache, p_inter_map)); @@ -678,8 +666,7 @@ public: class Are_mergeable_2 { public: - /*! - * Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given x-monotone curves. * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are mergeable - if they are supported @@ -692,7 +679,7 @@ public: } }; - /*! Get an Are_mergeable_2 functor object. */ + /*! obtains an `Are_mergeable_2` functor object. */ Are_mergeable_2 are_mergeable_2_object () const { return Are_mergeable_2(); @@ -709,7 +696,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Merge_2(const Traits* traits) : m_traits(traits) {} @@ -718,8 +705,7 @@ public: Nt_traits, Bounding_traits>; public: - /*! - * Merge two given x-monotone curves into a single curve (segment). + /*! merges two given x-monotone curves into a single curve (segment). * \param cv1 The first curve. * \param cv2 The second curve. * \param c Output: The merged curve. @@ -736,7 +722,7 @@ public: } }; - /*! Get a Merge_2 functor object. */ + /*! obtains a `Merge_2` functor object. */ Merge_2 merge_2_object () const { return Merge_2(this); @@ -752,8 +738,7 @@ public: class Compare_endpoints_xy_2 { public: - /*! - * Compare the endpoints of an $x$-monotone curve lexicographically. + /*! compares the endpoints of an $x$-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param cv The curve. * \return SMALLER if the curve is directed right; @@ -768,7 +753,7 @@ public: } }; - /*! Get a Compare_endpoints_xy_2 functor object. */ + /*! obtains a `Compare_endpoints_xy_2` functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); @@ -781,16 +766,14 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Trim_2(const Traits& traits) : m_traits(traits) {} friend class Arr_Bezier_curve_traits_2; - /*!\brief - * Returns a trimmed version of an arc - * + /*! returns a trimmed version of an arc * \param xcv The arc * \param src the new first endpoint * \param tgt the new second endpoint @@ -824,7 +807,7 @@ public: } }; - /*! Obtain a Trim_2 functor object. */ + /*! obtains a `Trim_2` functor object. */ Trim_2 trim_2_object() const { return Trim_2(*this); } /*! \class Construct_opposite_2 @@ -833,9 +816,7 @@ public: class Construct_opposite_2 { public: - - /*! - * Construct an opposite x-monotone curve (with swapped source and target). + /*! constructs an opposite x-monotone curve (with swapped source and target). * \param cv The curve. * \return The opposite curve. */ @@ -845,7 +826,7 @@ public: } }; - /*! Get a Construct_opposite_2 functor object. */ + /*! obtains a `Construct_opposite_2` functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); @@ -854,7 +835,8 @@ public: //@} }; -} //namespace CGAL +} // namespace CGAL #include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h b/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h index bb60e54d224..9627f680137 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h @@ -69,30 +69,29 @@ private: public: - /*! Constructor with an associated arrangement. */ + /*! constructs from an associated arrangement. */ Arr_accessor(Arrangement_2& arr) : p_arr(&arr) {} - /* Get the arrangement. */ + /*! obtains the arrangement. */ Arrangement_2& arrangement() { return (*p_arr); } - /* Get the arrangement (const version). */ + /*! obtains the arrangement (const version). */ const Arrangement_2& arrangement() const { return (*p_arr); } /// \name Accessing the notification functions (for the global functions). //@{ - /*! Notify that a global operation is about to take place. */ + /*! notifies that a global operation is about to take place. */ void notify_before_global_change() { p_arr->_notify_before_global_change(); } - /*! Notify that a global operation was completed. */ + /*! notifies that a global operation was completed. */ void notify_after_global_change() { p_arr->_notify_after_global_change(); } //@} /// \name Local operations and predicates for the arrangement. //@{ - /*! - * Locate the arrangement feature that contains the given curve-end. + /*! locates the arrangement feature that contains the given curve-end. * \param cv The curve. * \param ind ARR_MIN_END if we refer to cv's minimal end; * ARR_MAX_END if we refer to its maximal end. @@ -128,8 +127,7 @@ public: return Pl_result::make_result(Vertex_const_handle()); } - /*! - * Locate the place for the given curve around the given vertex. + /*! locates the place for the given curve around the given vertex. * \param vh A handle for the arrangement vertex. * \param cv The given x-monotone curve. * \pre v is one of cv's endpoints. @@ -162,8 +160,7 @@ public: return (p_arr->_handle_for (he)); } - /*! - * Locate the place for the given curve-end around the given vertex, + /*! locates the place for the given curve-end around the given vertex, * which lies on the boundary. * \param vh A handle for the arrangement vertex. * \param cv The curve. @@ -177,11 +174,11 @@ public: * vertex (in a clockwise order). */ Halfedge_handle - locate_around_boundary_vertex(Vertex_handle vh, - const X_monotone_curve_2& cv, - Arr_curve_end ind, - Arr_parameter_space ps_x, - Arr_parameter_space ps_y) const + locate_around_boundary_vertex(Vertex_handle vh, + const X_monotone_curve_2& cv, + Arr_curve_end ind, + Arr_parameter_space ps_x, + Arr_parameter_space ps_y) const { CGAL_precondition((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR)); @@ -193,8 +190,7 @@ public: return (p_arr->_handle_for (he)); } - /*! - * Compute the distance (in halfedges) between two halfedges. + /*! computes the distance (in halfedges) between two halfedges. * \param e1 A handle for the source halfedge. * \param e2 A handle for the destination halfedge. * \return In case e1 and e2 belong to the same connected component, the @@ -222,8 +218,7 @@ public: return (static_cast(dist)); } - /*! - * Determine whether a given query halfedge lies in the interior of a new + /*! determines whether a given query halfedge lies in the interior of a new * face we are about to create, by connecting it with another halfedge * using a given x-monotone curve. * \param prev1 A handle for the query halfedge. @@ -244,8 +239,7 @@ public: cv)); } - /*! - * Check if the given vertex represents one of the ends of a given curve. + /*! checks if the given vertex represents one of the ends of a given curve. * \param v The vertex. * \param cv The curve. * \param ind ARR_MIN_END if we refer to cv's minimal end; @@ -262,8 +256,7 @@ public: cv, ind, ps_x, ps_y)); } - /*! - * Check whether the given halfedge lies on the outer boundary of its + /*! checks whether the given halfedge lies on the outer boundary of its * incident face. * \param he The given halfedge. * \return (true) in case he lies on the outer boundary of its incident face; @@ -275,8 +268,7 @@ public: return (! p_he->is_on_inner_ccb()); } - /*! - * Check whether the given halfedge lies on the inner boundary of its + /*! checks whether the given halfedge lies on the inner boundary of its * incident face. * \param he The given halfedge. * \return (true) in case he lies on a hole inside its incident face; @@ -288,8 +280,7 @@ public: return (p_he->is_on_inner_ccb()); } - /*! - * Create a new vertex and associate it with the given point. + /*! creates a new vertex and associate it with the given point. * \param p The point. * \return A handle for the newly created vertex. */ @@ -300,8 +291,7 @@ public: return (p_arr->_handle_for (v)); } - /*! - * Create a new boundary vertex. + /*! creates a new boundary vertex. * \param pt the point * \param ps_x The parameter space in x. * \param ps_y The parameter space in y. @@ -328,8 +318,7 @@ public: return (p_arr->_handle_for(v)); } - /*! - * Create a new boundary vertex. + /*! creates a new boundary vertex. * \param cv The curve incident to the boundary. * \param ind The relevant curve-end. * \param ps_x The parameter space in x. @@ -358,8 +347,7 @@ public: return (p_arr->_handle_for(v)); } - /*! - * Locate the arrangement features that will be used for inserting the + /*! locates the arrangement features that will be used for inserting the * given curve end, which has a boundary condition, and set a proper vertex * there. * \param f The face that contains the curve end. @@ -388,8 +376,7 @@ public: return (std::make_pair(p_arr->_handle_for(v), p_arr->_handle_for(pred))); } - /*! - * Insert an x-monotone curve into the arrangement, where the end vertices + /*! inserts an x-monotone curve into the arrangement, where the end vertices * are given by the target points of two given halfedges. * The two halfedges should be given such that in case a new face is formed, * it will be the incident face of the halfedge directed from the first @@ -426,8 +413,7 @@ public: return (p_arr->_handle_for(he)); } - /*! - * Insert an x-monotone curve into the arrangement, such that one of its + /*! inserts an x-monotone curve into the arrangement, such that one of its * endpoints corresponds to a given arrangement vertex, given the exact * place for the curve in the circular list around this vertex. The other * endpoint corresponds to a free vertex (a newly created vertex or an @@ -463,8 +449,7 @@ public: return (p_arr->_handle_for (he)); } - /*! - * Insert an x-monotone curve into the arrangement, such that both its + /*! inserts an x-monotone curve into the arrangement, such that both its * endpoints correspond to free arrangement vertices (newly created vertices * or existing isolated vertices), so a new hole is formed in the face * that contains the two vertices. @@ -511,16 +496,14 @@ public: } - /*! - * Insert the given vertex as an isolated vertex inside the given face. + /*! inserts the given vertex as an isolated vertex inside the given face. * \param f The face that should contain the isolated vertex. * \param v The isolated vertex. */ void insert_isolated_vertex(Face_handle f, Vertex_handle v) { p_arr->_insert_isolated_vertex(p_arr->_face (f), p_arr->_vertex(v)); } - /*! - * Relocate all holes and isolated vertices to their proper position, + /*! relocates all holes and isolated vertices to their proper position, * immediately after a face has split due to the insertion of a new halfedge. * In case insert_at_vertices_ex() was invoked and indicated that a new face * has been created, this function should be called with the halfedge @@ -539,8 +522,7 @@ public: void relocate_holes_in_new_face(Halfedge_handle new_he) { p_arr->_relocate_holes_in_new_face(p_arr->_halfedge(new_he)); } - /*! - * Move an outer CCB from one face to another. + /*! moves an outer CCB from one face to another. * \param from_face The source face. * \param to_face The destination face. * \param ccb A CCB circulator that corresponds to component to move. @@ -552,8 +534,7 @@ public: p_arr->_halfedge (ccb)); } - /*! - * Move an inner CCB from one face to another. + /*! moves an inner CCB from one face to another. * \param from_face The source face. * \param to_face The destination face. * \param ccb A CCB circulator that corresponds to component to move. @@ -565,8 +546,7 @@ public: p_arr->_halfedge(ccb)); } - /*! - * Move an isolated vertex from one face to another. + /*! moves an isolated vertex from one face to another. * \param from_face The source face. * \param to_face The destination face. * \param v The isolated vertex to move. @@ -578,8 +558,7 @@ public: p_arr->_face(to_face), p_arr->_vertex(v)); } - /*! - * Remove an isolated vertex from its face. + /*! removes an isolated vertex from its face. * \param v The isolated vertex to remove. */ void remove_isolated_vertex_ex (Vertex_handle v) @@ -589,8 +568,7 @@ public: p_arr->_remove_isolated_vertex(iso_v); } - /*! - * Modify the point associated with a given vertex. The point may be + /*! modifies the point associated with a given vertex. The point may be * geometrically different than the one currently associated with the vertex. * \param v The vertex to modify. * \param p The new point to associate with v. @@ -602,9 +580,8 @@ public: return v; } - /*! - * Modify the x-monotone curve associated with a given edge. The curve may be - * geometrically different than the one currently associated with the edge. + /*! modifies the x-monotone curve associated with a given edge. The curve may + * be geometrically different than the one currently associated with the edge. * \param e The edge to modify. * \param cv The new x-monotone curve to associate with e. * \return A handle for the modified edge (same as e). @@ -616,8 +593,7 @@ public: return e; } - /*! - * Split a given edge into two at a given point, and associate the given + /*! splits a given edge into two at a given point, and associate the given * x-monotone curves with the split edges. * \param e The edge to split (one of the pair of twin halfedges). * \param p The split point. @@ -638,8 +614,7 @@ public: return (p_arr->_handle_for(he)); } - /*! - * Split a given edge into two at the given vertex, and associate the given + /*! splits a given edge into two at the given vertex, and associate the given * x-monotone curves with the split edges. * \param e The edge to split (one of the pair of twin halfedges). * \param v The split vertex. @@ -661,8 +636,7 @@ public: return (p_arr->_handle_for(he)); } - /*! - * Split a fictitious edge at the given vertex. + /*! splits a fictitious edge at the given vertex. * \param e The edge to split (one of the pair of twin halfedges). * \param v The split vertex. * \return A handle for the first split halfedge, whose source equals the @@ -677,8 +651,7 @@ public: return (p_arr->_handle_for(he)); } - /*! - * Remove a pair of twin halfedges from the arrangement. + /*! removes a pair of twin halfedges from the arrangement. * \param e A handle for one of the halfedges to be removed. * \param remove_source Should the source vertex of e be removed if it * becomes isolated (true by default). @@ -698,8 +671,7 @@ public: return (p_arr->_handle_for(f)); } - /*! - * Check if the two given halfedges lie on the same inner component. + /*! checks if the two given halfedges lie on the same inner component. * \param e1 A handle for the first halfedge. * \param e2 A handle for the second halfedge. * \return Whether e1 and e2 lie on the same inner component. @@ -714,8 +686,7 @@ public: return (ic1 == ic2); } - /*! - * Check if the two given halfedges lie on the same outer component. + /*! checks if the two given halfedges lie on the same outer component. * \param e1 A handle for the first halfedge. * \param e2 A handle for the second halfedge. * \return Whether e1 and e2 lie on the same outer component. @@ -741,7 +712,7 @@ public: typedef typename Arrangement_2::_Is_valid_vertex Is_valid_vertex; typedef typename Arrangement_2::_Valid_vertex_iterator Valid_vertex_iterator; - /*! Get an iterator for the first valid arrangement vertex. */ + /*! obtains an iterator for the first valid arrangement vertex. */ Valid_vertex_iterator valid_vertices_begin() { return (Valid_vertex_iterator @@ -750,7 +721,7 @@ public: Is_valid_vertex (p_arr->topology_traits()))); } - /*! Get a past-the-end iterator for the valid arrangement vertices. */ + /*! obtains a past-the-end iterator for the valid arrangement vertices. */ Valid_vertex_iterator valid_vertices_end() { return (Valid_vertex_iterator @@ -759,7 +730,7 @@ public: Is_valid_vertex (p_arr->topology_traits()))); } - /*! Get the number of valid arrangement vertices. */ + /*! obtains the number of valid arrangement vertices. */ Size number_of_valid_vertices() const { return (p_arr->topology_traits()->number_of_valid_vertices()); @@ -786,13 +757,11 @@ public: typedef DInner_ccb Dcel_inner_ccb; typedef DIso_vertex Dcel_isolated_vertex; - /*! - * Get the arrangement DCEL. + /*! obtains the arrangement DCEL. */ const Dcel& dcel() const { return (p_arr->_dcel()); } - /*! - * Clear the entire arrangement. + /*! clears the entire arrangement. */ void clear_all() { @@ -800,8 +769,7 @@ public: p_arr->_dcel().delete_all(); } - /*! - * Set the boundary of a vertex + /*! sets the boundary of a vertex * \param p A vertex * \param ps_x The boundary condition at x. * \param ps_y The boundary condition at y. @@ -816,8 +784,7 @@ public: return (v_to_set); } - /*! - * Create a new vertex. + /*! creates a new vertex. * \param p A pointer to the point (may be nullptr in case of a vertex at * infinity). * \param ps_x The boundary condition at x. @@ -842,8 +809,7 @@ public: return (new_v); } - /*! - * Create a new edge (halfedge pair), associated with the given curve. + /*! creates a new edge (halfedge pair), associated with the given curve. * \param cv A pointer to the x-monotone curve (may be nullptr in case of * a fictitious edge). * \return A pointer to one of the created DCEL halfedge. @@ -860,34 +826,29 @@ public: return new_he; } - /*! - * Create a new face. + /*! creates a new face. * \return A pointer to the created DCEL face. */ Dcel_face* new_face() { return (p_arr->_dcel().new_face()); } - /*! - * Create a new outer CCB. + /*! creates a new outer CCB. * \return A pointer to the created DCEL outer CCB. */ Dcel_outer_ccb* new_outer_ccb() { return (p_arr->_dcel().new_outer_ccb()); } - /*! - * Create a new inner CCB. + /*! creates a new inner CCB. * \return A pointer to the created DCEL inner CCB. */ Dcel_inner_ccb* new_inner_ccb() { return (p_arr->_dcel().new_inner_ccb()); } - /*! - * Create a new isolated vertex. + /*! creates a new isolated vertex. * \return A pointer to the created DCEL isolated vertex. */ Dcel_isolated_vertex* new_isolated_vertex() { return (p_arr->_dcel().new_isolated_vertex()); } - /*! - * Remove a range of vertices + /*! removes a range of vertices */ template void delete_vertices(const VertexRange& range) @@ -902,8 +863,7 @@ public: } } - /*! - * Remove a range of edges + /*! removes a range of edges */ template void delete_edges(const EdgeRange& range) @@ -918,8 +878,7 @@ public: } } - /*! - * Remove a range of faces + /*! removes a range of faces */ template void delete_faces(const FaceRange& range) @@ -932,8 +891,7 @@ public: } } - /*! - * Remove a range of outer ccbs + /*! removes a range of outer ccbs */ template void delete_outer_ccbs(const CcbRange& range) @@ -946,8 +904,7 @@ public: } } - /*! - * Remove a range of inner ccbs + /*! removes a range of inner ccbs */ template void delete_inner_ccbs(const CcbRange& range) @@ -960,14 +917,13 @@ public: } } - /*! - * Update the topology traits after the DCEL has been updated. + /*! updates the topology traits after the DCEL has been updated. */ void dcel_updated() { p_arr->topology_traits()->dcel_updated(); } //@} }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h index 03566eaa919..06ec80facc7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h @@ -33,11 +33,10 @@ namespace CGAL { -template< class Coefficient_ > +template class Arr_algebraic_segment_traits_2 { public: - enum Site_of_point { POINT_IN_INTERIOR = 0, MIN_ENDPOINT = -1, @@ -57,16 +56,15 @@ public: typedef CGAL::Arr_algebraic_segment_traits_2 Self; - // Default constructor + // constructs default Arr_algebraic_segment_traits_2 () {} - // Copy constructor + // constructs copy Arr_algebraic_segment_traits_2 (const Self& /* s */) { /* No state...*/} - // Assignment operator - const Self& operator= (const Self& s) - {return s;} + // assigns + const Self& operator= (const Self& s) { return s; } // public types @@ -613,11 +611,7 @@ public: return Construct_curve_2(&CKvA_2::instance()); } - - - - -/* + /* // additional functionality (for not introducing a "general" arc) @@ -650,12 +644,12 @@ public: }; -*/ + */ }; -} //namespace CGAL +} // namespace CGAL #include -#endif // CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS_H +#endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h index 105d379297d..ba7f8772864 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h @@ -118,26 +118,26 @@ public: ///! \name Construction methods. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arr_bounded_planar_topology_traits_2() : Base(), unb_face(nullptr) {} - /*! Constructor from a geometry-traits object. */ + /*! constructs from a geometry-traits object. */ Arr_bounded_planar_topology_traits_2(const Gt2* traits) : Base(traits), unb_face(nullptr) {} - /*! Assign the contents of another topology-traits class. */ + /*! assigns the contents of another topology-traits class. */ void assign(const Self& other); //@} ///! \name Accessing the DCEL and constructing iterators. //@{ - /*! Determine whether the DCEL reprsenets an empty structure. */ + /*! determines whether the DCEL reprsenets an empty structure. */ bool is_empty_dcel() const { // An empty bounded arrangement has no edges or vertices. @@ -145,40 +145,40 @@ public: this->m_dcel.size_of_halfedges() == 0); } - /*! Check if the given vertex is concrete (associated with a point). */ + /*! checks if the given vertex is concrete (associated with a point). */ inline bool is_concrete_vertex(const Vertex*) const { return true; } - /*! Get the number of concrete vertices. */ + /*! obtains the number of concrete vertices. */ Size number_of_concrete_vertices() const { // All vertices are concrete. return (this->m_dcel.size_of_vertices()); } - /*! Check if the given vertex is valid (not a fictitious one). */ + /*! checks if the given vertex is valid (not a fictitious one). */ inline bool is_valid_vertex(const Vertex*) const { return true; } - /*! Get the number of valid vertices. */ + /*! obtains the number of valid vertices. */ Size number_of_valid_vertices() const { // All vertices are valid. return (this->m_dcel.size_of_vertices()); } - /*! Check if the given halfedge is valid (not a fictitious one). */ + /*! checks if the given halfedge is valid (not a fictitious one). */ inline bool is_valid_halfedge(const Halfedge*) const { return true; } - /*! Get the number of valid halfedges. */ + /*! obtains the number of valid halfedges. */ Size number_of_valid_halfedges() const { // All halfedges are valid. return (this->m_dcel.size_of_halfedges()); } - /*! Check if the given face is valid (not a fictitious one). */ + /*! checks if the given face is valid (not a fictitious one). */ inline bool is_valid_face (const Face*) const { return true; } - /*! Get the number of valid faces. */ + /*! obtains the number of valid faces. */ Size number_of_valid_faces() const { // All faces are valid. @@ -255,15 +255,15 @@ public: ///! \name Topology-traits methods. //@{ - /*! Initialize an empty DCEL structure. + /*! initializes an empty DCEL structure. */ void init_dcel(); - /*! Make the necessary updates after the DCEL structure have been updated. + /*! makes the necessary updates after the DCEL structure have been updated. */ void dcel_updated(); - /*! Check if the given vertex is associated with the given curve end. + /*! checks if the given vertex is associated with the given curve end. * \param v The vertex. * \param cv The x-monotone curve. * \param ind The curve end. @@ -295,8 +295,8 @@ public: } } - /*! Given a curve end with boundary conditions and a face that contains the - * interior of the curve, find a place for a boundary vertex that will + /*! given a curve end with boundary conditions and a face that contains the + * interior of the curve, finds a place for a boundary vertex that will * represent the curve end along the face boundary. * \param f The face. * \param cv The x-monotone curve. @@ -318,7 +318,7 @@ public: return std::nullopt; } - /*! Locate the predecessor halfedge for the given curve around a given + /*! locates the predecessor halfedge for the given curve around a given * vertex with boundary conditions. * \param v The vertex. * \param cv The x-monotone curve. @@ -340,7 +340,7 @@ public: return nullptr; } - /*! Locate a DCEL feature that contains the given curve end. + /*! locates a DCEL feature that contains the given curve end. * \param cv The x-monotone curve. * \param ind The curve end. * \param ps_x The boundary condition of the curve end in x. @@ -361,7 +361,7 @@ public: return Result(v); } - /*! Split a fictitious edge using the given vertex. + /*! splits a fictitious edge using the given vertex. * \param e The edge to split (one of the pair of halfedges). * \param v The split vertex. * \pre e is a fictitious halfedge. @@ -375,21 +375,21 @@ public: return nullptr; } - /*! Determine whether the given face is unbounded. + /*! determines whether the given face is unbounded. * \param f The face. * \return Whether f is unbounded. * There is only one unbounded face in the arrangement: */ bool is_unbounded(const Face* f) const { return (f == unb_face); } - /*! Determine whether the given boundary vertex is redundant. + /*! determines whether the given boundary vertex is redundant. * \param v The vertex. * \return Whether v is redundant, and should be erased. * There are no redundant vertices. */ bool is_redundant(const Vertex*) const { return false; } - /*! Erase the given redundant vertex by merging a fictitious edge. + /*! erases the given redundant vertex by merging a fictitious edge. * The function does not free the vertex v itself. * \param v The vertex. * \pre v is a redundant vertex. @@ -402,20 +402,20 @@ public: return nullptr; } - //! reference_face (const version). - /*! The function returns a reference face of the arrangement. - All reference faces of arrangements of the same type have a common - point. - \return A pointer to the reference face. - */ + //! reference_face (const version). + /*! returns a reference face of the arrangement. All reference faces of + * arrangements of the same type have a common point. + * + * \return A pointer to the reference face. + */ const Face* reference_face() const { return unbounded_face(); } //! reference_face (non-const version). - /*! The function returns a reference face of the arrangement. - All reference faces of arrangements of the same type have a common - point. - \return A pointer to the reference face. - */ + /*! returns a reference face of the arrangement. All reference faces of + * arrangements of the same type have a common point. + * + * \return A pointer to the reference face. + */ Face* reference_face() { return unbounded_face(); } //@} @@ -426,17 +426,17 @@ public: /*! This function is used by the "walk" point-location strategy. */ const Face* initial_face() const { return (unb_face); } - /*! Get the unbounded face (const version). */ + /*! obtains the unbounded face (const version). */ const Face* unbounded_face() const { return (unb_face); } - /*! Get the unbounded face (non-const version). */ + /*! obtains the unbounded face (non-const version). */ Face* unbounded_face() { return (unb_face); } //@} /// \name Additional predicates, specialized for this topology-traits class. //@{ - /*! Compare the given vertex and the given point. + /*! compares the given vertex and the given point. * \param p The point. * \param v The vertex. * \return The result of the comparison of the x-coordinates of p and v. @@ -444,7 +444,7 @@ public: virtual Comparison_result compare_x(const Point_2& p, const Vertex* v) const { return (this->m_geom_traits->compare_x_2_object()(p, v->point())); } - /*! Compare the given vertex and the given point. + /*! compares the given vertex and the given point. * \param p The point. * \param v The vertex. * \return The result of the xy-lexicographic comparison of p and v. @@ -452,7 +452,7 @@ public: virtual Comparison_result compare_xy(const Point_2& p, const Vertex* v) const { return (this->m_geom_traits->compare_xy_2_object()(p, v->point())); } - /*! Compare the relative y-position of the given point and the given edge + /*! compares the relative y-position of the given point and the given edge * (which may be fictitious). * \param p The point. * \param he The edge (one of the pair of halfedges). diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h index f6fbe621739..a2630c65104 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h @@ -72,12 +72,12 @@ protected: bool m_use_cache; public: - /*! Default constructor. */ + /*! constructs default. */ Arr_circle_segment_traits_2 (bool use_intersection_caching = false) : m_use_cache(use_intersection_caching) {} - /*! Get the next curve index. */ + /*! obtains the next curve index. */ static unsigned int get_index () { #ifdef CGAL_NO_ATOMIC @@ -94,8 +94,7 @@ public: class Compare_x_2 { public: - /*! - * Compare the x-coordinates of two points. + /*! compares the \f$x\f$-coordinates of two points. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2); @@ -111,7 +110,7 @@ public: } }; - /*! Get a Compare_x_2 functor object. */ + /*! obtains a `Compare_x_2` functor object. */ Compare_x_2 compare_x_2_object () const { return Compare_x_2(); @@ -120,8 +119,7 @@ public: class Compare_xy_2 { public: - /*! - * Compares two points lexigoraphically: by x, then by y. + /*! compares two points lexigoraphically: by x, then by y. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2); @@ -142,7 +140,7 @@ public: } }; - /*! Get a Compare_xy_2 functor object. */ + /*! obtains a Compare_xy_2 functor object. */ Compare_xy_2 compare_xy_2_object () const { return Compare_xy_2(); @@ -151,8 +149,7 @@ public: class Construct_min_vertex_2 { public: - /*! - * Get the left endpoint of the x-monotone curve (segment). + /*! obtains the left endpoint of the \f$x\f$-monotone curve (segment). * \param cv The curve. * \return The left endpoint. */ @@ -162,7 +159,7 @@ public: } }; - /*! Get a Construct_min_vertex_2 functor object. */ + /*! obtains a `Construct_min_vertex_2` functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object () const { return Construct_min_vertex_2(); @@ -171,8 +168,7 @@ public: class Construct_max_vertex_2 { public: - /*! - * Get the right endpoint of the x-monotone curve (segment). + /*! obtains the right endpoint of the \f$x\f$-monotone curve (segment). * \param cv The curve. * \return The right endpoint. */ @@ -182,7 +178,7 @@ public: } }; - /*! Get a Construct_max_vertex_2 functor object. */ + /*! obtains a Construct_max_vertex_2 functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object () const { return Construct_max_vertex_2(); @@ -191,8 +187,7 @@ public: class Is_vertical_2 { public: - /*! - * Check whether the given x-monotone curve is a vertical segment. + /*! checks whether the given \f$x\f$-monotone curve is a vertical segment. * \param cv The curve. * \return (true) if the curve is a vertical segment; (false) otherwise. */ @@ -202,7 +197,7 @@ public: } }; - /*! Get an Is_vertical_2 functor object. */ + /*! obtains an `Is_vertical_2` functor object. */ Is_vertical_2 is_vertical_2_object () const { return Is_vertical_2(); @@ -211,11 +206,10 @@ public: class Compare_y_at_x_2 { public: - /*! - * Return the location of the given point with respect to the input curve. + /*! returns the location of the given point with respect to the input curve. * \param cv The curve. * \param p The point. - * \pre p is in the x-range of cv. + * \pre p is in the \f$x\f$-range of `cv`. * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve; * LARGER if y(p) > cv(x(p)), i.e. the point is above the curve; * EQUAL if p lies on the curve. @@ -229,7 +223,7 @@ public: } }; - /*! Get a Compare_y_at_x_2 functor object. */ + /*! obtains a `Compare_y_at_x_2` functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object () const { return Compare_y_at_x_2(); @@ -238,9 +232,8 @@ public: class Compare_y_at_x_right_2 { public: - /*! - * Compares the y value of two x-monotone curves immediately to the right - * of their intersection point. + /*! compares the y value of two \f$x\f$-monotone curves immediately to the + * right of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. * \param p The intersection point. @@ -283,7 +276,7 @@ public: } }; - /*! Get a Compare_y_at_x_right_2 functor object. */ + /*! obtains a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const { return Compare_y_at_x_right_2(); @@ -292,16 +285,15 @@ public: class Compare_y_at_x_left_2 { public: - /*! - * Compares the y value of two x-monotone curves immediately to the left - * of their intersection point. + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the left of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. * \param p The intersection point. - * \pre The point p lies on both curves, and both of them must be also be + * \pre The point `p` lies on both curves, and both of them must be also be * defined (lexicographically) to its left. - * \return The relative position of cv1 with respect to cv2 immdiately to - * the left of p: SMALLER, LARGER or EQUAL. + * \return The relative position of `cv1` with respect to `cv2` immdiately + * to the left of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator() (const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -338,7 +330,7 @@ public: } }; - /*! Get a Compare_y_at_x_left_2 functor object. */ + /*! obtains a `Compare_y_at_x_left_2` functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const { return Compare_y_at_x_left_2(); @@ -347,8 +339,8 @@ public: class Equal_2 { public: - /*! - * Check if the two x-monotone curves are the same (have the same graph). + /*! checks if the two \f$x\f$-monotone curves are the same (have the same + * graph). * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are the same; (false) otherwise. @@ -362,8 +354,7 @@ public: return (cv1.equals (cv2)); } - /*! - * Check if the two points are the same. + /*! checks if the two points are the same. * \param p1 The first point. * \param p2 The second point. * \return (true) if the two point are the same; (false) otherwise. @@ -374,7 +365,7 @@ public: } }; - /*! Get an Equal_2 functor object. */ + /*! obtains an `Equal_2` functor object. */ Equal_2 equal_2_object () const { return Equal_2(); @@ -395,7 +386,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits. */ Approximate_2(const Traits& traits) : m_traits(traits) {} @@ -403,24 +394,24 @@ public: friend class Arr_circle_segment_traits_2; public: - /*! Obtain an approximation of a point coordinate. + /*! obtains an approximation of a point coordinate. * \param p the exact point. * \param i the coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return An approximation of p's x-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). + * \pre `i` is either 0 or 1. + * \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). */ Approximate_number_type operator()(const Point_2& p, int i) const { CGAL_precondition((i == 0) || (i == 1)); return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y())); } - /*! Obtain an approximation of a point. + /*! obtains an approximation of a point. */ Approximate_point_2 operator()(const Point_2& p) const { return Approximate_point_2(operator()(p, 0), operator()(p, 1)); } - /*! Obtain an approximation of an \f$x\f$-monotone curve. + /*! obtains an approximation of an \f$x\f$-monotone curve. */ template OutputIterator operator()(const X_monotone_curve_2& xcv, double error, @@ -430,7 +421,7 @@ public: } private: - /*! Handle segments. + /*! handles segments. */ template OutputIterator approximate_segment(const X_monotone_curve_2& xcv, @@ -477,7 +468,7 @@ public: return oi; } - /*! Compute the circular point given the parameter t and the transform + /*! computes the circular point given the parameter t and the transform * data, that is, the center (translation) and the sin and cos of the * rotation angle. */ @@ -486,7 +477,7 @@ public: y = r * std::sin(t); } - /*! Transform a point. In particular, rotate the canonical point + /*! transforms a point. In particular, rotate the canonical point * (`xc`,`yc`) by an angle, the sine and cosine of which are `sint` and * `cost`, respectively, and translate by (`cx`,`cy`). */ @@ -496,7 +487,7 @@ public: y = yc + cy; } - /*! Handle circular arcs. + /*! handles circular arcs. */ template OutputIterator approximate_arc(const X_monotone_curve_2& xcv, @@ -554,7 +545,7 @@ public: } }; - /*! Obtain an Approximate_2 functor object. */ + /*! obtains an `Approximate_2` functor object. */ Approximate_2 approximate_2_object() const { return Approximate_2(*this); } //@} @@ -562,7 +553,7 @@ public: //@{ /*! \class - * A functor for subdividing a curve into x-monotone curves. + * A functor for subdividing a curve into \f$x\f$-monotone curves. */ class Make_x_monotone_2 { private: @@ -573,8 +564,8 @@ public: public: Make_x_monotone_2(bool use_cache = false) : m_use_cache(use_cache) {} - /*! Subdivide a given circular arc or line segment into x-monotone subcurves - * and insert them to a given output iterator. + /*! subdivides a given circular arc or line segment into \f$x\f$-monotone + * subcurves and insert them to a given output iterator. * \param cv the curve. * \param oi the output iterator for the result. Its dereference type is a * variant that wraps a \c Point_2 or an \c X_monotone_curve_2 @@ -632,7 +623,7 @@ public: else { // Act according to the number of vertical tangency points. if (n_vpts == 2) { - // Subdivide the circular arc into three x-monotone arcs. + // Subdivide the circular arc into three \f$x\f$-monotone arcs. *oi++ = X_monotone_curve_2(circ, cv.source(), vpts[0], cv.orientation(), @@ -650,7 +641,7 @@ public: index); } else if (n_vpts == 1) { - // Subdivide the circular arc into two x-monotone arcs. + // Subdivide the circular arc into two \f$x\f$-monotone arcs. *oi++ = X_monotone_curve_2(circ, cv.source(), vpts[0], @@ -666,7 +657,7 @@ public: else { CGAL_assertion(n_vpts == 0); - // The arc is already x-monotone: + // The arc is already \f$x\f$-monotone: *oi++ = X_monotone_curve_2(circ, cv.source(), cv.target(), @@ -679,7 +670,7 @@ public: } }; - /*! Get a Make_x_monotone_2 functor object. */ + /*! obtains a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(m_use_cache); } @@ -687,13 +678,13 @@ public: { public: - /*! - * Split a given x-monotone curve at a given point into two sub-curves. + /*! splits a given \f$x\f$-monotone curve at a given point into two + * sub-curves. * \param cv The curve to split * \param p The split point. - * \param c1 Output: The left resulting subcurve (p is its right endpoint). - * \param c2 Output: The right resulting subcurve (p is its left endpoint). - * \pre p lies on cv but is not one of its end-points. + * \param c1 Output: The left resulting subcurve (`p` is its right endpoint). + * \param c2 Output: The right resulting subcurve (`p` is its left endpoint). + * \pre `p` lies on cv but is not one of its end-points. */ void operator() (const X_monotone_curve_2& cv, const Point_2& p, X_monotone_curve_2& c1, X_monotone_curve_2& c2) const @@ -707,7 +698,7 @@ public: } }; - /*! Get a Split_2 functor object. */ + /*! obtains a `Split_2` functor object. */ Split_2 split_2_object () const { return Split_2(); @@ -718,10 +709,10 @@ public: Intersection_map& _inter_map; // The map of intersection points. public: - /*! Constructor. */ + /*! constructs. */ Intersect_2(Intersection_map& map) : _inter_map(map) {} - /*! Find the intersections of the two given curves and insert them to the + /*! finds the intersections of the two given curves and insert them to the * given output iterator. As two segments may itersect only once, only a * single will be contained in the iterator. * \param cv1 The first curve. @@ -736,18 +727,18 @@ public: { return (cv1.intersect(cv2, oi, &_inter_map)); } }; - /*! Get an Intersect_2 functor object. */ + /*! obtains an `Intersect_2` functor object. */ Intersect_2 intersect_2_object() const { return (Intersect_2(inter_map)); } class Are_mergeable_2 { public: - /*! - * Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given \f$x\f$-monotone curves. * \param cv1 The first curve. * \param cv2 The second curve. - * \return (true) if the two curves are mergeable - if they are supported - * by the same line and share a common endpoint; (false) otherwise. + * \return (true) if `cv1` and `cv2` are mergeable, that is, if they are + * supported by the same line and share a common endpoint; (false) + * otherwise. */ bool operator() (const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2) const @@ -756,14 +747,14 @@ public: } }; - /*! Get an Are_mergeable_2 functor object. */ + /*! obtains an `Are_mergeable_2` functor object. */ Are_mergeable_2 are_mergeable_2_object () const { return Are_mergeable_2(); } /*! \class Merge_2 - * A functor that merges two x-monotone arcs into one. + * A functor that merges two \f$x\f$-monotone arcs into one. */ class Merge_2 { @@ -773,7 +764,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! Constructs * \param traits the traits (in case it has state) */ Merge_2(const Traits* traits) : m_traits(traits) {} @@ -781,8 +772,7 @@ public: friend class Arr_circle_segment_traits_2; public: - /*! - * Merge two given x-monotone curves into a single curve. + /*! merges two given \f$x\f$-monotone curves into a single curve. * \param cv1 The first curve. * \param cv2 The second curve. * \param c Output: The merged curve. @@ -799,7 +789,7 @@ public: } }; - /*! Get a Merge_2 functor object. */ + /*! obtains a `Merge_2` functor object. */ Merge_2 merge_2_object () const { return Merge_2(this); @@ -808,10 +798,9 @@ public: class Compare_endpoints_xy_2 { public: - /*! - * compare lexicogrphic the endpoints of a x-monotone curve. + /*! compares lexicogrphic the endpoints of a \f$x\f$-monotone curve. * \param cv the curve - * \return SMALLER if the curve is directed right, else return SMALLER + * \return `SMALLER` if the curve is directed right, else return `LARGER`. */ Comparison_result operator()(const X_monotone_curve_2& cv) const { @@ -821,7 +810,7 @@ public: } }; - /*! Get a Compare_endpoints_xy_2 functor object. */ + /*! obtains a `Compare_endpoints_xy_2` functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); @@ -830,10 +819,9 @@ public: class Construct_opposite_2 { public: - /*! - * construct an opposite x-monotone curve. + /*! constructs an opposite \f$x\f$-monotone curve. * \param cv the curve - * \return an opposite x-monotone curve. + * \return an opposite \f$x\f$-monotone curve. */ X_monotone_curve_2 operator()(const X_monotone_curve_2& cv) const { @@ -841,7 +829,7 @@ public: } }; - /*! Get a Construct_opposite_2 functor object. */ + /*! obtains a `Construct_opposite_2` functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); @@ -854,7 +842,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Trim_2(const Traits& traits) : m_traits(traits) {} @@ -862,7 +850,7 @@ public: friend class Arr_circle_segment_traits_2; public: - /*! Obtain a trimmed version of an arc + /*! obtains a trimmed version of an arc * \param xcv The arc * \param src the new first endpoint * \param tgt the new second endpoint @@ -893,14 +881,14 @@ public: } }; - /*! Obtain a Trim_2 functor object. */ + /*! obtains a `Trim_2` functor object. */ Trim_2 trim_2_object() const { return Trim_2(*this); } // @} }; -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h index 151bcf5644a..367e4708a36 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h @@ -206,4 +206,4 @@ public: #include -#endif // CGAL_CIRCULAR_KERNEL_CIRCULAR_ARC_TRAITS_H +#endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h index b1783f8c3ec..449e085fa87 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h @@ -380,8 +380,7 @@ namespace CGAL { typedef typename CircularKernel::Circular_arc_point_2 Circular_arc_point_2; - public : - + public: typedef Circular_arc_point_2 result_type; //typedef const result_type& qualified_result_type; @@ -395,14 +394,13 @@ namespace CGAL { } }; - template class Construct_max_vertex_2//: public Has_qrt { typedef typename CircularKernel::Circular_arc_point_2 Point_2; + public: - /*! - * Get the right endpoint of the x-monotone curve (segment). + /*! obtains the right endpoint of the x-monotone curve (segment). * \param cv The curve. * \return The right endpoint. */ @@ -418,10 +416,10 @@ namespace CGAL { } }; - template + template class Variant_Is_vertical_2 { - public : + public: template < typename T > bool @@ -449,7 +447,7 @@ namespace CGAL { // an empty class used to have different types between Curve_2 and X_monotone_curve_2 // in Arr_circular_line_arc_traits_2. - namespace internal_Argt_traits{ + namespace internal_Argt_traits { struct Not_X_Monotone{}; inline std::ostream& operator << (std::ostream& os, const Not_X_Monotone&) {return os;} @@ -520,45 +518,42 @@ namespace CGAL { typedef VariantFunctors::Intersect_2 Intersect_2; + Compare_x_2 compare_x_2_object() const + { return ck.compare_x_2_object(); } - Compare_x_2 compare_x_2_object() const - { return ck.compare_x_2_object(); } + Compare_xy_2 compare_xy_2_object() const + { return ck.compare_xy_2_object(); } - Compare_xy_2 compare_xy_2_object() const - { return ck.compare_xy_2_object(); } + Compare_y_at_x_2 compare_y_at_x_2_object() const + { return Compare_y_at_x_2(); } - Compare_y_at_x_2 compare_y_at_x_2_object() const - { return Compare_y_at_x_2(); } + Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const + { return Compare_y_at_x_right_2(); } - Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const - { return Compare_y_at_x_right_2(); } + Equal_2 equal_2_object() const + { return Equal_2(); } - Equal_2 equal_2_object() const - { return Equal_2(); } + Make_x_monotone_2 make_x_monotone_2_object() const + { return Make_x_monotone_2(); } - Make_x_monotone_2 make_x_monotone_2_object() const - { return Make_x_monotone_2(); } + Split_2 split_2_object() const + { return Split_2(); } - Split_2 split_2_object() const - { return Split_2(); } - - Intersect_2 intersect_2_object() const + Intersect_2 intersect_2_object() const { return Intersect_2(); } - Construct_min_vertex_2 construct_min_vertex_2_object() const + Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } - Construct_max_vertex_2 construct_max_vertex_2_object() const + Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } - Is_vertical_2 is_vertical_2_object() const + Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2();} - - }; } // namespace CGAL #include -#endif // CGAL_CIRCULAR_KERNEL_VARIANT_TRAITS_H +#endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h index 6a5f37ec4cf..0f63b3c41fa 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h @@ -125,11 +125,11 @@ private: // intersection points. public: - /*! Default constructor. + /*! constructs default. */ Arr_conic_traits_2() {} - /*! Construct from resources. + /*! constructs from resources. */ Arr_conic_traits_2(Shared_rat_kernel rat_kernel, Shared_alg_kernel alg_kernel, @@ -139,19 +139,19 @@ public: m_nt_traits(nt_traits) {} - /*! Obtain the rational kernel. + /*! obtains the rational kernel. */ Shared_rat_kernel rat_kernel() const { return m_rat_kernel; } - /*! Obtain the algebraic kernel. + /*! obtains the algebraic kernel. */ Shared_alg_kernel alg_kernel() const { return m_alg_kernel; } - /*! Obtain the nt traits. + /*! obtains the nt traits. */ Shared_nt_traits nt_traits() const { return m_nt_traits; } - /*! Obtain the next conic index. */ + /*! obtains the next conic index. */ static size_t get_index() { #ifdef CGAL_NO_ATOMIC static size_t index; @@ -171,7 +171,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Compare_x_2(const Traits& traits) : m_traits(traits) {} @@ -179,7 +179,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Compare the x-coordinates of two points. + /*! compares the \f$x\f$-coordinates of two points. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2); @@ -190,7 +190,7 @@ public: { return m_traits.m_alg_kernel->compare_x_2_object()(p1, p2); } }; - /*! Obtain a Compare_x_2 functor object. */ + /*! obtains a `Compare_x_2` functor object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } class Compare_xy_2 { @@ -200,7 +200,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Compare_xy_2(const Traits& traits) : m_traits(traits) {} @@ -208,7 +208,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Compares two points lexigoraphically: by x, then by y. + /*! compares two points lexigoraphically: by x, then by y. * \param p1 The first point. * \param p2 The second point. * \return `LARGER` if `x(p1) > x(p2)`, or if `x(p1) = x(p2)` and `y(p1) > y(p2)`; @@ -219,12 +219,12 @@ public: { return m_traits.m_alg_kernel->compare_xy_2_object()(p1, p2); } }; - /*! Obtain a Compare_xy_2 functor object. */ + /*! obtains a `Compare_xy_2` functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } class Construct_min_vertex_2 { public: - /*! Obtain the left endpoint of an x-monotone arc. + /*! obtains the left endpoint of an \f$x\f$-monotone arc. * \param cv The arc. * \return The left endpoint. */ @@ -232,13 +232,13 @@ public: { return xcv.left(); } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a `Construct_min_vertex_2` functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } class Construct_max_vertex_2 { public: - /*! Obtain the right endpoint of the x-monotone arc. + /*! obtains the right endpoint of the \f$x\f$-monotone arc. * \param cv The arc. * \return The right endpoint. */ @@ -246,13 +246,13 @@ public: { return xcv.right(); } }; - /*! Obtain a Construct_max_vertex_2 functor object. */ + /*! obtains a Construct_max_vertex_2 functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } class Is_vertical_2 { public: - /*! Check whether a given x-monotone arc is a vertical segment. + /*! checks whether a given \f$x\f$-monotone arc is a vertical segment. * \param cv The vertical segment. * \return `true` if the arc is a vertical segment; `false` otherwise. */ @@ -260,7 +260,7 @@ public: { return cv.is_vertical(); } }; - /*! Obtain an Is_vertical_2 functor object. */ + /*! obtains an `Is_vertical_2` functor object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); } class Compare_y_at_x_2 { @@ -270,7 +270,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Compare_y_at_x_2(const Traits& traits) : m_traits(traits) {} @@ -278,7 +278,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Return the location of a given point with respect to an input arc. + /*! returns the location of a given point with respect to an input arc. * \param xcv The arc. * \param p The point. * \pre `p` is in the \f$x\f$-range of `xcv`. @@ -292,8 +292,8 @@ public: if (xcv.is_vertical()) { // A special treatment for vertical segments: - // In case p has the same x c-ordinate of the vertical segment, compare - // it to the segment endpoints to determine its position. + // In case p has the same \f$x\f$-coordinate of the vertical segment, + // compare it to the segment endpoints to determine its position. Comparison_result res1 = cmp_y(p, xcv.left()); Comparison_result res2 = cmp_y(p, xcv.right()); return (res1 == res2) ? res1 : EQUAL; @@ -302,7 +302,8 @@ public: // Check whether the point is exactly on the curve. if (m_traits.contains_point(xcv, p)) return EQUAL; - // Obtain a point q on the x-monotone arc with the same x coordinate as p. + // Obtain a point q on the \f$x\f$-monotone arc with the same + // \f$x\f$-coordinate as p. Point_2 q; auto cmp_x = m_traits.m_alg_kernel->compare_x_2_object(); @@ -318,12 +319,13 @@ public: } } - // Compare p with the a point of the curve with the same x coordinate. + // Compare p with the a point of the curve with the same + // \f$x\f$-coordinate. return cmp_y(p, q); } }; - /*! Obtain a Compare_y_at_x_2 functor object. */ + /*! obtains a `Compare_y_at_x_2` functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } @@ -334,7 +336,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Compare_y_at_x_left_2(const Traits& traits) : m_traits(traits) {} @@ -342,7 +344,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Compares the \f$y\f$ value of two \f$x\f$-monotone arcs immediately + /*! compares the \f$y\f$ value of two \f$x\f$-monotone arcs immediately * to the left of their intersection point. * \param xcv1 The first arc. * \param xcv2 The second arc. @@ -374,7 +376,7 @@ public: } private: - /*! Compare two arcs immediately to the leftt of their intersection point. + /*! compares two arcs immediately to the leftt of their intersection point. * \param xcv1 The first compared arc. * \param xcv2 The second compared arc. * \param p The reference intersection point. @@ -470,14 +472,14 @@ public: xcv2.test_flag(X_monotone_curve_2::FACING_UP)) return SMALLER; - // Compute the second-order derivative by y and act according to it. + // Compute the second-order derivative by \f$y\f$ and act according to it. xcv1.derive_by_y_at(p, 2, slope1_numer, slope1_denom); xcv2.derive_by_y_at(p, 2, slope2_numer, slope2_denom); Comparison_result slope_res = CGAL::compare(slope2_numer*slope1_denom, slope1_numer*slope2_denom); - // If necessary, use the third-order derivative by y. + // If necessary, use the third-order derivative by \f$y\f$. if (slope_res == EQUAL) { // \todo Check this! xcv1.derive_by_y_at(p, 3, slope1_numer, slope1_denom); @@ -501,7 +503,7 @@ public: }; - /*! Obtain a Compare_y_at_x_left_2 functor object. */ + /*! obtains a `Compare_y_at_x_left_2` functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(*this); } @@ -512,7 +514,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits. */ Compare_y_at_x_right_2(const Traits& traits) : m_traits(traits) {} @@ -520,7 +522,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Compares the `y` value of two \f$x\f$-monotone arcs immediately + /*! compares the `y` value of two \f$x\f$-monotone arcs immediately * to the right of their intersection point. * \param xcv1 The first arc. * \param xcv2 The second arc. @@ -552,7 +554,7 @@ public: } private: - /*! Compare two arcs immediately to the right of their intersection point. + /*! compares two arcs immediately to the right of their intersection point. * \param xcv1 The first compared arc. * \param xcv2 The second compared arc. * \param p The reference intersection point. @@ -643,14 +645,14 @@ public: else if (xcv1.test_flag(X_monotone_curve_2::FACING_DOWN) && xcv2.test_flag(X_monotone_curve_2::FACING_UP)) return SMALLER; - // Compute the second-order derivative by y and act according to it. + // Compute the second-order derivative by \f$y\f$ and act according to it. xcv1.derive_by_y_at(p, 2, slope1_numer, slope1_denom); xcv2.derive_by_y_at(p, 2, slope2_numer, slope2_denom); Comparison_result slope_res = CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom); - // If necessary, use the third-order derivative by y. + // If necessary, use the third-order derivative by \f$y\f$. if (slope_res == EQUAL) { // \todo Check this! xcv1.derive_by_y_at(p, 3, slope1_numer, slope1_denom); @@ -671,7 +673,7 @@ public: }; - /*! Obtain a Compare_y_at_x_right_2 functor object. */ + /*! obtains a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(*this); } @@ -682,7 +684,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Equal_2(const Traits& traits) : m_traits(traits) {} @@ -690,7 +692,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Check whether two \f$x\f$-monotone curves are the same (have the same + /*! checks whether two \f$x\f$-monotone curves are the same (have the same * graph). * \param xcv1 The first curve. * \param xcv2 The second curve. @@ -703,7 +705,7 @@ public: return equals(xcv1, xcv2); } - /*! Check whether two points are the same. + /*! checks whether two points are the same. * \param p1 The first point. * \param p2 The second point. * \return `true` if the two point are the same; `false` otherwise. @@ -714,7 +716,7 @@ public: } private: - /*! Check whether two arcs are equal (have the same graph). + /*! checks whether two arcs are equal (have the same graph). * \param xcv1 The first compared arc. * \param xcv2 The second compared arc. * \return `true` if the two arcs have the same graph; `false` otherwise. @@ -747,7 +749,7 @@ public: } }; - /*! Obtain an Equal_2 functor object. */ + /*! obtains an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(*this); } //@} @@ -755,11 +757,11 @@ public: //@{ /*! A function object that obtains the parameter space of a geometric - * entity along the \f$x-\f$xaxis. + * entity along the \f$x\f$x-axis. */ class Parameter_space_in_x_2 { public: - /*! Obtains the parameter space at the end of an arc along the \f$x\f$-axis. + /*! obtains the parameter space at the end of an arc along the \f$x\f$-axis. * \param xcv The arc. * \param ce The arc end indicator: * `ARR_MIN_END`—the minimal end of `xcv` or @@ -777,7 +779,7 @@ public: return ARR_INTERIOR; } - /*! Obtains the parameter space at a point along the \f$x\f$-axis. + /*! obtains the parameter space at a point along the \f$x\f$-axis. * \param p The point. * \return the parameter space at `p`. */ @@ -785,16 +787,16 @@ public: { return ARR_INTERIOR; } }; - /*! Obtain a Parameter_space_in_x_2 function object */ + /*! obtains a `Parameter_space_in_x_2` function object */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(); } /*! A function object that obtains the parameter space of a geometric - * entity along the y-axis + * entity along the \f$y\f$-axis */ class Parameter_space_in_y_2 { public: - /*! Obtains the parameter space at the end of an arc along the \f$y\f$-axis . + /*! obtains the parameter space at the end of an arc along the \f$y\f$-axis . * Note that if the arc end coincides with a pole, then unless the arc * coincides with the identification curve, the arc end is considered to * be approaching the boundary, but not on the boundary. @@ -817,7 +819,7 @@ public: return ARR_INTERIOR; } - /*! Obtains the parameter space at a point along the \f$y\f$-axis. + /*! obtains the parameter space at a point along the \f$y\f$-axis. * \param p The point. * \return The parameter space at `p`. */ @@ -825,7 +827,7 @@ public: { return ARR_INTERIOR; } }; - /*! Obtain a Parameter_space_in_y_2 function object */ + /*! obtains a `Parameter_space_in_y_2` function object */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(); } @@ -835,7 +837,7 @@ public: //@{ /*! \class Make_x_monotone_2 - * A functor for subdividing curves into x-monotone curves. + * A functor for subdividing curves into \f$x\f$-monotone curves. */ class Make_x_monotone_2 { protected: @@ -844,7 +846,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Make_x_monotone_2(const Traits& traits) : m_traits(traits) {} @@ -852,7 +854,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Subdivide a given conic arc into \f$x\f$-monotone sub arcs + /*! subdivides a given conic arc into \f$x\f$-monotone sub arcs * and insert them to a given output iterator. * \param cv The arc. * \param oi the output iterator for the result. Its dereference type is a @@ -874,17 +876,17 @@ public: Alg_point_2 vtan_ps[2]; auto n_vtan_ps = m_traits.vertical_tangency_points(cv, vtan_ps); if (n_vtan_ps == 0) { - // In case the given curve is already x-monotone: + // In case the given curve is already \f$x\f$-monotone: *oi++ = ctr_xcv(cv, conic_id); return oi; } - // Split the conic arc into x-monotone sub-curves. + // Split the conic arc into \f$x\f$-monotone sub-curves. if (cv.is_full_conic()) { // Make sure we have two vertical tangency points. CGAL_assertion(n_vtan_ps == 2); - // In case the curve is a full conic, split it into two x-monotone + // In case the curve is a full conic, split it into two \f$x\f$-monotone // arcs, one going from ps[0] to ps[1], and the other from ps[1] to // ps[0]. *oi++ = ctr_xcv(cv, vtan_ps[0], vtan_ps[1], conic_id); @@ -892,8 +894,8 @@ public: } else { if (n_vtan_ps == 1) { - // Split the arc into two x-monotone sub-curves: one going from the - // arc source to ps[0], and the other from ps[0] to the target. + // Split the arc into two \f$x\f$-monotone sub-curves: one going from + // the arc source to ps[0], and the other from ps[0] to the target. *oi++ = ctr_xcv(cv, cv.source(), vtan_ps[0], conic_id); *oi++ = ctr_xcv(cv, vtan_ps[0], cv.target(), conic_id); } @@ -924,7 +926,7 @@ public: ind_second = 0; } - // Split the arc into three x-monotone sub-curves. + // Split the arc into three \f$x\f$-monotone sub-curves. *oi++ = ctr_xcv(cv, cv.source(), vtan_ps[ind_first], conic_id); @@ -942,7 +944,7 @@ public: } }; - /*! Obtain a Make_x_monotone_2 functor object. */ + /*! obtains a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(*this); } @@ -953,7 +955,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Split_2(const Traits& traits) : m_traits(traits) {} @@ -961,7 +963,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Split a given \f$x\f$-monotone arc at a given point into two sub-arcs. + /*! splits a given \f$x\f$-monotone arc at a given point into two sub-arcs. * \param xcv The arc to split * \param p The split point. * \param xcv1 Output: The left resulting sub-arc (`p` is its right endpoint). @@ -973,7 +975,7 @@ public: { split(xcv, p, xcv1, xcv2); } private: - /*! Split the arc into two at a given split point. + /*! splits the arc into two at a given split point. * \param p The split point. * \param xcv1 Output: The first resulting arc, lying to the left of `p`. * \param xcv2 Output: The first resulting arc, lying to the right of `p`. @@ -1017,7 +1019,7 @@ public: }; - /*! Obtain a Split_2 functor object. */ + /*! obtains a `Split_2` functor object. */ Split_2 split_2_object() const { return Split_2(*this); } class Intersect_2 { @@ -1027,7 +1029,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor. + /*! constructs. * \param traits The traits. */ Intersect_2(const Traits& traits) : m_traits(traits) {} @@ -1035,7 +1037,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Find the intersections of the two given curves and insert them to the + /*! finds the intersections of the two given curves and insert them to the * given output iterator. As two segments may itersect only once, only a * single will be contained in the iterator. * \param cv1 The first arc. @@ -1050,7 +1052,7 @@ public: { return intersect(xcv1, xcv2, m_traits.m_inter_map, oi); } private: - /*! Compute the overlap with a given arc, which is supposed to have the same + /*! computes the overlap with a given arc, which is supposed to have the same * supporting conic curve as this arc. * \param xcv1 The first arc. * \param xcv2 The second arc. @@ -1107,7 +1109,7 @@ public: return false; } - /*! Intersect the supporting conic curves of this arc and the given arc. + /*! intersects the supporting conic curves of this arc and the given arc. * \param arc The arc to intersect with. * \param inter_list The list of intersection points. */ @@ -1152,7 +1154,7 @@ public: else { const auto* extra_data2 = xcv2.extra_data(); - // Compute the x-coordinates of the intersection points. + // Compute the \f$x\f$-coordinates of the intersection points. n_xs = compute_resultant_roots(*nt_traits, xcv1.alg_r(), xcv1.alg_s(), xcv1.alg_t(), xcv1.alg_u(), @@ -1164,7 +1166,7 @@ public: xs); CGAL_assertion(n_xs <= 2); - // Compute the y-coordinates of the intersection points. + // Compute the \f$y\f$-coordinates of the intersection points. n_ys = compute_resultant_roots(*nt_traits, xcv1.alg_s(), xcv1.alg_r(), xcv1.alg_t(), xcv1.alg_v(), @@ -1178,7 +1180,7 @@ public: } } else { - // Compute the x-coordinates of the intersection points. + // Compute the \f$x\f$-coordinates of the intersection points. n_xs = compute_resultant_roots(*nt_traits, xcv1.r(), xcv1.s(), xcv1.t(), xcv1.u(), xcv1.v(), xcv1.w(), @@ -1189,7 +1191,7 @@ public: xs); CGAL_assertion(n_xs <= 4); - // Compute the y-coordinates of the intersection points. + // Compute the \f$y\f$-coordinates of the intersection points. n_ys = compute_resultant_roots(*nt_traits, xcv1.s(), xcv1.r(), xcv1.t(), xcv1.v(), xcv1.u(), xcv1.w(), @@ -1202,8 +1204,8 @@ public: } // Pair the coordinates of the intersection points. As the vectors of - // x and y-coordinates are sorted in ascending order, we output the - // intersection points in lexicographically ascending order. + // \f$x\f$- and \f$y\f$-coordinates are sorted in ascending order, we + // output the intersection points in lexicographically ascending order. Multiplicity mult; int i, j; @@ -1249,9 +1251,9 @@ public: else { CGAL_assertion((n_xs == 2) && (n_ys == 2)); - // The x-coordinates and the y-coordinates are given in ascending - // order. If the slope of the segment is positive, we pair the - // coordinates as is - otherwise, we swap the pairs. + // The \f$x\f$-coordinates and the \f$y\f$-coordinates are given in + // ascending order. If the slope of the segment is positive, we pair + // the coordinates as is; otherwise, we swap the pairs. int ind_first_y(0), ind_second_y(1); const auto* extra_data2 = xcv2.extra_data(); @@ -1298,7 +1300,7 @@ public: } } - /*! Compute the intersections with the given arc. + /*! computes the intersections with the given arc. * \param arc The given intersecting arc. * \param inter_map Maps conic pairs to lists of their intersection points. * \param oi The output iterator. @@ -1315,7 +1317,8 @@ public: X_monotone_curve_2 overlap; if (compute_overlap(xcv1, xcv2, overlap)) { - // There can be just a single overlap between two x-monotone arcs: + // There can be just a single overlap between two \f$x\f$-monotone + // arcs: *oi++ = overlap; return oi; } @@ -1382,7 +1385,7 @@ public: } // Go over the list of intersection points and report those that lie on - // both x-monotone arcs. + // both \f$x\f$-monotone arcs. for (auto iter = inter_list.begin(); iter != inter_list.end(); ++iter) { if (m_traits.is_between_endpoints(xcv1, (*iter).first) && m_traits.is_between_endpoints(xcv2, (*iter).first)) @@ -1395,7 +1398,7 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! obtains an `Intersect_2` functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } class Are_mergeable_2 { @@ -1405,7 +1408,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits (in case it has state) */ Are_mergeable_2(const Traits& traits) : m_traits(traits) {} @@ -1413,7 +1416,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given \f$x\f$-monotone curves. * \param xcv1 The first arc. * \param xcv2 The second arc. * \return `true` if the two curves are mergeable; that is, they are @@ -1425,7 +1428,7 @@ public: { return can_merge_with(xcv1, xcv2); } private: - /*! Check whether it is possible to merge the arc with the given arc. + /*! checks whether it is possible to merge the arc with the given arc. * \param xcv1 The first arc. * \param xcv2 The second arc. * \return `true` if it is possible to merge the two arcs; @@ -1444,12 +1447,12 @@ public: } }; - /*! Obtain an Are_mergeable_2 functor object. */ + /*! obtains an `Are_mergeable_2` functor object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(*this); } /*! \class Merge_2 - * A functor that merges two x-monotone arcs into one. + * A functor that merges two \f$x\f$-monotone arcs into one. */ class Merge_2 { protected: @@ -1458,7 +1461,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits (in case it has state) */ Merge_2(const Traits& traits) : m_traits(traits) {} @@ -1466,7 +1469,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Merge two given x-monotone curves into a single curve (segment). + /*! merges two given \f$x\f$-monotone curves into a single curve (segment). * \param xcv1 The first arc. * \param xcv2 The second arc. * \param xcv The merged arc. @@ -1482,7 +1485,7 @@ public: } private: - /*! Merge the current arc with the given arc. + /*! merges the current arc with the given arc. * \param xcv1 The first arc to merge with. * \param xcv2 The second arc to merge with. * \pre The two arcs are mergeable. @@ -1507,12 +1510,12 @@ public: } }; - /*! Obtain a Merge_2 functor object. */ + /*! obtains a `Merge_2` functor object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } //@} - /*! \name Auxiliary Functor definitions, used gor, e.g., the landmarks + /*! \name Auxiliary Functor definitions, used gor, e.g., the landmarks \ * point-location strategy and the drawing function. */ //@{ @@ -1527,7 +1530,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits. */ Approximate_curve_length_2(const Traits& traits) : m_traits(traits) {} @@ -1535,7 +1538,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Obtain an approximation of the length of a curve. + /*! obtains an approximation of the length of a curve. * \param xcv The curve. * \return An approximation of the length of `xcv`. */ @@ -1548,7 +1551,7 @@ public: } private: - /*! Obtain the segment length. + /*! obtains the segment length. */ double segment_length(const X_monotone_curve_2& xcv) { auto min_vertex = m_traits.construct_min_vertex_2_object(); @@ -1588,7 +1591,7 @@ public: return tmp/2.0 + b_sqr*std::log((4.0*a + tmp)/b)/(8.0*a); } - /*! Obtain the parabolic arc length. + /*! obtains the parabolic arc length. */ double parabola_length(const X_monotone_curve_2& xcv) { double r_m, t_m, s_m, u_m, v_m, w_m; @@ -1645,7 +1648,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits. */ Approximate_2(const Traits& traits) : m_traits(traits) {} @@ -1653,12 +1656,12 @@ public: friend class Arr_conic_traits_2; public: - /*! Obtain an approximation of a point coordinate. + /*! obtains an approximation of a point coordinate. * \param p The exact point. * \param i The coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return An approximation of p's x-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). + * \pre `i` is either 0 or 1. + * \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). */ Approximate_number_type operator()(const Point_2& p, int i) const { CGAL_precondition((i == 0) || (i == 1)); @@ -1667,12 +1670,12 @@ public: else return CGAL::to_double(p.y()); } - /*! Obtain an approximation of a point. + /*! obtains an approximation of a point. */ Approximate_point_2 operator()(const Point_2& p) const { return Approximate_point_2(operator()(p, 0), operator()(p, 1)); } - /*! Obtain an approximation of an \f$x\f$-monotone curve. + /*! obtains an approximation of an \f$x\f$-monotone curve. */ template OutputIterator operator()(const X_monotone_curve_2& xcv, double error, @@ -1688,7 +1691,7 @@ public: } private: - /*! Handle segments. + /*! handles segments. */ template OutputIterator approximate_segment(const X_monotone_curve_2& xcv, @@ -1707,7 +1710,7 @@ public: return oi; } - /*! Transform a point. In particular, rotate the canonical point + /*! transforms a point. In particular, rotate the canonical point * (`xc`,`yc`) by an angle, the sine and cosine of which are `sint` and * `cost`, respectively, and translate by (`cx`,`cy`). */ @@ -1719,7 +1722,7 @@ public: y = xc*sint + yc*cost + cy; } - /*! Handle ellipses. + /*! handles ellipses. * The general equation of an ellipse is: * r·ð‘¥^2 + s·ð‘¦^2 + t·ð‘¥Â·ð‘¦ + u·𑥠+ v·𑦠+ w = 0 * where 4·r·s−t^2 > 0 @@ -1763,7 +1766,8 @@ public: * ð¶ð‘¦ = ð¶ð‘¥â€²Â·ð‘ ð‘–ð‘›ðœƒ + ð¶ð‘¦â€²Â·ð‘ð‘œð‘ ðœƒ * * The parametric formula of an ellipse centered at the origin with major - * axis parallel to the x-axis and minor axis parallel to the y-axis is: + * axis parallel to the \f$x\f$-axis and minor axis parallel to the + * \f$y\f$-axis is: * ð‘¥(ð›¼) = a·ð‘ð‘œð‘ (ð›¼) * ð‘¦(ð›¼) = b·ð‘ ð‘–ð‘›(ð›¼) * where a is the major radius and b is the minor radius. @@ -1826,7 +1830,7 @@ public: return oi; } - /*! Add either an elliptic or a hyperbilc point. + /*! adds either an elliptic or a hyperbilc point. * The arc endpoints are (`x1`, `y1`) and (`x2`, `y2`). * In our parametric representations for ellipses and hyperbolas the * following holds: @@ -1876,7 +1880,7 @@ public: return oi; } - /*! Compute the elliptic point given the parameter t and the transform + /*! computes the elliptic point given the parameter t and the transform * data, that is, the center (translation) and the sin and cos of the * rotation angle. */ @@ -1886,7 +1890,7 @@ public: y = b * std::sin(t); } - /*! Handle parabolas. + /*! handles parabolas. * The arc-length closed form can be found here: * https://www.vcalc.com/wiki/vCalc/Parabola+-+arc+length */ @@ -1936,7 +1940,7 @@ public: return oi; } - /*! Add either an elliptic or a hyperbilc point. + /*! adds either an elliptic or a hyperbilc point. * The arc endpoints are (`x1`, `y1`) and (`x2`, `y2`). * In our parametric representations for ellipses and hyperbolas the * following holds: @@ -1986,7 +1990,7 @@ public: return oi; } - /*! Compute the parabolic point given the parameter t and the transform + /*! computes the parabolic point given the parameter t and the transform * data, that is, the center (translation) and the sin and cos of the * rotation angle. */ @@ -1995,7 +1999,7 @@ public: y = 2.0*a*t; } - /*! Handle hyperbolas. + /*! handles hyperbolas. */ template OutputIterator approximate_hyperbola(const X_monotone_curve_2& xcv, @@ -2037,7 +2041,7 @@ public: return oi; } - /*! Compute the hyperbolic point given the parameter t and the transform + /*! computes the hyperbolic point given the parameter t and the transform * data, that is, the center (translation) and the sin and cos of the * rotation angle. */ @@ -2048,7 +2052,7 @@ public: } }; - /*! Obtain an Approximate_2 functor object. */ + /*! obtains an `Approximate_2` functor object. */ Approximate_2 approximate_2_object() const { return Approximate_2(*this); } //! Functor @@ -2058,7 +2062,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Construct_x_monotone_curve_2(const Traits& traits) : m_traits(traits) {} @@ -2066,7 +2070,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Construct an \f$x\f$-monotone arc from a conic arc. + /*! constructs an \f$x\f$-monotone arc from a conic arc. * \param cv The given curve. * \pre cv is \f$x\f$-monotone. */ @@ -2077,7 +2081,7 @@ public: return xcv; } - /*! Construct an \f$x\f$-monotone arc from a conic arc. + /*! constructs an \f$x\f$-monotone arc from a conic arc. * \param xcv The given curve. * \param id The ID of the base curve. */ @@ -2088,7 +2092,7 @@ public: return xcv; } - /*! Construct an \f$x\f$-monotone sub-arc from a conic arc. + /*! constructs an \f$x\f$-monotone sub-arc from a conic arc. * \param cv The given (base) arc. * \param source The source point. * \param target The target point. @@ -2107,7 +2111,7 @@ public: return xcv; } - /*! Return an \f$x\f$-monotone curve connecting the two given endpoints. + /*! returns an \f$x\f$-monotone curve connecting the two given endpoints. * \param source The first point. * \param target The second point. * \pre `source` and `target` must not be the same. @@ -2140,7 +2144,7 @@ public: return xcv; } - /*! Construct a special segment of a given line connecting to given + /*! constructs a special segment of a given line connecting to given * endpoints. * \param a, b, c The coefficients of the supporting line (`ax + by + c = 0`). * \param source The source point. @@ -2180,7 +2184,7 @@ public: } private: - /*! Determine whether the arc is \f$x\f$-monotone. + /*! determines whether the arc is \f$x\f$-monotone. */ bool is_x_monotone(const Curve_2& cv) const { // Collect vertical tangency points. @@ -2189,7 +2193,7 @@ public: return (res == 0); } - /*! Determine whether the arc is \f$y\f$-monotone. + /*! determines whether the arc is \f$y\f$-monotone. */ bool is_y_monotone(const Curve_2& cv) const { // Collect horizontal tangency points. @@ -2200,7 +2204,7 @@ public: }; - /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + /*! obtains a `Construct_x_monotone_curve_2` functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const { return Construct_x_monotone_curve_2(*this); } @@ -2212,7 +2216,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Construct_curve_2(const Traits& traits) : m_traits(traits) {} @@ -2220,11 +2224,11 @@ public: friend class Arr_conic_traits_2; public: - /*! Construct an empty curve. + /*! constructs an empty curve. */ Curve_2 operator()() const { return Curve_2(); } - /*! Construct a conic arc which is the full conic: + /*! constructs a conic arc which is the full conic: * `C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0` * \pre The conic C must be an ellipse (so `4rs - t^2 > 0`). */ @@ -2248,7 +2252,7 @@ public: return arc; } - /*! Construct a conic arc that lies on the conic: + /*! constructs a conic arc that lies on the conic: * `C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0` * \param orient The orientation of the arc (clockwise or counterclockwise). * \param source The source point. @@ -2273,7 +2277,7 @@ public: return arc; } - /*! Construct a conic arc that is a circular arc from given three points. + /*! constructs a conic arc that is a circular arc from given three points. * \param p1 The arc source. * \param p2 A point in the interior of the arc. * \param p3 The arc target. @@ -2354,7 +2358,7 @@ public: return arc; } - /*! Construct a conic arc from given five points, specified by the + /*! constructs a conic arc from given five points, specified by the * points p1, p2, p3, p4 and p5. * \param p1 The source point of the given arc. * \param p2,p3,p4 Points lying on the conic arc, between p1 and p5. @@ -2445,7 +2449,7 @@ public: return arc; } - /*! Construct a conic arc that lies on a conic given by its coefficients: + /*! constructs a conic arc that lies on a conic given by its coefficients: * `C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0` * The source and the target are specified by the intersection of the * conic with: @@ -2511,8 +2515,8 @@ public: (CGAL::sign(aux_coeffs[1]) == ZERO) && (CGAL::sign(aux_coeffs[2]) == ZERO)) ? 1 : 2; - // Compute the x- and y-coordinates of intersection points of the base - // conic and the k'th auxiliary conic. + // Compute the \f$x\f$- and \f$y\f$-coordinates of intersection points + // of the base conic and the k'th auxiliary conic. int n_xs = compute_resultant_roots(*nt_traits, base_coeffs[0], base_coeffs[1], base_coeffs[2], @@ -2606,7 +2610,7 @@ public: return arc; } - /*! Return a segment connecting the two given endpoints. + /*! returns a segment connecting the two given endpoints. * \param source The source point. * \param target The target point. * \pre `source` and `target` must not be the same. @@ -2626,7 +2630,7 @@ public: return cv; } - /*! Construct a conic arc from a given line segment. + /*! constructs a conic arc from a given line segment. * \param seg The line segment with rational endpoints. */ Curve_2 operator()(const Rat_segment_2& seg) const { @@ -2681,7 +2685,7 @@ public: return cv; } - /*! Construct a conic arc that is a full circle. + /*! constructs a conic arc that is a full circle. * \param circ The circle with rational center and rational squared radius. */ Curve_2 operator()(const Rat_circle_2& circ) const { @@ -2716,7 +2720,7 @@ public: return cv; } - /*! Construct a conic arc that lies on a given circle: + /*! constructs a conic arc that lies on a given circle: * `C: (x - x0)^2 + (y - y0)^2 = R^2` * \param orient The orientation of the circle. * \param source The source point. @@ -2781,7 +2785,7 @@ public: } }; - /*! Obtain a Construct_curve_2 functor object. */ + /*! obtains a `Construct_curve_2` functor object. */ Construct_curve_2 construct_curve_2_object() const { return Construct_curve_2(*this); } //@} @@ -2791,7 +2795,7 @@ public: class Compare_endpoints_xy_2 { public: - /*! Compare the endpoints of an $x$-monotone curve lexicographically. + /*! compares the endpoints of an $x$-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param cv The curve. * \return SMALLER if the curve is directed right; @@ -2801,13 +2805,13 @@ public: { return (cv.is_directed_right()) ? SMALLER : LARGER; } }; - /*! Obtain a Compare_endpoints_xy_2 functor object. */ + /*! obtains a `Compare_endpoints_xy_2` functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); } class Construct_opposite_2 { public: - /*! Construct an opposite x-monotone (with swapped source and target). + /*! constructs an opposite \f$x\f$-monotone (with swapped source and target). * \param cv The curve. * \return The opposite curve. */ @@ -2815,7 +2819,7 @@ public: { return cv.flip(); } }; - /*! Obtain a Construct_opposite_2 functor object. */ + /*! obtains a `Construct_opposite_2` functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); } @@ -2826,7 +2830,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Trim_2(const Traits& traits) : m_traits(traits) {} @@ -2834,8 +2838,7 @@ public: friend class Arr_conic_traits_2; public: - /*!\brief - * Returns a trimmed version of an cv + /*! returns a trimmed version of an cv * * \param xcv The arc * \param src the new first endpoint @@ -2866,7 +2869,7 @@ public: } private: - /*! Trim the arc given its new endpoints. + /*! trims the arc given its new endpoints. * \param ps The new source point. * \param pt The new target point. * \return The new trimmed arc. @@ -2917,7 +2920,7 @@ public: } }; - /*! Obtain a Trim_2 functor object. */ + /*! obtains a `Trim_2` functor object. */ Trim_2 trim_2_object() const { return Trim_2(*this); } //@} @@ -2931,7 +2934,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Construct_bbox_2(const Traits& traits) : m_traits(traits) {} @@ -2939,7 +2942,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Obtain a bounding box for the conic arc. + /*! obtains a bounding box for the conic arc. * \return The bounding box. */ Bbox_2 operator()(const X_monotone_curve_2& xcv) const { return bbox(xcv); } @@ -3002,7 +3005,8 @@ public: CGAL::to_double(xcv.target().y()) : CGAL::to_double(xcv.source().y()); - // Go over the vertical tangency points and try to update the x-points. + // Go over the vertical tangency points and try to update the + // \f$x\f$-points. Alg_point_2 tan_ps[2]; auto n_tan_ps = m_traits.vertical_tangency_points(xcv, tan_ps); for (decltype(n_tan_ps) i = 0; i < n_tan_ps; ++i) { @@ -3012,7 +3016,8 @@ public: x_max = CGAL::to_double(tan_ps[i].x()); } - // Go over the horizontal tangency points and try to update the y-points. + // Go over the horizontal tangency points and try to update the + // \f$y\f$-points. n_tan_ps = m_traits.horizontal_tangency_points(xcv, tan_ps); for (decltype(n_tan_ps) i = 0; i < n_tan_ps; ++i) { if (CGAL::to_double(tan_ps[i].y()) < y_min) @@ -3027,12 +3032,12 @@ public: } }; - /*! Obtain a Bbox_2 functor object. */ + /*! obtains a `Bbox_2` functor object. */ Construct_bbox_2 construct_bbox_2_object() const { return Construct_bbox_2(*this); } //@} - /*! Set the properties of a conic arc (for the usage of the constructors). + /*! sets the properties of a conic arc (for the usage of the constructors). * \param rat_coeffs A vector of size 6, storing the rational coefficients * of \f$x^2\f$, \f$y^2\f$, \f$x \cdot y\f$, \f$x\f$, \f$y\f$ * and the free coefficient resp. @@ -3138,7 +3143,7 @@ public: cv.reset_flag(Curve_2::IS_FULL_CONIC); // not a full conic } - /*! Set the properties of a conic arc that is really a full curve + /*! sets the properties of a conic arc that is really a full curve * (that is, an ellipse). * \param rat_coeffs A vector of size 6, storing the rational coefficients * of \f$x^2\f$, \f$y^2\f$, \f$x \cdot y\f$, \f$x\f$, \f$y\f$ @@ -3195,7 +3200,7 @@ public: else cv.reset_flags(); // invalid arc } - /*! Check whether the given point lies on the supporting conic of the arc. + /*! checks whether the given point lies on the supporting conic of the arc. * \param p The query point. * \return true if p lies on the supporting conic; (false) otherwise. */ @@ -3214,7 +3219,7 @@ public: return (CGAL::sign(val) == ZERO); } - /*! Check whether the given point is between the source and the target. + /*! checks whether the given point is between the source and the target. * The point is assumed to be on the conic's boundary. * \param p The query point. * \return `true` if the point is between the two endpoints; @@ -3229,7 +3234,7 @@ public: else return is_strictly_between_endpoints(cv, p); } - /*! Check whether the given point is strictly between the source and the + /*! checks whether the given point is strictly between the source and the * target (but not any of them). * The point is assumed to be on the conic's boundary. * \param p The query point. @@ -3267,23 +3272,24 @@ public: Comparison_result res2; if (m_alg_kernel->compare_x_2_object()(source, target) == EQUAL) { - // In case of a vertical segment - just check whether the y coordinate - // of p is between those of the source's and of the target's. + // In case of a vertical segment - just check whether the + // \f$y\f$-coordinate of p is between those of the source's and of the + // target's. auto cmp_y = m_alg_kernel->compare_y_2_object(); res1 = cmp_y(p, source); res2 = cmp_y(p, target); } else { - // Otherwise, since the segment is x-monotone, just check whether the - // x coordinate of p is between those of the source's and of the - // target's. + // Otherwise, since the segment is \f$x\f$-monotone, just check whether + // the \f$x\f$-coordinate of p is between those of the source's and of + // the target's. auto cmp_x = m_alg_kernel->compare_x_2_object(); res1 = cmp_x(p, source); res2 = cmp_x(p, target); } - // If p is not in the (open) x-range (or y-range) of the segment, it - // cannot be contained in the segment. + // If p is not in the (open) \f$x\f$-range (or \f$y\f$-range) of the + // segment, it cannot be contained in the segment. if ((res1 == EQUAL) || (res2 == EQUAL) || (res1 == res2)) return false; // Perform an orientation test: This is crucial for segment of line @@ -3300,7 +3306,7 @@ public: return (orient_f(source, p, target) == RIGHT_TURN); } - /*! Build the data for hyperbolic arc, containing the characterization of the + /*! builds the data for hyperbolic arc, containing the characterization of the * hyperbolic branch the arc is placed on. */ void build_hyperbolic_arc_data(Curve_2& cv) const { @@ -3393,16 +3399,18 @@ public: CGAL_assertion(side == cv.sign_of_extra_data(target.x(), target.y())); } - /*! Find the x coordinates of the underlying conic at a given y coordinate. - * \param y The y coordinate. - * \param xs The output x coordinates. - * \pre The vector xs must be allocated at the size of 2. - * \return The number of x coordinates computed (either 0, 1 or 2). + /*! finds the \f$x\f$-coordinates of the underlying conic at a given + * \f$y\f$-coordinate. + * \param y The \f$y\f$-coordinate. + * \param xs The output \f$x\f$-coordinates. + * \pre The vector `xs` must be allocated at the size of 2. + * \return The number of \f$x\f$-coordinates computed (either 0, 1 or 2). */ int conic_get_x_coordinates(const Curve_2& cv, const Algebraic& y, Algebraic* xs) const { - // Solve the quadratic equation for a given y and find the x values: - // r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0 + // Solve the quadratic equation for a given \f$y\f$ and find the \f$x\f$ + // values: + // \f$r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0\f$ Algebraic A = m_nt_traits->convert(cv.r()); Algebraic B = m_nt_traits->convert(cv.t())*y + m_nt_traits->convert(cv.u()); Algebraic C = @@ -3412,16 +3420,18 @@ public: return solve_quadratic_equation(A, B, C, xs[0], xs[1]); } - /*! Find the y coordinates of the underlying conic at a given x coordinate. - * \param x The x coordinate. - * \param ys The output y coordinates. - * \pre The vector ys must be allocated at the size of 2. - * \return The number of y coordinates computed (either 0, 1 or 2). + /*! finds the \f$y\f$-coordinates of the underlying conic at a given + * \f$x\f$-coordinate. + * \param x The \f$x\f$-coordinate. + * \param ys The output \f$y\f$-coordinates. + * \pre The vector `ys` must be allocated at the size of 2. + * \return The number of \f$y\f$-coordinates computed (either 0, 1 or 2). */ int conic_get_y_coordinates(const Curve_2& cv, const Algebraic& x, Algebraic* ys) const { - // Solve the quadratic equation for a given x and find the y values: - // s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0 + // Solve the quadratic equation for a given \f$x\f$ and find the \f$y\f$ + // values: + // \f$s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0\f$ Algebraic A = m_nt_traits->convert(cv.s()); Algebraic B = m_nt_traits->convert(cv.t())*x + m_nt_traits->convert(cv.v()); Algebraic C = @@ -3431,7 +3441,7 @@ public: return solve_quadratic_equation(A, B, C, ys[0], ys[1]); } - /*! Solve the given quadratic equation: Ax^2 + B*x + C = 0. + /*! solves the given quadratic equation: Ax^2 + B*x + C = 0. * \param x_minus The root obtained from taking -sqrt(discriminant). * \param x_plus The root obtained from taking -sqrt(discriminant). * \return The number of disticnt solutions to the equation. @@ -3468,14 +3478,14 @@ public: return 2; } - /*! Compute a point on an arc with the same \f$x\f$-coordiante as the given + /*! computes a point on an arc with the same \f$x\f$-coordiante as the given * point. * \param p The given point. * \pre The arc is not vertical and `p` is in the \f$x\f$-range of the arc. * \return A point on the arc with the same \f$x\f$-coordiante as `p`. */ Point_2 point_at_x(const X_monotone_curve_2& xcv, const Point_2& p) const { - // Make sure that p is in the x-range of the arc. + // Make sure that p is in the \f$x\f$-range of the arc. CGAL_precondition(! xcv.is_vertical()); CGAL_precondition_code(auto cmp_x = m_alg_kernel->compare_x_2_object()); @@ -3493,14 +3503,14 @@ public: return Point_2(p.x(), y); } - // Compute the y-coordinate according to the degree of the supporting + // Compute the \f$y\f$-coordinate according to the degree of the supporting // conic curve. Algebraic y; if (xcv.degree_mask() == X_monotone_curve_2::degree_1_mask()) { - // In case of a linear curve, the y-coordinate is a simple linear + // In case of a linear curve, the \f$y\f$-coordinate is a simple linear // expression of x(p) (note that v is not 0 as the arc is not vertical): - // y = -(u*x(p) + w) / v + // \f$y = -(u*x(p) + w) / v\f$ y = -(xcv.alg_u()*p.x() + xcv.alg_w()) / xcv.alg_v(); } else if (xcv.orientation() == COLLINEAR) { @@ -3514,8 +3524,8 @@ public: else { CGAL_assertion(xcv.degree_mask() == X_monotone_curve_2::degree_2_mask()); - // In this case the y-coordinate is one of solutions to the quadratic - // equation: + // In this case the \f$y\f$-coordinate is one of solutions to the + // quadratic equation: // s*y^2 + (t*x(p) + v)*y + (r*x(p)^2 + u*x(p) + w) = 0 Algebraic A = xcv.alg_s(); Algebraic B = xcv.alg_t()*p.x() + xcv.alg_v(); @@ -3545,14 +3555,14 @@ public: return Point_2(p.x(), y); } - /*! Find all points on the arc with a given \f$x\f$-coordinate. + /*! finds all points on the arc with a given \f$x\f$-coordinate. * \param p A placeholder for the \f$x\f$-coordinate. * \param ps The point on the arc at `x(p)`. * \pre The vector `ps` should be allocated at the size of 2. * \return The number of points found. */ int points_at_x(const Curve_2& cv, const Point_2& p, Alg_point_2* ps) const { - // Get the y coordinates of the points on the conic. + // Get the \f$y\f$-coordinates of the points on the conic. Algebraic ys[2]; int n = conic_get_y_coordinates(cv, p.x(), ys); @@ -3569,14 +3579,14 @@ public: return m; } - /*! Find all points on the arc with a given \f$y\f$-coordinate. + /*! finds all points on the arc with a given \f$y\f$-coordinate. * \param p A placeholder for the \f$y\f$-coordinate. * \param ps The point on the arc at `x(p)`. * \pre The vector `ps` should be allocated at the size of 2. * \return The number of points found. */ int points_at_y(const Curve_2& cv, const Point_2& p, Alg_point_2* ps) const { - // Get the y coordinates of the points on the conic. + // Get the \f$y\f$-coordinates of the points on the conic. Algebraic xs[2]; int n = conic_get_x_coordinates(cv, p.y(), xs); @@ -3593,7 +3603,7 @@ public: return m; } - /*! Set the properties of the x-monotone conic arc (for the usage of the + /*! sets the properties of the \f$x\f$-monotone conic arc (for the usage of the * constructors). */ void set_x_monotone(X_monotone_curve_2& xcv) const { @@ -3650,8 +3660,8 @@ public: xcv.set_flag(X_monotone_curve_2::DEGREE_2); - // Compute a midpoint between the source and the target and get the y-value - // of the arc at its x-coordiante. + // Compute a midpoint between the source and the target and get the + // \f$y\f$-value of the arc at its \f$x\f$-coordiante. Point_2 p_mid = m_alg_kernel->construct_midpoint_2_object()(xcv.source(), xcv.target()); Algebraic ys[2]; @@ -3660,12 +3670,12 @@ public: CGAL_assertion(n_ys != 0); - // Check which solution lies on the x-monotone arc. + // Check which solution lies on the \f$x\f$-monotone arc. Point_2 p_arc_mid(p_mid.x(), ys[0]); if (is_strictly_between_endpoints(xcv, p_arc_mid)) { // Mark that we should use the -sqrt(disc) root for points on this - // x-monotone arc. + // \f$x\f$-monotone arc. xcv.reset_flag(X_monotone_curve_2::PLUS_SQRT_DISC_ROOT); } else { @@ -3674,15 +3684,16 @@ public: CGAL_assertion(is_strictly_between_endpoints(xcv, p_arc_mid)); // Mark that we should use the +sqrt(disc) root for points on this - // x-monotone arc. + // \f$x\f$-monotone arc. xcv.set_flag(X_monotone_curve_2::PLUS_SQRT_DISC_ROOT); } - // Check whether the conic is facing up or facing down: - // Check whether the arc (which is x-monotone of degree 2) lies above or - // below the segment that connects its two end-points (x1,y1) and (x2,y2). - // To do that, we find the y coordinate of a point on the arc whose x - // coordinate is (x1+x2)/2 and compare it to (y1+y2)/2. + // Check whether the conic is facing up or facing down: Check whether the + // arc (which is \f$x\f$-monotone of degree 2) lies above or below the + // segment that connects its two end-points (x1,y1) and (x2,y2). To do + // that, we find the \f$y\f$-coordinate of a point on the arc whose + // \f$x\f$ coordinate is \f$x(x1+x2)/2\f$x and compare it to + // \f$x(y1+y2)/2\f$x. auto cmp_y = m_alg_kernel->compare_y_2_object(); Comparison_result res = cmp_y(p_arc_mid, p_mid); @@ -3692,7 +3703,7 @@ public: else if (res == SMALLER) xcv.set_flag(X_monotone_curve_2::FACING_DOWN); } - /*! Check whether the two arcs have the same supporting conic. + /*! checks whether the two arcs have the same supporting conic. * \param xcv1 The first comparedb arc. * \param xcv2 The secind compared arc. * \return `true` if the two supporting conics are the same. @@ -3752,7 +3763,7 @@ public: CGAL::compare(xcv1.w() * factor2, xcv2.w() * factor1) == EQUAL); } - /*! Check whether the given point lies on the arc. + /*! checks whether the given point lies on the arc. * \param p The query point. * \param (true) if p lies on the arc; (false) otherwise. */ @@ -3778,7 +3789,7 @@ public: return is_between_endpoints(xcv, p); } - /*! Find the vertical tangency points of the underlying conic. + /*! finds the vertical tangency points of the underlying conic. * \param ps The output points of vertical tangency. * This area must be allocated at the size of 2. * \return The number of vertical tangency points. @@ -3788,11 +3799,12 @@ public: // vertical tangency points. if (CGAL::sign(cv.s()) == ZERO) return 0; - // We are interested in the x coordinates where the quadratic equation: - // s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0 - // has a single solution (obviously if s = 0, there are no such points). - // We therefore demand that the discriminant of this equation is zero: - // (t*x + v)^2 - 4*s*(r*x^2 + u*x + w) = 0 + // We are interested in the \f$x\f$-coordinates where the quadratic + // equation: + // \f$s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0\f$ + // has a single solution (obviously if \f$s = 0\f$, there are no such + // points). We therefore demand that the discriminant of this equation is + // zero: \f$(t*x + v)^2 - 4*s*(r*x^2 + u*x + w) = 0\f$. const Integer two(2); const Integer four(4); Algebraic xs[2]; @@ -3809,13 +3821,13 @@ public: xs); auto n_xs = static_cast(xs_end - xs); - // Find the y-coordinates of the vertical tangency points. + // Find the \f$y\f$-coordinates of the vertical tangency points. Algebraic ys[2]; Algebraic* ys_end; int n_ys; if (CGAL::sign(cv.t()) == ZERO) { - // The two vertical tangency points have the same y coordinate: + // The two vertical tangency points have the same \f$y\f$-coordinate: ys[0] = m_nt_traits->convert(Integer(- v)) / m_nt_traits->convert(Integer(two * s)); n_ys = 1; } @@ -3828,7 +3840,8 @@ public: n_ys = static_cast(ys_end - ys); } - // Pair the x and y coordinates and obtain the vertical tangency points. + // Pair the \f$x\f$- and \f$y\f$-coordinates and obtain the vertical + // tangency points. int n(0); for (int i = 0; i < n_xs; ++i) { @@ -3852,7 +3865,7 @@ public: return n; } - /*! Calculate the vertical tangency points of the arc. + /*! calculates the vertical tangency points of the arc. * \param vpts The vertical tangency points. * \pre The vpts vector should be allocated at the size of 2. * \return The number of vertical tangency points. @@ -3876,7 +3889,7 @@ public: return m; } - /*! Find the horizontal tangency points of the underlying conic. + /*! finds the horizontal tangency points of the underlying conic. * \param ps The output points of horizontal tangency. * This area must be allocated at the size of 2. * \return The number of horizontal tangency points. @@ -3889,11 +3902,11 @@ public: // vertical tangency points. if (CGAL::sign(cv.r()) == ZERO) return 0; - // We are interested in the y coordinates were the quadratic equation: - // r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0 - // has a single solution (obviously if r = 0, there are no such points). - // We therefore demand that the discriminant of this equation is zero: - // (t*y + u)^2 - 4*r*(s*y^2 + v*y + w) = 0 + // We are interested in the \f$y\f$-coordinates were the quadratic equation: + // \f$r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0\f$ + // has a single solution (obviously if \f$r = 0\f$, there are no such + // points). We therefore demand that the discriminant of this equation is + // zero: \f$(t*y + u)^2 - 4*r*(s*y^2 + v*y + w) = 0\f$ const Integer two(2); const Integer four(4); Algebraic ys[2]; @@ -3911,10 +3924,12 @@ public: ys); auto n = static_cast(ys_end - ys); - // Compute the x coordinates and construct the horizontal tangency points. + // Compute the \f$x\f$-coordinates and construct the horizontal tangency + // points. for (int i = 0; i < n; ++i) { - // Having computed y, x is the single solution to the quadratic equation - // above, and since its discriminant is 0, x is simply given by: + // Having computed \f$y\f$, \f$x\f$ is the single solution to the + // quadratic equation above, and since its discriminant is 0, \f$x\f$ is + // simply given by: Algebraic x = -(m_nt_traits->convert(t)*ys[i] + m_nt_traits->convert(u)) / m_nt_traits->convert(Integer(two*r)); ps[i] = Point_2(x, ys[i]); @@ -3924,7 +3939,7 @@ public: return n; } - /*! Calculate the horizontal tangency points of the arc. + /*! calculates the horizontal tangency points of the arc. * \param hpts The horizontal tangency points. * \pre The hpts vector should be allocated at the size of 2. * \return The number of horizontal tangency points. @@ -3950,7 +3965,7 @@ public: return m; } - /*! Apply the inverse of the rotation given by the sin and cosine of the + /*! applies the inverse of the rotation given by the sin and cosine of the * rotation angle to the given conic arc. */ void inverse_conic(const X_monotone_curve_2& xcv, @@ -3972,7 +3987,7 @@ public: w_m = w; } - /*! Obtain (i) the rotation that yields the given conic arc when applied + /*! obtains (i) the rotation that yields the given conic arc when applied * to the canonical arc, and (ii) the canonical arc. * \param[in] arc the given arc * \param[out] r_m the coefficients of the canonical conic. @@ -4017,7 +4032,7 @@ public: inverse_conic(xcv, cost, sint, r_m, s_m, t_m, u_m, v_m, w_m); } - /*! Inverse transform a point. In particular, inversly rotate the point + /*! inverses transform a point. In particular, inversly rotate the point * (`x`,`y`) by an angle, the sine and cosine of which are `sint` and * `cost`, respectively, and translate by (`-cx`,`-cy`). */ @@ -4029,7 +4044,7 @@ public: yc = -x*sint + y*cost - cy; } - /*! Handle parabolas. + /*! handles parabolas. * The arc-length closed form can be found here: * https://www.vcalc.com/wiki/vCalc/Parabola+-+arc+length */ @@ -4100,7 +4115,7 @@ public: // std::cout << "center: " << cx << "," << cy << std::endl; } - /*! Handle ellipses. + /*! handles ellipses. */ void approximate_ellipse(const X_monotone_curve_2& xcv, double& r_m, double& t_m, double& s_m, @@ -4178,7 +4193,7 @@ public: // std::cout << "ts,tt: " << ts << "," << tt << std::endl; } - /*! Handle hyperbolas. + /*! handles hyperbolas. */ void approximate_hyperbola(const X_monotone_curve_2& xcv, double& r_m, double& t_m, double& s_m, @@ -4201,7 +4216,7 @@ public: // << ") => (" << xt << "," << yt << ")" // << std::endl; - // If the hyperbola conjugate axis is the Y-axis, add + // If the hyperbola conjugate axis is the \f$Y\f$-axis, add canonical_conic(xcv, r_m, s_m, t_m, u_m, v_m, w_m, cost, sint); // std::cout << r_m << "," << s_m << "," << t_m << "," // << u_m << "," << v_m << "," << w_m << std::endl; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index 55a75efd7de..51949d4546e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -18,10 +18,6 @@ #include /*! \file - * A counting traits-class for the arrangement package. - * This is a meta-traits class. It is parameterized with another traits class - * and inherits from it. For each traits method it maintains a counter that - * counts the number of invocations into the method. */ #include @@ -32,359 +28,275 @@ #include #include #include +#include namespace CGAL { /*! \class - * A model of the ArrangementTraits_2 concept that counts the methods invoked. + * A metadata traits-class decorator for the arrangement package. It counts the + * number of invocations of traits-class functors. It is parameterized with + * another traits class and inherits from it. For each traits method it + * maintains a counter that counts the number of invocations into the method. + * + * It models all the concepts that the original traits models. */ -template -class Arr_counting_traits_2 : public Base_traits { +template +class Arr_counting_traits_2 : public BaseTraits { public: enum Operation_id { - COMPARE_X_OP = 0, - COMPARE_XY_OP, - CONSTRUCT_MIN_VERTEX_OP, - CONSTRUCT_MAX_VERTEX_OP, - IS_VERTICAL_OP, - COMPARE_Y_AT_X_OP, - EQUAL_POINTS_OP, - EQUAL_CURVES_OP, - COMPARE_Y_AT_X_LEFT_OP, - COMPARE_Y_AT_X_RIGHT_OP, - MAKE_X_MONOTONE_OP, - SPLIT_OP, - INTERSECT_OP, - ARE_MERGEABLE_OP, - MERGE_OP, - CONSTRUCT_OPPOSITE_OP, - COMPARE_ENDPOINTS_XY_OP, + COMPARE_X_2_OP = 0, + COMPARE_XY_2_OP, + CONSTRUCT_MIN_VERTEX_2_OP, + CONSTRUCT_MAX_VERTEX_2_OP, + IS_VERTICAL_2_OP, + COMPARE_Y_AT_X_2_OP, + EQUAL_2_POINTS_OP, + EQUAL_2_CURVES_OP, + COMPARE_Y_AT_X_LEFT_2_OP, + COMPARE_Y_AT_X_RIGHT_2_OP, + MAKE_X_MONOTONE_2_OP, + SPLIT_2_OP, + INTERSECT_2_OP, + ARE_MERGEABLE_2_OP, + MERGE_2_OP, + CONSTRUCT_2_OPPOSITE_2_OP, + COMPARE_ENDPOINTS_XY_2_OP, + APPROXIMATE_2_COORD_OP, + APPROXIMATE_2_POINT_OP, + APPROXIMATE_2_CURVE_OP, - PARAMETER_SPACE_IN_X_CURVE_END_OP, - PARAMETER_SPACE_IN_X_POINT_OP, - PARAMETER_SPACE_IN_X_CURVE_OP, - IS_ON_X_IDENTIFICATION_POINT_OP, - IS_ON_X_IDENTIFICATION_CURVE_OP, - COMPARE_Y_ON_BOUNDARY_OP, - COMPARE_Y_NEAR_BOUNDARY_OP, + PARAMETER_SPACE_IN_X_2_CURVE_END_OP, + PARAMETER_SPACE_IN_X_2_POINT_OP, + IS_ON_X_IDENTIFICATION_POINT_2_OP, + IS_ON_X_IDENTIFICATION_CURVE_2_OP, + COMPARE_Y_ON_BOUNDARY_2_OP, + COMPARE_Y_NEAR_BOUNDARY_2_OP, - PARAMETER_SPACE_IN_Y_CURVE_END_OP, - PARAMETER_SPACE_IN_Y_POINT_OP, - PARAMETER_SPACE_IN_Y_CURVE_OP, - IS_ON_Y_IDENTIFICATION_POINT_OP, - IS_ON_Y_IDENTIFICATION_CURVE_OP, - COMPARE_X_ON_BOUNDARY_POINTS_OP, - COMPARE_X_ON_BOUNDARY_POINT_CURVE_END_OP, - COMPARE_X_ON_BOUNDARY_CURVE_ENDS_OP, - COMPARE_X_NEAR_BOUNDARY_OP, + PARAMETER_SPACE_IN_Y_2_CURVE_END_OP, + PARAMETER_SPACE_IN_Y_2_POINT_OP, + IS_ON_Y_IDENTIFICATION_2_POINT_OP, + IS_ON_Y_IDENTIFICATION_2_CURVE_OP, + COMPARE_X_ON_BOUNDARY_2_POINTS_OP, + COMPARE_X_ON_BOUNDARY_2_POINT_CURVE_END_OP, + COMPARE_X_ON_BOUNDARY_2_CURVE_ENDS_OP, + COMPARE_X_NEAR_BOUNDARY_2_OP, NUMBER_OF_OPERATIONS }; - typedef Base_traits Base; - typedef Arr_counting_traits_2 Self; + using Base = BaseTraits; - /*! Construct default */ - template - Arr_counting_traits_2(Args ... args) : - Base(args...) - { + /*! constructs default */ + template + Arr_counting_traits_2(Args ... args) : Base(std::forward(args)...) { clear_counters(); increment(); } - /*! Disable copy constructor. - */ + /*! disables copy constructor. */ Arr_counting_traits_2(const Arr_counting_traits_2&) = delete; - /*! Obtain the counter of the given operation */ - size_t count(Operation_id id) const - { return m_counters[id]; } + /*! obtains the counter of the given operation */ + std::size_t count(Operation_id id) const { return m_counters[id]; } - size_t count_compare_x() const - { return m_counters[COMPARE_X_OP]; } + /*! prints the counter associated with an operation. */ + template + OutStream& print(OutStream& os, Operation_id id) const { + if (! m_exist[id]) return os; + os << m_names[id] << ": " << m_counters[id] << std::endl; + return os; + } - size_t count_compare_xy() const - { return m_counters[COMPARE_XY_OP]; } - - size_t count_construct_min_vertex() const - { return m_counters[CONSTRUCT_MIN_VERTEX_OP]; } - - size_t count_construct_max_vertex() const - { return m_counters[CONSTRUCT_MAX_VERTEX_OP]; } - - size_t count_is_vertical() const - { return m_counters[IS_VERTICAL_OP]; } - - size_t count_compare_y_at_x() const - { return m_counters[COMPARE_Y_AT_X_OP]; } - - size_t count_equal_points() const - { return m_counters[EQUAL_POINTS_OP]; } - - size_t count_equal_curves() const - { return m_counters[EQUAL_CURVES_OP]; } - - size_t count_compare_y_at_x_left() const - { return m_counters[COMPARE_Y_AT_X_LEFT_OP]; } - - size_t count_compare_y_at_x_right() const - { return m_counters[COMPARE_Y_AT_X_RIGHT_OP]; } - - size_t count_make_x_monotone() const - { return m_counters[MAKE_X_MONOTONE_OP]; } - - size_t count_split() const - { return m_counters[SPLIT_OP]; } - - size_t count_intersect() const - { return m_counters[INTERSECT_OP]; } - - size_t count_are_mergeable() const - { return m_counters[ARE_MERGEABLE_OP]; } - - size_t count_merge() const - { return m_counters[MERGE_OP]; } - - size_t count_construct_opposite() const - { return m_counters[CONSTRUCT_OPPOSITE_OP]; } - - size_t count_compare_endpoints_xy() const - { return m_counters[COMPARE_ENDPOINTS_XY_OP]; } - - // left-right - - size_t count_parameter_space_in_x_curve_end() const - { return m_counters[PARAMETER_SPACE_IN_X_CURVE_END_OP]; } - - size_t count_parameter_space_in_x_curve() const - { return m_counters[PARAMETER_SPACE_IN_X_CURVE_OP]; } - - size_t count_parameter_space_in_x_point() const - { return m_counters[PARAMETER_SPACE_IN_X_POINT_OP]; } - - size_t count_is_on_x_identification_point() const - { return m_counters[IS_ON_X_IDENTIFICATION_POINT_OP]; } - - size_t count_is_on_x_identification_curve() const - { return m_counters[IS_ON_X_IDENTIFICATION_CURVE_OP]; } - - size_t count_compare_y_on_boundary() const - { return m_counters[COMPARE_Y_ON_BOUNDARY_OP]; } - - size_t count_compare_y_near_boundary() const - { return m_counters[COMPARE_Y_NEAR_BOUNDARY_OP]; } - - - // bottom-top - - size_t count_parameter_space_in_y_curve_end() const - { return m_counters[PARAMETER_SPACE_IN_Y_CURVE_END_OP]; } - - size_t count_parameter_space_in_y_curve() const - { return m_counters[PARAMETER_SPACE_IN_Y_CURVE_OP]; } - - size_t count_parameter_space_in_y_point() const - { return m_counters[PARAMETER_SPACE_IN_Y_POINT_OP]; } - - size_t count_is_on_y_identification_point() const - { return m_counters[IS_ON_Y_IDENTIFICATION_POINT_OP]; } - - size_t count_is_on_y_identification_curve() const - { return m_counters[IS_ON_Y_IDENTIFICATION_CURVE_OP]; } - - size_t count_compare_x_on_boundary_points() const - { return m_counters[COMPARE_X_ON_BOUNDARY_POINTS_OP]; } - - size_t count_compare_x_on_boundary_point_curve_end() const - { return m_counters[COMPARE_X_ON_BOUNDARY_POINT_CURVE_END_OP]; } - - size_t count_compare_x_on_boundary_curve_ends() const - { return m_counters[COMPARE_X_ON_BOUNDARY_CURVE_ENDS_OP]; } - - size_t count_compare_x_near_boundary() const - { return m_counters[COMPARE_X_NEAR_BOUNDARY_OP]; } - - /// \name Types and functors inherited from the base + /// \name Types and functors inherited from `BaseTraits` //@{ // Traits types: - typedef typename Base::Has_left_category Has_left_category; - typedef typename Base::Has_merge_category Has_merge_category; - typedef typename Base::Has_do_intersect_category Has_do_intersect_category; + using Has_left_category = typename Base::Has_left_category; + using Has_merge_category = typename Base::Has_merge_category; + using Has_do_intersect_category = typename Base::Has_do_intersect_category; - typedef typename internal::Arr_complete_left_side_category< Base >::Category - Left_side_category; - typedef typename internal::Arr_complete_bottom_side_category< Base >::Category - Bottom_side_category; - typedef typename internal::Arr_complete_top_side_category< Base >::Category - Top_side_category; - typedef typename internal::Arr_complete_right_side_category< Base >::Category - Right_side_category; + using Left_side_category = + typename internal::Arr_complete_left_side_category::Category; + using Bottom_side_category = + typename internal::Arr_complete_bottom_side_category::Category; + using Top_side_category = + typename internal::Arr_complete_top_side_category::Category; + using Right_side_category = + typename internal::Arr_complete_right_side_category::Category; - typedef typename Base::Point_2 Point_2; - typedef typename Base::X_monotone_curve_2 X_monotone_curve_2; - typedef typename Base::Curve_2 Curve_2; + using Point_2 = typename Base::Point_2; + using X_monotone_curve_2 = typename Base::X_monotone_curve_2; + using Curve_2 = typename Base::Curve_2; - /*! A functor that compares the x-coordinates of two points */ + /*! A functor that compares the \f$x\f$-coordinates of two points */ class Compare_x_2 { private: typename Base::Compare_x_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Compare_x_2(const Base* base, size_t& counter) : - m_object(base->compare_x_2_object()), m_counter(counter) {} + /*! constructs */ + Compare_x_2(const Base& base, std::size_t& counter) : + m_object(base.compare_x_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { ++m_counter; return m_object(p1, p2); } }; - /*! A functor that compares two points lexigoraphically: by x, then by y. */ + /*! A functor that compares two points lexigoraphically: by \f$x\f$, then by + * \f$y\f$. */ class Compare_xy_2 { private: typename Base::Compare_xy_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Compare_xy_2(const Base* base, size_t& counter) : - m_object(base->compare_xy_2_object()), m_counter(counter) {} + /*! constructs */ + Compare_xy_2(const Base& base, std::size_t& counter) : + m_object(base.compare_xy_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { ++m_counter; return m_object(p1, p2); } }; - /*! A functor that obtains the left endpoint of an x-monotone curve. */ + /*! A functor that obtains the left endpoint of an \f$x\f$-monotone curve. */ class Construct_min_vertex_2 { private: typename Base::Construct_min_vertex_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Construct_min_vertex_2(const Base* base, size_t& counter) : - m_object(base->construct_min_vertex_2_object()), m_counter(counter) {} + /*! constructs */ + Construct_min_vertex_2(const Base& base, std::size_t& counter) : + m_object(base.construct_min_vertex_2_object()), m_counter(counter) {} - /*! Operate */ - const Point_2 operator()(const X_monotone_curve_2& xc) const - { ++m_counter; return m_object(xc); } + /*! operates */ + using Subcurve_ctr_minv = typename Base::Construct_min_vertex_2; + decltype(std::declval(). + operator()(std::declval())) + operator()(const X_monotone_curve_2& xcv) const + { ++m_counter; return m_object(xcv); } }; - /*! A functor that obtains the right endpoint of an x-monotone curve. */ + /*! A functor that obtains the right endpoint of an \f$x\f$-monotone curve. */ class Construct_max_vertex_2 { private: typename Base::Construct_max_vertex_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Construct_max_vertex_2(const Base* base, size_t& counter) : - m_object(base->construct_max_vertex_2_object()), m_counter(counter) {} + /*! constructs */ + Construct_max_vertex_2(const Base& base, std::size_t& counter) : + m_object(base.construct_max_vertex_2_object()), m_counter(counter) {} - /*! Operate */ - const Point_2 operator()(const X_monotone_curve_2& xc) const - { ++m_counter; return m_object(xc); } + /*! operates */ + using Subcurve_ctr_maxv = typename Base::Construct_max_vertex_2; + decltype(std::declval(). + operator()(std::declval())) + operator()(const X_monotone_curve_2& xcv) const + { ++m_counter; return m_object(xcv); } }; - /*! A functor that checks whether a given x-monotone curve is vertical. */ + /*! A functor that checks whether a given \f$x\f$-monotone curve is vertical. + */ class Is_vertical_2 { private: typename Base::Is_vertical_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Is_vertical_2(const Base* base, size_t& counter) : - m_object(base->is_vertical_2_object()), m_counter(counter) {} + /*! constructs */ + Is_vertical_2(const Base& base, std::size_t& counter) : + m_object(base.is_vertical_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ bool operator()(const X_monotone_curve_2& xc) const { ++m_counter; return m_object(xc); } }; - /*! A functor that compares the y-coordinates of a point and an - * x-monotone curve at the point x-coordinate. + /*! A functor that compares the \f$y\f$-coordinates of a point and an + * \f$x\f$-monotone curve at the point \f$x\f$-coordinate. */ class Compare_y_at_x_2 { private: typename Base::Compare_y_at_x_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Compare_y_at_x_2(const Base* base, size_t& counter) : - m_object(base->compare_y_at_x_2_object()), m_counter(counter) {} + /*! constructs */ + Compare_y_at_x_2(const Base& base, std::size_t& counter) : + m_object(base.compare_y_at_x_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const Point_2& p, const X_monotone_curve_2& xc) const { ++m_counter; return m_object(p, xc); } }; - /*! A functor that checks whether two points and two x-monotone curves are - * identical. + /*! A functor that checks whether two points and two \f$x\f$-monotone curves + * are identical. */ class Equal_2 { private: typename Base::Equal_2 m_object; - size_t& m_counter1; - size_t& m_counter2; + std::size_t& m_counter1; + std::size_t& m_counter2; public: - /*! Construct */ - Equal_2(const Base* base, size_t& counter1, size_t& counter2) : - m_object(base->equal_2_object()), + /*! constructs */ + Equal_2(const Base& base, std::size_t& counter1, std::size_t& counter2) : + m_object(base.equal_2_object()), m_counter1(counter1), m_counter2(counter2) {} - /*! Operate */ + /*! operates */ bool operator()(const Point_2& p1, const Point_2& p2) const { ++m_counter1; return m_object(p1, p2); } - /*! Operate */ + /*! operates */ bool operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2) const { ++m_counter2; return m_object(xc1, xc2); } }; - /*! A functor that compares compares the y-coordinates of two x-monotone - * curves immediately to the left of their intersection point. + /*! A functor that compares compares the \f$y\f$-coordinates of two + * \f$x\f$-monotone curves immediately to the left of their intersection + * point. */ class Compare_y_at_x_left_2 { private: typename Base::Compare_y_at_x_left_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Compare_y_at_x_left_2(const Base* base, size_t& counter) : - m_object(base->compare_y_at_x_left_2_object()), m_counter(counter) {} + /*! constructs */ + Compare_y_at_x_left_2(const Base& base, std::size_t& counter) : + m_object(base.compare_y_at_x_left_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, const Point_2& p) const { ++m_counter; return m_object(xc1, xc2, p); } }; - /*! A functor that compares compares the y-coordinates of two x-monotone - * curves immediately to the right of their intersection point. + /*! A functor that compares compares the \f$y\f$-coordinates of two + * \f$x\f$-monotone curves immediately to the right of their intersection + * point. */ class Compare_y_at_x_right_2 { private: typename Base::Compare_y_at_x_right_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Compare_y_at_x_right_2(const Base* base, size_t& counter) : - m_object(base->compare_y_at_x_right_2_object()), m_counter(counter) {} + /*! constructs */ + Compare_y_at_x_right_2(const Base& base, std::size_t& counter) : + m_object(base.compare_y_at_x_right_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, const Point_2& p) const @@ -392,23 +304,23 @@ public: }; /*! \class Make_x_monotone_2 - * A functor that subdivides a curve into x-monotone curves. + * A functor that subdivides a curve into \f$x\f$-monotone curves. */ class Make_x_monotone_2 { private: typename Base::Make_x_monotone_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Make_x_monotone_2(const Base* base, size_t& counter) : - m_object(base->make_x_monotone_2_object()), m_counter(counter) {} + /*! constructs */ + Make_x_monotone_2(const Base& base, std::size_t& counter) : + m_object(base.make_x_monotone_2_object()), m_counter(counter) {} - /*! Subdivide a given curve into x-monotone subcurves and insert them into - * a given output iterator. + /*! Subdivide a given curve into \f$x\f$-monotone subcurves and insert them + * into a given output iterator. * \param cv the curve. * \param oi the output iterator for the result. Its value type is a variant - * that wraps Point_2 or an X_monotone_curve_2 objects. + * that wraps `Point_2` or an `X_monotone_curve_2` objects. * \return The past-the-end iterator. */ template @@ -420,31 +332,31 @@ public: class Split_2 { private: typename Base::Split_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Split_2(const Base* base, size_t& counter) : - m_object(base->split_2_object()), m_counter(counter) {} + /*! constructs */ + Split_2(const Base& base, std::size_t& counter) : + m_object(base.split_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ void operator()(const X_monotone_curve_2& xc, const Point_2& p, X_monotone_curve_2& xc1, X_monotone_curve_2& xc2) const { ++m_counter; m_object(xc, p, xc1, xc2); } }; - /*! A functor that computes intersections between x-monotone curves. */ + /*! A functor that computes intersections between \f$x\f$-monotone curves. */ class Intersect_2 { private: typename Base::Intersect_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Intersect_2(const Base* base, size_t& counter) : - m_object(base->intersect_2_object()), m_counter(counter) {} + /*! constructs */ + Intersect_2(const Base& base, std::size_t& counter) : + m_object(base.intersect_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ template OutputIterator operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, @@ -452,110 +364,150 @@ public: { ++m_counter; return m_object(xc1, xc2, oi); } }; - /*! A functor that tests whether two x-monotone curves can be merged. */ + /*! A functor that tests whether two \f$x\f$-monotone curves can be merged. */ class Are_mergeable_2 { private: typename Base::Are_mergeable_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Are_mergeable_2(const Base* base, size_t& counter) : - m_object(base->are_mergeable_2_object()), m_counter(counter) {} + /*! constructs */ + Are_mergeable_2(const Base& base, std::size_t& counter) : + m_object(base.are_mergeable_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ bool operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2) const { ++m_counter; return m_object(xc1, xc2); } }; - /*! A functor that merges two x-monotone curves into one. */ + /*! A functor that merges two \f$x\f$-monotone curves into one. */ class Merge_2 { private: typename Base::Merge_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Merge_2(const Base* base, size_t& counter) : - m_object(base->merge_2_object()), m_counter(counter) {} + /*! constructs */ + Merge_2(const Base& base, std::size_t& counter) : + m_object(base.merge_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ void operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, X_monotone_curve_2& xc) const { ++m_counter; m_object(xc1, xc2, xc); } }; - /*! A fnuctor that constructs an opposite x-monotone curve. */ + /*! A fnuctor that constructs an opposite \f$x\f$-monotone curve. */ class Construct_opposite_2 { private: typename Base::Construct_opposite_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Construct_opposite_2(const Base* base, size_t& counter) : - m_object(base->construct_opposite_2_object()), m_counter(counter) {} + /*! constructs */ + Construct_opposite_2(const Base& base, std::size_t& counter) : + m_object(base.construct_opposite_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ X_monotone_curve_2 operator()(const X_monotone_curve_2& xc) { ++m_counter; return m_object(xc); } }; - /*! A functor that compares the two endpoints of an x-monotone curve + /*! A functor that compares the two endpoints of an \f$x\f$-monotone curve * lexigoraphically. */ class Compare_endpoints_xy_2 { private: typename Base::Compare_endpoints_xy_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Compare_endpoints_xy_2(const Base* base, size_t& counter) : - m_object(base->compare_endpoints_xy_2_object()), m_counter(counter) {} + /*! constructs */ + Compare_endpoints_xy_2(const Base& base, std::size_t& counter) : + m_object(base.compare_endpoints_xy_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const X_monotone_curve_2& xc) { ++m_counter; return m_object(xc); } }; - // left-right - - /*! A functor that determines whether an endpoint of an x-monotone curve lies - * on a boundary of the parameter space along the x axis. + /*! A functor that approximates coordinates, points, and \f$x\f$-monotone + * curves. */ - class Parameter_space_in_x_2 { + class Approximate_2 { private: - typename Base::Parameter_space_in_x_2 m_object; - size_t& m_counter1; - size_t& m_counter2; - size_t& m_counter3; + using Approximate_number_type = typename Base::Approximate_number_type; + using Approximate_point_2 = typename Base::Approximate_point_2; + + typename Base::Approximate_2 m_object; + std::size_t& m_counter1; + std::size_t& m_counter2; + std::size_t& m_counter3; public: - /*! Construct */ - Parameter_space_in_x_2(const Base* base, size_t& counter1, - size_t& counter2, size_t& counter3) : - m_object(base->parameter_space_in_x_2_object()), + /*! constructs */ + Approximate_2(const Base& base, std::size_t& counter1, + std::size_t& counter2, std::size_t& counter3) : + m_object(base.approximate_2_object()), m_counter1(counter1), m_counter2(counter2), m_counter3(counter3) {} - /*! Operate */ + /*! obtains an approximation of a point coordinate. + * \param p the exact point. + * \param i the coordinate index (either 0 or 1). + * \pre `i` is either 0 or 1. + * \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). + */ + Approximate_number_type operator()(const Point_2& p, std::size_t i) const + { ++m_counter1; return m_object(p, i); } + + /*! obtains an approximation of a point. + */ + Approximate_point_2 operator()(const Point_2& p) const + { ++m_counter2; return m_object(p); } + + /*! obtains an approximation of an \f$x\f$-monotone curve. + */ + template + OutputIterator operator()(const X_monotone_curve_2& xcv, double error, + OutputIterator oi, bool l2r = true) const + { ++m_counter3; return m_object(xcv, error, oi, l2r); } + }; + + // left-right + + /*! A functor that determines whether an endpoint of an \f$x\f$-monotone curve + * lies on a boundary of the parameter space along the \f$x\f$-axis. + */ + class Parameter_space_in_x_2 { + private: + typename Base::Parameter_space_in_x_2 m_object; + std::size_t& m_counter1; + std::size_t& m_counter2; + + public: + /*! constructs */ + Parameter_space_in_x_2(const Base& base, + std::size_t& counter1, std::size_t& counter2) : + m_object(base.parameter_space_in_x_2_object()), + m_counter1(counter1), + m_counter2(counter2) + {} + + /*! operates */ Arr_parameter_space operator()(const X_monotone_curve_2& xc, - Arr_curve_end ce) const + Arr_curve_end ce) const { ++m_counter1; return m_object(xc, ce); } - /*! Operate */ + /*! operates */ Arr_parameter_space operator()(const Point_2& p) const { ++m_counter2; return m_object(p); } - - /*! Operate */ - Arr_parameter_space operator()(const X_monotone_curve_2& xc) const - { ++m_counter3; return m_object(xc); } }; /*! A functor that determines whether a point or a curve lies on an @@ -564,61 +516,59 @@ public: class Is_on_x_identification_2 { private: typename Base::Is_on_x_identification_2 m_object; - size_t& m_counter1; - size_t& m_counter2; + std::size_t& m_counter1; + std::size_t& m_counter2; public: - /*! Construct */ - Is_on_x_identification_2(const Base* base, - size_t& counter1, size_t& counter2) : - m_object(base->is_on_x_identification_2_object()), + /*! constructs */ + Is_on_x_identification_2(const Base& base, + std::size_t& counter1, std::size_t& counter2) : + m_object(base.is_on_x_identification_2_object()), m_counter1(counter1), m_counter2(counter2) {} - /*! Operate */ + /*! operates */ bool operator()(const Point_2& p) const { ++m_counter1; return m_object(p); } - /*! Operate */ + /*! operates */ bool operator()(const X_monotone_curve_2& xc) const { ++m_counter2; return m_object(xc); } }; - /*! A functor that compares the y-coordinate of two given points + /*! A functor that compares the \f$y\f$-coordinate of two given points * that lie on vertical boundaries. */ class Compare_y_on_boundary_2 { private: typename Base::Compare_y_on_boundary_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Compare_y_on_boundary_2(const Base* base, size_t& counter) : - m_object(base->compare_y_on_boundary_2_object()), - m_counter(counter) - {} + /*! constructs */ + Compare_y_on_boundary_2(const Base& base, std::size_t& counter) : + m_object(base.compare_y_on_boundary_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { ++m_counter; return m_object(p1, p2); } }; - /*! A functor that compares the y-coordinates of curve ends near the + /*! A functor that compares the \f$y\f$-coordinates of curve ends near the * boundary of the parameter space. */ class Compare_y_near_boundary_2 { private: typename Base::Compare_y_near_boundary_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Compare_y_near_boundary_2(const Base* base, size_t& counter) : - m_object(base->compare_y_near_boundary_2_object()), m_counter(counter) {} + /*! constructs */ + Compare_y_near_boundary_2(const Base& base, std::size_t& counter) : + m_object(base.compare_y_near_boundary_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, Arr_curve_end ce) const @@ -627,99 +577,93 @@ public: // bottom-top - /*! A functor that determines whether an endpoint of an x-monotone arc lies - * on a boundary of the parameter space along the y axis. + /*! A functor that determines whether an endpoint of an \f$x\f$-monotone arc + * lies on a boundary of the parameter space along the \f$y\f$-axis. */ class Parameter_space_in_y_2 { private: typename Base::Parameter_space_in_y_2 m_object; - size_t& m_counter1; - size_t& m_counter2; - size_t& m_counter3; + std::size_t& m_counter1; + std::size_t& m_counter2; public: - /*! Construct */ - Parameter_space_in_y_2(const Base* base, size_t& counter1, - size_t& counter2, size_t& counter3) : - m_object(base->parameter_space_in_y_2_object()), - m_counter1(counter1), - m_counter2(counter2), - m_counter3(counter3) - {} - - /*! Operate */ - Arr_parameter_space operator()(const X_monotone_curve_2& xc, - Arr_curve_end ce) const - { ++m_counter1; return m_object(xc, ce); } - - /*! Operate */ - Arr_parameter_space operator()(const Point_2& p) const - { ++m_counter2; return m_object(p); } - - /*! Operate */ - Arr_parameter_space operator()(const X_monotone_curve_2& xc) const - { ++m_counter3; return m_object(xc); } - }; - - /*! A functor that determines whether a point or a curve lies on an - * identification in x. - */ - class Is_on_y_identification_2 { - private: - typename Base::Is_on_y_identification_2 m_object; - size_t& m_counter1; - size_t& m_counter2; - - public: - /*! Construct */ - Is_on_y_identification_2(const Base* base, - size_t& counter1, size_t& counter2) : - m_object(base->is_on_y_identification_2_object()), + /*! constructs */ + Parameter_space_in_y_2(const Base& base, + std::size_t& counter1, std::size_t& counter2) : + m_object(base.parameter_space_in_y_2_object()), m_counter1(counter1), m_counter2(counter2) {} - /*! Operate */ + /*! operates */ + Arr_parameter_space operator()(const X_monotone_curve_2& xc, + Arr_curve_end ce) const + { ++m_counter1; return m_object(xc, ce); } + + /*! operates */ + Arr_parameter_space operator()(const Point_2& p) const + { ++m_counter2; return m_object(p); } + }; + + /*! A functor that determines whether a point or a curve lies on an + * identification in \f$x\f$. + */ + class Is_on_y_identification_2 { + private: + typename Base::Is_on_y_identification_2 m_object; + std::size_t& m_counter1; + std::size_t& m_counter2; + + public: + /*! constructs */ + Is_on_y_identification_2(const Base& base, + std::size_t& counter1, std::size_t& counter2) : + m_object(base.is_on_y_identification_2_object()), + m_counter1(counter1), + m_counter2(counter2) + {} + + /*! operates */ bool operator()(const Point_2& p) const { ++m_counter1; return m_object(p); } - /*! Operate */ + /*! operates */ bool operator()(const X_monotone_curve_2& xc) const { ++m_counter2; return m_object(xc); } }; - /*! A functor that compares the x-coordinate of two given points + /*! A functor that compares the \f$x\f$-coordinate of two given points * that lie on horizontal boundaries. */ class Compare_x_on_boundary_2 { private: typename Base::Compare_x_on_boundary_2 m_object; - size_t& m_counter1; - size_t& m_counter2; - size_t& m_counter3; + std::size_t& m_counter1; + std::size_t& m_counter2; + std::size_t& m_counter3; public: - /*! Construct */ - Compare_x_on_boundary_2(const Base* base, size_t& counter1, - size_t& counter2, size_t& counter3 ) : - m_object(base->compare_x_on_boundary_2_object()), + /*! constructs */ + Compare_x_on_boundary_2(const Base& base, std::size_t& counter1, + std::size_t& counter2, std::size_t& counter3 ) : + m_object(base.compare_x_on_boundary_2_object()), m_counter1(counter1), m_counter2(counter2), m_counter3(counter3) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { ++m_counter1; return m_object(p1, p2); } - /*! Operate */ + /*! operates */ Comparison_result operator()(const Point_2& pt, const X_monotone_curve_2& xcv, Arr_curve_end ce) const { ++m_counter2; return m_object(pt, xcv, ce); } - /*! Operate */ + /*! operates */ Comparison_result operator()(const X_monotone_curve_2& xcv1, Arr_curve_end ce1, const X_monotone_curve_2& xcv2, @@ -727,22 +671,22 @@ public: { ++m_counter3; return m_object(xcv1, ce1, xcv2, ce2); } }; - /*! A functor that compares the x-coordinates of curve ends near the + /*! A functor that compares the \f$x\f$-coordinates of curve ends near the * boundary of the parameter space. */ class Compare_x_near_boundary_2 { private: typename Base::Compare_x_near_boundary_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: - /*! Construct */ - Compare_x_near_boundary_2(const Base* base, size_t& counter) : - m_object(base->compare_x_near_boundary_2_object()), + /*! constructs */ + Compare_x_near_boundary_2(const Base& base, std::size_t& counter) : + m_object(base.compare_x_near_boundary_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, Arr_curve_end ce) const @@ -751,233 +695,228 @@ public: //@} - - /// \name Obtain the appropriate functor //@{ Compare_x_2 compare_x_2_object() const - { return Compare_x_2(this, m_counters[COMPARE_X_OP]); } + { return Compare_x_2(*this, m_counters[COMPARE_X_2_OP]); } Compare_xy_2 compare_xy_2_object() const - { return Compare_xy_2(this, m_counters[COMPARE_XY_OP]); } + { return Compare_xy_2(*this, m_counters[COMPARE_XY_2_OP]); } Construct_min_vertex_2 construct_min_vertex_2_object() const - { return Construct_min_vertex_2(this, m_counters[CONSTRUCT_MIN_VERTEX_OP]); } + { return Construct_min_vertex_2(*this, m_counters[CONSTRUCT_MIN_VERTEX_2_OP]); } Construct_max_vertex_2 construct_max_vertex_2_object() const - { return Construct_max_vertex_2(this, m_counters[CONSTRUCT_MAX_VERTEX_OP]); } + { return Construct_max_vertex_2(*this, m_counters[CONSTRUCT_MAX_VERTEX_2_OP]); } Is_vertical_2 is_vertical_2_object() const - { return Is_vertical_2(this, m_counters[IS_VERTICAL_OP]); } + { return Is_vertical_2(*this, m_counters[IS_VERTICAL_2_OP]); } Compare_y_at_x_2 compare_y_at_x_2_object() const - { return Compare_y_at_x_2(this, m_counters[COMPARE_Y_AT_X_OP]); } + { return Compare_y_at_x_2(*this, m_counters[COMPARE_Y_AT_X_2_OP]); } - Equal_2 equal_2_object() const - { - return Equal_2(this, m_counters[EQUAL_POINTS_OP], - m_counters[EQUAL_CURVES_OP]); + Equal_2 equal_2_object() const { + return Equal_2(*this, m_counters[EQUAL_2_POINTS_OP], + m_counters[EQUAL_2_CURVES_OP]); } Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const - { return Compare_y_at_x_left_2(this, m_counters[COMPARE_Y_AT_X_LEFT_OP]); } + { return Compare_y_at_x_left_2(*this, m_counters[COMPARE_Y_AT_X_LEFT_2_OP]); } Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const - { return Compare_y_at_x_right_2(this, m_counters[COMPARE_Y_AT_X_RIGHT_OP]); } + { return Compare_y_at_x_right_2(*this, m_counters[COMPARE_Y_AT_X_RIGHT_2_OP]); } Make_x_monotone_2 make_x_monotone_2_object() const - { return Make_x_monotone_2(this, m_counters[MAKE_X_MONOTONE_OP]); } + { return Make_x_monotone_2(*this, m_counters[MAKE_X_MONOTONE_2_OP]); } Split_2 split_2_object() const - { return Split_2(this, m_counters[SPLIT_OP]); } + { return Split_2(*this, m_counters[SPLIT_2_OP]); } Intersect_2 intersect_2_object() const - { return Intersect_2(this, m_counters[INTERSECT_OP]); } + { return Intersect_2(*this, m_counters[INTERSECT_2_OP]); } Are_mergeable_2 are_mergeable_2_object() const - { return Are_mergeable_2(this, m_counters[ARE_MERGEABLE_OP]); } + { return Are_mergeable_2(*this, m_counters[ARE_MERGEABLE_2_OP]); } Merge_2 merge_2_object() const - { return Merge_2(this, m_counters[MERGE_OP]); } + { return Merge_2(*this, m_counters[MERGE_2_OP]); } Construct_opposite_2 construct_opposite_2_object() const - { return Construct_opposite_2(this, m_counters[CONSTRUCT_OPPOSITE_OP]); } + { return Construct_opposite_2(*this, m_counters[CONSTRUCT_2_OPPOSITE_2_OP]); } Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const - { return Compare_endpoints_xy_2(this, m_counters[COMPARE_ENDPOINTS_XY_OP]); } + { return Compare_endpoints_xy_2(*this, m_counters[COMPARE_ENDPOINTS_XY_2_OP]); } + + Approximate_2 approximate_2_object() const { + return Approximate_2(*this, + m_counters[APPROXIMATE_2_COORD_OP], + m_counters[APPROXIMATE_2_POINT_OP], + m_counters[APPROXIMATE_2_CURVE_OP]); + } // left-right - Parameter_space_in_x_2 parameter_space_in_x_2_object() const - { return Parameter_space_in_x_2( - this, - m_counters[PARAMETER_SPACE_IN_X_CURVE_END_OP], - m_counters[PARAMETER_SPACE_IN_X_POINT_OP], - m_counters[PARAMETER_SPACE_IN_X_CURVE_OP] - ); + Parameter_space_in_x_2 parameter_space_in_x_2_object() const { + return Parameter_space_in_x_2(*this, + m_counters[PARAMETER_SPACE_IN_X_2_CURVE_END_OP], + m_counters[PARAMETER_SPACE_IN_X_2_POINT_OP]); } - Is_on_x_identification_2 is_on_x_identification_2_object() const - { - return Is_on_x_identification_2(this, - m_counters[IS_ON_X_IDENTIFICATION_POINT_OP], - m_counters[IS_ON_X_IDENTIFICATION_CURVE_OP]); + Is_on_x_identification_2 is_on_x_identification_2_object() const { + return Is_on_x_identification_2(*this, + m_counters[IS_ON_X_IDENTIFICATION_POINT_2_OP], + m_counters[IS_ON_X_IDENTIFICATION_CURVE_2_OP]); } - Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const - { return Compare_y_on_boundary_2(this, m_counters[COMPARE_Y_ON_BOUNDARY_OP]); } + Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { + return Compare_y_on_boundary_2(*this, m_counters[COMPARE_Y_ON_BOUNDARY_2_OP]); + } - Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const - { - return Compare_y_near_boundary_2(this, - m_counters[COMPARE_Y_NEAR_BOUNDARY_OP]); + Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { + return Compare_y_near_boundary_2(*this, + m_counters[COMPARE_Y_NEAR_BOUNDARY_2_OP]); } // bottom-top - Parameter_space_in_y_2 parameter_space_in_y_2_object() const - { return Parameter_space_in_y_2( - this, - m_counters[PARAMETER_SPACE_IN_Y_CURVE_END_OP], - m_counters[PARAMETER_SPACE_IN_Y_POINT_OP], - m_counters[PARAMETER_SPACE_IN_Y_CURVE_OP] - ); + Parameter_space_in_y_2 parameter_space_in_y_2_object() const { + return Parameter_space_in_y_2(*this, + m_counters[PARAMETER_SPACE_IN_Y_2_CURVE_END_OP], + m_counters[PARAMETER_SPACE_IN_Y_2_POINT_OP]); } - Is_on_y_identification_2 is_on_y_identification_2_object() const - { return Is_on_y_identification_2( - this, - m_counters[IS_ON_Y_IDENTIFICATION_POINT_OP], - m_counters[IS_ON_Y_IDENTIFICATION_CURVE_OP] - ); + Is_on_y_identification_2 is_on_y_identification_2_object() const { + return Is_on_y_identification_2(*this, + m_counters[IS_ON_Y_IDENTIFICATION_2_POINT_OP], + m_counters[IS_ON_Y_IDENTIFICATION_2_CURVE_OP]); } - Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const - { + Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return - Compare_x_on_boundary_2(this, - m_counters[COMPARE_X_ON_BOUNDARY_POINTS_OP], - m_counters[COMPARE_X_ON_BOUNDARY_POINT_CURVE_END_OP], - m_counters[COMPARE_X_ON_BOUNDARY_CURVE_ENDS_OP]); + Compare_x_on_boundary_2(*this, + m_counters[COMPARE_X_ON_BOUNDARY_2_POINTS_OP], + m_counters[COMPARE_X_ON_BOUNDARY_2_POINT_CURVE_END_OP], + m_counters[COMPARE_X_ON_BOUNDARY_2_CURVE_ENDS_OP]); } - Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const - { - return Compare_x_near_boundary_2(this, - m_counters[COMPARE_X_NEAR_BOUNDARY_OP]); + Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { + return Compare_x_near_boundary_2(*this, + m_counters[COMPARE_X_NEAR_BOUNDARY_2_OP]); } //@} - /*! Increment the construction counter - * \param doit indicates whethet to actually inceremnt the counter or not - * \return the counter at the end of the operation + /*! increments the construction counter. + * \param doit indicates whethet to actually inceremnt the counter or not. + * \return the counter at the end of the operation. */ - static size_t increment(bool doit = true) - { + static std::size_t increment(bool doit = true) { #ifdef CGAL_NO_ATOMIC - static size_t counter; + static std::size_t counter; #else - static std::atomic counter; + static std::atomic counter; #endif if (doit) ++counter; return counter; } - /*! Clean all operation counters */ - void clear_counters() - { m_counters = {}; } + /*! cleans all operation counters */ + void clear_counters() { m_counters = {}; } private: - /*! The operation counters */ - mutable std::array m_counters; + //! The operation counters + mutable std::array m_counters; + const std::array m_names = { + "COMPARE_X_2_OP", + "COMPARE_XY_2_OP", + "CONSTRUCT_MIN_VERTEX_2_OP", + "CONSTRUCT_MAX_VERTEX_2_OP", + "IS_VERTICAL_2_OP", + "COMPARE_Y_AT_X_2_OP", + "EQUAL_2_POINTS_OP", + "EQUAL_2_CURVES_OP", + "COMPARE_Y_AT_X_LEFT_2_OP", + "COMPARE_Y_AT_X_RIGHT_2_OP", + "MAKE_X_MONOTONE_2_OP", + "SPLIT_2_OP", + "INTERSECT_2_OP", + "ARE_MERGEABLE_2_OP", + "MERGE_2_OP", + "CONSTRUCT_2_OPPOSITE_2_OP", + "COMPARE_ENDPOINTS_XY_2_OP", + "APPROXIMATE_2_COORD_OP", + "APPROXIMATE_2_POINT_OP", + "APPROXIMATE_2_CURVE_OP", + + "PARAMETER_SPACE_IN_X_2_CURVE_END_OP", + "PARAMETER_SPACE_IN_X_2_POINT_OP", + "IS_ON_X_IDENTIFICATION_POINT_2_OP", + "IS_ON_X_IDENTIFICATION_CURVE_2_OP", + "COMPARE_Y_ON_BOUNDARY_2_OP", + "COMPARE_Y_NEAR_BOUNDARY_2_OP", + + "PARAMETER_SPACE_IN_Y_2_CURVE_END_OP", + "PARAMETER_SPACE_IN_Y_2_POINT_OP", + "IS_ON_Y_IDENTIFICATION_2_POINT_OP", + "IS_ON_Y_IDENTIFICATION_2_CURVE_OP", + "COMPARE_X_ON_BOUNDARY_2_POINTS_OP", + "COMPARE_X_ON_BOUNDARY_2_POINT_CURVE_END_OP", + "COMPARE_X_ON_BOUNDARY_2_CURVE_ENDS_OP", + "COMPARE_X_NEAR_BOUNDARY_2_OP" + }; + const std::array m_exist = { + has_compare_x_2::value, + has_compare_xy_2::value, + has_construct_min_vertex_2::value, + has_construct_max_vertex_2::value, + has_is_vertical_2::value, + has_compare_y_at_x_2::value, + has_equal_2::value, // points + has_equal_2::value, // curves + has_compare_y_at_x_left_2::value, + has_compare_y_at_x_right_2::value, + has_make_x_monotone_2::value, + has_split_2::value, + has_intersect_2::value, + has_are_mergeable_2::value, + has_merge_2::value, + has_construct_opposite_2::value, + has_compare_endpoints_xy_2::value, + has_approximate_2::value, // coordinate + has_approximate_2::value, // point + has_approximate_2::value, // curve + has_parameter_space_in_x_2::value, // curve end + has_parameter_space_in_x_2::value, // point + has_is_on_x_identification_2::value, // point + has_is_on_x_identification_2::value, // curve + has_compare_y_on_boundary_2::value, + has_compare_y_near_boundary_2::value, + has_parameter_space_in_y_2::value, // curve end + has_parameter_space_in_y_2::value, // point + has_is_on_y_identification_2::value, // point + has_is_on_y_identification_2::value, // curve + has_compare_x_on_boundary_2::value, // points + has_compare_x_on_boundary_2::value, // point, curve end + has_compare_x_on_boundary_2::value, // curve ends + has_compare_x_near_boundary_2::value + }; }; -template -inline -Out_stream& operator<<(Out_stream& os, - const Arr_counting_traits_2& traits) -{ - typedef Arr_counting_traits_2 Traits; - size_t sum = 0; - size_t i; - for (i = 0; i < Traits::NUMBER_OF_OPERATIONS; ++i) +template +inline OutStream& operator<<(OutStream& os, + const Arr_counting_traits_2& traits) { + using Traits = Arr_counting_traits_2; + std::size_t sum = 0; + for (auto i = 0; i < Traits::NUMBER_OF_OPERATIONS; ++i) { sum += traits.count(static_cast(i)); - os << "# of COMPARE_X operation = " - << traits.count_compare_x() << std::endl - << "# of COMPARE_XY operation = " - << traits.count_compare_xy() << std::endl - << "# of CONSTRUCT_MIN_VERTEX operation = " - << traits.count_construct_min_vertex() << std::endl - << "# of CONSTRUCT_MAX_VERTEX operation = " - << traits.count_construct_max_vertex() << std::endl - << "# of IS_VERTICAL operation = " - << traits.count_is_vertical() << std::endl - << "# of COMPARE_Y_AT_X operation = " - << traits.count_compare_y_at_x() << std::endl - << "# of EQUAL_POINTS operation = " - << traits.count_equal_points() << std::endl - << "# of EQUAL_CURVES operation = " - << traits.count_equal_curves() << std::endl - << "# of COMPARE_Y_AT_X_LEFT operation = " - << traits.count_compare_y_at_x_left() << std::endl - << "# of COMPARE_Y_AT_X_RIGHT operation = " - << traits.count_compare_y_at_x_right() << std::endl - << "# of MAKE_X_MONOTONE operation = " - << traits.count_make_x_monotone() << std::endl - << "# of SPLIT operation = " - << traits.count_split() << std::endl - << "# of INTERSECT operation = " - << traits.count_intersect() << std::endl - << "# of ARE_MERGEABLE operation = " - << traits.count_are_mergeable() << std::endl - << "# of MERGE operation = " - << traits.count_merge() << std::endl - << "# of CONSTRUCT_OPPOSITE operation = " - << traits.count_construct_opposite() << std::endl - << "# of COMPARE_ENDPOINTS_XY operation = " - << traits.count_compare_endpoints_xy() << std::endl - // left-right - << "# of PARAMETER_SPACE_IN_X curve-end operation = " - << traits.count_parameter_space_in_x_curve_end() << std::endl - << "# of PARAMETER_SPACE_IN_X point operation = " - << traits.count_parameter_space_in_x_point() << std::endl - << "# of PARAMETER_SPACE_IN_X curve operation = " - << traits.count_parameter_space_in_x_curve() << std::endl - << "# of IS_ON_X_IDENTIFICATION point operation = " - << traits.count_is_on_x_identification_point() << std::endl - << "# of IS_ON_X_IDENTIFICATION curve operation = " - << traits.count_is_on_x_identification_curve() << std::endl - << "# of COMPARE_Y_ON_BOUNDARY operation = " - << traits.count_compare_y_on_boundary() << std::endl - << "# of COMPARE_Y_NEAR_BOUNDARY operation = " - << traits.count_compare_y_near_boundary() << std::endl - // bottom-top - << "# of PARAMETER_SPACE_IN_Y curve-end operation = " - << traits.count_parameter_space_in_y_curve_end() << std::endl - << "# of PARAMETER_SPACE_IN_Y point operation = " - << traits.count_parameter_space_in_y_point() << std::endl - << "# of PARAMETER_SPACE_IN_Y curve operation = " - << traits.count_parameter_space_in_y_curve() << std::endl - << "# of IS_ON_Y_IDENTIFICATION point operation = " - << traits.count_is_on_y_identification_point() << std::endl - << "# of IS_ON_Y_IDENTIFICATION curve operation = " - << traits.count_is_on_y_identification_curve() << std::endl - << "# of COMPARE_X_ON_BOUNDARY points operation = " - << traits.count_compare_x_on_boundary_points() << std::endl - << "# of COMPARE_X_ON_BOUNDARY point/curve-end operation = " - << traits.count_compare_x_on_boundary_point_curve_end() << std::endl - << "# of COMPARE_X_ON_BOUNDARY curve-ends operation = " - << traits.count_compare_x_on_boundary_curve_ends() << std::endl - << "# of COMPARE_X_NEAR_BOUNDARY operation = " - << traits.count_compare_x_near_boundary() << std::endl - - << "total # = " << sum << std::endl + traits.print(os, static_cast(i)); + } + os << "total # = " << sum << std::endl << "# of traits constructed = " << Traits::increment(false) << std::endl; return os; } -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h index 1a62b9227c5..6fd985e1e94 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h @@ -92,10 +92,10 @@ public: /// \name Construction. //@{ - /*! Construct default. */ + /*! constructs default. */ Arr_curve_data_traits_2() {} - /*! Construct from a base-traits class. */ + /*! constructs from a base-traits class. */ Arr_curve_data_traits_2(const Base_traits_2& traits) : Base_traits_2(traits) {} //@} @@ -113,10 +113,10 @@ public: const Base_traits_2& m_base; public: - /*! Constructor. */ + /*! constructs. */ Make_x_monotone_2(const Base_traits_2& base) : m_base(base) {} - /*! Subdivide a given curve into x-monotone subcurves and insert them into + /*! subdivides a given curve into x-monotone subcurves and insert them into * a given output iterator. * \param cv the curve. * \param oi the output iterator for the result. Its value type is a variant @@ -152,7 +152,7 @@ public: } }; - /*! Obtain a Make_x_monotone_2 functor object. */ + /*! obtains a Make_x_monotone_2 functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(*this); } @@ -161,10 +161,10 @@ public: const Base_traits_2& m_base; public: - /*! Constructor. */ + /*! constructs. */ Split_2(const Base_traits_2& base) : m_base(base) {} - /*! Split a given x-monotone curve at a given point into two sub-curves. + /*! splits a given x-monotone curve at a given point into two sub-curves. * \param cv[in] The curve to split * \param p[in] The split point. * \param c1[out] The left resulting subcurve (p is its right endpoint). @@ -183,7 +183,7 @@ public: } }; - /*! Obtain a Split_2 functor object. */ + /*! obtains a Split_2 functor object. */ Split_2 split_2_object() const { return Split_2(*this); } class Intersect_2 { @@ -191,10 +191,10 @@ public: const Base_traits_2& m_base; public: - /*! Constructor. */ + /*! constructs. */ Intersect_2(const Base_traits_2& base) : m_base(base) {} - /*! Find the intersections of the two given curves and insert them to the + /*! finds the intersections of the two given curves and insert them to the * given output iterator. As two segments may itersect only once, only a * single will be contained in the iterator. * \param cv1 The first curve. @@ -240,7 +240,7 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! obtains an `Intersect_2` functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } class Are_mergeable_2 { @@ -288,10 +288,10 @@ public: } public: - /*! Constructor. */ + /*! constructs. */ Are_mergeable_2(const Base_traits_2& base) : m_base(base) {} - /*! Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given x-monotone curves. * \param cv1[in] The first curve. * \param cv2[in] The second curve. * \return (true) if the two curves are mergeable; (false) otherwise. @@ -301,7 +301,7 @@ public: { return are_mergeable(cv1, cv2, m_base, 0); } }; - /*! Obtain an Are_mergeable_2 functor object. */ + /*! obtains an Are_mergeable_2 functor object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(*this); } @@ -312,7 +312,7 @@ public: private: const Base_traits_2& m_base; - /*! Generate a helper class template to find out whether the base geometry + /*! generates a helper class template to find out whether the base geometry * traits has a nested type named Merge_2. */ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_merge_2, Are_mergeable_2, false) @@ -348,10 +348,10 @@ public: { CGAL_error_msg("Merging curves is not supported."); } public: - /*! Constructor. */ + /*! constructs. */ Merge_2(const Base_traits_2& base) : m_base(base) {} - /*! Merge two given x-monotone curves into a single curve (segment). + /*! merges two given x-monotone curves into a single curve (segment). * \param[in] cv1 The first curve. * \param[in] cv2 The second curve. * \param[out] c The merged curve. @@ -363,7 +363,7 @@ public: { merge(cv1, cv2, c); } }; - /*! Obtain a Merge_2 functor object. */ + /*! obtains a `Merge_2` functor object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } //@} @@ -373,10 +373,10 @@ public: const Base_traits_2& m_base; public: - /*! Constructor. */ + /*! constructs. */ Construct_x_monotone_curve_2(const Base_traits_2& base) : m_base(base) {} - /*! Obtain an x-monotone curve connecting the two given endpoints. + /*! obtains an x-monotone curve connecting the two given endpoints. * \param p The first point. * \param q The second point. * \pre p and q must not be the same. @@ -390,7 +390,7 @@ public: } }; - /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + /*! obtains a Construct_x_monotone_curve_2 functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } @@ -398,7 +398,7 @@ public: private: const Base_traits_2& m_base; - /*! Generate a helper class template to find out whether the base geometry + /*! generates a helper class template to find out whether the base geometry * traits has a nested type named Construct_opposite_2. */ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_construct_opposite_2, @@ -431,10 +431,10 @@ public: } public: - /*! Constructor. */ + /*! constructs. */ Construct_opposite_2(const Base_traits_2& base) : m_base(base) {} - /*! Construct an opposite x-monotone (with swapped source and target). + /*! constructs an opposite x-monotone (with swapped source and target). * \param cv The curve. * \return The opposite curve. */ @@ -442,7 +442,7 @@ public: { return construct_opposite(cv); } }; - /*! Obtain a Construct_opposite_2 functor object. */ + /*! obtains a Construct_opposite_2 functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(*this); } //@} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h index b0627f38eae..f38156da2af 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h @@ -82,13 +82,13 @@ protected: char pss[2]; // The x and y parameter spaces (condensed in two bytes). public: - /*! Default constructor. */ + /*! constructs default. */ Arr_vertex_base() : p_inc(nullptr), p_pt(nullptr) { pss[0] = pss[1] = static_cast(CGAL::ARR_INTERIOR); } - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_vertex_base() {} // Access/modification for pointer squatting @@ -96,35 +96,35 @@ public: void set_inc(void * inc) const { const_cast(*this).p_inc = inc; } - /*! Check if the point pointer is nullptr. */ + /*! checks if the point pointer is nullptr. */ bool has_null_point() const { return (p_pt == nullptr); } - /*! Obtain the point (const version). */ + /*! obtains the point (const version). */ const Point& point() const { CGAL_assertion(p_pt != nullptr); return (*p_pt); } - /*! Obtain the point (non-const version). */ + /*! obtains the point (non-const version). */ Point& point() { CGAL_assertion(p_pt != nullptr); return (*p_pt); } - /*! Set the point (may be a nullptr point). */ + /*! sets the point (may be a nullptr point). */ void set_point(Point* p) { p_pt = p; } - /*! Obtain the boundary type in x. */ + /*! obtains the boundary type in x. */ Arr_parameter_space parameter_space_in_x() const { return (Arr_parameter_space(pss[0])); } - /*! Obtain the boundary type in y. */ + /*! obtains the boundary type in y. */ Arr_parameter_space parameter_space_in_y() const { return (Arr_parameter_space(pss[1])); } - /*! Set the boundary conditions of the vertex. */ + /*! sets the boundary conditions of the vertex. */ void set_boundary(Arr_parameter_space ps_x, Arr_parameter_space ps_y) { pss[0] = static_cast(ps_x); @@ -132,7 +132,7 @@ public: return; } - /*! Assign from another vertex. */ + /*! assigns from another vertex. */ virtual void assign(const Arr_vertex_base& v) { p_pt = v.p_pt; @@ -170,7 +170,7 @@ protected: X_monotone_curve* p_cv; // The associated x-monotone curve. public: - /*! Default constructor */ + /*! constructs default */ Arr_halfedge_base() : p_opp(nullptr), p_prev(nullptr), @@ -180,27 +180,27 @@ public: p_cv(nullptr) {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_halfedge_base() {} - /*! Check if the curve pointer is nullptr. */ + /*! checks if the curve pointer is nullptr. */ bool has_null_curve() const { return (p_cv == nullptr); } - /*! Obtain the x-monotone curve (const version). */ + /*! obtains the x-monotone curve (const version). */ const X_monotone_curve& curve() const { CGAL_precondition(p_cv != nullptr); return (*p_cv); } - /*! Obtain the x-monotone curve (non-const version). */ + /*! obtains the x-monotone curve (non-const version). */ X_monotone_curve& curve() { CGAL_precondition(p_cv != nullptr); return (*p_cv); } - /*! Set the x-monotone curve. */ + /*! sets the x-monotone curve. */ void set_curve(X_monotone_curve* c) { p_cv = c; @@ -212,13 +212,12 @@ public: opp->p_cv = c; } - /*! Assign from another halfedge. */ + /*! assigns from another halfedge. */ virtual void assign(const Arr_halfedge_base& he) { p_cv = he.p_cv; } }; -/*! - * Base face class. +/*! Base face class. */ class Arr_face_base { @@ -248,27 +247,27 @@ protected: Isolated_vertices_container iso_verts; // The isolated vertices inside // the face. public: - /*! Default constructor. */ + /*! constructs default. */ Arr_face_base() : flags(0) {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_face_base() {} - /*! Check if the face is unbounded. */ + /*! checks if the face is unbounded. */ bool is_unbounded() const { return ((flags & IS_UNBOUNDED) != 0); } - /*! Set the face as bounded or unbounded. */ + /*! sets the face as bounded or unbounded. */ void set_unbounded(bool unbounded) { flags = (unbounded) ? (flags | IS_UNBOUNDED) : (flags & ~IS_UNBOUNDED); } - /*! Check if the face is fictitious. */ + /*! checks if the face is fictitious. */ bool is_fictitious() const { return ((flags & IS_FICTITIOUS) != 0); } - /*! Set the face as fictitious or valid. */ + /*! sets the face as fictitious or valid. */ void set_fictitious(bool fictitious) { flags = (fictitious) ? (flags | IS_FICTITIOUS) : (flags & ~IS_FICTITIOUS); } - /*! Assign from another face. */ + /*! assigns from another face. */ virtual void assign(const Arr_face_base& f) { flags = f.flags; } }; @@ -293,38 +292,38 @@ public: typedef Arr_halfedge Halfedge; typedef Arr_isolated_vertex Isolated_vertex; - /*! Default constructor. */ + /*! constructs default. */ Arr_vertex() {} - /*! Check if the vertex is isolated. */ + /*! checks if the vertex is isolated. */ bool is_isolated() const { // Note that we use the LSB of the p_inc pointer as a Boolean flag. return (_is_lsb_set(this->p_inc)); } - /*! Obtain an incident halfedge (const version). */ + /*! obtains an incident halfedge (const version). */ const Halfedge* halfedge() const { CGAL_precondition(! is_isolated()); return (reinterpret_cast(this->p_inc)); } - /*! Obtain an incident halfedge (non-const version). */ + /*! obtains an incident halfedge (non-const version). */ Halfedge* halfedge() { CGAL_precondition(! is_isolated()); return (reinterpret_cast(this->p_inc)); } - /*! Set an incident halfedge (for non-isolated vertices). */ + /*! sets an incident halfedge (for non-isolated vertices). */ void set_halfedge(Halfedge* he) { // Set the halfedge pointer and reset the LSB. this->p_inc = he; } - /*! Obtain the isolated vertex information (const version). */ + /*! obtains the isolated vertex information (const version). */ const Isolated_vertex* isolated_vertex() const { CGAL_precondition(is_isolated()); @@ -332,14 +331,14 @@ public: (this->p_inc))); } - /*! Obtain the isolated vertex information (non-const version). */ + /*! obtains the isolated vertex information (non-const version). */ Isolated_vertex* isolated_vertex() { CGAL_precondition(is_isolated()); return (reinterpret_cast(_clean_pointer(this->p_inc))); } - /*! Set the isolated vertex information. */ + /*! sets the isolated vertex information. */ void set_isolated_vertex(Isolated_vertex* iv) { // Set the isolated vertex-information pointer and set its LSB. @@ -362,20 +361,20 @@ public: typedef Arr_outer_ccb Outer_ccb; typedef Arr_inner_ccb Inner_ccb; - /*! Default constructor. */ + /*! constructs default. */ Arr_halfedge() {} - /*! Obtain the opposite halfedge (const version). */ + /*! obtains the opposite halfedge (const version). */ const Halfedge* opposite () const { return (reinterpret_cast(this->p_opp)); } - /*! Obtain the opposite halfedge (non-const version). */ + /*! obtains the opposite halfedge (non-const version). */ Halfedge* opposite() { return (reinterpret_cast(this->p_opp)); } /*! Sets the opposite halfedge. */ void set_opposite(Halfedge* he) { this->p_opp = he; } - /*! Obtain the direction of the halfedge. */ + /*! obtains the direction of the halfedge. */ Arr_halfedge_direction direction() const { // Note that we use the LSB of the p_v pointer as a Boolean flag. @@ -383,7 +382,7 @@ public: else return (ARR_RIGHT_TO_LEFT); } - /*! Set the direction of the edge (and of its opposite halfedge). */ + /*! sets the direction of the edge (and of its opposite halfedge). */ void set_direction(Arr_halfedge_direction dir) { Halfedge* opp = reinterpret_cast(this->p_opp); @@ -398,43 +397,43 @@ public: } } - /*! Obtain the previous halfedge along the chain (const version). */ + /*! obtains the previous halfedge along the chain (const version). */ const Halfedge* prev() const { return (reinterpret_cast(this->p_prev)); } - /*! Obtain the previous halfedge along the chain (const version). */ + /*! obtains the previous halfedge along the chain (const version). */ Halfedge* prev() { return (reinterpret_cast(this->p_prev)); } - /*! Set the previous halfedge along the chain. */ + /*! sets the previous halfedge along the chain. */ void set_prev(Halfedge* he) { this->p_prev = he; he->p_next = this; } - /*! Obtain the next halfedge along the chain (const version). */ + /*! obtains the next halfedge along the chain (const version). */ const Halfedge* next() const { return (reinterpret_cast(this->p_next)); } - /*! Obtain the next halfedge along the chain (const version). */ + /*! obtains the next halfedge along the chain (const version). */ Halfedge* next() { return (reinterpret_cast(this->p_next)); } - /*! Set the next halfedge along the chain. */ + /*! sets the next halfedge along the chain. */ void set_next(Halfedge* he) { this->p_next = he; he->p_prev = this; } - /*! Obtain the target vertex (const version). */ + /*! obtains the target vertex (const version). */ const Vertex* vertex() const { return (reinterpret_cast(_clean_pointer(this->p_v))); } - /*! Obtain the target vertex (non-const version). */ + /*! obtains the target vertex (non-const version). */ Vertex* vertex() { return (reinterpret_cast(_clean_pointer(this->p_v))); } - /*! Set the target vertex. */ + /*! sets the target vertex. */ void set_vertex(Vertex* v) { // Set the vertex pointer, preserving the content of the LSB. @@ -442,10 +441,10 @@ public: else this->p_v = v; } - /*! Check whether the halfedge lies on the boundary of an outer CCB. */ + /*! checks whether the halfedge lies on the boundary of an outer CCB. */ bool is_on_outer_ccb() const { return (!_is_lsb_set(this->p_comp)); } - /*! Obtain an incident outer CCB (const version). + /*! obtains an incident outer CCB (const version). * \pre The edge does not lie on an inner CCB. */ const Outer_ccb* outer_ccb() const @@ -454,7 +453,7 @@ public: return (reinterpret_cast(this->p_comp)); } - /*! Obtain an incident outer CCB (non-const version). + /*! obtains an incident outer CCB (non-const version). * \pre The edge does not lie on an inner CCB. */ Outer_ccb* outer_ccb() @@ -463,17 +462,17 @@ public: return (reinterpret_cast(this->p_comp)); } - /*! Set the incident outer CCB. */ + /*! sets the incident outer CCB. */ void set_outer_ccb(Outer_ccb *oc) { // Set the component pointer and reset its LSB. this->p_comp = oc; } - /*! Check whether the halfedge lies on the boundary of an inner CCB. */ + /*! checks whether the halfedge lies on the boundary of an inner CCB. */ bool is_on_inner_ccb() const { return (_is_lsb_set(this->p_comp)); } - /*! Obtain an incident inner CCB (const version). + /*! obtains an incident inner CCB (const version). * \pre The edge lies on an inner CCB. */ const Inner_ccb* inner_ccb() const @@ -493,7 +492,7 @@ public: return valid; } - /*! Obtain an incident inner CCB (non-const version). + /*! obtains an incident inner CCB (non-const version). * \pre The edge lies on an inner CCB. */ Inner_ccb* inner_ccb() @@ -519,7 +518,7 @@ public: return reinterpret_cast(_clean_pointer(this->p_comp)); } - /*! Set the incident inner CCB. */ + /*! sets the incident inner CCB. */ void set_inner_ccb(const Inner_ccb *ic) { // Set the component pointer and set its LSB. @@ -553,7 +552,7 @@ private: public: - /*! Default constructor. */ + /*! constructs default. */ Arr_face() {} @@ -565,20 +564,20 @@ public: _Const_ccb_to_halfedge_cast> Outer_ccb_const_iterator; - /*! Obtain the number of outer CCBs the face has. */ + /*! obtains the number of outer CCBs the face has. */ size_t number_of_outer_ccbs() const { return (this->outer_ccbs.size()); } - /*! Obtain an iterator for the first outer CCB of the face. */ + /*! obtains an iterator for the first outer CCB of the face. */ Outer_ccb_iterator outer_ccbs_begin() { return (this->outer_ccbs.begin()); } - /*! Obtain a past-the-end iterator for the outer CCBs inside the face. */ + /*! obtains a past-the-end iterator for the outer CCBs inside the face. */ Outer_ccb_iterator outer_ccbs_end() { return (this->outer_ccbs.end()); } - /*! Obtain an const iterator for the first outer CCB inside the face. */ + /*! obtains an const iterator for the first outer CCB inside the face. */ Outer_ccb_const_iterator outer_ccbs_begin() const { return (this->outer_ccbs.begin()); } - /*! Obtain a const past-the-end iterator for the outer CCBs inside the face. */ + /*! obtains a const past-the-end iterator for the outer CCBs inside the face. */ Outer_ccb_const_iterator outer_ccbs_end() const { return (this->outer_ccbs.end()); } @@ -601,20 +600,20 @@ public: typedef Inner_ccb_iterator Hole_iterator; typedef Inner_ccb_const_iterator Hole_const_iterator; - /*! Obtain the number of inner CCBs the face has. */ + /*! obtains the number of inner CCBs the face has. */ size_t number_of_inner_ccbs() const { return (this->inner_ccbs.size()); } - /*! Obtain an iterator for the first inner CCB of the face. */ + /*! obtains an iterator for the first inner CCB of the face. */ Inner_ccb_iterator inner_ccbs_begin() { return (this->inner_ccbs.begin()); } - /*! Obtain a past-the-end iterator for the inner CCBs inside the face. */ + /*! obtains a past-the-end iterator for the inner CCBs inside the face. */ Inner_ccb_iterator inner_ccbs_end() { return (this->inner_ccbs.end()); } - /*! Obtain an const iterator for the first inner CCB inside the face. */ + /*! obtains an const iterator for the first inner CCB inside the face. */ Inner_ccb_const_iterator inner_ccbs_begin() const { return (this->inner_ccbs.begin()); } - /*! Obtain a const past-the-end iterator for the inner CCBs inside the face. */ + /*! obtains a const past-the-end iterator for the inner CCBs inside the face. */ Inner_ccb_const_iterator inner_ccbs_end() const { return (this->inner_ccbs.end()); } @@ -669,23 +668,23 @@ public: typename F::Isolated_vertex_iterator::iterator_category> Isolated_vertex_const_iterator; - /*! Obtain the number of isloated vertices inside the face. */ + /*! obtains the number of isloated vertices inside the face. */ size_t number_of_isolated_vertices() const { return (this->iso_verts.size()); } - /*! Obtain an iterator for the first isloated vertex inside the face. */ + /*! obtains an iterator for the first isloated vertex inside the face. */ Isolated_vertex_iterator isolated_vertices_begin() { return (this->iso_verts.begin()); } - /*! Obtain a past-the-end iterator for the isloated vertices inside the face. */ + /*! obtains a past-the-end iterator for the isloated vertices inside the face. */ Isolated_vertex_iterator isolated_vertices_end() { return (this->iso_verts.end()); } - /*! Obtain an const iterator for the first isloated vertex inside the face. */ + /*! obtains an const iterator for the first isloated vertex inside the face. */ Isolated_vertex_const_iterator isolated_vertices_begin() const { return (this->iso_verts.begin()); } - /*! Obtain a const past-the-end iterator for the isloated vertices inside the + /*! obtains a const past-the-end iterator for the isloated vertices inside the * face. */ Isolated_vertex_const_iterator isolated_vertices_end() const { return (this->iso_verts.end()); } @@ -736,47 +735,47 @@ private: bool iter_is_not_singular; public: - /*! Default constructor. */ + /*! constructs default. */ Arr_outer_ccb() : p_f(nullptr), iter_is_not_singular(false) {} - /*! Copy constructor. */ + /*! constructs copy. */ Arr_outer_ccb(const Arr_outer_ccb& other) : p_f(other.p_f), iter_is_not_singular(other.iter_is_not_singular) { if (other.iter_is_not_singular) iter = other.iter; } - /*! Obtain a halfedge along the component (const version). */ + /*! obtains a halfedge along the component (const version). */ const Halfedge* halfedge() const { return (*iter); } - /*! Obtain a halfedge along the component (non-const version). */ + /*! obtains a halfedge along the component (non-const version). */ Halfedge* halfedge() { return (*iter); } - /*! Set a representative halfedge for the component. */ + /*! sets a representative halfedge for the component. */ void set_halfedge(Halfedge* he) { *iter = he; } - /*! Obtain the incident face (const version). */ + /*! obtains the incident face (const version). */ const Face* face() const { return (p_f); } - /*! Obtain the incident face (non-const version). */ + /*! obtains the incident face (non-const version). */ Face* face() { return (p_f); } - /*! Set the incident face. */ + /*! sets the incident face. */ void set_face(Face* f) { p_f = f; } - /*! Obtain the iterator (const version). */ + /*! obtains the iterator (const version). */ Outer_ccb_iterator iterator() const { CGAL_assertion(iter_is_not_singular); return (iter); } - /*! Obtain the iterator (non-const version). */ + /*! obtains the iterator (non-const version). */ Outer_ccb_iterator iterator() { CGAL_assertion(iter_is_not_singular); return (iter); } - /*! Set the outer CCB iterator. */ + /*! sets the outer CCB iterator. */ void set_iterator(Outer_ccb_iterator it) { iter = it; @@ -813,71 +812,71 @@ private: } status; public: - /*! Default constructor. */ + /*! constructs default. */ Arr_inner_ccb() : status(ITER_IS_SINGULAR) { f_or_icc.f = nullptr; } - /*! Copy constructor. */ + /*! constructs copy. */ Arr_inner_ccb(const Arr_inner_ccb& other) : f_or_icc(other.f_or_icc), status(other.status) { if (other.status == ITER_IS_NOT_SINGULAR) iter = other.iter; } - /*! Obtain a halfedge along the component (const version). */ + /*! obtains a halfedge along the component (const version). */ const Halfedge* halfedge() const { CGAL_assertion(is_valid()); return (*iter); } - /*! Obtain a halfedge along the component (non-const version). */ + /*! obtains a halfedge along the component (non-const version). */ Halfedge* halfedge() { CGAL_assertion(is_valid()); return (*iter); } - /*! Set a representative halfedge for the component. */ + /*! sets a representative halfedge for the component. */ void set_halfedge(Halfedge *he) { CGAL_assertion(is_valid()); *iter = he; } - /*! Obtain the incident face (const version). */ + /*! obtains the incident face (const version). */ const Face* face() const { CGAL_assertion(status != INVALID); return f_or_icc.f; } - /*! Obtain the incident face (non-const version). */ + /*! obtains the incident face (non-const version). */ Face* face() { CGAL_assertion(status != INVALID); return f_or_icc.f; } - /*! Set the incident face. */ + /*! sets the incident face. */ void set_face(Face* f) { CGAL_assertion(status != INVALID); f_or_icc.f = f; } - /*! Obtain the iterator (const version). */ + /*! obtains the iterator (const version). */ Inner_ccb_iterator iterator() const { CGAL_assertion(status == ITER_IS_NOT_SINGULAR); return (iter); } - /*! Obtain the iterator (non-const version). */ + /*! obtains the iterator (non-const version). */ Inner_ccb_iterator iterator() { CGAL_assertion(status == ITER_IS_NOT_SINGULAR); return (iter); } - /*! Set the inner CCB iterator. */ + /*! sets the inner CCB iterator. */ void set_iterator(Inner_ccb_iterator it) { CGAL_assertion(is_valid()); @@ -885,17 +884,17 @@ public: status = ITER_IS_NOT_SINGULAR; } - /*! Check validity */ + /*! checks validity */ bool is_valid() const { return (status != INVALID); } - /*! Obtain the next CCB to primary chain. */ + /*! obtains the next CCB to primary chain. */ Arr_inner_ccb* next() const { CGAL_assertion(status == INVALID); return f_or_icc.icc; } - /*! Set the next CCB to primary chain. */ + /*! sets the next CCB to primary chain. */ void set_next(Arr_inner_ccb* next) { status = INVALID; @@ -921,38 +920,38 @@ private: bool iter_is_not_singular; public: - /*! Default constructor. */ + /*! constructs default. */ Arr_isolated_vertex() : p_f(nullptr), iter_is_not_singular(false) {} - /*! Copy constructor. */ + /*! constructs copy. */ Arr_isolated_vertex(const Arr_isolated_vertex& other) : p_f(other.p_f), iter_is_not_singular(other.iter_is_not_singular) { if (other.iter_is_not_singular) iv_it = other.iv_it; } - /*! Obtain the containing face (const version). */ + /*! obtains the containing face (const version). */ const Face* face() const { return (p_f); } - /*! Obtain the containing face (non-const version). */ + /*! obtains the containing face (non-const version). */ Face* face() { return (p_f); } - /*! Set the incident face, the one that contains the isolated vertex. */ + /*! sets the incident face, the one that contains the isolated vertex. */ void set_face(Face* f) { p_f = f; } - /*! Obtain the isolated vertex iterator (const version). */ + /*! obtains the isolated vertex iterator (const version). */ Isolated_vertex_iterator iterator() const { CGAL_assertion(iter_is_not_singular); return (iv_it); } - /*! Obtain the isolated vertex iterator (non-const version). */ + /*! obtains the isolated vertex iterator (non-const version). */ Isolated_vertex_iterator iterator() { CGAL_assertion(iter_is_not_singular); return (iv_it); } - /*! Set the isolated vertex iterator. */ + /*! sets the isolated vertex iterator. */ void set_iterator(Isolated_vertex_iterator iv) { iv_it = iv; @@ -1035,40 +1034,40 @@ public: Edge_const_iterator; private: - // Copy constructor - not supported. + // Copy constructor not supported. Arr_dcel_base(const Self&); - // Assignment operator - not supported. + // Assignment operator not supported. Self& operator=(const Self&); public: /// \name Construction and destruction. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arr_dcel_base() {} - /*! Destructor. */ + /*! destructs. */ ~Arr_dcel_base() { delete_all(); } //@} /// \name The DCEL size. //@{ - /*! Obtain the number of DCEL vertices. */ + /*! obtains the number of DCEL vertices. */ Size size_of_vertices() const { return (vertices.size()); } - /*! Obtain the number of DCEL halfedges (twice the number of edges). */ + /*! obtains the number of DCEL halfedges (twice the number of edges). */ Size size_of_halfedges() const { return (halfedges.size()); } - /*! Obtain the number of DCEL faces. */ + /*! obtains the number of DCEL faces. */ Size size_of_faces() const { return (faces.size()); } - /*! Obtain the number of outer CCBs. */ + /*! obtains the number of outer CCBs. */ Size size_of_outer_ccbs() const { return (out_ccbs.size()); } - /*! Obtain the number of inner CCBs. */ + /*! obtains the number of inner CCBs. */ Size size_of_inner_ccbs() const { return (in_ccbs.size()); } - /*! Obtain the number of isolated vertices. */ + /*! obtains the number of isolated vertices. */ Size size_of_isolated_vertices() const { return (iso_verts.size()); } //@} @@ -1141,7 +1140,7 @@ public: // \name Creation of new DCEL features. //@{ - /*! Create a new vertex. */ + /*! creates a new vertex. */ Vertex* new_vertex() { Vertex* v = vertex_alloc.allocate(1); @@ -1150,7 +1149,7 @@ public: return v; } - /*! Create a new pair of opposite halfedges. */ + /*! creates a new pair of opposite halfedges. */ Halfedge* new_edge() { // Create two new halfedges. @@ -1164,7 +1163,7 @@ public: return (h1); } - /*! Create a new face. */ + /*! creates a new face. */ Face* new_face() { Face* f = face_alloc.allocate(1); @@ -1173,7 +1172,7 @@ public: return(f); } - /*! Create a new outer CCB. */ + /*! creates a new outer CCB. */ Outer_ccb* new_outer_ccb() { Outer_ccb* oc = out_ccb_alloc.allocate(1); @@ -1182,7 +1181,7 @@ public: return (oc); } - /*! Create a new inner CCB. */ + /*! creates a new inner CCB. */ Inner_ccb* new_inner_ccb() { Inner_ccb* ic = in_ccb_alloc.allocate(1); @@ -1191,7 +1190,7 @@ public: return (ic); } - /*! Create a new isolated vertex. */ + /*! creates a new isolated vertex. */ Isolated_vertex* new_isolated_vertex() { Isolated_vertex* iv = iso_vert_alloc.allocate(1); @@ -1304,7 +1303,7 @@ public: } //@} - /*! Assign our DCEL the contents of another DCEL. + /*! assigns our DCEL the contents of another DCEL. */ void assign(const Self& dcel) { @@ -1504,7 +1503,7 @@ public: } protected: - /*! Create a new halfedge. */ + /*! creates a new halfedge. */ Halfedge* _new_halfedge() { Halfedge* h = halfedge_alloc.allocate(1); @@ -1513,7 +1512,7 @@ protected: return (h); } - /*! Delete an existing halfedge. */ + /*! deletes an existing halfedge. */ void _delete_halfedge(Halfedge* h) { halfedges.erase(h); @@ -1522,7 +1521,7 @@ protected: } }; -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h index 86895503ff4..48de8ad5792 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h @@ -39,7 +39,7 @@ public: typedef typename Base::Segment_assertions Segment_assertions; typedef typename Base::Has_exact_division Has_exact_division; - /*! Default constructor. */ + /*! constructs default. */ Arr_directional_non_caching_segment_basic_traits_2() : Base() {} /// \name Types and functors inherited from the base, required by the @@ -103,7 +103,7 @@ public: //@{ typedef typename Kernel::Construct_opposite_segment_2 Construct_opposite_2; - /*! Obtain a Construct_opposite_2 functor object. */ + /*! obtains a Construct_opposite_2 functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); } @@ -114,7 +114,7 @@ public: /*! The traits (in case it has state). */ const Traits& m_traits; - /*! Constructor + /*! Constructs * \param traits the traits (in case it has state). */ Compare_endpoints_xy_2(const Traits& traits) : m_traits(traits) {} @@ -122,7 +122,7 @@ public: friend class Arr_directional_non_caching_segment_basic_traits_2; public: - /*! Compare the two endpoints of a given curve lexigoraphically. + /*! compares the two endpoints of a given curve lexigoraphically. * \param cv The curve. * \return SMALLER if cv is directed from left to right and LARGER * otherwise. @@ -138,7 +138,7 @@ public: } }; - /*! Obtain a Compare_endpoints_xy_2 functor object. */ + /*! obtains a Compare_endpoints_xy_2 functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(*this); } //@} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h b/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h index fd958718c69..da68eb331be 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h @@ -43,16 +43,16 @@ private: Data m_data; // The auxiliary data field. public: - /*! Get the auxiliary data (const version). */ + /*! obtains the auxiliary data (const version). */ const Data& data() const { return m_data; } - /*! Get the auxiliary data (non-const version). */ + /*! obtains the auxiliary data (non-const version). */ Data& data() { return m_data; } - /*! Set the auxiliary data. */ + /*! sets the auxiliary data. */ void set_data(const Data& data) { m_data = data; } - /*! Assign from another vertex. */ + /*! assigns from another vertex. */ virtual void assign(const Vertex_base& v) { Vertex_base::assign(v); const Self& ex_v = static_cast(v); @@ -83,16 +83,16 @@ private: Data m_data; // The auxiliary data field. public: - /*! Get the auxiliary data (const version). */ + /*! obtains the auxiliary data (const version). */ const Data& data() const { return m_data; } - /*! Get the auxiliary data (non-const version). */ + /*! obtains the auxiliary data (non-const version). */ Data& data() { return m_data; } - /*! Set the auxiliary data. */ + /*! sets the auxiliary data. */ void set_data(const Data& data) { m_data = data; } - /*! Assign from another halfedge. */ + /*! assigns from another halfedge. */ virtual void assign(const Halfedge_base& he) { Halfedge_base::assign(he); const Self& ex_he = static_cast(he); @@ -123,16 +123,16 @@ private: Data m_data; // The auxiliary data field. public: - /*! Get the auxiliary data (const version). */ + /*! obtains the auxiliary data (const version). */ const Data& data() const { return m_data; } - /*! Get the auxiliary data (non-const version). */ + /*! obtains the auxiliary data (non-const version). */ Data& data() { return m_data; } - /*! Set the auxiliary data. */ + /*! sets the auxiliary data. */ void set_data(const Data& data) { m_data = data; } - /*! Assign from another face. */ + /*! assigns from another face. */ virtual void assign(const Face_base& f) { Face_base::assign(f); const Self& ex_f = static_cast(f); @@ -176,10 +176,10 @@ public: Halfedge_other, Face_base>; }; - /*! Default constructor. */ + /*! constructs default. */ Arr_face_extended_dcel() {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_face_extended_dcel() {} }; @@ -227,14 +227,14 @@ public: Vertex_other, Halfedge_other, Face_base>; }; - /*! Default constructor. */ + /*! constructs default. */ Arr_extended_dcel() {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_extended_dcel() {} }; -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h b/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h index ee804c574c5..c3d408ccab2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h @@ -62,24 +62,24 @@ private: enum {MIN_REV_MAP_SIZE = 32}; public: - /*! Default constructor. */ + /*! constructs default. */ Arr_face_index_map() : Base(), n_faces(0), rev_map(MIN_REV_MAP_SIZE) {} - /*! Constructor with an associated arrangement. */ + /*! constructs from an associated arrangement. */ Arr_face_index_map(const Base_aos& arr) : Base(const_cast(arr)) { _init(); } - /*! Copy constructor. */ + /*! constructs copy. */ Arr_face_index_map(const Self& other) : Base(const_cast(*(other.arrangement()))) { _init(); } - /*! Assignment operator. */ + /*! assigns. */ Self& operator= (const Self& other) { if (this == &other) return (*this); @@ -89,13 +89,13 @@ public: return (*this); } - /*! Get the index of a given face. + /*! obtains the index of a given face. * \param f A handle to the face. * \pre f is a valid face in the arrangement. */ unsigned int operator[](Face_handle f) const { return (index_map[f]); } - /*! Get the face given its index. + /*! obtains the face given its index. * \param i The index of the face. * \pre i is less than the number of faces in the arrangement. */ @@ -107,27 +107,27 @@ public: /// \name Notification functions, to keep the mapping up-to-date. //@{ - /*! Update the mapping after the arrangement has been assigned with another + /*! updates the mapping after the arrangement has been assigned with another * arrangement. */ virtual void after_assign() override { _init(); } - /*! Update the mapping after the arrangement is cleared. + /*! updates the mapping after the arrangement is cleared. */ virtual void after_clear() override { _init(); } - /*! Update the mapping after attaching to a new arrangement. + /*! updates the mapping after attaching to a new arrangement. */ virtual void after_attach() override { _init(); } - /*! Update the mapping after detaching the arrangement. + /*! updates the mapping after detaching the arrangement. */ virtual void after_detach() override { n_faces = 0; index_map.clear(); } - /*! Update the mapping after the creation of a new face is split from another + /*! updates the mapping after the creation of a new face is split from another * face. * \param f A handle to the existing face. * \param new_f A handle to the newly created face. @@ -147,7 +147,7 @@ public: rev_map[n_faces - 1] = new_f; } - /*! Update the mapping before the merge of two faces. + /*! updates the mapping before the merge of two faces. * \param f1 A handle to the face that is going to remain. * \param f2 A handle to the face that is about to be removed. */ @@ -181,7 +181,7 @@ public: //@} private: - /*! Initialize the map for the given arrangement. */ + /*! initializes the map for the given arrangement. */ void _init() { // Get the number of faces and allocate the reverse map accordingly. n_faces = static_cast(this->arrangement()->number_of_faces()); @@ -206,7 +206,7 @@ private: } }; -/*! Get the index property-map function. Provided so that boost is able to +/*! obtains the index property-map function. Provided so that boost is able to * access the Arr_face_index_map above. * \param index_map The index map. * \param f A face handle. @@ -217,7 +217,7 @@ unsigned int get(const CGAL::Arr_face_index_map& index_map, typename Arrangement::Face_handle f) { return (index_map[f]); } -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h index 5e6f01f1f25..17b1178ac75 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h @@ -80,12 +80,12 @@ public: const Self * m_traits; public: - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Less_xy_2(const Self * traits) : m_traits(traits) {} - /*! Compare two points lexigoraphically: by x, then by y. + /*! compares two points lexigoraphically: by x, then by y. * We actually reversing the order, so x <--> y. * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. @@ -120,14 +120,12 @@ public: const Self * m_traits; public: - - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Less_yx_2(const Self * traits) : m_traits(traits) {} - - /*! Compare two points lexigoraphically: by y, then by x. + /*! compares two points lexigoraphically: by y, then by x. * We actually reversing the order, so x <--> y. * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. @@ -160,12 +158,12 @@ public: public: - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Orientation_2 (const Self * traits) : m_traits(traits) {} - /*! Checks the orientation between three points. + /*! checks the orientation between three points. * We actually reversing the order, so x <--> y. * \param p * \param q @@ -231,7 +229,6 @@ public: Compare_y_2 compare_y_2_object() const {return Base::compare_x_2_object(); } - /*! A functor that compares two points by x coordinate. */ class Compare_x_2 @@ -241,14 +238,12 @@ public: const Self * m_traits; public: - - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_x_2(const Self * traits) : m_traits(traits) {} - - /*! Compare two points by y coordinate. + /*! compares two points by y coordinate. * We actually reversing the order, so x <--> y. * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. @@ -388,7 +383,7 @@ public: public: - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Less_xy_2(const Self * traits) : m_traits(traits) {} @@ -429,7 +424,7 @@ public: public: - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Less_yx_2(const Self * traits) : m_traits(traits) {} @@ -467,7 +462,7 @@ public: public: - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Orientation_2 (const Self * traits) : m_traits(traits) {} @@ -549,7 +544,7 @@ public: public: - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_x_2(const Self * traits) : m_traits(traits) {} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h index 65ab748e0ee..80c03fbf866 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h @@ -25,7 +25,6 @@ */ #include - #include #include @@ -41,7 +40,7 @@ namespace CGAL { /*! Represent an extended 3D direction that is used in turn to represent a * spherical-arc endpoint. The extended data consists of two flags that - * indicate whether the point is on the x and on a y boundaries, + * indicate whether the point is on the \f$x\f$- and on a \f$y\f$-boundaries, * respectively. */ template @@ -71,39 +70,39 @@ private: inline Sign z_sign(Direction_3 d) const { return CGAL::sign(d.dz()); } public: - /*! Default constructor */ + /*! constructs default */ Arr_extended_direction_3() : Direction_3(0, 0, 1), m_location(MAX_BOUNDARY_LOC) {} - /*! Constructor */ + /*! constructs */ Arr_extended_direction_3(const Direction_3& dir, Location_type location) : Direction_3(dir), m_location(location) {} - /*! Copy constructor */ + /*! constructs copy */ Arr_extended_direction_3(const Arr_extended_direction_3& other) : Direction_3(static_cast(other)) { m_location = other.discontinuity_type(); } - /*! Assignment operator */ + /*! assigs */ Arr_extended_direction_3& operator=(const Arr_extended_direction_3& other) { *(static_cast(this)) = static_cast(other); m_location = other.discontinuity_type(); return (*this); } - /*! Set the location type of the point. + /*! sets the location type of the point. */ void set_location(Location_type location) { m_location = location; } - /*! Obtain the location type of the point. + /*! obtains the location type of the point. */ Location_type location() const { return m_location; } - /*! Obtain the discontinuity type of the point. + /*! obtains the discontinuity type of the point. * \todo deprecate this one; use the above instead. */ Location_type discontinuity_type() const { return m_location; } @@ -151,7 +150,7 @@ public: using Curve_2 = Arr_geodesic_arc_on_sphere_3; using Multiplicity = std::size_t; - /*! Default constructor */ + /*! constructs default */ Arr_geodesic_arc_on_sphere_traits_2() {} using FT = typename Kernel::FT; @@ -162,19 +161,19 @@ public: using Vector_2 = typename Kernel::Vector_2; protected: - /*! Obtain the intersection of the identification arc and the xy plane. - * By default, it is the vector directed along the negative x axis - * (x = -infinity). - * \return the intersection of the identification arc and the xy plane. + /*! obtains the intersection of the identification arc and the \f$xy\f$-plane. + * By default, it is the vector directed along the negative \f$x\f$-axis + * (\f$x = -\infty\f$). + * \return the intersection of the identification arc and the \f$xy\f$-plane. */ inline static const Direction_2& identification_xy() { static const Direction_2 d(atan_x, atan_y); return d; } - /*! Obtain the normal of the plane that contains the identification arc. - * By default, it is the vector directed along the positive y axis - * (y = infinity). + /*! obtains the normal of the plane that contains the identification arc. + * By default, it is the vector directed along the positive \f$y\f$-axis + * (\f$y = \infty\f$). * \return the normal of the plane that contains the identification arc. */ inline static const Direction_3& identification_normal() { @@ -182,78 +181,80 @@ protected: return d; } - /*! Obtain the 2D direction directed along the negative x axis - * \return the direction directed at x = -infinity + /*! obtains the 2D direction directed along the negative \f$x\f$-axis. + * \return the direction directed at \f$x = -\infty\f$. */ inline static const Direction_2& neg_x_2() { CGAL_STATIC_THREAD_LOCAL_VARIABLE_2(Direction_2, d, -1, 0); return d; } - /*! Obtain the 2D direction directed along the negative y axis - * \return the direction directed at y = -infinity + /*! obtains the 2D direction directed along the negative \f$y\f$-axis. + * \return the direction directed at \f$y = -\infty\f$. */ inline static const Direction_2& neg_y_2() { CGAL_STATIC_THREAD_LOCAL_VARIABLE_2(Direction_2, d, 0, -1); return d; } - /*! Obtain the sign of the x-coordinate of a direction in space - * \param d the direction in space - * \return the sign of the x-coordinate of d + /*! obtains the sign of the \f$x\f$-coordinate of a direction in space + * \param d the direction in space. + * \return the sign of the \f$x\f$-coordinate of `d`. */ inline static Sign x_sign(Direction_3 d) { return CGAL::sign(d.dx()); } - /*! Obtain the sign of the y-coordinate of a direction in space - * \param d the direction in space - * \return the sign of the y-coordinate of d + /*! obtains the sign of the \f$y\f$-coordinate of a direction in space + * \param d the direction in space. + * \return the sign of the \f$y\f$-coordinate of `d`. */ inline static Sign y_sign(Direction_3 d) { return CGAL::sign(d.dy()); } - /*! Obtain the sign of the z-coordinate of a direction in space + /*! obtains the sign of the \f$z\f$-coordinate of a direction in space * \param d the direction in space - * \return the sign of the z-coordinate of d + * \return the sign of the \f$z\f$-coordinate of `d`. */ inline static Sign z_sign(Direction_3 d) { return CGAL::sign(d.dz()); } typedef Direction_2 (*Project)(const Direction_3& d) ; - /*! Project a 3D direction onto the xy-plane - * \param d the 3D direction - * \return the projection onto the xy-plane + /*! projects a 3D direction onto the \f$xy\f$-plane + * \param d the 3D direction. + * \return the projection onto the \f$xy\f$-plane. */ inline static Direction_2 project_xy(const Direction_3& d) { return Direction_2(d.dx(), d.dy()); } - /*! Project a 3D direction onto the yz-plane - * \param d the 3D direction - * \return the projection onto the yz-plane + /*! projects a 3D direction onto the \f$yz\f$-plane. + * \param d the 3D direction. + * \return the projection onto the \f$yz\f$-plane. */ inline static Direction_2 project_yz(const Direction_3& d) { return Direction_2(d.dy(), d.dz()); } - /*! Project a 3D direction onto the zx-plane - * \param d the 3D direction - * \return the projection onto the xz-plane + /*! projects a 3D direction onto the \f$zx\f$-plane. + * \param d the 3D direction. + * \return the projection onto the \f$xz\f$-plane. */ inline static Direction_2 project_xz(const Direction_3& d) { return Direction_2(d.dx(), d.dz()); } - /*! Project a 3D direction onto the yz-plane and reflect the y coordinate - * \param d the 3D direction - * \return the projection onto the yz-plane + /*! projects a 3D direction onto the \f$yz\f$-plane and reflect the + * \f$y\f$-coordinate. + * \param d the 3D direction. + * \return the projection onto the \f$yz\f$-plane. */ inline static Direction_2 project_minus_yz(const Direction_3& d) { return Direction_2(-d.dy(), d.dz()); } - /*! Project a 3D direction onto the zx-plane and reflect the x coordinate - * \param d the 3D direction - * \return the projection onto the xz-plane + /*! projects a 3D direction onto the \f$zx\f$-plane and reflect the + * \f$x\f$- coordinate. + * \param d the 3D direction. + * \return the projection onto the \f$xz\f$-plane. */ inline static Direction_2 project_minus_xz(const Direction_3& d) { return Direction_2(-d.dx(), d.dz()); } - /*! Compare the relative position of a direction and a plane given by its + /*! compares the relative position of a direction and a plane given by its * normal. * \param normal the direction of the plane. * \param dir the direction. @@ -264,10 +265,10 @@ protected: return CGAL::sign(dot); } - /*! Compute the orientation of two directions. + /*! computes the orientation of two directions. * \param d1 the first direction. * \param d2 the second direction. - * \return the relative orientation of d1 and d2. + * \return the relative orientation of `d1` and `d2`. */ inline Orientation orientation(const Direction_2& d1, const Direction_2& d2) const { @@ -275,7 +276,7 @@ protected: return kernel.orientation_2_object()(d1.vector(), d2.vector()); } - /*! Constructs a plane that contains two directions. + /*! constructs a plane that contains two directions. * \param d1 the first direction. * \param d2 the second direction. */ @@ -287,7 +288,7 @@ protected: return v.direction(); } - /*! Determined whether a direction is contained in a plane given by its + /*! determines whether a direction is contained in a plane given by its * normal * \param normal the direction of the 3D plane. * \param dir the 3D direction. @@ -300,7 +301,7 @@ protected: } public: - /*! Compare two endpoint directions by v. + /*! compares two endpoint directions by v. * \param d1 the first endpoint direction. * \param d2 the second endpoint direction. * \return SMALLER - v(d1) < v(d2); @@ -334,7 +335,7 @@ public: CGAL::compare(dot_p2 * dot_p2 * norm1, dot_p1 * dot_p1 * norm2); } - /*! Compare two directions contained in the xy plane by u. + /*! compares two directions contained in the xy plane by u. * \param d1 the first direction. * \param d2 the second direction. * \return SMALLER - u(d1) < u(d2); @@ -350,14 +351,14 @@ public: LARGER : SMALLER; } - /*! Compare two endpoint directions by u. + /*! compares two endpoint directions by u. * \param d1 the first endpoint direction. * \param d2 the second endpoint direction. * \return SMALLER - u(d1) < u(d2); * EQUAL - u(d1) = u(d2); * LARGER - u(d1) > u(d2). - * \pre d1 does not coincide with any pole. - * \pre d2 does not coincide with any pole. + * \pre `d1` does not coincide with any pole. + * \pre `d2` does not coincide with any pole. */ inline Comparison_result compare_x(const Direction_3& d1, const Direction_3& d2) const { @@ -367,7 +368,7 @@ public: return compare_x(d1_2, d2_2); } - /*! Compare two endpoint directions lexigoraphically: by u, then by v. + /*! compares two endpoint directions lexigoraphically: by u, then by v. * \param d1 the first endpoint direction. * \param d2 the second endpoint direction. * \return SMALLER - u(d1) < u(d2); @@ -375,8 +376,8 @@ public: * EQUAL - u(d1) = u(d2) and v(d1) = v(d2); * LARGER - u(d1) = u(d2) and v(d1) > v(d2); * LARGER - u(d1) > u(d2). - * \pre d1 does not lie on the discontinuity arc. - * \pre d2 does not lie on the discontinuity arc. + * \pre `d1` does not lie on the discontinuity arc. + * \pre `d2` does not lie on the discontinuity arc. */ inline Comparison_result compare_xy(const Direction_3& d1, const Direction_3& d2) const { @@ -385,12 +386,12 @@ public: return res; } - /*! Determine whether the given point is in the x-range of the + /*! determines whether the given point is in the \f$x\f$-range of the * spherical_arc. * \param point the query point direction. - * \return true if point is in the x-range of the (closed) spherical_arc and - * false otherwise. - * \pre point does not coincide with one of the poles + * \return true if point is in the \f$x\f$-range of the (closed) spherical_arc + * and false otherwise. + * \pre point does not coincide with one of the poles. */ bool is_in_x_range(const X_monotone_curve_2& xcv, const Point_2& point) const { @@ -418,8 +419,8 @@ public: return kernel.counterclockwise_in_between_2_object()(p, l, r); } - /*! Compute the intersection of a curve and the identification curve. - * \param[in] cv the curve + /*! computes the intersection of a curve and the identification curve. + * \param[in] cv the curve. */ void intersection_with_identification(const X_monotone_curve_2& xcv, Direction_3& dp, @@ -430,8 +431,8 @@ public: Direction_3(normal.dz(), 0, -(normal.dx())); } - /*! Compute the intersection of a curve and the identification curve. - * \param[in] cv the curve + /*! computes the intersection of a curve and the identification curve. + * \param[in] cv the curve. */ void intersection_with_identification(const X_monotone_curve_2& xcv, Direction_3& dp, @@ -442,7 +443,7 @@ public: dp = Direction_3(atan_x, atan_y, z); } - /*! Compute the intersection of a curve and the identification curve. + /*! computes the intersection of a curve and the identification curve. * \param[in] cv the curve */ bool overlap_with_identification(const X_monotone_curve_2& xcv, @@ -453,8 +454,8 @@ public: ((y_sign(normal) == POSITIVE) && xcv.is_directed_right()))); } - /*! Compute the intersection of a curve and the identification curve. - * \param[in] cv the curve + /*! computes the intersection of a curve and the identification curve. + * \param[in] cv the curve. */ bool overlap_with_identification(const X_monotone_curve_2& xcv, std::false_type) const { @@ -483,7 +484,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Construct_point_2(const Traits& traits) : m_traits(traits) {} @@ -491,11 +492,11 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Construct a point on the sphere from three coordinates, which define + /*! constructs a point on the sphere from three coordinates, which define * a (not necessarily normalized) direction. - * \param[in] x the x coordinate - * \param[in] y the y coordinate - * \param[in] z the z coordinate + * \param[in] x the \f$x\f$-coordinate. + * \param[in] y the \f$y\f$-coordinate. + * \param[in] z the \f$z\f$-coordinate. */ Point_2 operator()(const FT& x, const FT& y, const FT& z) { Point_2 p; @@ -505,9 +506,9 @@ public: return p; } - /*! Construct a point on the sphere from a (not necessarily normalized) + /*! constructs a point on the sphere from a (not necessarily normalized) * direction. - * \param other the other direction + * \param other the other direction. */ Point_2 operator()(const Direction_3& other) { Point_2 p; @@ -517,7 +518,7 @@ public: return p; } - /*! Initialize a point on the sphere, + /*! initializes a point on the sphere, * \param[in] p the point to initialize. */ void init(Point_2& p, std::true_type) const { @@ -535,7 +536,7 @@ public: p.set_location(location); } - /*! Initialize a point on the sphere, + /*! initializes a point on the sphere, * \param[in] p the point to initialize. */ void init(Point_2& p, std::false_type) const { @@ -557,12 +558,13 @@ public: } }; - /*! Obtain an x-monotone geodesic arc construction functor. + /*! obtains a point construction functor. */ Construct_point_2 construct_point_2_object() const { return Construct_point_2(*this); } - /*! A functor that constructs an x-monotone geodesic arc on the sphere. */ + /*! A functor that constructs an \f$x\f$-monotone geodesic arc on the sphere. + */ class Construct_x_monotone_curve_2 { protected: using Traits = Arr_geodesic_arc_on_sphere_traits_2; @@ -570,7 +572,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Construct_x_monotone_curve_2(const Traits& traits) : m_traits(traits) {} @@ -578,16 +580,16 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Construct the minor arc from two endpoint directions. The minor arc + /*! constructs the minor arc from two endpoint directions. The minor arc * is the one with the smaller angle among the two geodesic arcs with * the given endpoints. - * 1. Find out whether the arc is x-monotone. - * 2. If it is x-monotone, + * 1. Find out whether the arc is \f$x\f$-monotone. + * 2. If it is \f$x\f$-monotone, * 2.1 Find out whether it is vertical, and * 2.2 whether the target is larger than the source (directed right). * The arc is vertical, iff * 1. one of its endpoint direction pierces a pole, or - * 2. the projections onto the xy-plane coincide. + * 2. the projections onto the \f$xy\f$-plane coincide. * \param[in] source the source point. * \param[in] target the target point. * \pre the source and target must not coincide. @@ -613,7 +615,7 @@ public: return xcv; } - /*! Construct a full spherical_arc from a plane + /*! constructs a full spherical_arc from a plane * \param plane the containing plane. * \pre the plane is not vertical */ @@ -636,7 +638,7 @@ public: xcv.set_target(p); } - /*! Construct a spherical_arc from two endpoints directions contained + /*! constructs a spherical_arc from two endpoints directions contained * in a plane. * \param[in] plane the containing plane. * \param[in] source the source-point direction. @@ -648,16 +650,16 @@ public: { return X_monotone_curve_2(source, target, normal); } private: - /*! Initialize a spherical_arc given that the two endpoint directions + /*! initializes a spherical_arc given that the two endpoint directions * have been set. It is assumed that the arc is the one with the smaller * angle among the two. - * 1. Find out whether the arc is x-monotone. - * 2. If it is x-monotone, + * 1. Find out whether the arc is \f$x\f$-monotone. + * 2. If it is \f$x\f$-monotone, * 2.1 Find out whether it is vertical, and * 2.2 whether the target is larger than the source (directed right). * The arc is vertical, iff * 1. one of its endpoint direction pierces a pole, or - * 2. the projections onto the xy-plane coincide. + * 2. the projections onto the \f$xy\f$-plane coincide. * \param source the source point. * \param target the target point. * \pre the source and target cannot be equal. @@ -746,7 +748,7 @@ public: } }; - /*! Obtain an x-monotone geodesic arc construction functor. + /*! obtains an \f$x\f$-monotone geodesic arc construction functor. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } @@ -759,7 +761,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Construct_curve_2(const Traits& traits) : m_traits(traits) {} @@ -767,15 +769,15 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Construct a spherical_arc from two endpoint directions. It is assumed + /*! constructs a spherical_arc from two endpoint directions. It is assumed * that the arc is the one with the smaller angle among the two. - * 1. Find out whether the arc is x-monotone. - * 2. If it is x-monotone, + * 1. Find out whether the arc is \f$x\f$-monotone. + * 2. If it is \f$x\f$-monotone, * 2.1 Find out whether it is vertical, and * 2.2 whether the target is larger than the source (directed right). * The arc is vertical, iff * 1. one of its endpoint direction pierces a pole, or - * 2. the projections onto the xy-plane coincide. + * 2. the projections onto the \f$xy\f$-plane coincide. * \param source the source point. * \param target the target point. * \pre the source and target cannot be equal. @@ -861,7 +863,7 @@ public: return cv; } - /*! Construct a spherical_arc from two endpoint directions contained + /*! constructs a spherical_arc from two endpoint directions contained * in a plane. * \param[in] source the source-point direction. * \param[in] target the target-point direction. @@ -952,9 +954,9 @@ public: /* None of the endpoints coincide with a pole. * The projections of both endpoints lie on the same hemi-circle. - * Thus, either the arc is x-monotone, or it includes both poles. + * Thus, either the arc is \f$x\f$-monotone, or it includes both poles. * This means that it is sufficient to check whether one pole lies - * on the arc in order to determine x-monotonicity + * on the arc in order to determine \f$x\f$-monotonicity */ typename Traits::Project project = @@ -985,7 +987,7 @@ public: return cv; } - /*! Construct a full spherical_arc from a plane + /*! constructs a full spherical_arc from a plane * \param plane the containing plane. */ Curve_2 operator()(const Direction_3& normal) const { @@ -1001,12 +1003,13 @@ public: } }; - /*! Obtain a geodesic arc construction functor. + /*! obtains a geodesic arc construction functor. */ Construct_curve_2 construct_curve_2_object() const { return Construct_curve_2(*this); } - /*! A functor that compares the x-coordinates of two directional points */ + /*! A functor that compares the \f$x\f$-coordinates of two directional points + */ class Compare_x_2 { protected: using Traits = Arr_geodesic_arc_on_sphere_traits_2; @@ -1014,7 +1017,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_x_2(const Traits& traits) : m_traits(traits) {} @@ -1022,7 +1025,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the x-coordinates of two directional points. + /*! compares the \f$x\f$-coordinates of two directional points. * \param p1 the first directional point. * \param p2 the second directional point. * \return SMALLER - x(p1) < x(p2); @@ -1040,7 +1043,7 @@ public: }; protected: - /*! Obtain the positive (north) pole + /*! obtains the positive (north) pole * \return the positive (north) pole */ inline static const Point_2& pos_pole() { @@ -1048,7 +1051,7 @@ protected: return p; } - /*! Obtain the negative (south) pole + /*! obtains the negative (south) pole * \return the negative (south) pole */ inline static const Point_2& neg_pole() { @@ -1057,7 +1060,7 @@ protected: } public: - /*! Obtain a Compare_x_2 function object */ + /*! obtains a `Compare_x_2` function object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } /*! A functor that compares two directional points lexigoraphically: @@ -1070,7 +1073,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_xy_2(const Traits& traits) : m_traits(traits) {} @@ -1078,7 +1081,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare two directional points lexigoraphically: by x, then by y. + /*! compares two directional points lexigoraphically: by x, then by y. * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return SMALLER - x(p1) < x(p2); @@ -1097,13 +1100,13 @@ public: } }; - /*! Obtain a Compare_xy_2 function object */ + /*! obtains a `Compare_xy_2` function object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } - /*! A functor that obtain the left endpoint of an x-monotone arc */ + /*! A functor that obtain the left endpoint of an \f$x\f$-monotone arc */ class Construct_min_vertex_2 { public: - /*! Obtain the left endpoint of and arc. + /*! obtains the left endpoint of and arc. * \param xc the arc. * \return the left endpoint. */ @@ -1111,14 +1114,14 @@ public: { return xc.left(); } }; - /*! Obtain a Construct_min_vertex_2 function object */ + /*! obtains a `Construct_min_vertex_2` function object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } - /*! A functor that obtain the right endpoint of an x-monotone arc */ + /*! A functor that obtain the right endpoint of an \f$x\f$-monotone arc */ class Construct_max_vertex_2 { public: - /*! Obtain the right endpoint of an arc. + /*! obtains the right endpoint of an arc. * \param xc the arc. * \return the right endpoint. */ @@ -1126,14 +1129,14 @@ public: { return xc.right(); } }; - /*! Obtain a Construct_max_vertex_2 function object */ + /*! obtains a `Construct_max_vertex_2` function object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } - /*! A functor that checks whether an x-monotone arc is a vertical */ + /*! A functor that checks whether an \f$x\f$-monotone arc is a vertical */ class Is_vertical_2 { public: - /*! Check whether a given arc is vertical. + /*! checks whether a given arc is vertical. * \param xc the arc. * \return true if the curve is a vertical spherical_arc; false otherwise. * \pre the arc is not degenerate (consists of a single point) @@ -1144,11 +1147,11 @@ public: } }; - /*! Obtain an Is_vertical_2 function object */ + /*! obtains an `Is_vertical_2` function object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); } - /*! A functor that compares the y-coordinates of a directional point and - * an x-monotone arc at the point x-coordinate + /*! A functor that compares the \f$y\f$-coordinates of a directional point and + * an \f$x\f$-monotone arc at the point \f$x\f$-coordinate */ class Compare_y_at_x_2 { protected: @@ -1157,7 +1160,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_at_x_2(const Traits& traits) : m_traits(traits) {} @@ -1165,14 +1168,14 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Return the location of the given point with respect to the input arc. + /*! returns the location of the given point with respect to the input arc. * \param xc the arc. * \param p the point. * \return SMALLER - y(p) < xc(x(p)), i.e. the point is below the curve; * EQUAL - p lies on the curve. * LARGER - y(p) > xc(x(p)), i.e. the point is above the curve; * \pre p is not a contraction point. - * \pre p is in the x-range of xc. + * \pre p is in the \f$x\f$-range of `xc`. */ Comparison_result operator()(const Point_2& p, const X_monotone_curve_2& xc) const { @@ -1202,12 +1205,12 @@ public: } }; - /*! Obtain a Compare_y_at_x_2 function object */ + /*! obtains a `Compare_y_at_x_2` function object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } - /*! A functor that compares the y-coordinates of two x-monotone arcs - * immediately to the left of their intersection directional point. + /*! A functor that compares the \f$y\f$-coordinates of two \f$x\f$-monotone + * arcs immediately to the left of their intersection directional point. */ class Compare_y_at_x_left_2 { protected: @@ -1216,7 +1219,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_at_x_left_2(const Traits& traits) : m_traits(traits) {} @@ -1224,14 +1227,14 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the y value of two x-monotone curves immediately to the left - * of their intersection point. + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the left of their intersection point. * \param xc1 the first curve. * \param xc2 the second curve. * \param p the intersection point. - * \return the relative position of xc1 with respect to xc2 immdiately to - * the left of p: SMALLER, EQUAL, or LARGER. - * \pre the point p lies on both curves, and both of them must be also be + * \return the relative position of `xc1` with respect to `xc2` immdiately to + * the left of `p`: `SMALLER`, `EQUAL`, or `LARGER`. + * \pre the point `p` lies on both curves, and both of them must be also be * defined (lexicographically) to its left. * \pre the arcs are not degenerate */ @@ -1250,7 +1253,8 @@ public: // Non of the arc is verticel. Thus, non of the endpoints coincide with // a pole. - // Compare the y-coord. at the x-coord of the most right left-endpoint. + // Compare the \f$y\f$-coordinate at the \f$x\f$-coordinate of the most + // right left-endpoint. const Point_2& l1 = xc1.left(); const Point_2& l2 = xc2.left(); @@ -1317,12 +1321,12 @@ public: } }; - /*! Obtain a Compare_y_at_x_left_2 function object */ + /*! obtains a `Compare_y_at_x_left_2` function object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(*this); } - /*! A functor that compares the y-coordinates of two x-monotone arcs - * immediately to the right of their intersection directional point. + /*! A functor that compares the \f$y\f$-coordinates of two \f$x\f$-monotone + * arcs immediately to the right of their intersection directional point. */ class Compare_y_at_x_right_2 { protected: @@ -1331,7 +1335,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_at_x_right_2(const Traits& traits) : m_traits(traits) {} @@ -1339,14 +1343,14 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the y value of two x-monotone curves immediately to the right - * of their intersection point. + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the right of their intersection point. * \param xc1 the first curve. * \param xc2 the second curve. * \param p the intersection point. - * \return the relative position of xc1 with respect to xc2 immdiately to - * the right of p: SMALLER, EQUAL, or LARGER. - * \pre the point p lies on both curves, and both of them must also be + * \return the relative position of `xc1` with respect to `xc2` immdiately + * to the right of `p`: `SMALLER`, `EQUAL`, or `LARGER`. + * \pre the point `p` lies on both curves, and both of them must also be * defined to its right (lexicographically). * \pre the arcs are not degenerate */ @@ -1392,7 +1396,8 @@ public: SMALLER : LARGER; } - // Compare the y-coord. at the x-coord of the most left right-endpoint. + // Compare the \f$y\f$-coord. at the \f$x\f$-coordinate of the most left + // right-endpoint. if (! r1.is_no_boundary()) { // use r2 and xc1: Oriented_side os = m_traits.oriented_side(xc1.normal(), r2); @@ -1431,12 +1436,12 @@ public: } }; - /*! Obtain a Compare_y_at_x_right_2 function object */ + /*! obtains a `Compare_y_at_x_right_2` function object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(*this); } - /*! A functor that checks whether two directional points and two x-monotone - * arcs are identical. + /*! A functor that checks whether two directional points and two + * \f$x\f$-monotone arcs are identical. */ class Equal_2 { protected: @@ -1445,7 +1450,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Equal_2(const Traits& traits) : m_traits(traits) {} @@ -1453,8 +1458,8 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Determines whether the two x-monotone curves are the same (have the - * same graph). + /*! determines whether the two \f$x\f$-monotone curves are the same (have + * the same graph). * \param xc1 the first curve. * \param xc2 the second curve. * \return true if the two curves are the same; false otherwise. @@ -1479,7 +1484,7 @@ public: equal_3(Direction_3(xc1.right()), Direction_3(xc2.right()))); } - /*! Determines whether the two points are the same. + /*! determines whether the two points are the same. * \param p1 the first point. * \param p2 the second point. * \return true if the two point are the same; false otherwise. @@ -1490,7 +1495,7 @@ public: } }; - /*! Obtain an Equal_2 function object */ + /*! obtains an `Equal_2` function object. */ Equal_2 equal_2_object() const { return Equal_2(*this); } //@} @@ -1498,7 +1503,7 @@ public: //@{ /*! A function object that obtains the parameter space of a geometric - * entity along the x-axis + * entity along the \f$x\f$-axis */ class Parameter_space_in_x_2 { protected: @@ -1507,7 +1512,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Parameter_space_in_x_2(const Traits& traits) : m_traits(traits) {} @@ -1515,7 +1520,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Obtains the parameter space at the end of an arc along the x-axis. + /*! obtains the parameter space at the end of an arc along the \f$x\f$-axis. * Only called for arcs whose interior lie in the interior of the * parameter space, that is, the arc does not coincide with the * identification. Thus, it returns ARR_LEFT_BOUNDARY or ARR_RIGHT_BOUNDARY @@ -1544,7 +1549,7 @@ public: ((xcv.right().is_no_boundary()) ? ARR_INTERIOR : ARR_RIGHT_BOUNDARY); } - /*! Obtains the parameter space at a point along the x-axis. + /*! obtains the parameter space at a point along the \f$x\f$-axis. * Every non-interior point is assumed to lie on the left-right * identification. * Points at the poles additionally lie on the bottom or top boundary. @@ -1558,16 +1563,16 @@ public: } }; - /*! Obtain a Parameter_space_in_x_2 function object */ + /*! obtains a Parameter_space_in_x_2 function object. */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(*this); } /*! A function object that obtains the parameter space of a geometric - * entity along the y-axis + * entity along the \f$y\f$-axis. */ class Parameter_space_in_y_2 { public: - /*! Obtains the parameter space at the end of an arc along the y-axis. + /*! obtains the parameter space at the end of an arc along the \f$y\f$-axis. * Only called for arcs whose interior lie in the interior of the * parameter space, that is, the arc does not coincide with the * identification. Thus, it returns ARR_BOTTOM_BOUNDARY or ARR_TOP_BOUNDARY @@ -1591,7 +1596,7 @@ public: ((xcv.right().is_max_boundary()) ? ARR_TOP_BOUNDARY : ARR_INTERIOR); } - /*! Obtains the parameter space of a point along the y-axis. + /*! obtains the parameter space of a point along the \f$y\f$-axis. * That is, ARR_BOTTOM_BOUNDARY is returned if p coincides with the * south pole and ARR_TOP_BOUNDARY if p coincides with the north pole. * Otherwise ARR_INTERIOR is returned. @@ -1605,13 +1610,13 @@ public: } }; - /*! Obtain a Parameter_space_in_y_2 function object */ + /*! obtains a `Parameter_space_in_y_2` function object. */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(); } - /*! A functor that compares the x-coordinate of arc ends and points on the - * boundary of the parameter space. + /*! A functor that compares the \f$x\f$-coordinate of arc ends and points on + * the boundary of the parameter space. */ class Compare_x_on_boundary_2 { protected: @@ -1620,7 +1625,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_x_on_boundary_2(const Traits& traits) : m_traits(traits) {} @@ -1628,8 +1633,8 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the x-coordinate of a direction with the x-coordinate of an - * arc end projected onto the boundary. + /*! compares the \f$x\f$-coordinate of a direction with the + * \f$x\f$-coordinate of an arc end projected onto the boundary. * \param point the point direction. * \param xcv the arc, the endpoint of which is compared. * \param ce the arc-end indicator - @@ -1639,9 +1644,10 @@ public: * SMALLER - x(p) < x(xc, ce); * EQUAL - x(p) = x(xc, ce); * LARGER - x(p) > x(xc, ce). - * \pre p lies in the interior of the parameter space. - * \pre the ce end of the arc xcv lies on a pole (implying ce is vertical). - * \pre xcv does not coincide with the vertical identification curve. + * \pre `p` lies in the interior of the parameter space. + * \pre The `ce` end of the arc `xcv` lies on a pole (implying ce is + * vertical). + * \pre `xcv` does not coincide with the vertical identification curve. */ Comparison_result operator()(const Point_2& point, const X_monotone_curve_2& xcv, @@ -1657,7 +1663,7 @@ public: // xcv is vertical, but does not coincide with the discontinuity arc. // Obtain the direction contained in the underlying plane, which is - // also on the xy-plane: + // also on the \f$xy\f$-plane: Direction_3 normal = xcv.normal(); Direction_2 q = (xcv.is_directed_right()) ? Direction_2(-(normal.dy()), normal.dx()) : @@ -1666,8 +1672,8 @@ public: return m_traits.compare_x(p, q); } - /*! Compare the x-coordinates of two arc ends projected onto the boundary - * of the parameter space. + /*! compares the \f$x\f$-coordinates of two arc ends projected onto the + * boundary of the parameter space. * \param xcv1 the first arc. * \param ce1 the first arc end indicator - * ARR_MIN_END - the minimal end of xcv1 or @@ -1708,7 +1714,7 @@ public: // Non of the arcs coincide with the identification arc: // Obtain the directions contained in the underlying planes, which are - // also on the xy-plane: + // also on the \f$xy\f$-plane: Direction_3 normal1 = xcv1.normal(); Direction_2 p = (xcv1.is_directed_right()) ? Direction_2(-(normal1.dy()), normal1.dx()) : @@ -1730,12 +1736,12 @@ public: { CGAL_error(); return EQUAL; } }; - /*! Obtain a Compare_x_on_boundary_2 function object. + /*! obtains a `Compare_x_on_boundary_2` function object. */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(*this); } - /*! A functor that compares the x-coordinates of arc ends near the + /*! A functor that compares the \f$x\f$-coordinates of arc ends near the * boundary of the parameter space. */ class Compare_x_near_boundary_2 { @@ -1745,7 +1751,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_x_near_boundary_2(const Traits& traits) : m_traits(traits) {} @@ -1753,8 +1759,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - - /*! Compare the x-coordinates of 2 arc ends near the boundary of the + /*! compares the \f$x\f$-coordinates of 2 arc ends near the boundary of the * parameter space. * \param xcv1 the first arc. * \param xcv2 the second arc. @@ -1794,12 +1799,12 @@ public: } }; - /*! Obtain a Compare_x_near_boundary_2 function object */ + /*! obtains a `Compare_x_near_boundary_2` function object. */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(*this); } - /*! A functor that compares the y-coordinates of arc ends near the + /*! A functor that compares the \f$y\f$-coordinates of arc ends near the * boundary of the parameter space. */ class Compare_y_near_boundary_2 { @@ -1809,7 +1814,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_near_boundary_2(const Traits& traits) : m_traits(traits) {} @@ -1817,15 +1822,15 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the y-coordinates of 2 curves at their ends near the boundary - * of the parameter space. + /*! compares the \f$y\f$-coordinates of 2 curves at their ends near the + * boundary of the parameter space. * \param xcv1 the first arc. * \param xcv2 the second arc. * \param ce the arc end indicator. * \return the second comparison result. - * \pre the ce ends of the arcs xcv1 and xcv2 lie either on the left + * \pre The `ce` ends of the arcs `xcv1` and `xcv2` lie either on the left * boundary or on the right boundary of the parameter space. - * \pre the curves cannot reach a pole + * \pre the curves cannot reach a pole. * There is no horizontal identification curve! */ Comparison_result operator()(const X_monotone_curve_2& xcv1, @@ -1870,7 +1875,7 @@ public: if (xcv2.is_vertical()) return SMALLER; // There are 4 cases based on the sign of the z component of the normals - // Compute the sign of the x-component of the normal cross product. + // Compute the sign of the \f$x\f$-component of the normal cross product. // There is no point computing the intermediate cross product: // auto cross_prod = kernel.construct_cross_product_vector_3_object(); // Vector_3 v = cross_prod(n1.vector(), n2.vector()); @@ -1909,7 +1914,7 @@ public: if (xcv2.is_vertical()) return SMALLER; // There are 4 cases based on the sign of the z component of the normals - // Compute the sign of the x-component of the normal cross product. + // Compute the sign of the \f$x\f$-component of the normal cross product. // There is no point computing the intermediate cross product: // auto cross_prod = kernel.construct_cross_product_vector_3_object(); // Vector_3 v = cross_prod(n1.vector(), n2.vector()); @@ -1938,7 +1943,7 @@ public: } }; - /*! Obtain a Compare_y_near_boundary_2 function object */ + /*! obtains a `Compare_y_near_boundary_2` function object. */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(*this); } @@ -1952,7 +1957,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Is_on_y_identification_2(const Traits& traits) : m_traits(traits) {} @@ -1960,14 +1965,14 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Determine whether a point lies on the vertical identification arc. + /*! determines whether a point lies on the vertical identification arc. * \param p the point. * \return a Boolean indicating whether p lies on the vertical * identification arc (including the poles) */ bool operator()(const Point_2& p) const { return !p.is_no_boundary(); } - /*! Determine whether an arc coincides with the vertical identification + /*! determines whether an arc coincides with the vertical identification * arc. * \param xcv the arc. * \return a Boolean indicating whether xcv coincides with the vertical @@ -1996,11 +2001,11 @@ public: } }; - /*! Obtain a Is_on_y_identification_2 function object */ + /*! obtains an `Is_on_y_identification_2` function object. */ Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(*this); } - /*! A functor that compares the y-coordinate of two given points + /*! A functor that compares the \f$y\f$-coordinate of two given points * that lie on the vertical identification arc. */ class Compare_y_on_boundary_2 { @@ -2010,7 +2015,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_on_boundary_2(const Traits& traits) : m_traits(traits) {} @@ -2018,15 +2023,15 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the y-coordinate of two given points that lie on the vertical - * identification curve. + /*! compares the \f$y\f$-coordinate of two given points that lie on the + * vertical identification curve. * \param p1 the first point. * \param p2 the second point. * \return SMALLER - p1 is smaller than p2; * EQUAL - p1 and p2 coincides; * LARGER - p1 is larger than p2; - * \pre p1 lies on the vertical identification arc including the poles! - * \pre p2 lies on the vertical identification arc including the poles! + * \pre `p1` lies on the vertical identification arc including the poles! + * \pre `p2` lies on the vertical identification arc including the poles! */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { // first deal with the 'degenerate' case of poles! @@ -2052,7 +2057,7 @@ public: }; - /*! Obtain a Compare_y_on_boundary_2 function object */ + /*! obtains a `Compare_y_on_boundary_2` function object. */ Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(*this); } //@} @@ -2061,8 +2066,8 @@ public: //@{ /*! \class Make_x_monotone_2 - * A functor for subdividing arcs into x-monotone arcs that do not cross the - * identification arc. + * A functor for subdividing arcs into \f$x\f$-monotone arcs that do not cross + * the identification arc. */ class Make_x_monotone_2 { protected: @@ -2071,7 +2076,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Make_x_monotone_2(const Traits& traits) : m_traits(traits) {} @@ -2079,9 +2084,9 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Subdivide a given curve into x-monotone subcurves and insert them into - * a given output iterator. As spherical_arcs are always x_monotone, only - * one object will be contained in the iterator. + /*! subdivides a given curve into \f$x\f$-monotone subcurves and insert them + * into a given output iterator. As spherical_arcs are always x_monotone, + * only one object will be contained in the iterator. * \param xc the curve. * \param oi the output iterator for the result. Its dereference type is a * variant that wraps a \c Point_2 or an \c X_monotone_curve_2 @@ -2126,7 +2131,7 @@ public: const X_monotone_curve_2 xc(c.normal()); *oi++ = Make_x_monotone_result(xc); #else - // Full x-monotone arcs are not supported! + // Full \f$x\f$-monotone arcs are not supported! // Split the arc at the intersection point with the complement of the // discontinuity arc: Direction_3 normal = c.normal(); @@ -2219,11 +2224,11 @@ public: } }; - /*! Obtain a Make_x_monotone_2 function object */ + /*! obtains a `Make_x_monotone_2` function object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(*this); } - /*! A functor that splits an x-monotone arc at a directional point. */ + /*! A functor that splits an \f$x\f$-monotone arc at a directional point. */ class Split_2 { protected: using Traits = Arr_geodesic_arc_on_sphere_traits_2; @@ -2231,7 +2236,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Split_2(const Traits& traits) : m_traits(traits) {} @@ -2239,15 +2244,16 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Split a given x-monotone curve at a given point into two sub-curves. + /*! splits a given \f$x\f$-monotone curve at a given point into two + * sub-curves. * \param xc the curve to split * \param p the split point. - * \param xc1 (output) the left resulting subcurve. p is its right + * \param xc1 (output) the left resulting subcurve. `p` is its right * endpoint. - * \param xc2 (output) the right resulting subcurve. p is its left + * \param xc2 (output) the right resulting subcurve. `p` is its left * endpoint. - * \pre p lies on xc but is not one of its endpoints. - * \pre xc is not degenerate + * \pre `p` lies on xc but is not one of its endpoints. + * \pre `xc` is not degenerate */ void operator()(const X_monotone_curve_2& xc, const Point_2& p, X_monotone_curve_2& xc1, X_monotone_curve_2& xc2) const { @@ -2287,10 +2293,10 @@ public: } }; - /*! Obtain a Split_2 function object */ + /*! obtains a `Split_2` function object. */ Split_2 split_2_object() const { return Split_2(*this); } - /*! The clockwise-in-between function object */ + /*! The clockwise-in-between function object. */ class Clockwise_in_between_2 { protected: using Traits = Arr_geodesic_arc_on_sphere_traits_2; @@ -2298,7 +2304,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Clockwise_in_between_2(const Traits& traits) : m_traits(traits) {} @@ -2313,15 +2319,15 @@ public: } }; - /*! Obtain a Clockwise_in_between function object */ + /*! obtains a `Clockwise_in_between_2` function object. */ Clockwise_in_between_2 clockwise_in_between_2_object() const { return Clockwise_in_between_2(*this); } - /*! A functor that computes intersections between x-monotone arcs. */ + /*! A functor that computes intersections between \f$x\f$-monotone arcs. */ class Intersect_2 { private: - /*! Computes the intersection between two arcs contained in the same plane + /*! computes the intersection between two arcs contained in the same plane * \param l1_3 * \param r1_3 * \param l2_3 @@ -2473,7 +2479,7 @@ public: return oi; } - // Case 6 cannot occur. Two x-monotone curves cannot overlap twice. + // Case 6 cannot occur. Two \f$x\f$-monotone curves cannot overlap twice. CGAL_assertion(! in_between(l2, r2, r1)); // Case 4 @@ -2488,7 +2494,7 @@ public: return oi; } - /*! Determine whether a direction pierces an arc. + /*! determines whether a direction pierces an arc. * \param point the direction. * \param xc the arc. * \return true iff point pierces xc. @@ -2507,7 +2513,7 @@ public: if (point.is_min_boundary()) return (left.is_min_boundary()); if (xc.is_vertical()) { - // Compare the x coordinates. If they are not equal, return false: + // Compare the \f$x\f$-coordinates. If they are not equal, return false: Direction_3 normal = xc.normal(); bool plane_is_positive, p_is_positive; CGAL::Sign xsign = Traits::x_sign(normal); @@ -2526,14 +2532,15 @@ public: (!xc_is_positive && p_is_positive)) return false; - // Compare the y-coords: + // Compare the \f$y\f$-coordinates: return (((left.is_min_boundary()) || (m_traits.compare_y(point, left) != SMALLER)) && ((right.is_max_boundary()) || (m_traits.compare_y(point, right) != LARGER))); } - // The arc is not vertical. Compare the projections onto the xy-plane: + // The arc is not vertical. Compare the projections onto the + // \f$xy\f$-plane: typename Kernel::Equal_2 equal_2 = kernel.equal_2_object(); Direction_2 p = Traits::project_xy(point); Direction_2 r = Traits::project_xy(right); @@ -2549,7 +2556,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Intersect_2(const Traits& traits) : m_traits(traits) {} @@ -2557,7 +2564,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Find the intersections of the two given curves and insert them into the + /*! finds the intersections of the two given curves and insert them into the * given output iterator. As two spherical_arcs may itersect only once, * only a single intersection will be contained in the iterator. * \param xc1 the first curve. @@ -2604,7 +2611,7 @@ public: return oi; } - /*! If the endpoints of one arc coincide with the 2 poles resp, + /* If the endpoints of one arc coincide with the 2 poles resp, * the other arc is completely overlapping. */ if (xc1.left().is_min_boundary() && xc1.right().is_max_boundary()) { @@ -2615,7 +2622,7 @@ public: *oi++ = xc1; return oi; } - /*! Find an endpoint that does not coincide with a pole, and project + /* Find an endpoint that does not coincide with a pole, and project * it onto the xy plane. If the projection coincide with the negative * x, project onto the zx plane. Otherwise project onto the yz plane. */ @@ -2634,12 +2641,12 @@ public: bool p_y_is_positive = Traits::y_sign(point) == POSITIVE; if ((xz_plane && p_x_is_positive) || (!xz_plane && p_y_is_positive)) { - // The endpoints reside in the positive x-halfspace: + // The endpoints reside in the positive \f$x\f$-halfspace: return compute_intersection(xc1.left(), xc1.right(), xc2.left(), xc2.right(), normal, true, ccib, project, oi); } - // The endpoints reside in the negative x-halfspace: + // The endpoints reside in the negative \f$x\f$-halfspace: return compute_intersection(xc1.left(), xc1.right(), xc2.left(), xc2.right(), normal, true, cib, project, oi); @@ -2671,17 +2678,17 @@ public: } }; - /*! Obtain an Intersect_2 function object */ + /*! obtains an `Intersect_2` function object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } - /*! A functor that tests whether two x-monotone arcs can be merged. */ + /*! A functor that tests whether two \f$x\f$-monotone arcs can be merged. */ class Are_mergeable_2 { using Traits = Arr_geodesic_arc_on_sphere_traits_2; //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Are_mergeable_2(const Traits& traits) : m_traits(traits) {} @@ -2689,7 +2696,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given \f$x\f$-monotone curves. * \param xc1 the first curve. * \param xc2 the second curve. * \return true if the two arcs are mergeable; false otherwise. @@ -2740,11 +2747,11 @@ public: } }; - /*! Obtain an Are_mergeable_2 function object */ + /*! obtains an `Are_mergeable_2` function object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(*this); } - /*! A functor that merges two x-monotone arcs into one */ + /*! A functor that merges two \f$x\f$-monotone arcs into one */ class Merge_2 { protected: using Traits = Arr_geodesic_arc_on_sphere_traits_2; @@ -2752,7 +2759,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Merge_2(const Traits& traits) : m_traits(traits) {} @@ -2760,7 +2767,8 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Merge two given x-monotone curves into a single curve (spherical_arc). + /*! merges two given \f$x\f$-monotone curves into a single curve + * (spherical_arc). * \param xc1 the first curve. * \param xc2 the second curve. * \param xc Output: the merged curve. @@ -2841,7 +2849,7 @@ public: } }; - /*! Obtain a Merge_2 function object */ + /*! obtains a `Merge_2` function object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } //@} @@ -2855,12 +2863,12 @@ public: class Approximate_2 { public: - /*! Return an approximation of a point coordinate. + /*! returns an approximation of a point coordinate. * \param p the exact point. * \param i the coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return an approximation of p's x-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). + * \pre `i` is either 0 or 1. + * \return an approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). */ Approximate_number_type operator()(const Point_2& p, int i) const { CGAL_precondition((i == 0) || (i == 1) || (i == 2)); @@ -2868,7 +2876,7 @@ public: ((i == 1) ? CGAL::to_double(p.dy()) : CGAL::to_double(p.dz())); } - /*! Obtain an approximation of a point. + /*! obtains an approximation of a point. */ Approximate_point_2 operator()(const Point_2& p) const { Approximate_kernel::Direction_3 dir(operator()(p, 0), operator()(p, 1), @@ -2877,7 +2885,7 @@ public: return Approximate_point_2(dir, loc); } - /*! Obtain an approximation of an \f$x\f$-monotone curve. + /*! obtains an approximation of an \f$x\f$-monotone curve. */ template OutputIterator operator()(const X_monotone_curve_2& xcv, @@ -2917,7 +2925,7 @@ public: // Define the spanning vectors of the coordinate system where we are // going to make the approximation: - auto axis_x = vs; // x-axis will coincide with the vector from the + auto axis_x = vs; // \f$x\f$-axis will coincide with the vector from the // origin to the normalized SOURCE-vector auto axis_z = vn; // this will make sure that the orientation of the // approximated curve is consistent with the curve @@ -2925,8 +2933,9 @@ public: normalize(axis_y); // In this coordinate system the source has local coords (0,0), hence its - // initial angle with the X-axis is 0 degrees (radians) - // Compute the local coordinates and the angle it makes with the X-axis + // initial angle with the \f$X\f$-axis is 0 degrees (radians) + // Compute the local coordinates and the angle it makes with the + // \f$X\f$-axis Approximate_number_type theta; if (xcv.is_full()) theta = 2.0 * CGAL_PI; else { @@ -2976,7 +2985,7 @@ public: } }; - /*! Obtain an Approximate_2 function object */ + /*! obtains an `Approximate_2` function object. */ Approximate_2 approximate_2_object() const { return Approximate_2(); } //@} @@ -2986,7 +2995,7 @@ public: class Compare_endpoints_xy_2 { public: - /*! Compare the endpoints of an $x$-monotone curve lexicographically. + /*! compares the endpoints of an $x$-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param xc the curve. * \return SMALLER if the curve is directed right; @@ -2996,13 +3005,13 @@ public: { return (xc.is_directed_right()) ? SMALLER : LARGER; } }; - /*! Obtain a Compare_endpoints_xy_2 function object */ + /*! obtains a `Compare_endpoints_xy_2` function object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); } class Construct_opposite_2 { public: - /*! Construct an opposite x-monotone (with swapped source and target). + /*! constructs an opposite \f$x\f$-monotone (with swapped source and target). * \param xc the curve. * \return the opposite curve. */ @@ -3010,7 +3019,7 @@ public: { return xc.opposite(); } }; - /*! Obtain a Construct_opposite_2 function object */ + /*! obtains a `Construct_opposite_2` function object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); } //@} @@ -3026,7 +3035,7 @@ public: return os; } - /*! Inserter for the spherical_arc class used by the traits-class */ + /*! inserters a spherical_arc used by the traits-class */ template friend OutputStream& operator<<(OutputStream& os, const X_monotone_curve_2& xc) { @@ -3034,7 +3043,7 @@ public: return os; } - /*! Extractor for the spherical_arc class used by the traits-class */ + /*! extracts a spherical_arc used by the traits-class */ template friend InputStream& operator>>(InputStream& is, X_monotone_curve_2& arc) { CGAL_error_msg("Not implemented yet!"); @@ -3043,11 +3052,12 @@ public: #endif }; -/*! A Representation of an x-monotone great circular arc embedded on a sphere, - * as used by the Arr_geodesic_arc_on_sphere_traits_2 traits-class - * An x-monotone great circular arc cannot cross the closed hemi-circle arc of - * discontinuity, defined as the longitude that lies in the zx-plane, and is - * contained in the open halfspace (x > 0). +/*! A Representation of an \f$x\f$-monotone great circular arc embedded on a + * sphere, as used by the `Arr_geodesic_arc_on_sphere_traits_2` traits-class An + * x-monotone great circular arc cannot cross the closed hemi-circle arc of + * discontinuity, defined as the longitude that lies in the \f$zx\f$-plane, and + * is contained in the open halfspace (\f$x > 0\f$). + * * \todo At this point such an arc cannot have an angle of 180 degrees. * \todo It is always directed from its source to its target. */ @@ -3095,7 +3105,7 @@ protected: inline Sign z_sign(Direction_3 d) const { return CGAL::sign(d.dz()); } public: - /*! Default constructor - constructs an empty arc */ + /*! constructs default; constructs an empty arc */ Arr_x_monotone_geodesic_arc_on_sphere_3() : m_is_vertical(false), m_is_directed_right(false), @@ -3104,7 +3114,7 @@ public: m_is_empty(true) {} - /*! Constructor + /*! constructs * \param src the source point of the arc * \param trg the target point of the arc * \param plane the plane that contains the arc @@ -3130,7 +3140,7 @@ public: m_is_empty(is_empty) {} - /*! Copy constructor + /*! constructs copy * \param other the other arc */ Arr_x_monotone_geodesic_arc_on_sphere_3 @@ -3145,7 +3155,7 @@ public: m_is_empty = other.m_is_empty; } - /*! Assignment operator */ + /*! assigns */ Arr_x_monotone_geodesic_arc_on_sphere_3& operator= (const Arr_x_monotone_geodesic_arc_on_sphere_3& other) { m_source = other.m_source; @@ -3159,16 +3169,16 @@ public: return (*this); } - /*! Initialize a spherical_arc given that the two endpoint directions + /*! initializes a spherical_arc given that the two endpoint directions * have been set. It is assumed that the arc is the one with the smaller * angle among the two. - * 1. Find out whether the arc is x-monotone. - * 2. If it is x-monotone, + * 1. Find out whether the arc is \f$x\f$-monotone. + * 2. If it is \f$x\f$-monotone, * 2.1 Find out whether it is vertical, and * 2.2 whether the target is larger than the source (directed right). * The arc is vertical, iff * 1. one of its endpoint direction pierces a pole, or - * 2. the projections onto the xy-plane coincide. + * 2. the projections onto the \f$xy\f$-plane coincide. * \param source the source point. * \param target the target point. * \pre the source and target cannot be equal. @@ -3253,7 +3263,7 @@ public: Direction_3(m_target))); } - /*! Construct a full spherical_arc from a plane + /*! constructs a full spherical_arc from a plane * \param plane the containing plane. * \pre the plane is not vertical */ @@ -3284,7 +3294,7 @@ public: Arr_extended_direction_3(d, Arr_extended_direction_3::MID_BOUNDARY_LOC); } - /*! Construct a full spherical_arc from a common endpoint and a plane + /*! constructs a full spherical_arc from a common endpoint and a plane * \param plane the containing plane. * \pre the point lies on the plane * \pre the point lies on the open discontinuity arc @@ -3306,7 +3316,7 @@ public: #endif } - /*! Construct a spherical_arc from two endpoints directions contained + /*! constructs a spherical_arc from two endpoints directions contained * in a plane. * \param plane the containing plane. * \param source the source-point direction. @@ -3371,17 +3381,17 @@ public: set_is_directed_right(z_sign(normal) == POSITIVE); } - /*! Set the source endpoint direction. + /*! sets the source endpoint direction. * \param p the endpoint to set. */ void set_source(const Arr_extended_direction_3& p) { m_source = p; } - /*! Set the target endpoint direction. + /*! sets the target endpoint direction. * \param p the endpoint to set. */ void set_target(const Arr_extended_direction_3& p) { m_target = p; } - /*! Set the direction of the underlying plane. + /*! sets the direction of the underlying plane. * \param normal the plane direction. */ void set_normal(const Direction_3& normal) { m_normal = normal; } @@ -3392,46 +3402,46 @@ public: void set_is_degenerate(bool flag) { m_is_degenerate = flag; } void set_is_empty(bool flag) { m_is_empty = flag; } - /*! Obtain the source */ + /*! obtains the source */ const Arr_extended_direction_3& source() const { return m_source; } - /*! Obtain the target */ + /*! obtains the target */ const Arr_extended_direction_3& target() const { return m_target; } - /*! Obtain the normal to the containing plane */ + /*! obtains the normal to the containing plane */ const Direction_3& normal() const { return m_normal; } - /*! Obtain the (lexicographically) left endpoint direction */ + /*! obtains the (lexicographically) left endpoint direction */ const Arr_extended_direction_3& left() const { return (m_is_directed_right ? m_source : m_target); } - /*! Obtain the (lexicographically) right endpoint */ + /*! obtains the (lexicographically) right endpoint */ const Arr_extended_direction_3& right() const { return (m_is_directed_right ? m_target : m_source); } - /*! Determines whether the curve is vertical */ + /*! determines whether the curve is vertical */ bool is_vertical() const { return m_is_vertical; } - /*! Determines whether the curve is directed lexicographically from left to + /*! determines whether the curve is directed lexicographically from left to * right */ bool is_directed_right() const { return m_is_directed_right; } - /*! Determines whether the curve is a full circle */ + /*! determines whether the curve is a full circle */ bool is_full() const { return m_is_full; } - /*! Determines whether the curve is degenerate */ + /*! determines whether the curve is degenerate */ bool is_degenerate() const { return m_is_degenerate; } - /*! Determines whether the curve is degenerate */ + /*! determines whether the curve is degenerate */ bool is_empty() const { return m_is_empty; } - /*! Determines whether the curve is a meridian */ + /*! determines whether the curve is a meridian */ bool is_meridian() const { return left().is_min_boundary() && right().is_max_boundary(); } #if 0 - /*! Create a bounding box for the spherical_arc */ + /*! creates a bounding box for the spherical_arc */ Bbox_2 bbox() const { Kernel kernel; Segment_2 seg = kernel.construct_spherical_arc_2_object()(this->m_source, @@ -3440,7 +3450,7 @@ public: } #endif - /*! Flip the spherical_arc (swap it source and target) */ + /*! flips the spherical_arc (swap it source and target) */ Arr_x_monotone_geodesic_arc_on_sphere_3 opposite() const { Arr_x_monotone_geodesic_arc_on_sphere_3 opp; opp.m_source = this->m_target; @@ -3454,7 +3464,7 @@ public: return opp; } - /*! Determined whether a direction is contained in a plane + /*! determines whether a direction is contained in a plane * \param plane the 3D plane. * \param dir the 3D direction. * \return true if dir is contained in plane; false otherwise. @@ -3496,14 +3506,14 @@ protected: using Base::y_sign; using Base::z_sign; - //! Indicates whether the arc is x-monotone + //! Indicates whether the arc is \f$x\f$-monotone bool m_is_x_monotone; public: - /*! Default constructor - constructs an empty arc */ + /*! constructs default; constructs an empty arc */ Arr_geodesic_arc_on_sphere_3() : Base(), m_is_x_monotone(true) {} - /*! Copy constructor + /*! constructs copy * \param other the other arc */ #ifdef DOXYGEN_RUNNING @@ -3512,11 +3522,11 @@ public: { m_is_x_monotone = other.m_is_x_monotone; } #endif - /*! Constructor + /*! constructs * \param src the source point of the arc * \param trg the target point of the arc * \param normal the normal to the plane that contains the arc - * \param is_x_monotone is arc x-monotone ? + * \param is_x_monotone is arc \f$x\f$-monotone ? * \param is_vertical is the arc vertical ? * \param is_directed_right is the arc directed from left to right? * \param is_full is the arc a full (great) circle? @@ -3541,7 +3551,7 @@ public: CGAL_precondition(this->has_on(trg)); } - /*! Construct a spherical_arc from two endpoint directions contained + /*! constructs a spherical_arc from two endpoint directions contained * in a plane. * \param plane the containing plane. * \param source the source-point direction. @@ -3631,9 +3641,9 @@ public: /* Non of the endpoints coincide with a pole. * The projections of both endpoints lie on the same hemi-circle. - * Thus, either the arc is x-monotone, or it includes both poles. + * Thus, either the arc is \f$x\f$-monotone, or it includes both poles. * This means that it is sufficient to check whether one pole lies - * on the arc in order to determine x-monotonicity + * on the arc in order to determine \f$x\f$-monotonicity */ typename Traits::Project project = @@ -3663,7 +3673,7 @@ public: (!plane_is_positive && !ccib(d, t, s))); } - /*! Construct a full spherical_arc from a normal to a plane. + /*! constructs a full spherical_arc from a normal to a plane. * \param normal the normal to the plane containing the arc. */ Arr_geodesic_arc_on_sphere_3(const Direction_3& normal) { @@ -3676,18 +3686,18 @@ public: set_is_x_monotone(false); } - /*! Indicates whether the arc is x-monotone - * \return true if the arc is x-monotone; false otherwise + /*! indicates whether the arc is \f$x\f$-monotone + * \return true if the arc is \f$x\f$-monotone; false otherwise */ bool is_x_monotone() const { return m_is_x_monotone; } - /*! Set the flag that indicates whether the arc is x-monotone - * \param flag indicates whether the arc is x-monotone + /*! sets the flag that indicates whether the arc is \f$x\f$-monotone + * \param flag indicates whether the arc is \f$x\f$-monotone */ void set_is_x_monotone(bool flag) { m_is_x_monotone = flag; } }; -/*! Inserter for the spherical_arc class used by the traits-class */ +/*! inserts a spherical_arc used by the traits-class */ template OutputStream& operator<<(OutputStream& os, const Arr_extended_direction_3& ed) { @@ -3709,7 +3719,7 @@ OutputStream& operator<<(OutputStream& os, return os; } -/*! Inserter for the spherical_arc class used by the traits-class */ +/*! inserters a spherical_arc used by the traits-class */ template OutputStream& operator<<(OutputStream& os, @@ -3730,7 +3740,7 @@ operator<<(OutputStream& os, return os; } -/*! Extractor for the spherical-arc point class used by the traits-class */ +/*! extracts a spherical-arc point used by the traits-class */ template InputStream& operator>>(InputStream& is, Arr_extended_direction_3& point) { @@ -3745,7 +3755,7 @@ operator>>(InputStream& is, Arr_extended_direction_3& point) { return is; } -/*! Extractor for the spherical_arc class used by the traits-class */ +/*! extracts a spherical_arc used by the traits-class */ template InputStream& operator>>(InputStream& is, diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h index d966a52b41a..8c99f5c9750 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h @@ -55,13 +55,13 @@ private: FT m_c; public: - /*! Default Constructor */ + /*! constructs default */ Arr_plane_3() : m_a(0), m_b(0), m_c(0) {} - /*! Constructor */ + /*! constructs */ Arr_plane_3(int a, int b, int c) : m_a(a), m_b(b), m_c(c) {} - /*! Constructor */ + /*! constructs */ Arr_plane_3(typename Kernel::Plane_3 p) { CGAL_precondition_code(Kernel kernel;); @@ -71,7 +71,7 @@ public: m_a = p.a(); m_b = p.b(); m_c = p.c() ; } - /*! Constructor */ + /*! constructs */ Arr_plane_3(const Point_3 & p, const Point_3 & r) { FT prx = r.x() - p.x(); @@ -82,16 +82,16 @@ public: m_c = r.x() * pry - prx * r.y(); } - /*! Obtain the x coefficient */ + /*! obtains the x coefficient */ const FT & a() const { return m_a; } - /*! Obtain the y coefficient */ + /*! obtains the y coefficient */ const FT & b() const { return m_b; } - /*! Obtain the z coefficient */ + /*! obtains the z coefficient */ const FT & c() const { return m_c; } - /*! Obtain the i-th coefficient of the plane + /*! obtains the i-th coefficient of the plane * \param i the index of the coefficient * \return the i-th coefficient */ @@ -108,14 +108,14 @@ public: (c() == plane.c())); } - /*! Convert to kernel's plane */ + /*! converts to kernel's plane */ operator typename Kernel::Plane_3 () const { Kernel kernel; return kernel.construct_plane_3_object() (m_a, m_b, m_c, 0); } - /*! Compute the image point of the projection of p under an affine + /*! computes the image point of the projection of p under an affine * transformation, which maps the plane onto the xy-plane, with the * z-coordinate removed. * \param p the point @@ -139,7 +139,7 @@ public: return Point_2(x, y); } - /*! Compute a 3d point p_3 coincident to the plane, such that the image point + /*! computes a 3d point p_3 coincident to the plane, such that the image point * of the projection of p_3 under an affine transformation, which maps the * plane onto the a given axis-parallel plane is a given 2d point. * \param p_2 the image point @@ -183,7 +183,7 @@ public: return p_3; } - /*! Determine the relative position of a point and the plane + /*! determines the relative position of a point and the plane * \param p the point * \return ON_ORIENTED_BOUNDARY, ON_POSITIVE_SIDE, or ON_NEGATIVE_SIDE, * determined by the position of p relative to the oriented plane. @@ -194,7 +194,7 @@ public: } }; -/*! Intersect 2 planes +/*! intersects 2 planes * \param plane1 the first plane * \param plane2 the second plane * \return a variant that represents the intersection. It wraps a line of @@ -244,7 +244,7 @@ intersect(const Arr_plane_3 & plane1, return Intersection_result(plane1); } -/*! Compute the image point of the projection of p under an affine +/*! computes the image point of the projection of p under an affine * transformation, which maps the plane onto the xy-plane, with the * z-coordinate removed. * \param plane the plane @@ -259,7 +259,7 @@ construct_projected_xy_point(const Arr_plane_3 & plane, return plane.to_2d(p); } -/*! Export a plane to an output stream +/*! exports a plane to an output stream * \param os the output stream * \param plane the plane * \return the output stream @@ -272,6 +272,6 @@ inline std::ostream & operator<<(std::ostream & os, return os; } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h index 0d30f01166c..9598456cd59 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h @@ -63,7 +63,7 @@ public: Algebraic x; // The x-coordinate. Algebraic y; // The y-coordinate. - /*! Constructor. */ + /*! constructs. */ Intersection_point (const Algebraic& _s, const Algebraic& _t, const Algebraic& _x, const Algebraic& _y) : s(_s), t(_t), @@ -124,7 +124,7 @@ private: app_y (0) {} - /*! Constructor. */ + /*! constructs. */ My_point_2 (typename Parameter_list::const_iterator it, const Algebraic& _x, const Algebraic& _y) : prm_it (it), @@ -134,7 +134,7 @@ private: app_y (CGAL::to_double(_y)) {} - /*! Get the parameter value. */ + /*! obtains the parameter value. */ const Algebraic& parameter () const { return (*prm_it); @@ -177,7 +177,7 @@ private: public: - /*! Constructor. */ + /*! constructs. */ _Bezier_cache () {} @@ -869,6 +869,6 @@ _Bezier_cache::_compute_resultant return (det); } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h index b2af7346033..e63e7eea930 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h @@ -105,7 +105,7 @@ private: public: - /*! Default constructor. */ + /*! constructs default. */ _Bezier_curve_2_rep () : _no_self_inter (true), p_polyX(nullptr), @@ -114,7 +114,7 @@ public: p_normY(nullptr) {} - /*! Copy constructor (isn't really used). */ + /*! constructs copy (isn't really used). */ _Bezier_curve_2_rep (const _Bezier_curve_2_rep& other) : _ctrl_pts(other._ctrl_pts), _bbox(other._bbox), @@ -134,8 +134,7 @@ public: p_normY = new Integer(*(other.p_normY)); } - /*! - * Constructor from a given range of control points. + /*! constructs from a given range of control points. * \param pts_begin An iterator pointing to the first point in the range. * \param pts_end A past-the-end iterator for the range. * \pre The value-type of the input iterator must be Rat_kernel::Point_2. @@ -206,7 +205,7 @@ public: _no_self_inter = ! bound_tr.may_have_self_intersections (_ctrl_pts); } - /*! Destructor. */ + /*! destructs. */ ~_Bezier_curve_2_rep () { if (p_polyX != nullptr) @@ -222,14 +221,14 @@ public: /// \name Access the polynomials (lazily evaluated). //@{ - /*! Check if the polynomials are already constructed. */ + /*! checks if the polynomials are already constructed. */ bool has_polynomials () const { return (p_polyX != nullptr && p_normX != nullptr && p_polyY != nullptr && p_normY != nullptr); } - /*! Get the polynomial X(t). */ + /*! obtains the polynomial X(t). */ const Polynomial& x_polynomial () const { if (p_polyX == nullptr) @@ -238,7 +237,7 @@ public: return (*p_polyX); } - /*! Get the normalizing factor for X(t). */ + /*! obtains the normalizing factor for X(t). */ const Integer& x_norm () const { if (p_normX == nullptr) @@ -247,7 +246,7 @@ public: return (*p_normX); } - /*! Get the polynomial Y(t). */ + /*! obtains the polynomial Y(t). */ const Polynomial& y_polynomial () const { if (p_polyY == nullptr) @@ -256,7 +255,7 @@ public: return (*p_polyY); } - /*! Get the normalizing factor for Y(t). */ + /*! obtains the normalizing factor for Y(t). */ const Integer& y_norm () const { if (p_normY == nullptr) @@ -268,14 +267,12 @@ public: private: - /*! - * Construct the representation of X(t) and Y(t). + /*! construct the representation of X(t) and Y(t). * The function is declared as "const" as it changes only mutable members. */ void _construct_polynomials () const; - /*! - * Compute the value of n! / (j! k! (n-k-j)!). + /*! computes the value of n! / (j! k! (n-k-j)!). */ Integer _choose (int n, int j, int k) const; @@ -324,22 +321,19 @@ public: public: - /*! - * Default constructor. + /*!constructs default. */ _Bezier_curve_2 () : Bcv_handle (Bcv_rep()) {} - /*! - * Copy constructor. + /*! constructs copy. */ _Bezier_curve_2 (const Self& bc) : Bcv_handle (bc) {} - /*! - * Constructor from a given range of control points. + /*! constructs from a given range of control points. * \param pts_begin An iterator pointing to the first point in the range. * \param pts_end A past-the-end iterator for the range. * \pre The value-type of the input iterator must be Rat_kernel::Point_2. @@ -350,8 +344,7 @@ public: Bcv_handle (Bcv_rep (pts_begin, pts_end)) {} - /*! - * Assignment operator. + /*! assigns. */ Self& operator= (const Self& bc) { @@ -362,56 +355,49 @@ public: return (*this); } - /*! - * Get a unique curve ID (based on the actual representation pointer). + /*! obtains a unique curve ID (based on the actual representation pointer). */ size_t id () const { return (reinterpret_cast (this->ptr())); } - /*! - * Get the polynomial for the x-coordinates of the curve. + /*! obtains the polynomial for the x-coordinates of the curve. */ const Polynomial& x_polynomial () const { return (this->_rep().x_polynomial()); } - /*! - * Get the normalizing factor for the x-coordinates. + /*! obtains the normalizing factor for the x-coordinates. */ const Integer& x_norm () const { return (this->_rep().x_norm()); } - /*! - * Get the polynomial for the y-coordinates of the curve. + /*! obtains the polynomial for the y-coordinates of the curve. */ const Polynomial& y_polynomial () const { return (this->_rep().y_polynomial()); } - /*! - * Get the normalizing factor for the y-coordinates. + /*! obtains the normalizing factor for the y-coordinates. */ const Integer& y_norm () const { return (this->_rep().y_norm()); } - /*! - * Get the number of control points inducing the Bezier curve. + /*! obtains the number of control points inducing the Bezier curve. */ unsigned int number_of_control_points () const { return static_cast((this->_rep()._ctrl_pts.size())); } - /*! - * Get the i'th control point. + /*! obtains the i'th control point. * \pre i must be between 0 and n - 1, where n is the number of control * points. */ @@ -422,46 +408,40 @@ public: return ((this->_rep()._ctrl_pts)[i]); } - /*! - * Get an iterator for the first control point. + /*! obtains an iterator for the first control point. */ Control_point_iterator control_points_begin () const { return (this->_rep()._ctrl_pts.begin()); } - /*! - * Get a past-the-end iterator for control points. + /*! obtains a past-the-end iterator for control points. */ Control_point_iterator control_points_end () const { return (this->_rep()._ctrl_pts.end()); } - /*! - * Check if both curve handles refer to the same object. + /*! checks if both curve handles refer to the same object. */ bool is_same (const Self& bc) const { return (this->identical (bc)); } - /*! - * Compute a point of the Bezier curve given a rational t-value. + /*! computes a point of the Bezier curve given a rational t-value. * \param t The given t-value. * \return The point B(t). */ Rat_point_2 operator() (const Rational& t) const; - /*! - * Compute a point of the Bezier curve given an algebraic t-value. + /*! computes a point of the Bezier curve given an algebraic t-value. * \param t The given t-value. * \return The point B(t). */ Alg_point_2 operator() (const Algebraic& t) const; - /*! - * Sample a portion of the curve (for drawing purposes, etc.). + /*! samples a portion of the curve (for drawing purposes, etc.). * \param t_start The t-value to start with. * \param t_end The t-value to end at. * \param n_samples The required number of samples. @@ -507,8 +487,7 @@ public: return (oi); } - /*! - * Compute all parameter values t such that the x-coordinate of B(t) is x0. + /*! computes all parameter values t such that the x-coordinate of B(t) is x0. * Note that the function does not return only values between 0 and 1, so * the output t-values may belong to the imaginary continuation of the curve. * \param x0 The given x-coordinate. @@ -525,8 +504,7 @@ public: oi)); } - /*! - * Compute all parameter values t such that the y-coordinate of B(t) is y0. + /*! computes all parameter values t such that the y-coordinate of B(t) is y0. * Note that the function does not return only values between 0 and 1, so * the output t-values may belong to the imaginary continuation of the curve. * \param y0 The given y-coordinate. @@ -542,21 +520,18 @@ public: oi)); } - /*! - * Check if the two curves have the same support. + /*! checks if the two curves have the same support. */ bool has_same_support (const Self& bc) const; - /*! - * Get the bounding box of the curve. + /*! obtains the bounding box of the curve. */ const Bbox_2& bbox () const { return (this->_rep()._bbox); } - /*! - * Check if the curve contains not self intersections. + /*! checks if the curve contains not self intersections. * Note that there may not be any self intersections even if the * function returns true (but not vice versa). */ @@ -578,8 +553,7 @@ private: return (*(this->ptr())); } - /*! - * Compute all parameter values t, such that P(t) = val. + /*! computes all parameter values t, such that P(t) = val. * \param poly The polynomial. * \param norm Its normalizing factor. * \param val The required value. @@ -618,8 +592,7 @@ private: } }; -/*! - * Exporter for Bezier curves. +/*! exports a Bezier curves. */ template @@ -638,8 +611,7 @@ operator<< (std::ostream& os, return (os); } -/*! - * Importer for Bezier curves. +/*! imports a Bezier curves. */ template @@ -947,6 +919,6 @@ bool _Bezier_curve_2::has_same_support return (true); } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h index a2318c0d7d1..83161c83b46 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h @@ -95,7 +95,7 @@ private: public: - /*! Constructor, given an exact algebraic representation. */ + /*! constructs, given an exact algebraic representation. */ Originator (const Curve_2& c, const Algebraic& t) : _curve (c), _xid (0), @@ -104,7 +104,7 @@ private: set_parameter (t); } - /*! Constructor, given an exact algebraic representation. */ + /*! constructs, given an exact algebraic representation. */ Originator (const Curve_2& c, unsigned int xid, const Algebraic& t) : _curve (c), @@ -114,7 +114,7 @@ private: set_parameter (t); } - /*! Constructor with bounding information and no exact representation. */ + /*! constructs with bounding information and no exact representation. */ Originator (const Curve_2& c, const Bez_point_bound& bpb) : _curve (c), _xid (0), @@ -122,7 +122,7 @@ private: p_t (nullptr) {} - /*! Constructor with bounding information and no exact representation. */ + /*! constructs with bounding information and no exact representation. */ Originator (const Curve_2& c, unsigned int xid, const Bez_point_bound& bpb) : _curve (c), @@ -174,19 +174,19 @@ private: return (*this); } - /*! Get the originating curve. */ + /*! obtains the originating curve. */ const Curve_2& curve () const { return (_curve); } - /*! Get the serial number of the originating x-monotone curve. */ + /*! obtains the serial number of the originating x-monotone curve. */ unsigned int xid () const { return (_xid); } - /*! Get the bounding information. */ + /*! obtains the bounding information. */ const Bez_point_bound& point_bound () const { return (_bpb); @@ -264,7 +264,7 @@ private: BoundNT t_min; /*!< Minimal parameter value. */ BoundNT t_max; /*!< Maximal parameter value. */ - /*! Constructor given control points an a t-range. */ + /*! constructs given control points an a t-range. */ Subcurve (const Control_points& _ctrl, const BoundNT& _tmin, const BoundNT& _tmax) : @@ -273,7 +273,7 @@ private: t_max (_tmax) {} - /*! Constructor given a t-range. */ + /*! constructs given a t-range. */ Subcurve (const BoundNT& _tmin, const BoundNT& _tmax) : t_min (_tmin), @@ -924,7 +924,7 @@ public: _rep()._bbox = bbox; } - /*! Get the bounding box of the point. */ + /*! obtains the bounding box of the point. */ void get_bbox (typename Bounding_traits::NT& min_x, typename Bounding_traits::NT& min_y, typename Bounding_traits::NT& max_x, @@ -938,13 +938,13 @@ public: private: - /*! Get the representation (const version). */ + /*! obtains the representation (const version). */ inline const Bpt_rep& _rep () const { return (*(this->ptr())); } - /*! Get the representation (non-const version). */ + /*! obtains the representation (non-const version). */ inline Bpt_rep& _rep () { return (*(this->ptr())); @@ -1701,6 +1701,6 @@ void _Bezier_point_2_rep::_make_exact CGAL_error(); } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h index 02bd94b4e21..ba17acc09ad 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h @@ -130,7 +130,7 @@ private: Rational t_min; Rational t_max; - /*! Get the rational bounding box of the subcurve. */ + /*! obtains the rational bounding box of the subcurve. */ void bbox(Rational& x_min, Rational& y_min, Rational& x_max, Rational& y_max) const { @@ -464,7 +464,7 @@ private: const Point_2& p, Bezier_cache& cache) const; - /*! Get the range of t-value over which the subcurve is defined. + /*! obtains the range of t-value over which the subcurve is defined. * \param cache Caches the vertical tangency points and intersection points. * \return A pair comprised of the t-value for the source point and the * t-value for the target point. @@ -2585,6 +2585,6 @@ _exact_vertical_position(const Point_2& p, return EQUAL; } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h index dfa75584c53..9c799d7b76a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h @@ -50,13 +50,13 @@ private: CoordNT _y; public: - /*! Default constructor. */ + /*! constructs default. */ _One_root_point_2_rep() : _x(0), _y(0) {} - /*! Constructor of a point with one-root coefficients. + /*! constructs a point with one-root coefficients. This constructor of a point can also be used with rational coefficients thanks to convertor of CoordNT. */ _One_root_point_2_rep(const CoordNT& x, const CoordNT& y) : @@ -83,28 +83,29 @@ private: public: typedef typename Point_rep::CoordNT CoordNT; - /*! Default constructor. */ + /*! constructs default. */ _One_root_point_2() : Point_handle(Point_rep()) {} - /*! Copy constructor. */ + /*! constructs copy. */ _One_root_point_2(const Self& p) : Point_handle(p) {} _One_root_point_2& operator=(const _One_root_point_2&)=default; - /*! Constructor of a point with one-root coefficients. - This constructor of a point can also be used with rational coefficients - thanks to convertor of CoordNT. */ + /*! constructs a point with one-root coefficients. + * This constructor of a point can also be used with rational coefficients + * thanks to convertor of CoordNT. + */ _One_root_point_2(const CoordNT& x, const CoordNT& y) : Point_handle(Point_rep(x, y)) {} - /*! Get the x-coordinate. */ + /*! obtains the x-coordinate. */ const CoordNT& x() const { return (this->ptr()->_x); } - /*! Get the y-coordinate. */ + /*! obtains the y-coordinate. */ const CoordNT& y() const { return (this->ptr()->_y); } - /*! Check for equality. */ + /*! checks for equality. */ bool equals(const Self& p) const { if (this->identical(p)) return (true); @@ -117,7 +118,7 @@ public: bool operator == (const Self& p) const { return equals(p); } - /*! Set the point coordinates. */ + /*! sets the point coordinates. */ void set(const NT& x, const NT& y) { this->copy_on_write(); @@ -126,7 +127,7 @@ public: return; } - /*! Set the point coordinates. */ + /*! sets the point coordinates. */ void set(const CoordNT& x, const CoordNT& y) { this->copy_on_write(); @@ -136,8 +137,7 @@ public: } }; -/*! - * Exporter for conic arcs. +/*! exports a conic arc. */ template std::ostream& operator<<(std::ostream& os, @@ -187,14 +187,14 @@ protected: Orientation m_orient; // The orientation (COLLINEAR for line segments). public: - /*! Default constructor. */ + /*! constructs default. */ _Circle_segment_2() : m_is_full(false), m_has_radius(false), m_orient(COLLINEAR) {} - /*! Constructor from a line segment. + /*! constructs from a line segment. * \param seg The segment. */ _Circle_segment_2(const Segment_2& seg) : @@ -206,7 +206,7 @@ public: m_orient(COLLINEAR) {} - /*! Constructor from of a line segment. + /*! constructs from of a line segment. * \param ps The source point. * \param pt The target point. */ @@ -220,7 +220,7 @@ public: m_orient(COLLINEAR) {} - /*! Constructor of a segment, given a supporting line and two endpoints, + /*! constructs a segment, given a supporting line and two endpoints, * which need not necessarily have rational coordinates. * \param line The supporting line. * \param source The source point. @@ -243,7 +243,7 @@ public: -target.y() * line.b()) == EQUAL); } - /*! Constructor from a circle. + /*! constructs from a circle. * \param circ The circle. */ _Circle_segment_2(const Circle_2& circ) : @@ -253,7 +253,7 @@ public: m_orient(circ.orientation()) { CGAL_assertion(m_orient != COLLINEAR); } - /*! Constructor from a circle. + /*! constructs from a circle. * \param c The circle center. * \param r The radius. * \param orient The orientation of the circle. @@ -267,7 +267,7 @@ public: m_orient(orient) { CGAL_assertion (orient != COLLINEAR); } - /*! Constructor of a circular arc, given a supporting circle and two + /*! constructs a circular arc, given a supporting circle and two * endpoints, which need not necessarily have rational coordinates. * The orientation of the circle determines the orientation of the arc. * \param circ The supporting circle. @@ -297,7 +297,7 @@ public: CGAL::square(target.y() - circ.center().y())) == EQUAL); } - /*! Constructor of a circular arc, given a supporting circle and two + /*! constructs a circular arc, given a supporting circle and two * endpoints, which need not necessarily have rational coordinates. * \param c The circle center. * \param r The radius. @@ -330,7 +330,7 @@ public: CGAL::square(target.y() - c.y())) == EQUAL); } - /*! Constructor of a circular arc, from the given three points, in case of + /*! constructs a circular arc, from the given three points, in case of * three collinear points, a segment will be constructed. * \param p1 The arc source. * \param p2 A point in the interior of the arc. @@ -408,19 +408,19 @@ public: m_circ = Circle_2(circ_center, sqr_rad, m_orient); } - /*! Get the orientation of the curve. + /*! obtains the orientation of the curve. * \return COLLINEAR in case of a line segment, * CLOCKWISE or COUNTERCLOCKWISE for circular curves. */ inline Orientation orientation() const { return (m_orient); } - /*! Check if the arc is linear. */ + /*! checks if the arc is linear. */ inline bool is_linear() const { return (m_orient == COLLINEAR); } - /*! Check if the arc is circular. */ + /*! checks if the arc is circular. */ inline bool is_circular() const { return (m_orient != COLLINEAR); } - /*! Obtain the supporting line. + /*! obtains the supporting line. * \pre The curve orientation is COLLINEAR. */ const Line_2& supporting_line() const @@ -429,7 +429,7 @@ public: return m_line; } - /*! Obtain the supporting circle. + /*! obtains the supporting circle. * \pre The curve orientation is not COLLINEAR. */ const Circle_2& supporting_circle() const @@ -438,11 +438,10 @@ public: return m_circ; } - /*! Check if the curve is a full circle. */ + /*! checks if the curve is a full circle. */ bool is_full() const { return (m_is_full); } - /*! - * Get the source point. + /*! obtains the source point. * \pre The curve is not a full circle. */ const Point_2& source() const @@ -451,8 +450,7 @@ public: return (m_source); } - /*! - * Get the target point. + /*! obtains the target point. * \pre The curve is not a full circle. */ const Point_2& target() const @@ -461,7 +459,7 @@ public: return (m_target); } - /*! Get the vertical tangency points the arc contains. + /*! obtains the vertical tangency points the arc contains. * \param vpts Output: The vertical tangency points. * \pre The curve is circular. * \return The number of points (0, 1, or 2). @@ -514,7 +512,7 @@ public: } private: - /*! Obtain the vertical tangency points the arc contains, assuming it is + /*! obtains the vertical tangency points the arc contains, assuming it is * counterclockwise oriented. * \param vpts Output: The vertical tangency points. * \return The number of points (0, 1, or 2). @@ -580,7 +578,7 @@ private: return (n_vpts); } - /*! Obtain the index of the quarter-plane containing the given point, + /*! obtains the index of the quarter-plane containing the given point, * where the circle center is considered to be the origin. */ int _quart_index(const Point_2& p) const @@ -606,7 +604,7 @@ private: } }; -/*! Exporter for line segments and circular arcs. +/*! exports a line segments or a circular arc. */ template std::ostream& @@ -648,8 +646,7 @@ public: typedef std::pair Intersection_point; typedef std::list Intersection_list; - /*! - * \struct Less functor for Curve_id_pair. + /*! \struct Less functor for Curve_id_pair. */ struct Less_id_pair { bool operator()(const Curve_id_pair& ip1, const Curve_id_pair& ip2) const @@ -692,7 +689,7 @@ protected: // The rest of the bits represent the curve index. public: - /*! Default constructor. + /*! constructs default. */ _X_monotone_circle_segment_2() : m_first(), @@ -703,7 +700,7 @@ public: m_info(0) {} - /*! Construct an arc from a line segment. + /*! constructs an arc from a line segment. * \param line The supporting line. * \param source The source point. * \param target The target point. @@ -734,7 +731,7 @@ public: if (res == SMALLER) m_info = (m_info | IS_DIRECTED_RIGHT_MASK); } - /*! Construct a segment arc from two kernel points + /*! constructs a segment arc from two kernel points * \param source the source point. * \ param target the target point. * \pre source and target are not equal. @@ -766,7 +763,7 @@ public: if (res == SMALLER) m_info = (m_info | IS_DIRECTED_RIGHT_MASK); } - /*! Construct a circular arc. + /*! constructs a circular arc. * \param line The supporting line. * \param source The source point. * \param target The target point. @@ -795,14 +792,14 @@ public: else m_info = (m_info | CLOCKWISE_CODE); } - /*! Check if the arc is linear. */ + /*! checks if the arc is linear. */ inline bool is_linear () const { return ((m_info & ORIENTATION_MASK) == 0); } - /*! Check if the arc is circular. */ + /*! checks if the arc is circular. */ inline bool is_circular () const { return ((m_info & ORIENTATION_MASK) != 0); } - /*! Obtain the supporting line. + /*! obtains the supporting line. * \pre The arc is linear (a line segment). */ Line_2 supporting_line() const @@ -811,7 +808,7 @@ public: return (Line_2 (a(), b(), c())); } - /*! Obtain the supporting circle. + /*! obtains the supporting circle. * \pre The arc is circular. */ Circle_2 supporting_circle() const @@ -822,13 +819,13 @@ public: return (Circle_2(center , sqr_r(), orientation())); } - /*! Get the source point. */ + /*! obtains the source point. */ inline const Point_2& source() const { return (m_source); } - /*! Get the target point. */ + /*! obtains the target point. */ inline const Point_2& target() const { return (m_target); } - /*! True if the arc is directed right, false otherwise. */ + /*! returns true if the arc is directed right, false otherwise. */ bool is_directed_right() const { return ((m_info & IS_DIRECTED_RIGHT_MASK) != 0); } @@ -836,15 +833,15 @@ public: bool has_right() const { return true; } - /*! Get the left endpoint of the arc. */ + /*! obtains the left endpoint of the arc. */ inline const Point_2& left() const { return (((m_info & IS_DIRECTED_RIGHT_MASK) != 0) ? m_source : m_target); } - /*! Get the right endpoint of the arc. */ + /*! obtains the right endpoint of the arc. */ inline const Point_2& right() const { return (((m_info & IS_DIRECTED_RIGHT_MASK) != 0) ? m_target : m_source); } - /*! Check whether the given point is in the x-range of the arc. + /*! checks whether the given point is in the x-range of the arc. */ bool is_in_x_range(const Point_2& p) const { @@ -856,11 +853,11 @@ public: return (CGAL::compare (p.x(), right().x()) != LARGER); } - /*! Check if the arc is a vertical segment. */ + /*! checks if the arc is a vertical segment. */ inline bool is_vertical() const { return ((m_info & IS_VERTICAL_SEGMENT_MASK) != 0); } - /*! Get the orientation of the arc. */ + /*! obtains the orientation of the arc. */ inline Orientation orientation() const { unsigned int or_ = (m_info & ORIENTATION_MASK); @@ -871,7 +868,7 @@ public: return (CGAL::COLLINEAR); } - /*! Check the position of a given point with respect to the arc. + /*! checks the position of a given point with respect to the arc. */ Comparison_result point_position(const Point_2& p) const { @@ -879,7 +876,7 @@ public: else return (_circ_point_position (p)); } - /*! Compare the two arcs to the right of their intersection point. + /*! compares the two arcs to the right of their intersection point. */ Comparison_result compare_to_right(const Self& cv, const Point_2& p) const { @@ -895,7 +892,7 @@ public: } } - /*! Compare the two arcs to the left of their intersection point. + /*! compares the two arcs to the left of their intersection point. */ Comparison_result compare_to_left(const Self& cv, const Point_2& p) const { @@ -911,7 +908,7 @@ public: } } - /*! Check whether the two arcs have the same supporting curve. + /*! checks whether the two arcs have the same supporting curve. */ bool has_same_supporting_curve(const Self& cv) const { @@ -951,7 +948,7 @@ public: CGAL::compare(fact2*c(), fact1*cv.c()) == EQUAL); } - /*! Check whether the two curves are equal. + /*! checks whether the two curves are equal. */ bool equals(const Self& cv) const { @@ -970,7 +967,7 @@ public: m_source.equals(cv.m_target) && m_target.equals(cv.m_source))); } - /*! Split the curve at a given point into two sub-arcs. + /*! splits the curve at a given point into two sub-arcs. */ void split(const Point_2& p, Self& c1, Self& c2) const { @@ -989,7 +986,7 @@ public: } } - /*! Compute the intersections between the two arcs or segments. + /*! computes the intersections between the two arcs or segments. */ template OutputIterator intersect(const Self& cv, OutputIterator oi, @@ -1076,7 +1073,7 @@ public: return oi; } - /*! Check whether it is possible to merge our arc with the given arc. + /*! checks whether it is possible to merge our arc with the given arc. */ bool can_merge_with(const Self& cv) const { @@ -1089,7 +1086,7 @@ public: return (right().equals(cv.left()) || left().equals(cv.right())); } - /*! Merge our arc with the given arc. + /*! merges our arc with the given arc. * \pre The two arcs are mergeable. */ void merge(const Self& cv) @@ -1111,7 +1108,7 @@ public: } } - /*! construct an opposite arc. */ + /*! constructs an opposite arc. */ Self construct_opposite() const { Self opp_cv; @@ -1153,23 +1150,22 @@ public: } protected: - /*! Get the curve index. */ + /*! obtains the curve index. */ inline unsigned int _index() const { return (m_info >> INDEX_SHIFT_BITS); } /// \name Accessors for circular arcs. //@{ - /*! Get the x-coordinate of the center of the supporting circle. */ + /*! obtains the x-coordinate of the center of the supporting circle. */ inline const NT& x0() const { return (m_first); } - /*! Get the y-coordinate of the center of the supporting circle. */ + /*! obtains the y-coordinate of the center of the supporting circle. */ inline const NT& y0() const { return (m_second); } - /*! Get the squared radius of the supporting circle. */ + /*! obtains the squared radius of the supporting circle. */ inline const NT& sqr_r() const { return (m_third); } - /*! - * Check if the circular arc lies on the upper half of the supporting circle. + /*! checks if the circular arc lies on the upper half of the supporting circle. */ inline bool _is_upper() const { @@ -1186,21 +1182,20 @@ protected: /// \name Accessors for line segments. //@{ - /*! Get the coefficient of x in the equation of the supporting line. */ + /*! obtains the coefficient of x in the equation of the supporting line. */ inline const NT& a() const { return (m_first); } - /*! Get the coefficient of y in the equation of the supporting line. */ + /*! obtains the coefficient of y in the equation of the supporting line. */ inline const NT& b() const { return (m_second); } - /*! Get the free coefficient in the equation of the supporting line. */ + /*! obtains the free coefficient in the equation of the supporting line. */ inline const NT& c() const { return (m_third); } //@} /// \name Auxiliary functions for the point_position predicate. //@{ - /*! - * Check the position of a given point with respect to a line segment. + /*! checks the position of a given point with respect to a line segment. */ Comparison_result _line_point_position(const Point_2& p) const { @@ -1232,8 +1227,7 @@ protected: return (CGAL::compare (p.y(), y_proj)); } - /*! - * Check the position of a given point with respect to a circular arc. + /*! checks the position of a given point with respect to a circular arc. */ Comparison_result _circ_point_position(const Point_2& p) const { @@ -1274,8 +1268,7 @@ protected: /// \name Auxiliary functions for the compare_to_right predicate. //@{ - /*! - * Compare two line segments to the right of their intersection point. + /*! compares two line segments to the right of their intersection point. */ Comparison_result _lines_compare_to_right(const Self& cv, const Point_2& /* p */) const @@ -1295,8 +1288,7 @@ protected: return (CGAL::compare (cv.a()/cv.b(), a()/b())); } - /*! - * Compare a circular arcs (this) and a line segment (cv) to the right of + /*! compares a circular arcs (this) and a line segment (cv) to the right of * their intersection point. */ Comparison_result _circ_line_compare_to_right(const Self& cv, @@ -1339,7 +1331,7 @@ protected: return (_is_upper() ? SMALLER : LARGER); } - /*! Compare two circular arcs to the right of their intersection point. + /*! compares two circular arcs to the right of their intersection point. */ Comparison_result _circs_compare_to_right(const Self& cv, const Point_2& p) const @@ -1471,8 +1463,7 @@ protected: /// \name Auxiliary functions for the compare_to_left predicate. //@{ - /*! - * Compare two line segments to the left of their intersection point. + /*! compares two line segments to the left of their intersection point. */ Comparison_result _lines_compare_to_left(const Self& cv, const Point_2& ) const @@ -1494,7 +1485,7 @@ protected: return (CGAL::compare (a()/b(), cv.a()/cv.b())); } - /*! Compare a circular arcs (this) and a line segment (cv) to the left of + /*! compares a circular arcs (this) and a line segment (cv) to the left of * their intersection point. */ Comparison_result _circ_line_compare_to_left(const Self& cv, @@ -1540,8 +1531,7 @@ protected: return (_is_upper() ? SMALLER : LARGER); } - /*! - * Compare the two arcs to the left of their intersection point. + /*! compares the two arcs to the left of their intersection point. */ Comparison_result _circs_compare_to_left(const Self& cv, const Point_2& p) const @@ -1675,7 +1665,7 @@ protected: /// \name Auxiliary functions for computing intersections. //@{ - /*! Compute the intersections between two line segments. + /*! computes the intersections between two line segments. */ void _lines_intersect(const Self& cv, Intersection_list& inter_list) const @@ -1701,7 +1691,7 @@ protected: inter_list.push_back(Intersection_point(p, mult)); } - /*! Compute the intersections between the supporting circle of (*this) and + /*! computes the intersections between the supporting circle of (*this) and * the supporting line of the segment cv. */ void _circ_line_intersect(const Self& cv, @@ -1826,7 +1816,7 @@ protected: } } - /*! Compute the intersections between two circles. + /*! computes the intersections between two circles. */ void _circs_intersect(const Self& cv, Intersection_list& inter_list) const { @@ -1891,7 +1881,7 @@ protected: } } - /*! Check if the given point lies on the arc. + /*! checks if the given point lies on the arc. * \pre p lies on the supporting curve. */ bool _is_between_endpoints(const Point_2& p) const @@ -1928,7 +1918,7 @@ protected: return (this->is_in_x_range(p)); } - /*! Check whether the given point lies in the interior of the arc. + /*! checks whether the given point lies in the interior of the arc. * \pre p lies on the supporting curve. */ bool _is_strictly_between_endpoints(const Point_2& p) const @@ -1937,7 +1927,7 @@ protected: return (_is_between_endpoints(p)); } - /*! Compute the overlap with a given arc having the same supporting curve. + /*! computes the overlap with a given arc having the same supporting curve. * \param cv The given arc. * \param overlap Output: The overlapping arc (if any). * \return Whether we found an overlap. @@ -2048,7 +2038,7 @@ protected: *oi++ = std::make_pair(x_right, y_right); // The right point. } - /*! Trim the arc given its new endpoints. + /*! trims the arc given its new endpoints. * \param ps The new source point. * \param pt The new target point. * \return The new trimmed arc. @@ -2068,7 +2058,7 @@ protected: //@} }; -/*! Exporter for circular arcs (or line segments). +/*! exports a circular arcs or a line segment */ template std::ostream& @@ -2082,6 +2072,6 @@ operator<<(std::ostream& os, return (os); } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h index c115673ff53..b0bd7fd018e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h @@ -105,7 +105,7 @@ public: /// \name Deprecated Constructions. //@{ - /*!Construct a conic arc which is the full conic: + /*! constructs a conic arc which is the full conic: * C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0 * \pre The conic C must be an ellipse (so 4rs - t^2 > 0). */ @@ -129,7 +129,7 @@ public: _set_full(rat_coeffs, true); } - /*! Construct a conic arc which lies on the conic: + /*! constructs a conic arc which lies on the conic: * C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0 * \param orient The orientation of the arc (clockwise or counterclockwise). * \param source The source point. @@ -156,7 +156,7 @@ public: _set(rat_coeffs); } - /*! Construct a segment conic arc from two endpoints. + /*! constructs a segment conic arc from two endpoints. * \param source the source point with rational coordinates. */ CGAL_DEPRECATED Conic_arc_2(const Point_2& source, const Point_2& target) : @@ -186,7 +186,7 @@ public: m_extra_data->side = ZERO; } - /*! Construct a conic arc from the given line segment. + /*! constructs a conic arc from the given line segment. * \param seg The line segment with rational endpoints. */ CGAL_DEPRECATED Conic_arc_2 (const Rat_segment_2& seg) : @@ -241,7 +241,7 @@ public: _set(rat_coeffs); } - /*! Set a circular arc that corresponds to a full circle. + /*! sets a circular arc that corresponds to a full circle. * \param circ The circle (with rational center and rational squared radius). */ CGAL_DEPRECATED Conic_arc_2(const Rat_circle_2& circ) : @@ -277,7 +277,7 @@ public: _set_full(rat_coeffs, false); } - /*! Set a circular arc that lies on the given circle: + /*! sets a circular arc that lies on the given circle: * C: (x - x0)^2 + (y - y0)^2 = R^2 * \param orient The orientation of the circle. * \param source The source point. @@ -342,7 +342,7 @@ public: _set(rat_coeffs); } - /*! Construct a circular arc from the given three points. + /*! constructs a circular arc from the given three points. * \param p1 The arc source. * \param p2 A point in the interior of the arc. * \param p3 The arc target. @@ -424,7 +424,7 @@ public: _set(rat_coeffs); } - /*! Construct a conic arc from the given five points, specified by the + /*! constructs a conic arc from the given five points, specified by the * points p1, p2, p3, p4 and p5. * \param p1 The source point of the given arc. * \param p2,p3,p4 Points lying on the conic arc, between p1 and p5. @@ -515,7 +515,7 @@ public: } } - /*! Construct a conic arc which lies on the conic: + /*! constructs a conic arc which lies on the conic: * C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0 * The source and the target are specified by the intersection of the * conic with: @@ -684,7 +684,7 @@ public: _set(rat_coeffs); } - /*! Get a bounding box for the conic arc. + /*! obtains a bounding box for the conic arc. * \return The bounding box. */ CGAL_DEPRECATED Bbox_2 bbox() const { @@ -769,7 +769,7 @@ public: //@} protected: - /*! Calculate the vertical tangency points of the arc. + /*! calculates the vertical tangency points of the arc. * \param vpts The vertical tangency points. * \pre The vpts vector should be allocated at the size of 2. * \return The number of vertical tangency points. @@ -797,7 +797,7 @@ protected: return m; } - /*! Calculate the horizontal tangency points of the arc. + /*! calculates the horizontal tangency points of the arc. * \param hpts The horizontal tangency points. * \pre The hpts vector should be allocated at the size of 2. * \return The number of horizontal tangency points. @@ -825,7 +825,7 @@ protected: return m; } - /*! Check whether the given point is strictly between the source and the + /*! checks whether the given point is strictly between the source and the * target (but not any of them). * The point is assumed to be on the conic's boundary. * \param p The query point. @@ -892,7 +892,7 @@ protected: } } - /*! Find the vertical tangency points of the underlying conic. + /*! finds the vertical tangency points of the underlying conic. * \param ps The output points of vertical tangency. * This area must be allocated at the size of 2. * \return The number of vertical tangency points. @@ -970,7 +970,7 @@ protected: return n; } - /*! Find the horizontal tangency points of the underlying conic. + /*! finds the horizontal tangency points of the underlying conic. * \param ps The output points of horizontal tangency. * This area must be allocated at the size of 2. * \return The number of horizontal tangency points. @@ -1020,7 +1020,7 @@ protected: return n; } - /*! Set the properties of a conic arc that is really a full curve + /*! sets the properties of a conic arc that is really a full curve * (that is, an ellipse). * \param rat_coeffs A vector of size 6, storing the rational coefficients * of x^2, y^2, xy, x, y and the free coefficient resp. @@ -1074,7 +1074,7 @@ protected: else reset_flags(); // invalid arc } - /*! Check whether the given point lies on the supporting conic of the arc. + /*! checks whether the given point lies on the supporting conic of the arc. * \param p The query point. * \return (true) if p lies on the supporting conic; (false) otherwise. */ @@ -1093,7 +1093,7 @@ protected: return (CGAL::sign(val) == ZERO); } - /*! Build the data for hyperbolic arc, containing the characterization of the + /*! builds the data for hyperbolic arc, containing the characterization of the * hyperbolic branch the arc is placed on. */ CGAL_DEPRECATED void _build_hyperbolic_arc_data() { @@ -1189,7 +1189,7 @@ protected: sign_of_extra_data(m_target.x(), m_target.y())); } - /*! Check whether the given point is between the source and the target. + /*! checks whether the given point is between the source and the target. * The point is assumed to be on the conic's boundary. * \param p The query point. * \return (true) if the point is between the two endpoints, @@ -1206,7 +1206,7 @@ protected: else return _is_strictly_between_endpoints(p); } - /*! Find the y coordinates of the underlying conic at a given x coordinate. + /*! finds the y coordinates of the underlying conic at a given x coordinate. * \param x The x coordinate. * \param ys The output y coordinates. * \pre The vector ys must be allocated at the size of 2. @@ -1224,7 +1224,7 @@ protected: return (_solve_quadratic_equation(A, B, C, ys[0], ys[1])); } - /*! Find all points on the arc with a given x-coordinate. + /*! finds all points on the arc with a given x-coordinate. * \param p A placeholder for the x-coordinate. * \param ps The point on the arc at x(p). * \pre The vector ps should be allocated at the size of 2. @@ -1248,7 +1248,7 @@ protected: return m; } - /*! Solve the given quadratic equation: Ax^2 + B*x + C = 0. + /*! solves the given quadratic equation: Ax^2 + B*x + C = 0. * \param x_minus The root obtained from taking -sqrt(discriminant). * \param x_plus The root obtained from taking -sqrt(discriminant). * \return The number of disticnt solutions to the equation. @@ -1289,7 +1289,7 @@ protected: return 2; } - /*! Find the x coordinates of the underlying conic at a given y coordinate. + /*! finds the x coordinates of the underlying conic at a given y coordinate. * \param y The y coordinate. * \param xs The output x coordinates. * \pre The vector xs must be allocated at the size of 2. @@ -1308,7 +1308,7 @@ protected: return (_solve_quadratic_equation(A, B, C, xs[0], xs[1])); } - /*! Find all points on the arc with a given y-coordinate. + /*! finds all points on the arc with a given y-coordinate. * \param p A placeholder for the y-coordinate. * \param ps The point on the arc at x(p). * \pre The vector ps should be allocated at the size of 2. @@ -1332,7 +1332,7 @@ protected: return m; } - /*! Set the properties of a conic arc (for the usage of the constructors). + /*! sets the properties of a conic arc (for the usage of the constructors). * \param rat_coeffs A vector of size 6, storing the rational coefficients * of x^2, y^2, xy, x, y and the free coefficient resp. */ @@ -1454,7 +1454,7 @@ public: /// \name Construction and destruction functions. //@{ - /*! Default constructor. + /*! constructs default. */ Conic_arc_2() : m_r(0), m_s(0), m_t(0), m_u(0), m_v(0), m_w(0), @@ -1463,7 +1463,7 @@ public: m_extra_data(nullptr) {} - /*! Copy constructor. + /*! constructs copy. * \param arc The copied arc. */ Conic_arc_2(const Self& arc) : @@ -1478,11 +1478,11 @@ public: new Extra_data(*(arc.m_extra_data)) : nullptr; } - /*! Destructor. + /*! destructs. */ virtual ~Conic_arc_2() { if (m_extra_data != nullptr) delete m_extra_data; } - /*! Assignment operator. + /*! assigns. * \param arc The copied arc. */ const Self& operator=(const Self& arc) { @@ -1515,15 +1515,15 @@ public: /// \name Get the arc properties. //@{ - /*! Determine whether the arc is valid. + /*! determines whether the arc is valid. */ bool is_valid() const { return test_flag(IS_VALID); } - /*! Determine whether the arc represents a full conic curve. + /*! determines whether the arc represents a full conic curve. */ bool is_full_conic() const { return test_flag(IS_FULL_CONIC); } - /*! Obtain the coefficients of the underlying conic. + /*! obtains the coefficients of the underlying conic. */ const Integer& r() const { return (m_r); } const Integer& s() const { return (m_s); } @@ -1532,7 +1532,7 @@ public: const Integer& v() const { return (m_v); } const Integer& w() const { return (m_w); } - /*! Obtain the arc's source. + /*! obtains the arc's source. * \return The source point. * \pre The arc does not represent a full conic curve. */ @@ -1541,14 +1541,14 @@ public: return m_source; } - /*! Obtain the non const reference to the curve source point. + /*! obtains the non const reference to the curve source point. */ Point_2& source() { CGAL_precondition(! is_full_conic()); return (this->m_source); } - /*! Obtain the arc's target. + /*! obtains the arc's target. * \return The target point. * \pre The arc does not represent a full conic curve. */ @@ -1557,19 +1557,19 @@ public: return m_target; } - /*! Obtain the non const reference to the curve source point. + /*! obtains the non const reference to the curve source point. */ Point_2& target() { CGAL_precondition(! is_full_conic()); return this->m_target; } - /*! Obtain the orientation of the arc. + /*! obtains the orientation of the arc. * \return The orientation. */ Orientation orientation() const { return m_orient; } - /*! Obtain the extra data. + /*! obtains the extra data. */ const Extra_data* extra_data() const { return m_extra_data; } //@} @@ -1603,17 +1603,17 @@ public: // only friends have the privilege to use. //@{ - /*! Set the source point of the conic arc. + /*! sets the source point of the conic arc. * \param ps The new source point. */ void set_source(const Point_2& ps) { m_source = ps; } - /*! Set the target point of the conic arc. + /*! sets the target point of the conic arc. * \param pt The new source point. */ void set_target(const Point_2& pt) { m_target = pt; } - /*! Set the coefficients. + /*! sets the coefficients. */ void set_coefficients(Integer r, Integer s, Integer t, Integer u, Integer v, Integer w) { @@ -1625,22 +1625,22 @@ public: m_w = w; } - /*! Set the orientation. + /*! sets the orientation. */ void set_orientation(Orientation orient) { m_orient = orient; } - /*! Set the endpoints. + /*! sets the endpoints. */ void set_endpoints(const Point_2& source, const Point_2& target) { m_source = source; m_target = target; } - /*! Set the extra data field. + /*! sets the extra data field. */ void set_extra_data(Extra_data* extra_data) { m_extra_data = extra_data; } - /*! Set the extra data field. + /*! sets the extra data field. */ void set_extra_data(const Algebraic& a, const Algebraic& b, const Algebraic& c, Sign side) @@ -1652,7 +1652,7 @@ public: m_extra_data->side = side; } - /*! Update the extra data field. + /*! updates the extra data field. */ void update_extra_data() { const Algebraic x1 = source().x(); @@ -1675,7 +1675,7 @@ public: /// \name Auxiliary functions. //@{ - /*! Evaluate the sign of (a*x + b*y + c) stored with the extra data field + /*! evaluates the sign of (a*x + b*y + c) stored with the extra data field * at a given point. * \param px The x-coordinate of query point. * \param py The y-coordinate of query point. @@ -1691,7 +1691,7 @@ public: //@} }; -/*! Exporter for conic arcs. +/*! exports a conic arc. */ template std::ostream& @@ -1721,6 +1721,6 @@ operator<< (std::ostream& os, return os; } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h index 97f8dd74181..c9e17b4d85f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h @@ -88,7 +88,7 @@ public: /// \name Deprecated Constructions. //@{ - // /*! Construct an x-monotone arc from a conic arc. + // /*! constructs an x-monotone arc from a conic arc. // * \param arc The given (base) arc. // * \param id The ID of the base arc. // */ @@ -100,7 +100,7 @@ public: // _set(); // } - /*! Construct an x-monotone sub-arc from a conic arc. + /*! constructs an x-monotone sub-arc from a conic arc. * \param arc The given (base) arc. * \param source The source point. * \param target The target point. @@ -118,7 +118,7 @@ public: _set(); } - /*! Construct a special segment connecting to given endpoints (for the usage + /*! constructs a special segment connecting to given endpoints (for the usage * of the landmarks point-location strategy). * \param source The source point. * \param target The target point. @@ -141,7 +141,7 @@ public: set_flag(IS_SPECIAL_SEGMENT); } - /*! Construct a special segment of a given line connecting to given + /*! constructs a special segment of a given line connecting to given * endpoints. * \param a, b, c The coefficients of the supporting line (ax + by + c = 0). * \param source The source point. @@ -200,7 +200,7 @@ public: //@} private: - /*! Set the properties of the x-monotone conic arc (for the usage of the + /*! sets the properties of the x-monotone conic arc (for the usage of the * constructors). */ CGAL_DEPRECATED void _set() { @@ -304,11 +304,11 @@ public: /// \name Public constructors, assignment operators, and destructors. //@{ - /*! Default constructor. + /*! constructs default. */ Conic_x_monotone_arc_2() : Base(), m_id() {} - /*! Copy constructor. + /*! constructs copy. * \param arc The copied arc. */ Conic_x_monotone_arc_2(const Self& arc) : @@ -322,7 +322,7 @@ public: m_id(arc.m_id) {} - /*! Assignment operator. + /*! assigns. * \param arc The copied arc. */ const Self& operator=(const Self& arc) { @@ -353,13 +353,13 @@ private: /// \name private constructors to be used only by the traits class template. //@{ - /*! Construct an x-monotone arc from a conic arc. + /*! constructs an x-monotone arc from a conic arc. * \param arc The given (base) arc. * \pre The given arc is x-monotone. */ Conic_x_monotone_arc_2(const Base& arc) : Base(arc), m_id() {} - /*! Construct an x-monotone arc from a conic arc. + /*! constructs an x-monotone arc from a conic arc. * \param arc The given (base) arc. * \param id The ID of the base arc. */ @@ -373,15 +373,15 @@ public: /// \name Accessing the arc properties. //@{ - /*! Obtain the facing mask. + /*! obtains the facing mask. */ size_t facing_mask() const { return this->m_info & FACING_MASK; } - /*! Obtain the degree mask. + /*! obtains the degree mask. */ size_t degree_mask() const { return this->m_info & DEGREE_MASK; } - /*! Obtain the coefficients of the underlying conic. + /*! obtains the coefficients of the underlying conic. */ const Integer& r() const { return ( this->m_r); } const Integer& s() const { return ( this->m_s); } @@ -390,50 +390,50 @@ public: const Integer& v() const { return ( this->m_v); } const Integer& w() const { return ( this->m_w); } - /*! Obtain the left endpoint of the arc. + /*! obtains the left endpoint of the arc. */ const Point_2& left() const { if (this->test_flag(IS_DIRECTED_RIGHT)) return this->source(); else return this->target(); } - /*! Obtain the right endpoint of the arc. + /*! obtains the right endpoint of the arc. */ const Point_2& right() const { if (this->test_flag(IS_DIRECTED_RIGHT)) return this->target(); else return this->source(); } - /*! Determine whether the conic arc is directed iexicographically right. + /*! determines whether the conic arc is directed iexicographically right. */ bool is_directed_right() const { return this->test_flag(IS_DIRECTED_RIGHT); } - /*! Determine whether the conic arc is a vertical segment. + /*! determines whether the conic arc is a vertical segment. */ bool is_vertical() const { return this->test_flag(IS_VERTICAL_SEGMENT); } - /*! Determine whether the conic arc is a facing up. + /*! determines whether the conic arc is a facing up. */ bool is_upper() const { return this->test_flag(FACING_UP); } - /*! Determine whether the conic arc is a facing down. + /*! determines whether the conic arc is a facing down. */ bool is_lower() const { return this->test_flag(FACING_DOWN); } - /*! Check whether the arc is a special segment connecting two algebraic + /*! checks whether the arc is a special segment connecting two algebraic * endpoints (and has no underlying integer conic coefficients). */ bool is_special_segment() const { return this->test_flag(IS_SPECIAL_SEGMENT); } - /*! Obtain the mask of the DEGREE_1 flag. + /*! obtains the mask of the DEGREE_1 flag. */ static constexpr size_t degree_1_mask() { return flag_mask(DEGREE_1); } - /*! Obtain the mask of the DEGREE_1 flag. + /*! obtains the mask of the DEGREE_1 flag. */ static constexpr size_t degree_2_mask() { return flag_mask(DEGREE_2); } - /*! Obtain the algebraic coefficients. + /*! obtains the algebraic coefficients. */ Algebraic alg_r() const { return m_alg_r; } Algebraic alg_s() const { return m_alg_s; } @@ -442,11 +442,11 @@ public: Algebraic alg_v() const { return m_alg_v; } Algebraic alg_w() const { return m_alg_w; } - /*! Obtain the conic id. + /*! obtains the conic id. */ Conic_id id() const { return m_id; } - /*! Check whether the given point lies on the arc. + /*! checks whether the given point lies on the arc. * \param p The query point. * \param (true) if p lies on the arc; (false) otherwise. */ @@ -474,7 +474,7 @@ public: return _is_between_endpoints(p); } - /*! Obtain a bounding box for the conic arc. + /*! obtains a bounding box for the conic arc. * \return The bounding box. */ CGAL_DEPRECATED Bbox_2 bbox() const { return Base::bbox(); } @@ -483,7 +483,7 @@ public: // Setters //@{ - /*! Set the algebraic coefficients. + /*! sets the algebraic coefficients. */ void set_alg_coefficients(const Algebraic& alg_r, const Algebraic& alg_s, const Algebraic& alg_t, const Algebraic& alg_u, @@ -497,7 +497,7 @@ public: m_alg_w = alg_w; } - /*! Add a generating conic ID. + /*! adds a generating conic ID. */ void set_generating_conic(const Conic_id& id) { this->m_source.set_generating_conic(id); @@ -505,7 +505,7 @@ public: } //@} - /*! Compute a point on an arc with the same \f$x\f$-coordiante as the given + /*! computes a point on an arc with the same \f$x\f$-coordiante as the given * point. * \param p The given point. * \pre The arc is not vertical and `p` is in the \f$x\f$-range of the arc. @@ -590,7 +590,7 @@ public: /// \name Constructing points on the arc. //@{ - /*! Obtain a polyline approximating the conic arc. + /*! obtains a polyline approximating the conic arc. * \param n The maximal number of sample points. * \param oi An output iterator, whose value-type is pair * (representing an approximated point). @@ -659,7 +659,7 @@ public: /// \name Constructing x-monotone arcs. //@{ - /*! Flip the arc. + /*! flips the arc. * \return An arc with swapped source and target and a reverse orientation. */ Self flip() const { @@ -680,7 +680,7 @@ public: return arc; } - /*! Trim the arc given its new endpoints. + /*! trims the arc given its new endpoints. * \param ps The new source point. * \param pt The new target point. * \return The new trimmed arc. @@ -730,7 +730,7 @@ public: //@} - /*! Compare two arcs immediately to the leftt of their intersection point. + /*! compares two arcs immediately to the leftt of their intersection point. * \param xcv1 The first compared arc. * \param xcv2 The second compared arc. * \param p The reference intersection point. @@ -855,7 +855,7 @@ public: return slope_res; } - /*! Compare two arcs immediately to the right of their intersection point. + /*! compares two arcs immediately to the right of their intersection point. * \param xcv1 The first compared arc. * \param xcv2 The second compared arc. * \param p The reference intersection point. @@ -972,7 +972,7 @@ public: return slope_res; // both are facing down } - /*! Check whether two arcs are equal (have the same graph). + /*! checks whether two arcs are equal (have the same graph). * \param xcv1 The first compared arc. * \param xcv2 The second compared arc. * \return `true` if the two arcs have the same graph; `false` otherwise. @@ -1007,7 +1007,7 @@ public: eq(xcv1.target(), xcv2.source())); } - /*! Check whether it is possible to merge the arc with the given arc. + /*! checks whether it is possible to merge the arc with the given arc. * \param xcv1 The first arc. * \param xcv2 The second arc. * \return `true` if it is possible to merge the two arcs; @@ -1028,7 +1028,7 @@ public: return (eq(xcv1.right(), xcv2.left()) || eq(xcv1.left(), xcv2.right())); } - /*! Merge the current arc with the given arc. + /*! merges the current arc with the given arc. * \param xcv1 The first arc to merge with. * \param xcv2 The second arc to merge with. * \pre The two arcs are mergeable. @@ -1060,7 +1060,7 @@ private: /// \name Auxiliary (private) functions. //@{ - /*! Check whether the given point lies on the supporting conic of the arc. + /*! checks whether the given point lies on the supporting conic of the arc. * \param px The x-coordinate of query point. * \param py The y-coordinate of query point. * \return (true) if p lies on the supporting conic; (false) otherwise. @@ -1078,7 +1078,7 @@ private: } public: - /*! Obtain the i'th order derivative by x of the conic at the point p=(x,y). + /*! obtains the i'th order derivative by x of the conic at the point p=(x,y). * \param p The point where we derive. * \param i The order of the derivatives (either 1, 2 or 3). * \param slope_numer The numerator of the slope. @@ -1187,7 +1187,7 @@ public: CGAL_error(); } - /*! Obtain the i'th order derivative by y of the conic at the point p=(x,y). + /*! obtains the i'th order derivative by y of the conic at the point p=(x,y). * \param p The point where we derive. * \param i The order of the derivatives (either 1, 2 or 3). * \param slope_numer The numerator of the slope. @@ -1297,7 +1297,7 @@ public: } private: - /*! Compute the multiplicity of an intersection point. + /*! computes the multiplicity of an intersection point. * \param arc The arc to intersect with. * \param p The intersection point. * \return The multiplicity of the intersection point. @@ -1348,7 +1348,7 @@ private: }; -/*! Exporter for x-monotone conic arcs. +/*! exports an x-monotone conic arc. */ template std::ostream& operator<<(std::ostream& os, diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h index 41564af33a6..d8dd55e7653 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h @@ -42,19 +42,19 @@ private: public: - /*! Default constructor. */ + /*! constructs default. */ _Unique_list () : m_list() {} - /*! Construct a singleton list. */ + /*! constructs a singleton list. */ _Unique_list (const Data& data) : m_list () { m_list.push_back (data); } - /*! Go over the data objects in list. */ + /*! traverses the data objects in list. */ const_iterator begin () const { return (m_list.begin()); @@ -65,13 +65,13 @@ public: return (m_list.end()); } - /*! Get the list size. */ + /*! obtains the list size. */ std::size_t size () const { return (m_list.size()); } - /*! Get the first (or last) data object. */ + /*! obtains the first (or last) data object. */ const Data& front () const { return (m_list.front()); @@ -105,8 +105,7 @@ public: return (true); } - /*! - * Find the given data object is contained in the list. + /*! finds the given data object is contained in the list. * \param data The data object. * \return An iterator for the data object, or end() if it is not found. */ @@ -123,8 +122,7 @@ public: return (iter); } - /*! - * Insert an object into the list. + /*! inserts an object into the list. * \param data The data object. * \return (true) if the data object has been successfully inserted; * (false) otherwise (if it already exists). @@ -138,8 +136,7 @@ public: return (true); } - /*! - * Erase an object from the list. + /*! erases an object from the list. * \param data The data object. * \return (true) if the data object has been successfully erased; * (false) otherwise (if it is not in the list). @@ -163,7 +160,7 @@ public: return (false); } - /*! Clear the list. */ + /*! clears the list. */ void clear () { m_list.clear(); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polycurve_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polycurve_2.h index addc072c217..5f9ca2187bb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polycurve_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polycurve_2.h @@ -53,10 +53,10 @@ public: typedef typename Subcurves_container::size_type Size; typedef typename Subcurves_container::size_type size_type; - /*! Construct default. */ + /*! constructs default. */ Polycurve_2() : m_subcurves() {} - /*! Construct from a subcurve. */ + /*! constructs from a subcurve. */ Polycurve_2(const Subcurve_type_2& seg) : m_subcurves() { m_subcurves.push_back(seg); } @@ -70,7 +70,7 @@ public: * this class. */ - /*! Construct from a range. The range can be either: + /*! constructs from a range. The range can be either: * * For the sake of backwards compatibility we have to keep the possibility * of construction from a range of points. Therefore, we have to test the @@ -100,7 +100,7 @@ public: construct_polycurve(begin, end, Is_point()); } - /*! Construct a polycurve from a range of subcurves. + /*! constructs a polycurve from a range of subcurves. * \param begin An iterator pointing to the first subcurve in the range. * \param end An iterator pointing after the past-the-end subcurve * in the range. @@ -111,7 +111,7 @@ public: std::false_type) { m_subcurves.assign(begin, end); } - /*! Construct a polycurve from a range of points. + /*! constructs a polycurve from a range of points. * \param begin An iterator pointing to the first point in the range. * \param end An iterator pointing after the last point in the range. * \pre There are at least 2 points in the range. @@ -150,7 +150,7 @@ public: * becomes friendly...) */ - /*! Append a subcurve to the (x-monotone) polycurve. + /*! appends a subcurve to the (x-monotone) polycurve. * Warning: This is a risky function! Don't use it! Prefer the * provided implementation in the traits class. * \param seg The new subcurve to be appended to the polycurve. @@ -160,7 +160,7 @@ public: inline void push_back(const Subcurve_type_2& seg) { this->m_subcurves.push_back(seg); } - /*! Append a subcurve to the (x-monotone) polycurve. + /*! appends a subcurve to the (x-monotone) polycurve. * Warning: This is a risky function! Don't use it! Prefer the * provided implementation in the traits class. * \param seg The new subcurve to be appended to the polycurve. @@ -170,7 +170,7 @@ public: inline void push_front(const Subcurve_type_2& seg) { this->m_subcurves.insert(this->m_subcurves.begin(), seg); } - /*! Append a point to the polycurve. + /*! appends a point to the polycurve. * To properly implemented this function the traits class is needed, * thus it is deprecated. */ @@ -182,7 +182,7 @@ public: m_subcurves.push_back(Subcurve_type_2(ps, pt)); } - /*! Compute the bounding box of the polycurve. + /*! computes the bounding box of the polycurve. * \return The bounding-box. */ Bbox_2 bbox() const @@ -235,14 +235,14 @@ public: { return m_index != std::numeric_limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); } public: - /*! Default constructor. */ + /*! constructs default. */ Point_const_iterator() : m_cvP(nullptr), m_num_pts(0), m_index(std::numeric_limits::max BOOST_PREVENT_MACRO_SUBSTITUTION ()) {} - /*! Dereference operator. + /*! dereferences. * \return The current point. */ const Point_type_2& operator*() const @@ -275,7 +275,7 @@ public: return temp; } - /*! Decrement operators. */ + /*! decrements. */ Point_const_iterator& operator--() { if ((m_cvP != nullptr) && (is_index_valid())) --m_index; @@ -303,39 +303,39 @@ public: typedef Point_const_iterator const_iterator; typedef Point_const_reverse_iterator const_reverse_iterator; - /*! Obtain an iterator for the polycurve points.*/ + /*! obtains an iterator for the polycurve points.*/ Point_const_iterator points_begin() const { if (number_of_subcurves() == 0) return (Point_const_iterator()); else return (Point_const_iterator(this, 0)); } - /*! Obtain an iterator for the polycurve points.*/ + /*! obtains an iterator for the polycurve points.*/ CGAL_DEPRECATED Point_const_iterator begin() const { return points_begin(); } - /*! Obtain a past-the-end iterator for the polycurve points.*/ + /*! obtains a past-the-end iterator for the polycurve points.*/ Point_const_iterator points_end() const { if (number_of_subcurves() == 0) return (Point_const_iterator()); else return (Point_const_iterator(this, number_of_subcurves() + 1)); } - /*! Obtain a past-the-end iterator for the polycurve points.*/ + /*! obtains a past-the-end iterator for the polycurve points.*/ CGAL_DEPRECATED Point_const_iterator end() const { return points_end(); } - /*! Obtain a reverse iterator for the polycurve points. */ + /*! obtains a reverse iterator for the polycurve points. */ Point_const_reverse_iterator points_rbegin() const { return Point_const_reverse_iterator(points_end()); } - /*! Obtain a reverse iterator for the polycurve points. */ + /*! obtains a reverse iterator for the polycurve points. */ CGAL_DEPRECATED Point_const_reverse_iterator rbegin() const { return points_rbegin(); } - /*! Obtain a reverse past-the-end iterator for the polycurve points. */ + /*! obtains a reverse past-the-end iterator for the polycurve points. */ Point_const_reverse_iterator points_rend() const { return Point_const_reverse_iterator(points_begin()); } - /*! Obtain a reverse past-the-end iterator for the polycurve points. */ + /*! obtains a reverse past-the-end iterator for the polycurve points. */ CGAL_DEPRECATED Point_const_reverse_iterator rend() const { return points_rend(); } @@ -345,7 +345,7 @@ public: typedef typename std::reverse_iterator Subcurve_const_reverse_iterator; - /*! Obtain an iterator for the polycurve subcurves. */ + /*! obtains an iterator for the polycurve subcurves. */ Subcurve_const_iterator subcurves_begin() const { return m_subcurves.begin(); } @@ -353,7 +353,7 @@ public: CGAL_DEPRECATED Subcurve_const_iterator begin_subcurves() const { return subcurves_begin(); } - /*! Obtain a past-the-end iterator for the polycurve subcurves. */ + /*! obtains a past-the-end iterator for the polycurve subcurves. */ Subcurve_const_iterator subcurves_end() const { return m_subcurves.end(); } @@ -361,11 +361,11 @@ public: CGAL_DEPRECATED Subcurve_const_iterator end_subcurves() const { return subcurves_end(); } - /*! Obtain a reverse iterator for the polycurve subcurves. */ + /*! obtains a reverse iterator for the polycurve subcurves. */ Subcurve_const_reverse_iterator subcurves_rbegin() const { return (Subcurve_const_reverse_iterator(subcurves_end())); } - /*! Obtain a reverse past-the-end iterator for the polycurve points. */ + /*! obtains a reverse past-the-end iterator for the polycurve points. */ Subcurve_const_reverse_iterator subcurves_rend() const { return (Subcurve_const_reverse_iterator(subcurves_begin())); } @@ -379,7 +379,7 @@ public: CGAL_DEPRECATED std::size_t points() const { return (number_of_subcurves() == 0) ? 0 : number_of_subcurves() + 1; } - /*! Obtain the number of subcurves that comprise the poyline. + /*! obtains the number of subcurves that comprise the poyline. * \return The number of subcurves. */ size_type number_of_subcurves() const @@ -388,7 +388,7 @@ public: /*! Deprecated! Replaced by number_of_subcurves(). */ CGAL_DEPRECATED size_type size() const { return number_of_subcurves(); } - /*! Obtain the ith subcurve of the polycurve. + /*! obtains the ith subcurve of the polycurve. * \param[in] i The subcurve index(from 0 to size()-1). * \return A const reference to the subcurve. */ @@ -398,7 +398,7 @@ public: return (m_subcurves[i]); } - /*! Clear the polycurve. */ + /*! clears the polycurve. */ inline void clear() { m_subcurves.clear(); } }; @@ -416,13 +416,13 @@ public: typedef Polycurve_2 Base; - /*! Construct default. */ + /*! constructs default. */ X_monotone_polycurve_2() : Base() {} - /*! Construct from a subcurve. */ + /*! constructs from a subcurve. */ X_monotone_polycurve_2(Subcurve_type_2 seg) : Base(seg) {} - /*! Construct from a range. + /*! constructs from a range. * Similar to the constructor of a general polycurve. * Like in the case of general polycurve, for the sake of backwards * compatibility we have to keep an implementation of construction @@ -437,7 +437,7 @@ public: construct_x_monotone_polycurve(begin, end, Is_point()); } - /*! Construct from a range of subcurves. + /*! constructs from a range of subcurves. * This constructor is expected to be called only from the * traits class, after the input was verified there. * \pre The range of subcurves form an x-monotone polycurve. @@ -447,7 +447,7 @@ public: std::false_type) {} - /*! Construct from a range of points, defining the endpoints of the + /*! constructs from a range of points, defining the endpoints of the * polycurve subcurves. */ template @@ -458,6 +458,7 @@ public: }; } // namespace polycurve + } //namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polyline_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polyline_2.h index 288ec0166fb..5cf4aabb31f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polyline_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polyline_2.h @@ -47,33 +47,33 @@ public: typedef typename Base::Subcurve_const_reverse_iterator Segment_const_reverse_iterator; - /*! Construct default. */ + /*! constructs default. */ Polyline_2() : Base() {} - /*! Construct from a subcurve. */ + /*! constructs from a subcurve. */ Polyline_2(const Subcurve_type_2& subcurve) : Base(subcurve) {} - /*! Construct from a range. */ + /*! constructs from a range. */ template Polyline_2(InputIterator begin, InputIterator end) : Base(begin, end) {} - /*! Obtain an iterator for the polycurve subcurves. */ + /*! obtains an iterator for the polycurve subcurves. */ Segment_const_iterator begin_segments() const { return this->subcurves_begin(); } - /*! Obtain a past-the-end iterator for the polycurve subcurves. */ + /*! obtains a past-the-end iterator for the polycurve subcurves. */ Segment_const_iterator end_segments() const { return this->subcurves_end(); } - /*! Obtain a reverse iterator for the polycurve subcurves. */ + /*! obtains a reverse iterator for the polycurve subcurves. */ Segment_const_reverse_iterator rbegin_segments() const { return this->subcurves_rbegin(); } - /*! Obtain a reverse past-the-end iterator for the polycurve points. */ + /*! obtains a reverse past-the-end iterator for the polycurve points. */ Segment_const_reverse_iterator rend_segments() const { return this->subcurves_rend() ; } - /*! Obtain the number of subcurves that comprise the poyline. + /*! obtains the number of subcurves that comprise the poyline. * \return The number of subcurves. */ Segments_size_type number_of_segments() const @@ -96,13 +96,13 @@ public: typedef typename Base::Subcurve_const_reverse_iterator Segment_const_reverse_iterator; - /*! Construct default. */ + /*! constructs default. */ X_monotone_polyline_2() : Base() {} - /*! Construct from a subcurve. */ + /*! constructs from a subcurve. */ X_monotone_polyline_2(Subcurve_type_2 seg) : Base(seg) {} - /*! Construct from a range. + /*! constructs from a range. * Similar to the constructor of a general polycurve. * Like in the case of general polycurve, for the sake of backwards * compatibility we have to keep an implementation of construction @@ -113,23 +113,23 @@ public: Base(begin, end) {} - /*! Obtain an iterator for the polycurve subcurves. */ + /*! obtains an iterator for the polycurve subcurves. */ Segment_const_iterator begin_segments() const { return this->subcurves_begin(); } - /*! Obtain a past-the-end iterator for the polycurve subcurves. */ + /*! obtains a past-the-end iterator for the polycurve subcurves. */ Segment_const_iterator end_segments() const { return this->subcurves_end(); } - /*! Obtain a reverse iterator for the polycurve subcurves. */ + /*! obtains a reverse iterator for the polycurve subcurves. */ Segment_const_reverse_iterator rbegin_segments() const { return this->subcurves_rbegin(); } - /*! Obtain a reverse past-the-end iterator for the polycurve points. */ + /*! obtains a reverse past-the-end iterator for the polycurve points. */ Segment_const_reverse_iterator rend_segments() const { return this->subcurves_rend() ; } - /*! Obtain the number of subcurves that comprise the poyline. + /*! obtains the number of subcurves that comprise the poyline. * \return The number of subcurves. */ Segments_size_type number_of_segments() const diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h index aea70d5331a..fe37236feb4 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h @@ -98,15 +98,13 @@ public: /// \name Construction methods. //@{ - /*! - * Default constructor. + /*! constructs default. */ _Base_rational_arc_2 () : _info (0) {} - /*! - * Constructor of a whole polynomial curve. + /*! constructs a whole polynomial curve. * \param pcoeffs The rational coefficients of the polynomial p(x). */ _Base_rational_arc_2 (const Rat_vector& pcoeffs) : @@ -178,8 +176,7 @@ public: _info = (_info | IS_VALID); } - /*! - * Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the + /*! constructs a polynomial ray, defined by y = p(x), for x_s <= x if the * ray is directed to the right, or for x_s >= x if it is directed to the * left. * \param pcoeffs The rational coefficients of the polynomial p(x). @@ -266,8 +263,7 @@ public: _info = (_info | IS_VALID); } - /*! - * Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max. + /*! constructs a polynomial arc, defined by y = p(x), x_min <= x <= x_max. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param x_s The x-coordinate of the source point. * \param x_t The x-coordinate of the target point. @@ -313,8 +309,7 @@ public: _info = (_info | IS_VALID); } - /*! - * Constructor of a polynomial function, defined by y = p(x)/q(x) for any x. + /*! constructs a polynomial function, defined by y = p(x)/q(x) for any x. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param qcoeffs The rational coefficients of the polynomial q(x). */ @@ -368,8 +363,7 @@ public: (IS_CONTINUOUS | IS_VALID) : IS_VALID ) ); } - /*! - * Constructor of a ray of a rational function, defined by y = p(x)/q(x), + /*! constructs a ray of a rational function, defined by y = p(x)/q(x), * for x_s <= x if the ray is directed to the right, or for x_s >= x if it * is directed to the left. * \param pcoeffs The rational coefficients of the polynomial p(x). @@ -461,8 +455,7 @@ public: (IS_CONTINUOUS | IS_VALID) : IS_VALID ) ); } - /*! - * Constructor of a bounded rational arc, defined by y = p(x)/q(x), + /*! constructs a bounded rational arc, defined by y = p(x)/q(x), * where: x_min <= x <= x_max. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param qcoeffs The rational coefficients of the polynomial q(x). @@ -550,19 +543,19 @@ public: /// \name Accessing the arc properties. //@{ - /*! Get the numerator polynomial of the underlying rational function. */ + /*! obtains the numerator polynomial of the underlying rational function. */ const Polynomial& numerator () const { return (_numer); } - /*! Get the denominator polynomial of the underlying rational function. */ + /*! obtains the denominator polynomial of the underlying rational function. */ const Polynomial& denominator () const { return (_denom); } - /*! Check if the x-coordinate of the source point is infinite. */ + /*! checks if the x-coordinate of the source point is infinite. */ Arr_parameter_space source_infinite_in_x () const { return @@ -571,7 +564,7 @@ public: ARR_INTERIOR; } - /*! Check if the y-coordinate of the source point is infinite. */ + /*! checks if the y-coordinate of the source point is infinite. */ Arr_parameter_space source_infinite_in_y () const { return @@ -580,7 +573,7 @@ public: ARR_INTERIOR; } - /*! Check if the x-coordinate of the target point is infinite. */ + /*! checks if the x-coordinate of the target point is infinite. */ Arr_parameter_space target_infinite_in_x () const { return @@ -589,7 +582,7 @@ public: ARR_INTERIOR; } - /*! Check if the y-coordinate of the target point is infinite. */ + /*! checks if the y-coordinate of the target point is infinite. */ Arr_parameter_space target_infinite_in_y () const { return @@ -598,7 +591,7 @@ public: ARR_INTERIOR; } - /*! Get the source point. */ + /*! obtains the source point. */ const Point_2& source () const { CGAL_precondition ((_info & IS_VALID) != 0 && @@ -607,7 +600,7 @@ public: return (_ps); } - /*! Get the x-coordinate of the source point. */ + /*! obtains the x-coordinate of the source point. */ Algebraic source_x () const { CGAL_precondition ((_info & IS_VALID) != 0 && @@ -615,7 +608,7 @@ public: return (_ps.x()); } - /*! Get the y-coordinate of the source point. */ + /*! obtains the y-coordinate of the source point. */ Algebraic source_y () const { CGAL_precondition ((_info & IS_VALID) != 0 && @@ -623,7 +616,7 @@ public: return (_ps.y()); } - /*! Get the target point. */ + /*! obtains the target point. */ const Point_2& target () const { CGAL_precondition ((_info & IS_VALID) != 0 && @@ -632,7 +625,7 @@ public: return (_pt); } - /*! Get the x-coordinate of the target point. */ + /*! obtains the x-coordinate of the target point. */ Algebraic target_x () const { CGAL_precondition ((_info & IS_VALID) != 0 && @@ -640,7 +633,7 @@ public: return (_pt.x()); } - /*! Get the y-coordinate of the target point. */ + /*! obtains the y-coordinate of the target point. */ Algebraic target_y () const { CGAL_precondition ((_info & IS_VALID) != 0 && @@ -648,35 +641,35 @@ public: return (_pt.y()); } - /*! Check if the x-coordinate of the left point is infinite. */ + /*! checks if the x-coordinate of the left point is infinite. */ Arr_parameter_space left_infinite_in_x () const { return ((_info & IS_DIRECTED_RIGHT) != 0) ? source_infinite_in_x() : target_infinite_in_x(); } - /*! Check if the y-coordinate of the left point is infinite. */ + /*! checks if the y-coordinate of the left point is infinite. */ Arr_parameter_space left_infinite_in_y () const { return ((_info & IS_DIRECTED_RIGHT) != 0) ? source_infinite_in_y() : target_infinite_in_y(); } - /*! Check if the x-coordinate of the right point is infinite. */ + /*! checks if the x-coordinate of the right point is infinite. */ Arr_parameter_space right_infinite_in_x () const { return ((_info & IS_DIRECTED_RIGHT) != 0) ? target_infinite_in_x() : source_infinite_in_x(); } - /*! Check if the y-coordinate of the right point is infinite. */ + /*! checks if the y-coordinate of the right point is infinite. */ Arr_parameter_space right_infinite_in_y () const { return ((_info & IS_DIRECTED_RIGHT) != 0) ? target_infinite_in_y() : source_infinite_in_y(); } - /*! Get the left endpoint. */ + /*! obtains the left endpoint. */ const Point_2& left () const { CGAL_precondition (left_infinite_in_x() == ARR_INTERIOR && @@ -684,7 +677,7 @@ public: return ((_info & IS_DIRECTED_RIGHT) ? _ps : _pt); } - /*! Get the right endpoint. */ + /*! obtains the right endpoint. */ const Point_2& right () const { CGAL_precondition (right_infinite_in_x() == ARR_INTERIOR && @@ -692,19 +685,19 @@ public: return ((_info & IS_DIRECTED_RIGHT) ? _pt : _ps); } - /*! Check if the arc is valid. */ + /*! checks if the arc is valid. */ bool is_valid () const { return ((_info & IS_VALID) != 0); } - /*! Check if the arc is continuous. */ + /*! checks if the arc is continuous. */ bool is_continuous () const { return ((_info & IS_CONTINUOUS) != 0); } - /*! Check if the arc is directed right. */ + /*! checks if the arc is directed right. */ bool is_directed_right () const { return ((_info & IS_DIRECTED_RIGHT) != 0); @@ -714,20 +707,19 @@ public: /// \name Modifiers. //@{ - /*! Mark the arc as being continuous. */ + /*! marks the arc as being continuous. */ void set_continuous () { _info = (_info | IS_CONTINUOUS); } - /*! Mark the arc as being invalid. */ + /*! marks the arc as being invalid. */ void set_invalid () { _info = (_info & ~IS_VALID); } - /*! - * Split the arc into two at a given pole. The function returns the sub-arc + /*! splits the arc into two at a given pole. The function returns the sub-arc * to the left of the pole and sets (*this) to be the right sub-arc. * \param x0 The x-coordinate of the pole. * \pre x0 lies in the interior of the arc. @@ -791,8 +783,7 @@ public: /// \name Predicates. //@{ - /*! - * Get the relative position of the point with respect to the rational arc. + /*! obtains the relative position of the point with respect to the rational arc. * \param p The query point. * \pre p is in the x-range of the arc. * \return SMALLER if the point is below the arc; @@ -816,8 +807,7 @@ public: return (CGAL::compare (p.y(), y)); } - /*! - * Compare the x-coordinate of a vertical asymptote of the arc (one of its + /*! compares the x-coordinate of a vertical asymptote of the arc (one of its * ends) and the given point. */ Comparison_result compare_end (const Point_2& p, @@ -852,8 +842,7 @@ public: return ((ce == ARR_MIN_END) ? SMALLER : LARGER); } - /*! - * Compare the x-coordinate of a vertical asymptotes of the two arcs. + /*! compares the x-coordinate of a vertical asymptotes of the two arcs. */ Comparison_result compare_ends (Arr_curve_end ind1, const Self& arc, Arr_curve_end ind2) const @@ -1021,8 +1010,7 @@ public: return (val_res); } - /*! - * Compare the slopes of the arc with another given arc at their given + /*! compares the slopes of the arc with another given arc at their given * intersection point. * \param cv The given arc. * \param p The intersection point. @@ -1106,8 +1094,7 @@ public: return (EQUAL); } - /*! - * Compare the two arcs at x = -oo. + /*! compares the two arcs at x = -oo. * \param arc The given arc. * \pre Both arcs have a left end which is unbounded in x. * \return SMALLER if (*this) lies below the other arc; @@ -1162,8 +1149,7 @@ public: return (flip_res ? SMALLER : LARGER); } - /*! - * Compare the two arcs at x = +oo. + /*! compares the two arcs at x = +oo. * \param arc The given arc. * \pre Both arcs are have a right end which is unbounded in x. * \return SMALLER if (*this) lies below the other arc; @@ -1218,8 +1204,7 @@ public: return (flip_res ? SMALLER : LARGER); } - /*! - * Check whether the two arcs are equal (have the same graph). + /*! checks whether the two arcs are equal (have the same graph). * \param arc The compared arc. * \return (true) if the two arcs have the same graph; (false) otherwise. */ @@ -1276,8 +1261,7 @@ public: return (true); } - /*! - * Check whether it is possible to merge the arc with the given arc. + /*! checks whether it is possible to merge the arc with the given arc. * \param arc The query arc. * \return (true) if it is possible to merge the two arcs; * (false) otherwise. @@ -1311,8 +1295,7 @@ public: /// \name Constructions of points and curves. //@{ - /*! - * Flip the arc (swap its source and target). + /*! flips the arc (swap its source and target). * \return The flipped arc. */ Self flip () const @@ -1341,8 +1324,7 @@ public: return (arc); } - /*! - * Print the rational arc. + /*! prints the rational arc. */ std::ostream& print (std::ostream& os) const { @@ -1386,8 +1368,7 @@ protected: /// \name Auxiliary (protected) functions. //@{ - /*! - * Check if the given x-value is in the x-range of the arc. + /*! checks if the given x-value is in the x-range of the arc. * \param x The x-value. * \param eq_src Output: Is this value equal to the x-coordinate of the * source point. @@ -1470,8 +1451,7 @@ protected: return (true); } - /*! - * Check if the given x-value is in the x-range of the arc, excluding its + /*! checks if the given x-value is in the x-range of the arc, excluding its * open ends. */ bool _is_in_true_x_range (const Algebraic& x) const @@ -1494,8 +1474,7 @@ protected: return (true); } - /*! - * Check if the underlying rational function is the same in the given arc. + /*! checks if the underlying rational function is the same in the given arc. * \param arc The given arc. * \return (true) if arc's underlying rational function is the same * as of *this; (false) otherwise. @@ -1506,8 +1485,7 @@ protected: return (_numer * arc._denom == _denom * arc._numer); } - /*! - * Compute the sign of the given polynomial at x = -oo. + /*! computes the sign of the given polynomial at x = -oo. */ CGAL::Sign _sign_at_minus_infinity (const Polynomial& poly) const { @@ -1531,8 +1509,7 @@ protected: return ((lead_sign == CGAL::POSITIVE) ? CGAL::NEGATIVE : CGAL::POSITIVE); } - /*! - * Compute the sign of the given polynomial at x = +oo. + /*! computes the sign of the given polynomial at x = +oo. */ CGAL::Sign _sign_at_plus_infinity (const Polynomial& poly) const { @@ -1548,8 +1525,7 @@ protected: return (CGAL::sign (nt_traits.get_coefficient (poly, degree))); } - /*! - * Compute infinity type of the rational function P(x)/Q(x) at x = -oo. + /*! computes infinity type of the rational function P(x)/Q(x) at x = -oo. * \param y Output: The value of the horizontal asymptote (if exists). * \return The infinity type for the y-coordinate at x = -oo. */ @@ -1588,8 +1564,7 @@ protected: ((def_diff % 2 == 0) ? ARR_BOTTOM_BOUNDARY : ARR_TOP_BOUNDARY); } - /*! - * Compute infinity type of the rational function P(x)/Q(x) at x = +oo. + /*! computes infinity type of the rational function P(x)/Q(x) at x = +oo. * \param y Output: The value of the horizontal asymptote (if exists). * \return The infinity type for the y-coordinate at x = +oo. */ @@ -1625,8 +1600,7 @@ protected: ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY; } - /*! - * Compute all zeros of the denominator polynomial that lie within the + /*! computes all zeros of the denominator polynomial that lie within the * x-range of the arc. */ template @@ -1673,7 +1647,7 @@ protected: return (oi); } - /*! Check whether the arc is continuous. */ + /*! checks whether the arc is continuous. */ bool _is_continuous () { // Compute the roots of the denominator polynomial, and make sure @@ -1687,8 +1661,7 @@ protected: return (q_roots.empty()); } - /*! - * Determine the signs of the rational functions infinitisimally to the left + /*! determines the signs of the rational functions infinitisimally to the left * and to the right of the given pole. * \param x0 The x-coordinate of the pole. * \pre x0 lies in the interior of the arc. @@ -1754,8 +1727,7 @@ protected: return (std::make_pair (sign_left, sign_right)); } - /*! - * Print a polynomial nicely. + /*! prints a polynomial nicely. */ std::ostream& _print_polynomial (std::ostream& os, const Polynomial& poly, @@ -1797,8 +1769,7 @@ protected: //@} }; -/*! - * Exporter for rational arcs. +/*! exports a rational arc. */ template std::ostream& @@ -1836,15 +1807,13 @@ public: /// \name Construction methods. //@{ - /*! - * Default constructor. + /*! constructs default. */ _Continuous_rational_arc_2 () : Base() {} - /*! - * Constructor from a base arc. + /*! constructors from a base arc. */ _Continuous_rational_arc_2 (const Base& arc) : Base (arc) @@ -1852,16 +1821,14 @@ public: CGAL_precondition (arc.is_continuous()); } - /*! - * Constructor of a whole polynomial curve. + /*! constructs a whole polynomial curve. * \param pcoeffs The rational coefficients of the polynomial p(x). */ _Continuous_rational_arc_2 (const Rat_vector& pcoeffs) : Base (pcoeffs) {} - /*! - * Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the + /*! constructs a polynomial ray, defined by y = p(x), for x_s <= x if the * ray is directed to the right, or for x_s >= x if it is directed to the * left. * \param pcoeffs The rational coefficients of the polynomial p(x). @@ -1874,8 +1841,7 @@ public: Base (pcoeffs, x_s, dir_right) {} - /*! - * Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max. + /*! constructors a polynomial arc, defined by y = p(x), x_min <= x <= x_max. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param x_s The x-coordinate of the source point. * \param x_t The x-coordinate of the target point. @@ -1886,8 +1852,7 @@ public: Base (pcoeffs, x_s, x_t) {} - /*! - * Constructor of a polynomial function, defined by y = p(x)/q(x) for any x. + /*! constructs a polynomial function, defined by y = p(x)/q(x) for any x. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param qcoeffs The rational coefficients of the polynomial q(x). * \pre The denominator polynomial q(x) does not have any roots. @@ -1903,8 +1868,7 @@ public: } } - /*! - * Constructor of a ray of a rational function, defined by y = p(x)/q(x), + /*! constructs a ray of a rational function, defined by y = p(x)/q(x), * for x_s <= x if the ray is directed to the right, or for x_s >= x if it * is directed to the left. * \param pcoeffs The rational coefficients of the polynomial p(x). @@ -1927,8 +1891,7 @@ public: } } - /*! - * Constructor of a bounded rational arc, defined by y = p(x)/q(x), + /*! constructs a bounded rational arc, defined by y = p(x)/q(x), * where: x_min <= x <= x_max. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param qcoeffs The rational coefficients of the polynomial q(x). @@ -1954,8 +1917,7 @@ public: /// \name Constructions of points and curves. //@{ - /*! - * Compute the intersections with the given arc. + /*! computes the intersections with the given arc. * \param arc The given intersecting arc. * \param oi The output iterator. * \return The past-the-end iterator. @@ -2148,8 +2110,7 @@ public: return oi; } - /*! - * Split the arc into two at a given split point. + /*! splits the arc into two at a given split point. * \param p The split point. * \param c1 Output: The first resulting arc, lying to the left of p. * \param c2 Output: The first resulting arc, lying to the right of p. @@ -2195,8 +2156,7 @@ public: return; } - /*! - * Merge the current arc with the given arc. + /*! merges the current arc with the given arc. * \param arc The arc to merge with. * \pre The two arcs are mergeable. */ @@ -2349,23 +2309,20 @@ public: /// \name Construction methods. //@{ - /*! - * Default constructor. + /*! constructs default. */ _Rational_arc_2 () : Base() {} - /*! - * Constructor of a whole polynomial curve. + /*! constructs a whole polynomial curve. * \param pcoeffs The rational coefficients of the polynomial p(x). */ _Rational_arc_2 (const Rat_vector& pcoeffs) : Base (pcoeffs) {} - /*! - * Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the + /*! constructs a polynomial ray, defined by y = p(x), for x_s <= x if the * ray is directed to the right, or for x_s >= x if it is directed to the * left. * \param pcoeffs The rational coefficients of the polynomial p(x). @@ -2378,8 +2335,7 @@ public: Base (pcoeffs, x_s, dir_right) {} - /*! - * Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max. + /*! constructs a polynomial arc, defined by y = p(x), x_min <= x <= x_max. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param x_s The x-coordinate of the source point. * \param x_t The x-coordinate of the target point. @@ -2390,8 +2346,7 @@ public: Base (pcoeffs, x_s, x_t) {} - /*! - * Constructor of a polynomial function, defined by y = p(x)/q(x) for any x. + /*! constructs a polynomial function, defined by y = p(x)/q(x) for any x. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param qcoeffs The rational coefficients of the polynomial q(x). */ @@ -2399,8 +2354,7 @@ public: Base (pcoeffs, qcoeffs) {} - /*! - * Constructor of a ray of a rational function, defined by y = p(x)/q(x), + /*! constructs a ray of a rational function, defined by y = p(x)/q(x), * for x_s <= x if the ray is directed to the right, or for x_s >= x if it * is directed to the left. * \param pcoeffs The rational coefficients of the polynomial p(x). @@ -2414,8 +2368,7 @@ public: Base (pcoeffs, qcoeffs, x_s, dir_right) {} - /*! - * Constructor of a bounded rational arc, defined by y = p(x)/q(x), + /*! constructs a bounded rational arc, defined by y = p(x)/q(x), * where: x_min <= x <= x_max. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param qcoeffs The rational coefficients of the polynomial q(x). @@ -2429,8 +2382,7 @@ public: {} //@} - /*! - * Subdivide the given portion of a rational function into continuous + /*! subdivides the given portion of a rational function into continuous * sub-arcs, splitting it at the roots of the denominator polynomial. * \param oi An output iterator of _Continuous_rational_arc_2 objects. */ @@ -2475,7 +2427,7 @@ public: protected: - /*! Check whether the arc is continuous. */ + /*! checks whether the arc is continuous. */ void _check_continuity () { if (this->_is_continuous()) @@ -2489,6 +2441,6 @@ protected: } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_has.h b/Arrangement_on_surface_2/include/CGAL/Arr_has.h new file mode 100644 index 00000000000..c5e05b616f4 --- /dev/null +++ b/Arrangement_on_surface_2/include/CGAL/Arr_has.h @@ -0,0 +1,258 @@ +// Copyright (c) 2005,2007,2009,2010,2011 Tel-Aviv University (Israel). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s): Efi Fogel +// Eric Berberich + +#ifndef CGAL_ARR_HAS_H +#define CGAL_ARR_HAS_H + +#include + +#include + +namespace CGAL { + +// Compare_x_2 +// Helper trait to check for the presence of nested Compare_x_2 +template > +struct has_compare_x_2 : std::false_type {}; + +// Specialization if the nested type Compare_x_2 exists +template +struct has_compare_x_2> : std::true_type {}; + +// Compare_xy_2 +// Helper trait to check for the presence of nested Compare_xy_2 +template > +struct has_compare_xy_2 : std::false_type {}; + +// Specialization if the nested type Compare_xy_2 exists +template +struct has_compare_xy_2> : std::true_type {}; + +// Construct_min_vertex_2 +// Helper trait to check for the presence of nested Construct_min_vertex_2 +template > +struct has_construct_min_vertex_2 : std::false_type {}; + +// Specialization if the nested type Construct_min_vertex_2 exists +template +struct has_construct_min_vertex_2> : std::true_type {}; + +// Construct_max_vertex_2 +// Helper trait to check for the presence of nested Construct_max_vertex_2 +template > +struct has_construct_max_vertex_2 : std::false_type {}; + +// Specialization if the nested type Construct_max_vertex_2 exists +template +struct has_construct_max_vertex_2> : std::true_type {}; + +// Is_vertical_2 +// Helper trait to check for the presence of nested Is_vertical_2 +template > +struct has_is_vertical_2 : std::false_type {}; + +// Specialization if the nested type Is_vertical_2 exists +template +struct has_is_vertical_2> : std::true_type {}; + +// Compare_y_at_x_2 +// Helper trait to check for the presence of nested Compare_y_at_x_2 +template > +struct has_compare_y_at_x_2 : std::false_type {}; + +// Specialization if the nested type Compare_y_at_x_2 exists +template +struct has_compare_y_at_x_2> : std::true_type {}; + +// Equal +// Helper trait to check for the presence of nested Equal +template > +struct has_equal_2 : std::false_type {}; + +// Specialization if the nested type Equal exists +template +struct has_equal_2> : std::true_type {}; + +// Compare_y_at_x_left_2 +// Helper trait to check for the presence of nested Compare_y_at_x_left_2 +template > +struct has_compare_y_at_x_left_2 : std::false_type {}; + +// Specialization if the nested type Compare_y_at_x_left_2 exists +template +struct has_compare_y_at_x_left_2> : std::true_type {}; + +// Compare_y_at_x_right_2 +// Helper trait to check for the presence of nested Compare_y_at_x_right_2 +template > +struct has_compare_y_at_x_right_2 : std::false_type {}; + +// Specialization if the nested type Compare_y_at_x_right_2 exists +template +struct has_compare_y_at_x_right_2> : std::true_type {}; + +// Make_x_monotone_2 +// Helper trait to check for the presence of nested Make_x_monotone_2 +template > +struct has_make_x_monotone_2 : std::false_type {}; + +// Specialization if the nested type Make_x_monotone_2 exists +template +struct has_make_x_monotone_2> : std::true_type {}; + +// Split_2 +// Helper trait to check for the presence of nested Split_2 +template > +struct has_split_2 : std::false_type {}; + +// Specialization if the nested type Split_2 exists +template +struct has_split_2> : std::true_type {}; + +// Intersect_2 +// Helper trait to check for the presence of nested Intersect_2 +template > +struct has_intersect_2 : std::false_type {}; + +// Specialization if the nested type Intersect_2 exists +template +struct has_intersect_2> : std::true_type {}; + +// Are_mergeable_2 +// Helper trait to check for the presence of nested Are_mergeable_2 +template > +struct has_are_mergeable_2 : std::false_type {}; + +// Specialization if the nested type Are_mergeable_2 exists +template +struct has_are_mergeable_2> : std::true_type {}; + +// Merge_2 +// Helper trait to check for the presence of nested Merge_2 +template > +struct has_merge_2 : std::false_type {}; + +// Specialization if the nested type Merge_2 exists +template +struct has_merge_2> : std::true_type {}; + +// Construct_opposite_2 +// Helper trait to check for the presence of nested Construct_opposite_2 +template > +struct has_construct_opposite_2 : std::false_type {}; + +// Specialization if the nested type Construct_opposite_2 exists +template +struct has_construct_opposite_2> : std::true_type {}; + +// Construct_point_2 +// Helper trait to check for the presence of nested Construct_point_2 +template > +struct has_construct_point_2 : std::false_type {}; + +// Specialization if the nested type Construct_point_2 exists +template +struct has_construct_point_2> : std::true_type {}; + +// Compare_endpoints_xy_2 +// Helper trait to check for the presence of nested Compare_endpoints_xy_2 +template > +struct has_compare_endpoints_xy_2 : std::false_type {}; + +// Specialization if the nested type Compare_endpoints_xy_2 exists +template +struct has_compare_endpoints_xy_2> : std::true_type {}; + +// Approximate_2 +// Helper trait to check for the presence of nested Approximate_2 +template > +struct has_approximate_2 : std::false_type {}; + +// Specialization if the nested type Approximate_2 exists +template +struct has_approximate_2> : std::true_type {}; + +// Parameter_space_in_x_2 +// Helper trait to check for the presence of nested Parameter_space_in_x_2 +template > +struct has_parameter_space_in_x_2 : std::false_type {}; + +// Specialization if the nested type Parameter_space_in_x_2 exists +template +struct has_parameter_space_in_x_2> : std::true_type {}; + +// Is_on_x_identification_2 +// Helper trait to check for the presence of nested Is_on_x_identification_2 +template > +struct has_is_on_x_identification_2 : std::false_type {}; + +// Specialization if the nested type Is_on_x_identification_2 exists +template +struct has_is_on_x_identification_2> : std::true_type {}; + +// Compare_y_on_boundary_2 +// Helper trait to check for the presence of nested Compare_y_on_boundary_2 +template > +struct has_compare_y_on_boundary_2 : std::false_type {}; + +// Specialization if the nested type Compare_y_on_boundary_2 exists +template +struct has_compare_y_on_boundary_2> : std::true_type {}; + +// Compare_y_near_boundary_2 +// Helper trait to check for the presence of nested Compare_y_near_boundary_2 +template > +struct has_compare_y_near_boundary_2 : std::false_type {}; + +// Specialization if the nested type Compare_y_near_boundary_2 exists +template +struct has_compare_y_near_boundary_2> : std::true_type {}; + +// Parameter_space_in_y_2 +// Helper trait to check for the presence of nested Parameter_space_in_y_2 +template > +struct has_parameter_space_in_y_2 : std::false_type {}; + +// Specialization if the nested type Parameter_space_in_y_2 exists +template +struct has_parameter_space_in_y_2> : std::true_type {}; + +// Is_on_y_identification_2 +// Helper trait to check for the presence of nested Is_on_y_identification_2 +template > +struct has_is_on_y_identification_2 : std::false_type {}; + +// Specialization if the nested type Is_on_y_identification_2 exists +template +struct has_is_on_y_identification_2> : std::true_type {}; + +// Compare_x_on_boundary_2 +// Helper trait to check for the presence of nested Compare_x_on_boundary_2 +template > +struct has_compare_x_on_boundary_2 : std::false_type {}; + +// Specialization if the nested type Compare_x_on_boundary_2 exists +template +struct has_compare_x_on_boundary_2> : std::true_type {}; + +// Compare_x_near_boundary_2 +// Helper trait to check for the presence of nested Compare_x_near_boundary_2 +template > +struct has_compare_x_near_boundary_2 : std::false_type {}; + +// Specialization if the nested type Compare_x_near_boundary_2 exists +template +struct has_compare_x_near_boundary_2> : std::true_type {}; + +} + +#endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h index 9cfcd680aea..8db96653d1b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h @@ -8,8 +8,8 @@ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // -// Author(s) : Idit Haran -// Ron Wein +// Author(s) : Idit Haran +// Ron Wein #ifndef CGAL_ARR_LANDMARKS_POINT_LOCATION_H #define CGAL_ARR_LANDMARKS_POINT_LOCATION_H @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -42,44 +43,54 @@ namespace CGAL { * Generator is a class that generates the set of landmarks. */ -template > -class Arr_landmarks_point_location -{ +template > +class Arr_landmarks_point_location { public: - typedef Arrangement_ Arrangement_2; - typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2; - typedef Generator_ Generator; + using Arrangement_2 = Arrangement_; + using Generator = Generator_; + using Geometry_traits_2 = typename Arrangement_2::Geometry_traits_2; - typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle; - typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; - typedef typename Arrangement_2::Face_const_handle Face_const_handle; + using Vertex_const_handle = typename Arrangement_2::Vertex_const_handle; + using Halfedge_const_handle = typename Arrangement_2::Halfedge_const_handle; + using Face_const_handle = typename Arrangement_2::Face_const_handle; - typedef typename Arrangement_2::Vertex_const_iterator Vertex_const_iterator; - typedef typename Arrangement_2::Halfedge_const_iterator - Halfedge_const_iterator; - typedef typename Arrangement_2::Halfedge_around_vertex_const_circulator - Halfedge_around_vertex_const_circulator; - typedef typename Arrangement_2::Ccb_halfedge_const_circulator - Ccb_halfedge_const_circulator; - typedef typename Arrangement_2::Outer_ccb_const_iterator - Outer_ccb_const_iterator; - typedef typename Arrangement_2::Inner_ccb_const_iterator - Inner_ccb_const_iterator; - typedef typename Arrangement_2::Isolated_vertex_const_iterator - Isolated_vertex_const_iterator; + using Vertex_const_iterator = typename Arrangement_2::Vertex_const_iterator; + using Halfedge_const_iterator = + typename Arrangement_2::Halfedge_const_iterator; - typedef typename Arrangement_2::Point_2 Point_2; - typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2; + using Halfedge_around_vertex_const_circulator = + typename Arrangement_2::Halfedge_around_vertex_const_circulator; + using Ccb_halfedge_const_circulator = + typename Arrangement_2::Ccb_halfedge_const_circulator; + using Outer_ccb_const_iterator = + typename Arrangement_2::Outer_ccb_const_iterator; + using Inner_ccb_const_iterator = + typename Arrangement_2::Inner_ccb_const_iterator; + using Isolated_vertex_const_iterator = + typename Arrangement_2::Isolated_vertex_const_iterator; - typedef Arr_point_location_result Result; - typedef typename Result::Type Result_type; + using Point_2 = typename Arrangement_2::Point_2; + using X_monotone_curve_2 = typename Arrangement_2::X_monotone_curve_2; + + using Result = Arr_point_location_result; + using Result_type = typename Result::Type; // Support cpp11::result_of - typedef Result_type result_type; + using result_type = Result_type; + +private: + using Gt2 = Geometry_traits_2; + using Left_side_category = + typename internal::Arr_complete_left_side_category::Category; + using Right_side_category = + typename internal::Arr_complete_right_side_category::Category; + using Left_or_right_sides_category = + typename Arr_two_sides_category::result; protected: - typedef Arr_traits_basic_adaptor_2 Traits_adaptor_2; + using Traits_adaptor_2 = Arr_traits_basic_adaptor_2; /*! \struct Less_halfedge_handle * Used to sort handles. @@ -92,10 +103,10 @@ protected: typedef std::set Halfedge_set; // Data members: - const Arrangement_2* p_arr; // The associated arrangement. + const Arrangement_2* p_arr; // The associated arrangement. const Traits_adaptor_2* m_traits; // Its associated traits object. - Generator* lm_gen; // The associated landmark generator. - bool own_gen; // Indicates whether the generator + Generator* lm_gen; // The associated landmark generator. + bool own_gen; // Indicates whether the generator // has been locally allocated. template @@ -103,7 +114,7 @@ protected: inline Result_type default_result() const { return Result::default_result(); } public: - /*! Default constructor. */ + /*! constructs default. */ Arr_landmarks_point_location() : p_arr(nullptr), m_traits(nullptr), @@ -111,34 +122,32 @@ public: own_gen(false) {} - /*! Constructor given an arrangement only. */ + /*! constructs given an arrangement only. */ Arr_landmarks_point_location(const Arrangement_2& arr) : p_arr(&arr), m_traits(static_cast(p_arr->geometry_traits())), lm_gen(new Generator(arr)), // allocate the landmarks generator. own_gen(true) - { } + {} - /*! Constructor given an arrangement, and landmarks generator. */ + /*! constructs given an arrangement, and landmarks generator. */ Arr_landmarks_point_location(const Arrangement_2& arr, Generator* gen) : p_arr(&arr), m_traits(static_cast(p_arr->geometry_traits())), lm_gen(gen), own_gen(false) - { } + {} - /*! Destructor. */ - ~Arr_landmarks_point_location() - { + /*! destructs. */ + ~Arr_landmarks_point_location() { if (own_gen) { delete lm_gen; lm_gen = nullptr; } } - /*! Attach an arrangement object (and a generator, if supplied). */ - void attach(const Arrangement_2& arr, Generator* gen = nullptr) - { + /*! attaches an arrangement object (and a generator, if supplied). */ + void attach(const Arrangement_2& arr, Generator* gen = nullptr) { // Keep a pointer to the associated arrangement. p_arr = &arr; m_traits = static_cast(p_arr->geometry_traits()); @@ -163,9 +172,8 @@ public: } } - /*! Detach the instance from the arrangement object. */ - void detach() - { + /*! detaches the instance from the arrangement object. */ + void detach() { p_arr = nullptr; m_traits = nullptr; @@ -174,8 +182,7 @@ public: lm_gen->detach(); } - /*! - * Locate the arrangement feature containing the given point. + /*! locates the arrangement feature containing the given point. * \param p The query point. * \return An object representing the arrangement feature containing the * query point. This object is either a Face_const_handle or a @@ -184,7 +191,7 @@ public: result_type locate(const Point_2& p) const; protected: - /*! Walk from the given vertex to the query point. + /*! walks from the given vertex to the query point. * \param vh The given vertex handle. * \param p The query point. * \param crossed_edges In/Out: The set of edges crossed so far. @@ -196,7 +203,7 @@ protected: const Point_2& p, Halfedge_set& crossed_edges) const; - /*! Locate an edge around a given vertex that is the predecessor of the + /*! locates an edge around a given vertex that is the predecessor of the * curve connecting the vertex to the query point in a clockwise order. * \param vh The vertex. * \param p The query point. @@ -207,7 +214,7 @@ protected: const Point_2& p, bool& new_vertex) const; - /*! Walk from a point on a given halfedge to the query point. + /*! walks from a point on a given halfedge to the query point. * \param eh The given halfedge handle. * \param np The point that the walk starts from. * \param p The query point. @@ -220,7 +227,7 @@ protected: const Point_2& np, const Point_2& p, Halfedge_set& crossed_edges) const; - /*! In case the arrangement's curve contained in the segment + /*! handles the arrangement curve contained in the segment * from the nearest landmark to the query point * \param he The given halfedge handle. * \param p_is_left Is the query point the left endpoint of seg. @@ -236,7 +243,7 @@ protected: const Point_2& p, Halfedge_set& crossed_edges) const; - /*! Walk from a point in a face to the query point. + /*! walks from a point in a face to the query point. * \param fh A halfedge handle that points to the face. * \param np The point that the walk starts from. * \param p The query point. @@ -250,7 +257,7 @@ protected: const Point_2& p, Halfedge_set& crossed_edges) const; - /*! Find a halfedge on the given CCB that intersects the given x-monotone + /*! finds a halfedge on the given CCB that intersects the given x-monotone * curve, connecting the current landmark to the query point. * \param circ The CCB circulator. * \param seg The segment connecting the landmark and the query point. @@ -275,7 +282,7 @@ protected: bool& cv_is_contained_in_seg, Vertex_const_handle& new_vertex) const; - /*! Return the halfedge that contains the query point. + /*! returns the halfedge that contains the query point. * \param he The halfedge handle. * \param crossed_edges In/Out: The set of edges crossed so far. * \param p The query point. @@ -287,7 +294,7 @@ protected: const Point_2& p, bool& is_target) const; - /*! Check whether the given curve intersects a simple segment, which connects + /*! checks whether the given curve intersects a simple segment, which connects * the current landmark to the query point, an odd number of times. * \param cv The curve. * \param seg The segment connecting the landmark and the query point. @@ -303,9 +310,62 @@ protected: bool& p_on_curve, bool& cv_and_seg_overlap, bool& cv_is_contained_in_seg) const; + + //! + template + std::pair + construct_segment(const Point_2& p, const Point_2& q, T const& traits, + ...) const { + X_monotone_curve_2 seg = traits.construct_x_monotone_curve_2_object()(p, q); + Comparison_result res = traits.compare_xy_2_object()(p, q); + return std::make_pair(seg, res); + } + + //*! + template + std::pair + construct_segment(const Point_2& p, const Point_2& q, T const& traits, + int) const { + X_monotone_curve_2 seg = traits.construct_x_monotone_curve_2_object()(p, q); + Comparison_result res = traits.compare_endpoints_xy_2_object()(seg); + return std::make_pair(seg, res); + } + + /*! Determines whether the $x$-coordinates of two points are equal. + */ + bool equal_x_2(const Point_2& p, const Point_2& q, + Arr_all_sides_oblivious_tag) const + { return (m_traits->compare_x_2_object()(p, q) == EQUAL); } + + /*! Determines whether the $x$-coordinates of two points are equal. + */ + bool equal_x_2(const Point_2& p, const Point_2& q, + Arr_has_identified_side_tag) const { + auto is_on_y_identification = m_traits->is_on_y_identification_2_object(); + if (is_on_y_identification(p)) { + return is_on_y_identification(q); + } + if (is_on_y_identification(q)) return false; + return (m_traits->compare_x_2_object()(p, q) == EQUAL); + } + + /*! Determines whether the $x$-coordinates of two points are equal. + */ + bool equal_x_2(const Point_2& p, const Point_2& q, + Arr_boundary_cond_tag) const { + auto param_space_in_x = m_traits->parameter_space_in_x_2_object(); + switch (param_space_in_x(p)) { + case ARR_LEFT_BOUNDARY: return (param_space_in_x(q) == ARR_LEFT_BOUNDARY); + case ARR_RIGHT_BOUNDARY: return (param_space_in_x(q) == ARR_LEFT_BOUNDARY); + case ARR_INTERIOR: return (m_traits->compare_x_2_object()(p, q) == EQUAL); + default: CGAL_error(); + } + CGAL_error(); + return false; + } }; -} //namespace CGAL +} // namespace CGAL // The member-function definitions can be found under: #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h index 9c0cda934db..83d7adcfe54 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h @@ -38,8 +38,6 @@ #include #include - - namespace CGAL { // Traits class for CGAL::Arrangement_2 (and similar) based on a diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h index f712190f0df..bf8792fdac5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h @@ -70,8 +70,7 @@ public: typedef CGAL::Segment_assertions > Segment_assertions; - /*! - * \class Representation of a linear with cached data. + /*! \class Representation of a linear with cached data. */ class _Linear_object_cached_2 { public: @@ -100,7 +99,7 @@ public: public: - /*! Default constructor. + /*! constructs default. */ _Linear_object_cached_2() : has_source(true), @@ -111,7 +110,7 @@ public: is_degen(true) {} - /*! Constructor for segment from two points. + /*! constructs from two points. * \param p1 source point. * \param p2 target point. * \pre The two points must not be equal. @@ -137,7 +136,7 @@ public: has_pos_slope = _has_positive_slope(); } - /*! Constructor from a segment. + /*! constructs from a segment. * \param seg The segment. * \pre The segment is not degenerate. */ @@ -165,7 +164,7 @@ public: has_pos_slope = _has_positive_slope(); } - /*! Constructor from a ray. + /*! constructs from a ray. * \param ray The ray. * \pre The ray is not degenerate. */ @@ -193,7 +192,7 @@ public: has_pos_slope = _has_positive_slope(); } - /*! Constructor from a line. + /*! constructs from a line. * \param ln The line. * \pre The line is not degenerate. */ @@ -221,9 +220,9 @@ public: has_pos_slope = _has_positive_slope(); } - /*! Check whether the x-coordinate of the left point is infinite. - * \return ARR_LEFT_BOUNDARY if the left point is near the boundary; - * ARR_INTERIOR if the x-coordinate is finite. + /*! checks whether the \f$x\f$-coordinate of the left point is infinite. + * \return `ARR_LEFT_BOUNDARY` if the left point is near the boundary; + * `ARR_INTERIOR` if the \f$x\f$-coordinate is finite. */ Arr_parameter_space left_infinite_in_x() const { @@ -234,10 +233,10 @@ public: (has_target ? ARR_INTERIOR : ARR_LEFT_BOUNDARY); } - /*! Check whether the y-coordinate of the left point is infinite. - * \return ARR_BOTTOM_BOUNDARY if the left point is at y = -oo; - * ARR_INTERIOR if the y-coordinate is finite. - * ARR_TOP_BOUNDARY if the left point is at y = +oo; + /*! checks whether the \f$y\f$-coordinate of the left point is infinite. + * \return `ARR_BOTTOM_BOUNDARY` if the left point is at \f$y = -\infty\f$; + * `ARR_INTERIOR` if the \f$y\f$-coordinate is finite. + * `ARR_TOP_BOUNDARY` if the left point is at \f$y = +\infty\f$; */ Arr_parameter_space left_infinite_in_y() const { @@ -255,11 +254,11 @@ public: return (has_pos_slope ? ARR_BOTTOM_BOUNDARY : ARR_TOP_BOUNDARY); } - /*! Check whether the left point is finite. + /*! checks whether the left point is finite. */ bool has_left() const { return (is_right ? has_source : has_target); } - /*! Obtain the (lexicographically) left endpoint. + /*! obtains the (lexicographically) left endpoint. * \pre The left point is finite. */ const Point_2& left() const @@ -268,7 +267,7 @@ public: return (is_right ? ps : pt); } - /*! Set the (lexicographically) left endpoint. + /*! sets the (lexicographically) left endpoint. * \param p The point to set. * \pre p lies on the supporting line to the left of the right endpoint. */ @@ -293,7 +292,7 @@ public: } } - /*! Set the (lexicographically) left endpoint as infinite. + /*! sets the (lexicographically) left endpoint as infinite. */ void set_left() { @@ -303,9 +302,9 @@ public: else has_target = false; } - /*! Check whether the x-coordinate of the right point is infinite. - * \return ARR_RIGHT_BOUNDARY if the right point is near the boundary; - * ARR_INTERIOR if the x-coordinate is finite. + /*! checks whether the \f$x\f$-coordinate of the right point is infinite. + * \return `ARR_RIGHT_BOUNDARY` if the right point is near the boundary; + * `ARR_INTERIOR` if the \f$x\f$-coordinate is finite. */ Arr_parameter_space right_infinite_in_x() const { @@ -316,10 +315,10 @@ public: (has_source ? ARR_INTERIOR : ARR_RIGHT_BOUNDARY); } - /*! Check whether the y-coordinate of the right point is infinite. - * \return ARR_BOTTOM_BOUNDARY if the right point is at y = -oo; - * ARR_INTERIOR if the y-coordinate is finite. - * ARR_TOP_BOUNDARY if the right point is at y = +oo; + /*! checks whether the \f$y\f$-coordinate of the right point is infinite. + * \return `ARR_BOTTOM_BOUNDARY` if the right point is at \f$y = -\infty\f$; + * `ARR_INTERIOR` if the \f$y\f$-coordinate is finite. + * `ARR_TOP_BOUNDARY` if the right point is at \f$y = +\infty\f$; */ Arr_parameter_space right_infinite_in_y() const { @@ -337,11 +336,11 @@ public: return (has_pos_slope ? ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY); } - /*! Check whether the right point is finite. + /*! checks whether the right point is finite. */ bool has_right() const { return (is_right ? has_target : has_source); } - /*! Obtain the (lexicographically) right endpoint. + /*! obtains the (lexicographically) right endpoint. * \pre The right endpoint is finite. */ const Point_2& right() const @@ -350,7 +349,7 @@ public: return (is_right ? pt : ps); } - /*! Set the (lexicographically) right endpoint. + /*! sets the (lexicographically) right endpoint. * \param p The point to set. * \pre p lies on the supporting line to the right of the left endpoint. */ @@ -374,7 +373,7 @@ public: } } - /*! Set the (lexicographically) right endpoint as infinite. + /*! sets the (lexicographically) right endpoint as infinite. */ void set_right() { @@ -384,7 +383,7 @@ public: else has_source = false; } - /*! Obtain the supporting line. + /*! obtains the supporting line. */ const Line_2& supp_line() const { @@ -392,7 +391,7 @@ public: return (l); } - /*! Check whether the curve is vertical. + /*! checks whether the curve is vertical. */ bool is_vertical() const { @@ -400,17 +399,18 @@ public: return (is_vert); } - /*! Check whether the curve is degenerate. + /*! checks whether the curve is degenerate. */ bool is_degenerate() const { return (is_degen); } - /*! Check whether the curve is directed lexicographic from left to right + /*! checks whether the curve is directed lexicographic from left to right */ bool is_directed_right() const { return (is_right); } - /*! Check whether the given point is in the x-range of the object. + /*! checks whether the given point is in the \f$x\f$-range of the object. * \param p The query point. - * \return (true) is in the x-range of the segment; (false) if it is not. + * \return (true) is in the \f$x\f$-range of the segment; (false) if it is + * not. */ bool is_in_x_range(const Point_2& p) const { @@ -446,10 +446,11 @@ public: return (res2 != LARGER); } - /*! Check whether the given point is in the y-range of the object. + /*! checks whether the given point is in the \f$y\f$-range of the object. * \param p The query point. * \pre The object is vertical. - * \return (true) is in the y-range of the segment; (false) if it is not. + * \return (true) is in the \f$y\f$-range of the segment; (false) if it is + * not. */ bool is_in_y_range(const Point_2& p) const { @@ -478,7 +479,7 @@ public: } private: - /*! Determine if the supporting line has a positive slope. + /*! determines if the supporting line has a positive slope. */ bool _has_positive_slope() const { @@ -501,14 +502,14 @@ public: typedef unsigned int Multiplicity; public: - /*! Default constructor. + /*! constructs default. */ Arr_linear_traits_2() {} /// \name Basic functor definitions. //@{ - /*! A functor that compares the x-coordinates of two points */ + /*! A functor that compares the \f$x\f$-coordinates of two points */ class Compare_x_2 { protected: typedef Arr_linear_traits_2 Traits; @@ -516,7 +517,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -528,7 +529,7 @@ public: friend class Arr_linear_traits_2; public: - /*! Compare the x-coordinates of two points. + /*! compares the \f$x\f$-coordinates of two points. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2); @@ -542,13 +543,13 @@ public: } }; - /*! Obtain a Compare_x_2 functor. */ + /*! obtains a `Compare_x_2` functor. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } /*! A functor that compares the he endpoints of an $x$-monotone curve. */ class Compare_endpoints_xy_2{ public: - /*! Compare the endpoints of an $x$-monotone curve lexicographically. + /*! compares the endpoints of an $x$-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param cv The curve. * \return SMALLER if the curve is directed right; @@ -558,6 +559,7 @@ public: { return (xcv.is_directed_right()) ? (SMALLER) : (LARGER); } }; + /*! obtains a `Compare_endpoints_xy_2` functor. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); } @@ -568,7 +570,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -610,6 +612,7 @@ public: } }; + /*! obtains a `Trim_2` functor object. */ Trim_2 trim_2_object() const { return Trim_2(*this); } class Construct_opposite_2{ @@ -619,7 +622,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -648,14 +651,14 @@ public: } }; - /*! Get a Construct_opposite_2 functor object. */ + /*! obtains a Construct_opposite_2 functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(*this); } - /*! A functor that compares the x-coordinates of two points */ + /*! A functor that compares the \f$x\f$-coordinates of two points */ class Compare_xy_2 { public: - /*! Compare two points lexigoraphically: by x, then by y. + /*! compares two points lexigoraphically: by \f$x\f$, then by \f$y\f$. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2); @@ -669,13 +672,13 @@ public: } }; - /*! Obtain a Compare_xy_2 functor object. */ + /*! obtains a `Compare_xy_2` functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(); } /*! A functor that obtains the left endpoint of a segment or a ray. */ class Construct_min_vertex_2 { public: - /*! Obtain the left endpoint of the x-monotone curve (segment). + /*! obtains the left endpoint of the \f$x\f$-monotone curve (segment). * \param cv The curve. * \pre The left end of cv is a valid (bounded) point. * \return The left endpoint. @@ -689,14 +692,14 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a `Construct_min_vertex_2` functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } /*! A functor that obtains the right endpoint of a segment or a ray. */ class Construct_max_vertex_2 { public: - /*! Obtain the right endpoint of the x-monotone curve (segment). + /*! obtains the right endpoint of the \f$x\f$-monotone curve (segment). * \param cv The curve. * \pre The right end of cv is a valid (bounded) point. * \return The right endpoint. @@ -710,14 +713,14 @@ public: } }; - /*! Obtain a Construct_max_vertex_2 functor object. */ + /*! obtains a `Construct_max_vertex_2` functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } /*! A functor that checks whether a given linear curve is vertical. */ class Is_vertical_2 { public: - /*! Check whether the given x-monotone curve is a vertical segment. + /*! checks whether the given \f$x\f$-monotone curve is a vertical segment. * \param cv The curve. * \return (true) if the curve is a vertical segment; (false) otherwise. */ @@ -728,11 +731,11 @@ public: } }; - /*! Obtain an Is_vertical_2 functor object. */ + /*! obtains an `Is_vertical_2` functor object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); } - /*! A functor that compares the y-coordinates of a point and a line at - * the point x-coordinate + /*! A functor that compares the \f$y\f$-coordinates of a point and a line at + * the point \f$x\f$-coordinate */ class Compare_y_at_x_2 { protected: @@ -741,7 +744,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -753,10 +756,10 @@ public: friend class Arr_linear_traits_2; public: - /*! Obtain the location of the given point with respect to the input curve. + /*! obtains the location of the given point with respect to the input curve. * \param cv The curve. * \param p The point. - * \pre p is in the x-range of cv. + * \pre p is in the \f$x\f$-range of cv. * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve; * LARGER if y(p) > cv(x(p)), i.e. the point is above the curve; * EQUAL if p lies on the curve. @@ -783,24 +786,24 @@ public: } }; - /*! Obtain a Compare_y_at_x_2 functor object. */ + /*! obtains a `Compare_y_at_x_2` functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } - /*! A functor that compares compares the y-coordinates of two linear + /*! A functor that compares compares the \f$y\f$-coordinates of two linear * curves immediately to the left of their intersection point. */ class Compare_y_at_x_left_2 { public: - /*! Compare the y value of two x-monotone curves immediately to the left - * of their intersection point. + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the left of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. * \param p The intersection point. - * \pre The point p lies on both curves, and both of them must be also be + * \pre The point `p` lies on both curves, and both of them must be also be * defined (lexicographically) to its left. - * \return The relative position of cv1 with respect to cv2 immdiately to - * the left of p: SMALLER, LARGER or EQUAL. + * \return The relative position of `cv1` with respect to `cv2` immdiately to + * the left of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -835,24 +838,24 @@ public: } }; - /*! Obtain a Compare_y_at_x_left_2 functor object. */ + /*! obtains a Compare_y_at_x_left_2 functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(); } - /*! A functor that compares compares the y-coordinates of two linear + /*! A functor that compares compares the \f$y\f$-coordinates of two linear * curves immediately to the right of their intersection point. */ class Compare_y_at_x_right_2 { public: - /*! Compare the y value of two x-monotone curves immediately to the right - * of their intersection point. + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the right of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. * \param p The intersection point. - * \pre The point p lies on both curves, and both of them must be also be + * \pre The point `p` lies on both curves, and both of them must be also be * defined (lexicographically) to its right. - * \return The relative position of cv1 with respect to cv2 immdiately to - * the right of p: SMALLER, LARGER or EQUAL. + * \return The relative position of `cv1` with respect to `cv2` immdiately + * to the right of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -885,7 +888,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_right_2 functor object. */ + /*! obtains a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(); } @@ -894,8 +897,8 @@ public: */ class Equal_2 { public: - /*! Check whether the two x-monotone curves are the same (have the same - * graph). + /*! checks whether the two \f$x\f$-monotone curves are the same (have the + * same graph). * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are the same; (false) otherwise. @@ -931,7 +934,7 @@ public: (! cv1.has_right() || equal (cv1.right(), cv2.right()))); } - /*! Check whether the two points are the same. + /*! checks whether the two points are the same. * \param p1 The first point. * \param p2 The second point. * \return (true) if the two point are the same; (false) otherwise. @@ -943,7 +946,7 @@ public: } }; - /*! Obtain an Equal_2 functor object. */ + /*! obtains an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(); } //@} @@ -951,11 +954,11 @@ public: //@{ /*! A function object that obtains the parameter space of a geometric - * entity along the x-axis + * entity along the \f$x\f$-axis */ class Parameter_space_in_x_2 { public: - /*! Obtains the parameter space at the end of a line along the x-axis. + /*! obtains the parameter space at the end of a line along the \f$x\f$-axis. * \param xcv the line * \param ce the line end indicator: * ARR_MIN_END - the minimal end of xc or @@ -975,24 +978,24 @@ public: xcv.left_infinite_in_x() : xcv.right_infinite_in_x(); } - /*! Obtains the parameter space at a point along the x-axis. + /*! obtains the parameter space at a point along the \f$x\f$-axis. * \param p the point. - * \return the parameter space at p. + * \return the parameter space at `p`. */ - Arr_parameter_space operator()(const Point_2 ) const + Arr_parameter_space operator()(const Point_2 /* p */) const { return ARR_INTERIOR; } }; - /*! Obtain a Parameter_space_in_x_2 function object */ + /*! obtains a `Parameter_space_in_x_2` function object. */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(); } /*! A function object that obtains the parameter space of a geometric - * entity along the y-axis + * entity along the \f$y\f$-axis */ class Parameter_space_in_y_2 { public: - /*! Obtains the parameter space at the end of a line along the y-axis . + /*! obtains the parameter space at the end of a line along the \f$y\f$-axis. * Note that if the line end coincides with a pole, then unless the line * coincides with the identification arc, the line end is considered to * be approaching the boundary, but not on the boundary. @@ -1018,19 +1021,19 @@ public: xcv.left_infinite_in_y() : xcv.right_infinite_in_y(); } - /*! Obtains the parameter space at a point along the y-axis. + /*! obtains the parameter space at a point along the \f$y\f$-axis. * \param p the point. - * \return the parameter space at p. + * \return the parameter space at `p`. */ Arr_parameter_space operator()(const Point_2 /* p */) const { return ARR_INTERIOR; } }; - /*! Obtain a Parameter_space_in_y_2 function object */ + /*! obtains a `Parameter_space_in_y_2` function object. */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(); } - /*! A function object that compares the x-limits of line ends on the + /*! A function object that compares the \f$x\f$-limits of line ends on the * boundary of the parameter space */ class Compare_x_on_boundary_2 { @@ -1040,7 +1043,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -1052,8 +1055,8 @@ public: friend class Arr_linear_traits_2; public: - /*! Compare the x-limit of a vertical line at a point with the x-limit of - * a line end on the boundary at y = +/- oo. + /*! compares the \f$x\f$-limit of a vertical line at a point with the + * \f$x\f$-limit of a line end on the boundary at \f$y = +/- \infty\f$. * \param p the point direction. * \param xcv the line, the endpoint of which is compared. * \param ce the line-end indicator - @@ -1064,8 +1067,8 @@ public: * EQUAL - x(p) = x(xc, ce); * LARGER - x(p) > x(xc, ce). * \pre p lies in the interior of the parameter space. - * \pre the ce end of the line xcv lies on a boundary, implying - * that xcv1 is vertical. + * \pre the ce end of the line xcv lies on a boundary, implying the + * `xcv1` is vertical. */ Comparison_result operator()(const Point_2 & p, const X_monotone_curve_2 & xcv, @@ -1078,29 +1081,29 @@ public: return (kernel.compare_x_at_y_2_object()(p, xcv.supp_line())); } - /*! Compare the x-limits of 2 arcs ends on the boundary of the - * parameter space at y = +/- oo. + /*! compares the \f$x\f$-limits of 2 arcs ends on the boundary of the + * parameter space at \f$y = +/- \infty\f$. * \param xcv1 the first arc. * \param ce1 the first arc end indicator - - * ARR_MIN_END - the minimal end of xcv1 or - * ARR_MAX_END - the maximal end of xcv1. + * `ARR_MIN_END` - the minimal end of `xcv1` or + * `ARR_MAX_END` - the maximal end of `xcv1`. * \param xcv2 the second arc. * \param ce2 the second arc end indicator - - * ARR_MIN_END - the minimal end of xcv2 or - * ARR_MAX_END - the maximal end of xcv2. + * `ARR_MIN_END` - the minimal end of `xcv2` or + * `ARR_MAX_END` - the maximal end of `xcv2`. * \return the second comparison result: - * SMALLER - x(xcv1, ce1) < x(xcv2, ce2); - * EQUAL - x(xcv1, ce1) = x(xcv2, ce2); - * LARGER - x(xcv1, ce1) > x(xcv2, ce2). - * \pre the ce1 end of the line xcv1 lies on a boundary, implying - * that xcv1 is vertical. - * \pre the ce2 end of the line xcv2 lies on a boundary, implying - * that xcv2 is vertical. + * `SMALLER` - x(xcv1, ce1) < x(xcv2, ce2); + * `EQUAL` - x(xcv1, ce1) = x(xcv2, ce2); + * `LARGER ` - x(xcv1, ce1) > x(xcv2, ce2). + * \pre the `ce1` end of the line `xcv1` lies on a boundary, implying + * that `xcv1` is vertical. + * \pre the `ce2` end of the line `xcv2` lies on a boundary, implying + * that `xcv2` is vertical. */ Comparison_result operator()(const X_monotone_curve_2 & xcv1, Arr_curve_end /* ce1 */, const X_monotone_curve_2 & xcv2, - Arr_curve_end /*! ce2 */) const + Arr_curve_end /* ce2 */) const { CGAL_precondition(! xcv1.is_degenerate()); CGAL_precondition(! xcv2.is_degenerate()); @@ -1114,40 +1117,40 @@ public: } }; - /*! Obtain a Compare_x_on_boundary_2 function object */ + /*! obtains a `Compare_x_on_boundary_2` function object. */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(*this); } - /*! A function object that compares the x-coordinates of arc ends near the - * boundary of the parameter space + /*! A function object that compares the \f$x\f$-coordinates of arc ends near + * the boundary of the parameter space */ class Compare_x_near_boundary_2 { public: - /*! Compare the x-coordinates of 2 arcs ends near the boundary of the - * parameter space at y = +/- oo. + /*! compares the \f$x\f$-coordinates of 2 arcs ends near the boundary of the + * parameter space at y\f$ = +/- \infty\f$. * \param xcv1 the first arc. * \param ce1 the first arc end indicator - - * ARR_MIN_END - the minimal end of xcv1 or - * ARR_MAX_END - the maximal end of xcv1. + * `ARR_MIN_END` - the minimal end of `xcv1` or + * `ARR_MAX_END` - the maximal end of `xcv1`. * \param xcv2 the second arc. * \param ce2 the second arc end indicator - - * ARR_MIN_END - the minimal end of xcv2 or - * ARR_MAX_END - the maximal end of xcv2. + * `ARR_MIN_END` - the minimal end of `xcv2` or + * `ARR_MAX_END` - the maximal end of `xcv2`. * \return the second comparison result: - * SMALLER - x(xcv1, ce1) < x(xcv2, ce2); - * EQUAL - x(xcv1, ce1) = x(xcv2, ce2); - * LARGER - x(xcv1, ce1) > x(xcv2, ce2). - * \pre the ce end of the line xcv1 lies on a boundary, implying - * that xcv1 is vertical. - * \pre the ce end of the line xcv2 lies on a boundary, implying - * that xcv2 is vertical. + * `SMALLER` - x(xcv1, ce1) < x(xcv2, ce2); + * `EQUAL` - x(xcv1, ce1) = x(xcv2, ce2); + * `LARGER ` - x(xcv1, ce1) > x(xcv2, ce2). + * \pre the `ce` end of the line `xcv1` lies on a boundary, implying + * that `xcv1` is vertical. + * \pre the `ce` end of the line `xcv2` lies on a boundary, implying + * that `xcv2` is vertical. * \pre the $x$-coordinates of xcv1 and xcv2 at their ce ends are * equal, implying that the curves overlap! */ Comparison_result operator()(const X_monotone_curve_2& CGAL_precondition_code(xcv1), const X_monotone_curve_2& CGAL_precondition_code(xcv2), - Arr_curve_end /*! ce2 */) const + Arr_curve_end /* ce2 */) const { CGAL_precondition(! xcv1.is_degenerate()); CGAL_precondition(! xcv2.is_degenerate()); @@ -1157,11 +1160,11 @@ public: } }; - /*! Obtain a Compare_x_near_boundary_2 function object */ + /*! obtains a `Compare_x_near_boundary_2` function object. */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(); } - /*! A function object that compares the y-limits of arc ends on the + /*! A function object that compares the \f$y\f$-limits of arc ends on the * boundary of the parameter space. */ class Compare_y_near_boundary_2 { @@ -1171,7 +1174,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -1183,20 +1186,21 @@ public: friend class Arr_linear_traits_2; public: - /*! Compare the y-limits of 2 lines at their ends on the boundary - * of the parameter space at x = +/- oo. + /*! compares the \f$y\f$-limits of 2 lines at their ends on the boundary + * of the parameter space at \f$x = +/- \infty\f$. * \param xcv1 the first arc. * \param xcv2 the second arc. * \param ce the line end indicator. * \return the second comparison result. - * \pre the ce ends of the lines xcv1 and xcv2 lie either on the left + * \pre the `ce` ends of the lines `xcv1` and `xcv2` lie either on the left * boundary or on the right boundary of the parameter space. */ Comparison_result operator()(const X_monotone_curve_2 & xcv1, const X_monotone_curve_2 & xcv2, Arr_curve_end ce) const { - // Make sure both curves are defined at x = -oo (or at x = +oo). + // Make sure both curves are defined at \f$x = -\infty\f$ (or at + // \f$x = +\infty\f$). CGAL_precondition(! xcv1.is_degenerate()); CGAL_precondition(! xcv2.is_degenerate()); CGAL_precondition((ce == ARR_MIN_END && @@ -1213,19 +1217,19 @@ public: if (res_slopes == EQUAL) { // In case the two supporting line are parallel, compare their - // relative position at x = 0, which is the same as their position + // relative position at \f$x = 0\f$, which is the same as their position // at infinity. const Point_2 p = kernel.construct_point_2_object()(ORIGIN); return (kernel.compare_y_at_x_2_object()(p, xcv1.supp_line(), xcv2.supp_line())); } - // Flip the slope result if we compare at x = -oo: + // Flip the slope result if we compare at \f$x = -\infty\f$: return (ce == ARR_MIN_END) ? CGAL::opposite(res_slopes) : res_slopes; } }; - /*! Obtain a Compare_y_limit_on_boundary_2 function object */ + /*! obtains a `Compare_y_near_boundary_2` function object. */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(*this); } @@ -1236,9 +1240,9 @@ public: class Make_x_monotone_2 { public: - /*! Cut the given curve into x-monotone subcurves and insert them into the - * given output iterator. As segments are always x_monotone, only one - * object will be contained in the iterator. + /*! cuts the given curve into \f$x\f$-monotone subcurves and insert them + * into the given output iterator. As segments are always x_monotone, only + * one object will be contained in the iterator. * \param cv The curve. * \param oi an output iterator for the result. Its dereference type is a * variant that wraps a \c Point_2 or an \c X_monotone_curve_2 @@ -1256,18 +1260,19 @@ public: } }; - /*! Obtain a Make_x_monotone_2 functor object. */ + /*! obtains a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(); } class Split_2 { public: - /*! Split a given x-monotone curve at a given point into two sub-curves. + /*! splits a given \f$x\f$-monotone curve at a given point into two + * sub-curves. * \param cv The curve to split * \param p The split point. * \param c1 Output: The left resulting subcurve (p is its right endpoint). * \param c2 Output: The right resulting subcurve (p is its left endpoint). - * \pre p lies on cv but is not one of its end-points. + * \pre `p` lies on `cv` but is not one of its end-points. */ void operator()(const X_monotone_curve_2& cv, const Point_2& p, X_monotone_curve_2& c1, X_monotone_curve_2& c2) const @@ -1294,7 +1299,7 @@ public: } }; - /*! Obtain a Split_2 functor object. */ + /*! obtains a `Split_2` functor object. */ Split_2 split_2_object() const { return Split_2(); } class Intersect_2 { @@ -1304,7 +1309,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Intersect_2(const Traits& traits) : m_traits(traits) {} @@ -1312,7 +1317,7 @@ public: friend class Arr_linear_traits_2; public: - /*! Find the intersections of the two given curves and insert them into the + /*! finds the intersections of the two given curves and insert them into the * given output iterator. As two segments may itersect only once, only a * single intersection will be contained in the iterator. * \param cv1 The first curve. @@ -1410,12 +1415,12 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! obtains an Intersect_2 functor object. */ Intersect_2 intersect_2_object () const { return Intersect_2(*this); } class Are_mergeable_2 { public: - /*! Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given \f$x\f$-monotone curves. * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are mergeable - if they are supported @@ -1436,8 +1441,8 @@ public: kernel.construct_opposite_line_2_object()(cv2.supp_line()))) return false; - // Check whether the left endpoint of one curve is the right endpoint of the - // other. + // Check whether the left endpoint of one curve is the right endpoint of + // the other. return ((cv1.has_right() && cv2.has_left() && equal(cv1.right(), cv2.left())) || (cv2.has_right() && cv1.has_left() && @@ -1445,11 +1450,11 @@ public: } }; - /*! Obtain an Are_mergeable_2 functor object. */ + /*! obtains an Are_mergeable_2 functor object. */ Are_mergeable_2 are_mergeable_2_object () const { return Are_mergeable_2(); } /*! \class Merge_2 - * A functor that merges two x-monotone arcs into one. + * A functor that merges two \f$x\f$-monotone arcs into one. */ class Merge_2 { protected: @@ -1458,7 +1463,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Merge_2(const Traits& traits) : m_traits(traits) {} @@ -1466,7 +1471,7 @@ public: friend class Arr_linear_traits_2; public: - /*! Merge two given x-monotone curves into a single curve (segment). + /*! merges two given \f$x\f$-monotone curves into a single curve (segment). * \param cv1 The first curve. * \param cv2 The second curve. * \param c Output: The merged curve. @@ -1506,7 +1511,7 @@ public: } }; - /*! Obtain a Merge_2 functor object. */ + /*! obtains a `Merge_2` functor object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } //@} @@ -1516,12 +1521,12 @@ public: class Approximate_2 { public: - /*! Obtain an approximation of a point coordinate. + /*! obtains an approximation of a point coordinate. * \param p The exact point. * \param i The coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return An approximation of p's x-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). + * \pre `i` is either 0 or 1. + * \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). */ Approximate_number_type operator()(const Point_2& p, int i) const { @@ -1530,17 +1535,17 @@ public: } }; - /*! Obtain an Approximate_2 functor object. */ + /*! obtains an `Approximate_2` functor object. */ Approximate_2 approximate_2_object() const { return Approximate_2(); } //! Functor class Construct_x_monotone_curve_2 { public: - /*! Obtain an x-monotone curve connecting the two given endpoints. + /*! obtains an \f$x\f$-monotone curve connecting the two given endpoints. * \param p The first point. * \param q The second point. * \pre p and q must not be the same. - * \return A segment connecting p and q. + * \return A segment connecting `p` and `q`. */ X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q) const { @@ -1551,7 +1556,7 @@ public: } }; - /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + /*! obtains a `Construct_x_monotone_curve_2` functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(); } //@} @@ -1562,14 +1567,13 @@ public: //! Functor typedef Construct_x_monotone_curve_2 Construct_curve_2; - /*! Obtain a Construct_curve_2 functor object. */ + /*! obtains a `Construct_curve_2` functor object. */ Construct_curve_2 construct_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } //@} }; -/*! - * \class A representation of a segment, as used by the Arr_segment_traits_2 +/*! \class A representation of a segment, as used by the Arr_segment_traits_2 * traits-class. */ template @@ -1588,41 +1592,41 @@ public: typedef typename Kernel::Line_2 Line_2; public: - /*! Default constructor. + /*! constructs default. */ Arr_linear_object_2() : Base() {} - /*! Constructor from two points. + /*! constructs from two points. * \param s The source point. * \param t The target point. * \pre The two points must not be the same. */ Arr_linear_object_2(const Point_2& s, const Point_2& t) : Base(s, t) {} - /*! Constructor from a segment. + /*! constructs from a segment. * \param seg The segment. * \pre The segment is not degenerate. */ Arr_linear_object_2(const Segment_2& seg) : Base(seg) {} - /*! Constructor from a ray. + /*! constructs from a ray. * \param ray The segment. * \pre The ray is not degenerate. */ Arr_linear_object_2(const Ray_2& ray) : Base(ray) {} - /*! Constructor from a line. + /*! constructs from a line. * \param line The line. * \pre The line is not degenerate. */ Arr_linear_object_2(const Line_2& line) : Base(line) {} - /*! Check whether the object is actually a segment. + /*! checks whether the object is actually a segment. */ bool is_segment() const { return (! this->is_degen && this->has_source && this->has_target); } - /*! Cast to a segment. + /*! casts to a segment. * \pre The linear object is really a segment. */ Segment_2 segment() const @@ -1634,12 +1638,12 @@ public: return seg; } - /*! Check whether the object is actually a ray. + /*! checks whether the object is actually a ray. */ bool is_ray() const { return (! this->is_degen && (this->has_source != this->has_target)); } - /*! Cast to a ray. + /*! casts to a ray. * \pre The linear object is really a ray. */ Ray_2 ray() const @@ -1654,12 +1658,12 @@ public: return ray; } - /*! Check whether the object is actually a line. + /*! checks whether the object is actually a line. */ bool is_line() const { return (! this->is_degen && ! this->has_source && ! this->has_target); } - /*! Cast to a line. + /*! casts to a line. * \pre The linear object is really a line. */ Line_2 line() const @@ -1668,7 +1672,7 @@ public: return (this->l); } - /*! Get the supporting line. + /*! obtains the supporting line. * \pre The object is not a point. */ const Line_2& supporting_line() const @@ -1677,7 +1681,7 @@ public: return (this->l); } - /*! Get the source point. + /*! obtains the source point. * \pre The object is a point, a segment or a ray. */ const Point_2& source() const @@ -1689,7 +1693,7 @@ public: else return (this->pt); // For a "flipped" ray. } - /*! Get the target point. + /*! obtains the target point. * \pre The object is a point or a segment. */ const Point_2& target() const @@ -1698,7 +1702,7 @@ public: return (this->pt); } - /*! Create a bounding box for the linear object. + /*! creates a bounding box for the linear object. */ Bbox_2 bbox() const { diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h index f394e3adf86..b15cf639204 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h @@ -24,9 +24,9 @@ #include /*! \file The basic non-caching segment traits-class for the arrangement - * package. This traits class handles x-monotone non-intersecting segments. - * It is a model of the ArrangementBasicTraits_2 concept. The class is - * templated by a kernel and inherits from it all the types and many of the + * package. This traits class handles \f$x\f$-monotone non-intersecting + * segments. It is a model of the ArrangementBasicTraits_2 concept. The class + * is templated by a kernel and inherits from it all the types and many of the * functors required by the concept it models. */ @@ -41,7 +41,7 @@ namespace CGAL { /*! \class - * A model of the ArrangementBasicTraits_2 concept that handles x-monotone + * A model of the ArrangementBasicTraits_2 concept that handles \f$x\f$-monotone * non-intersecting line segments. */ template @@ -73,9 +73,8 @@ public: typedef Arr_oblivious_side_tag Top_side_category; typedef Arr_oblivious_side_tag Right_side_category; - /*! Default Constructor */ - Arr_non_caching_segment_basic_traits_2() - {} + /*! constructs default */ + Arr_non_caching_segment_basic_traits_2() {} /// \name Types and functor inherited from the kernel //@{ @@ -85,25 +84,25 @@ public: typedef typename Kernel::Segment_2 X_monotone_curve_2; typedef unsigned int Multiplicity; - /*! Compare the x-coordinates of two points */ + /*! Compare the \f$x\f$-coordinates of two points. */ typedef typename Kernel::Compare_x_2 Compare_x_2; - /*! Compare two points lexigoraphically; by x, then by y */ + /*! Compare two points lexigoraphically; by \f$x\f$, then by \f$y\f$. */ typedef typename Kernel::Compare_xy_2 Compare_xy_2; - /*! Obtain the left endpoint of a given segment */ + /*! Obtain the left endpoint of a given segment. */ typedef typename Kernel::Construct_min_vertex_2 Construct_min_vertex_2; - /*! Obtain the right endpoint of a given segment */ + /*! Obtain the right endpoint of a given segment. */ typedef typename Kernel::Construct_max_vertex_2 Construct_max_vertex_2; - /*! Check whether a given segment is vertical */ + /*! Check whether a given segment is vertical. */ typedef typename Kernel::Is_vertical_2 Is_vertical_2; - /*! Return the location of a given point with respect to an input segment */ + /*! Return the location of a given point with respect to an input segment. */ typedef typename Kernel::Compare_y_at_x_2 Compare_y_at_x_2; - /*! Check if two segments or if two points are identical */ + /*! Check if two segments or if two points are identical. */ typedef typename Kernel::Equal_2 Equal_2; //@} @@ -116,17 +115,15 @@ public: */ class Compare_y_at_x_left_2 { public: - - /* - * Compare the y value of two segments immediately to the left of their - * intersection point. + /* compares the \f$y\f$-value of two segments immediately to the left of + * their intersection point. * \param cv1 The first segment. * \param cv2 The second segment. * \param p The intersection point. - * \pre The point p lies on both segments, and both of them must be also be - * defined (lexicographically) to its left. - * \return The relative position of cv1 with respect to cv2 immdiately to - * the left of p: SMALLER, LARGER or EQUAL. + * \pre The point `p` lies on both segments, and both of them must be also + * be defined (lexicographically) to its left. + * \return The relative position of `cv1` with respect to `cv2` immdiately + * to the left of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -164,28 +161,24 @@ public: } }; - /*! Obtain a Compare_y_at_x_left_2 functor object. */ + /*! obtains a `Compare_y_at_x_left_2` functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const - { - return Compare_y_at_x_left_2(); - } + { return Compare_y_at_x_left_2(); } /*! \class * A functor for comparing two segments to the right of a point. */ class Compare_y_at_x_right_2 { public: - - /*! - * Compare the y value of two segments immediately to the right of their - * intersection point. + /*! compares the \f$y\f$-value of two segments immediately to the right of + * their intersection point. * \param cv1 The first segment. * \param cv2 The second segment. * \param p The intersection point. - * \pre The point p lies on both segments, and both of them must be also be - * defined (lexicographically) to its right. - * \return The relative position of cv1 with respect to cv2 immdiately to - * the right of p: SMALLER, LARGER or EQUAL. + * \pre The point `p` lies on both segments, and both of them must be also + * be defined (lexicographically) to its right. + * \return The relative position of `cv1` with respect to `cv2` immdiately + * to the right of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator()(const X_monotone_curve_2 & cv1, @@ -222,11 +215,9 @@ public: } }; - /*! Obtain a Compare_y_at_x_right_2 functor object. */ + /*! obtains a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const - { - return Compare_y_at_x_right_2(); - } + { return Compare_y_at_x_right_2(); } //@} /// \name Functor definitions for the landmarks point-location strategy. @@ -242,7 +233,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits. */ Approximate_2(const Traits& traits) : m_traits(traits) {} @@ -250,24 +241,24 @@ public: friend class Arr_non_caching_segment_basic_traits_2; public: - /*! Return an approximation of a point coordinate. + /*! obtains an approximation of a point coordinate. * \param p The exact point. * \param i The coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return An approximation of p's x-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). + * \pre `i` is either 0 or 1. + * \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). */ Approximate_number_type operator() (const Point_2& p, int i) const { CGAL_precondition (i == 0 || i == 1); return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y())); } - /*! Obtain an approximation of a point. + /*! obtains an approximation of a point. */ Approximate_point_2 operator()(const Point_2& p) const { return Approximate_point_2(operator()(p, 0), operator()(p, 1)); } - /*! Obtain an approximation of an \f$x\f$-monotone curve. + /*! obtains an approximation of an \f$x\f$-monotone curve. */ template OutputIterator operator()(const X_monotone_curve_2& xcv, double /* error */, @@ -286,20 +277,18 @@ public: } }; - /*! Get an Approximate_2 functor object. */ + /*! obtains an Approximate_2 functor object. */ Approximate_2 approximate_2_object () const { return Approximate_2(*this); } typedef typename Kernel::Construct_segment_2 Construct_x_monotone_curve_2; - /*! Get a Construct_x_monotone_curve_2 functor object. */ + /*! obtains a `Construct_x_monotone_curve_2` functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const - { - return (this->construct_segment_2_object()); - } + { return (this->construct_segment_2_object()); } //@} }; -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h index 58acefda211..4029a7be681 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h @@ -52,7 +52,7 @@ public: typedef typename Base::Segment_assertions Segment_assertions; typedef typename Base::Has_exact_division Has_exact_division; - /*! Default constructor */ + /*! constructs default */ Arr_non_caching_segment_traits_2() : Base() {} /// \name Types and functors inherited from the base @@ -118,7 +118,7 @@ public: */ class Make_x_monotone_2 { public: - /*! Subdivide a given curve into x-monotone subcurves and insert them into + /*! subdivides a given curve into x-monotone subcurves and insert them into * a given output iterator. As segments are always x_monotone, only one * x-monotone curve is inserted into the output iterator. * \param cv the segment. @@ -138,7 +138,7 @@ public: } }; - /*! Obtain a Make_x_monotone_2 functor object. */ + /*! obtains a Make_x_monotone_2 functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(); } @@ -149,7 +149,7 @@ public: typedef Arr_non_caching_segment_traits_2 Self; public: - /*! Split a given x-monotone curve at a given point into two sub-curves. + /*! splits a given x-monotone curve at a given point into two sub-curves. * \param cv The curve to split * \param p The split point. * \param c1 Output: The left resulting subcurve (p is its right endpoint). @@ -189,7 +189,7 @@ public: } }; - /*! Obtain a Split_2 functor object. */ + /*! obtains a Split_2 functor object. */ Split_2 split_2_object() const { return Split_2(); } /*! \class @@ -202,7 +202,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Intersect_2(const Traits& traits) : m_traits(traits) {} @@ -210,7 +210,7 @@ public: friend class Arr_non_caching_segment_traits_2; public: - /*! Find the intersections of the two given segments and insert them into + /*! finds the intersections of the two given segments and insert them into * the given output iterator. As two segments may itersect only once, only * a single intersection will be contained in the iterator. * \param cv1 The first curve. @@ -264,7 +264,7 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! obtains an Intersect_2 functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } /*! \class @@ -277,7 +277,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Are_mergeable_2(const Traits* traits) : m_traits(traits) {} @@ -285,7 +285,7 @@ public: friend class Arr_non_caching_segment_traits_2; public: - /*! Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given x-monotone curves. * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are mergeable, that is, if they are @@ -308,7 +308,7 @@ public: } }; - /*! Obtain an Are_mergeable_2 functor object */ + /*! obtains an Are_mergeable_2 functor object */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(this); } @@ -322,7 +322,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Merge_2(const Traits* traits) : m_traits(traits) {} @@ -330,7 +330,7 @@ public: friend class Arr_non_caching_segment_traits_2; public: - /*! Merge two given segments into a single segment. + /*! merges two given segments into a single segment. * \param cv1 The first curve. * \param cv2 The second curve. * \param c Output: The merged curve. @@ -365,7 +365,7 @@ public: } }; - /*! Obtain a Merge_2 functor object */ + /*! obtains a Merge_2 functor object */ Merge_2 merge_2_object() const { return Merge_2(this); } //@} @@ -373,14 +373,13 @@ public: //@{ typedef typename Kernel::Construct_opposite_segment_2 Construct_opposite_2; - /*! Obtain a Construct_opposite_2 functor object */ + /*! obtains a Construct_opposite_2 functor object */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); } class Compare_endpoints_xy_2 { public: - /*! - * Compare the two endpoints of a given curve lexigoraphically. + /*! compares the two endpoints of a given curve lexigoraphically. * \param cv The curve. * \return SMALLER if cv is directed from left to right and LARGER * otherwise. @@ -397,7 +396,7 @@ public: } }; - /*! Obtain a Compare_endpoints_xy_2 functor object */ + /*! obtains a Compare_endpoints_xy_2 functor object */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); } //@} @@ -408,14 +407,14 @@ public: //! Functor typedef typename Kernel::Construct_segment_2 Construct_curve_2; - /*! Obtain a Construct_curve_2 functor object. */ + /*! obtains a Construct_curve_2 functor object. */ Construct_curve_2 construct_curve_2_object() const { return this->construct_segment_2_object(); } //@} }; -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h index b83ca0189e2..2a356de0179 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h @@ -77,7 +77,7 @@ protected: const Base_traits_2* m_base_traits; public: - /*! Constructor. */ + /*! constructs. */ Arr_batched_point_location_traits_2(const Base_traits_2& tr) : m_base_traits(&tr) {} @@ -184,7 +184,7 @@ public: //! The base operator. Base_construct_min_vertex_2 m_base_min_v; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -197,8 +197,7 @@ public: friend class Arr_batched_point_location_traits_2; public: - /*! - * Get the left endpoint of the x-monotone curve (segment). + /*! obtains the left endpoint of the x-monotone curve (segment). * \param xcv The curve. * \return The left endpoint. */ @@ -211,7 +210,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return @@ -224,7 +223,7 @@ public: //! The base operator. Base_construct_max_vertex_2 m_base_max_v; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -237,8 +236,7 @@ public: friend class Arr_batched_point_location_traits_2; public: - /*! - * Get the right endpoint of the x-monotone curve . + /*! obtains the right endpoint of the x-monotone curve . * \param xcv The curve. * \return The right endpoint. */ @@ -251,7 +249,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return @@ -266,7 +264,7 @@ public: Vertex_const_handle invalid_v; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -280,8 +278,7 @@ public: friend class Arr_batched_point_location_traits_2; public: - /*! - * Get the left endpoint of the x-monotone curve (segment). + /*! obtains the left endpoint of the x-monotone curve (segment). * \param xcv The curve. * \return The left endpoint. */ @@ -295,7 +292,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(m_base_traits->compare_xy_2_object()); } @@ -307,7 +304,7 @@ public: //! The base operator. Base_compare_y_at_x_2 m_base_cmp_y_at_x; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -325,7 +322,7 @@ public: { return (m_base_cmp_y_at_x(p.base(), xcv.base())); } }; - /*! Obtain a Compare_y_at_x_2 function object. */ + /*! obtains a Compare_y_at_x_2 function object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return (Compare_y_at_x_2(m_base_traits->compare_y_at_x_2_object())); } @@ -337,7 +334,7 @@ public: //! The base operator. Base_compare_y_at_x_right_2 m_base_cmp_y_at_x_right; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -356,7 +353,7 @@ public: { return (m_base_cmp_y_at_x_right(xcv1.base(), xcv2.base(), p.base())); } }; - /*! Obtain a Compare_y_at_x_right_2 function object. */ + /*! obtains a Compare_y_at_x_right_2 function object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return (Compare_y_at_x_right_2 @@ -374,7 +371,7 @@ public: Vertex_const_handle invalid_v; Halfedge_const_handle invalid_he; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -389,7 +386,7 @@ public: friend class Arr_batched_point_location_traits_2; public: - /*! Check if two curves are the same. */ + /*! checks if two curves are the same. */ bool operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2) const { @@ -400,7 +397,7 @@ public: return (m_base_eq(xcv1.base(), xcv2.base())); } - /*! Check if the two points are the same. */ + /*! checks if the two points are the same. */ bool operator()(const Point_2& p1, const Point_2& p2) const { if (p1.vertex_handle() == p2.vertex_handle() && @@ -411,7 +408,7 @@ public: } }; - /*! Obtain an `Equal_2` function object. */ + /*! obtains an `Equal_2` function object. */ Equal_2 equal_2_object() const { return (Equal_2(m_base_traits->equal_2_object())); } @@ -421,7 +418,7 @@ public: //! The base operator. Base_compare_x_2 m_base_cmp_x; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -436,7 +433,7 @@ public: { return (m_base_cmp_x(p1.base(), p2.base())); } }; - /*! Obtain a Compare_x_2 function object. */ + /*! obtains a Compare_x_2 function object. */ Compare_x_2 compare_x_2_object() const { return (Compare_x_2(m_base_traits->compare_x_2_object())); } @@ -446,7 +443,7 @@ public: //! The base operator. Base_is_vertical_2 m_base_is_vert; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -461,7 +458,7 @@ public: { return (m_base_is_vert(xcv.base())); } }; - /*! Obtain a Is_vertical_2 function object. */ + /*! obtains a Is_vertical_2 function object. */ Is_vertical_2 is_vertical_2_object() const { return (Is_vertical_2(m_base_traits->is_vertical_2_object())); } @@ -476,7 +473,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -498,7 +495,7 @@ public: { return m_base->parameter_space_in_x_2_object() (xcv.base()); } }; - /*! Obtain a Parameter_space_in_x_2 function object */ + /*! obtains a Parameter_space_in_x_2 function object */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(m_base_traits); } @@ -510,7 +507,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -528,7 +525,7 @@ public: { return m_base->is_on_x_identification_2_object()(xcv.base()); } }; - /*! Obtain a Is_on_x_identification_2 function object */ + /*! obtains a Is_on_x_identification_2 function object */ Is_on_x_identification_2 is_on_x_identification_2_object() const { return Is_on_x_identification_2(m_base_traits); } @@ -540,7 +537,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle * non stateless traits (e.g., it stores data). * The constructor is declared private to allow only the functor @@ -574,7 +571,7 @@ public: } }; - /*! Obtain a Compare_y_on_boundary_2 functor object. */ + /*! obtains a Compare_y_on_boundary_2 functor object. */ Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(m_base_traits); } @@ -586,7 +583,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle * non stateless traits (e.g., it stores data). * The constructor is declared private to allow only the functor @@ -610,7 +607,7 @@ public: } }; - /*! Obtain a Compare_y_near_boundary_2 functor object. */ + /*! obtains a Compare_y_near_boundary_2 functor object. */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(m_base_traits); } @@ -624,7 +621,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -646,7 +643,7 @@ public: { return m_base->parameter_space_in_y_2_object()(xcv.base()); } }; - /*! Obtain a Parameter_space_in_y_2 function object */ + /*! obtains a Parameter_space_in_y_2 function object */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(m_base_traits); } @@ -658,7 +655,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -676,7 +673,7 @@ public: { return m_base->is_on_y_identification_2_object()(xcv.base()); } }; - /*! Obtain a Is_on_y_identification_2 function object */ + /*! obtains a Is_on_y_identification_2 function object */ Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(m_base_traits); } @@ -688,7 +685,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle * non stateless traits (e.g., it stores data). * The constructor is declared private to allow only the functor @@ -722,7 +719,7 @@ public: } }; - /*! Obtain a Compare_x_on_boundary_2 functor object. */ + /*! obtains a Compare_x_on_boundary_2 functor object. */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(m_base_traits); } @@ -734,7 +731,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle * non stateless traits (e.g., it stores data). * The constructor is declared private to allow only the functor @@ -757,11 +754,11 @@ public: } }; - /*! Obtain a Compare_x_near_boundary_2 function object. */ + /*! obtains a Compare_x_near_boundary_2 function object. */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(m_base_traits); } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h index dae2f574090..74d400cfc33 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h @@ -7,16 +7,15 @@ // $Id$ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // -// Author(s) : Idit Haran -// Ron Wein -// Efi Fogel +// Author(s) : Idit Haran +// Ron Wein +// Efi Fogel #ifndef CGAL_ARR_LANDMARKS_PL_IMPL_H #define CGAL_ARR_LANDMARKS_PL_IMPL_H #include - /*! \file * Member-function definitions for the * Arr_landmarks_point_location class. @@ -24,60 +23,53 @@ namespace CGAL { -//----------------------------------------------------------------------------- -// Locate the arrangement feature containing the given point. -// +/*! locates the arrangement feature containing the given point. + */ template typename Arr_landmarks_point_location::result_type -Arr_landmarks_point_location::locate(const Point_2& p) const -{ +Arr_landmarks_point_location::locate(const Point_2& p) const { // If the arrangement is empty, return its initial (empty and // non-fictitious) face. if (p_arr->number_of_vertices() == 0) { CGAL_assertion(p_arr->number_of_faces() == 1); - Face_const_handle fh = p_arr->faces_begin(); + Face_const_handle fh = p_arr->faces_begin(); return make_result(fh); } + // Use the generator and to find the closest landmark to the query point. - result_type lm_location_obj; + result_type lm_location_obj; const Point_2& landmark_point = lm_gen->closest_landmark(p, lm_location_obj); // If the query point and the landmark point are equal, return the landmark. - if (m_traits->equal_2_object()(landmark_point, p)) - return lm_location_obj; + if (m_traits->equal_2_object()(landmark_point, p)) return lm_location_obj; // Walk from the nearest_vertex to the point p, using walk algorithm, // and find the location of the query point p. Note that the set of edges // we have crossed so far is initially empty. - Halfedge_set crossed_edges; - result_type out_obj; + Halfedge_set crossed_edges; + result_type out_obj; // Locate the arrangement feature that contains the landmark. - const Vertex_const_handle* vh; - const Halfedge_const_handle* hh; - const Face_const_handle* fh; - if ( ( vh = Result().template assign(&lm_location_obj) ) ) - out_obj = _walk_from_vertex(*vh, p, crossed_edges); - else if ( ( hh = Result().template assign(&lm_location_obj) ) ) - out_obj = _walk_from_edge(*hh, landmark_point, p, crossed_edges); - else if ( ( fh = Result().template assign(&lm_location_obj) ) ) - out_obj = _walk_from_face(*fh, landmark_point, p, crossed_edges); + if (const auto* v = std::get_if(&lm_location_obj)) + out_obj = _walk_from_vertex(*v, p, crossed_edges); + else if (const auto* e = std::get_if(&lm_location_obj)) + out_obj = _walk_from_edge(*e, landmark_point, p, crossed_edges); + else if (const auto* f = std::get_if(&lm_location_obj)) + out_obj = _walk_from_face(*f, landmark_point, p, crossed_edges); else CGAL_error_msg("lm_location_obj of an unknown type."); - if ( ( fh = Result().template assign(&out_obj) ) ) { + if (const auto* fp = std::get_if(&out_obj)) { + const auto& f = *fp; // If we reached here, we did not locate the query point in any of the // holes inside the current face, so we conclude it is contained in this - // face. - // However, we first have to check whether the query point coincides with - // any of the isolated vertices contained inside this face. - Isolated_vertex_const_iterator iso_verts_it; - typename Traits_adaptor_2::Equal_2 equal = m_traits->equal_2_object(); - - for (iso_verts_it = (*fh)->isolated_vertices_begin(); - iso_verts_it != (*fh)->isolated_vertices_end(); ++iso_verts_it) - { + // face. However, we first have to check whether the query point coincides + // with any of the isolated vertices contained inside this face. + auto equal = m_traits->equal_2_object(); + // Do not use 'auto' to define the iterator, as MSVC2017 complains. + for (Isolated_vertex_const_iterator iso_verts_it = f->isolated_vertices_begin(); + iso_verts_it != f->isolated_vertices_end(); ++iso_verts_it) { if (equal(p, iso_verts_it->point())) { - Vertex_const_handle ivh = iso_verts_it; + Vertex_const_handle ivh = iso_verts_it; return make_result(ivh); } } @@ -86,28 +78,24 @@ Arr_landmarks_point_location::locate(const Point_2& p) const return out_obj; } -//----------------------------------------------------------------------------- -// Walk from a given vertex to the query point. -// +/*! walks from a given vertex to the query point. + */ template typename Arr_landmarks_point_location::result_type Arr_landmarks_point_location:: -_walk_from_vertex(Vertex_const_handle nearest_vertex, - const Point_2& p, - Halfedge_set& crossed_edges) const -{ +_walk_from_vertex(Vertex_const_handle nearest_vertex, const Point_2& p, + Halfedge_set& crossed_edges) const { Vertex_const_handle vh = nearest_vertex; CGAL_assertion_msg(! vh->is_at_open_boundary(), "_walk_from_vertex() from a vertex at infinity."); // Check if the query point p coincides with the vertex. - if (m_traits->equal_2_object()(vh->point(), p)) - return make_result(vh); + if (m_traits->equal_2_object()(vh->point(), p)) return make_result(vh); // In case of an isolated vertex, walk to from the face that contains // it toward the query point. if (vh->is_isolated()) { - Face_const_handle fh = vh->face(); + Face_const_handle fh = vh->face(); return (_walk_from_face(fh, vh->point(), p, crossed_edges)); } @@ -116,16 +104,15 @@ _walk_from_vertex(Vertex_const_handle nearest_vertex, Halfedge_around_vertex_const_circulator first = vh->incident_halfedges(); // Create an x-monotone curve connecting the point associated with the // vertex vp and the query point p. - const Point_2& vp = vh->point(); - X_monotone_curve_2 seg = - m_traits->construct_x_monotone_curve_2_object()(vp, p); - const bool seg_dir_right = - (m_traits->compare_xy_2_object()(vp, p) == SMALLER); + const Point_2& vp = vh->point(); + X_monotone_curve_2 seg; + Comparison_result res; + std::tie(seg, res) = construct_segment(vp, p, *m_traits, 0); + bool seg_dir_right = (res == SMALLER); Halfedge_around_vertex_const_circulator curr_iter = first; Halfedge_around_vertex_const_circulator next_iter = curr_iter; ++next_iter; - typename Traits_adaptor_2::Is_between_cw_2 is_between_cw = - m_traits->is_between_cw_2_object(); + auto is_between_cw = m_traits->is_between_cw_2_object(); // Traverse the halfedges around vp until we find the pair of adjacent // halfedges such as seg is located clockwise in between them. do { @@ -134,12 +121,11 @@ _walk_from_vertex(Vertex_const_handle nearest_vertex, (curr_iter->direction() == ARR_RIGHT_TO_LEFT), next_iter->curve(), (next_iter->direction() == ARR_RIGHT_TO_LEFT), - vp, eq_curr_iter, eq_next_iter)) - { + vp, eq_curr_iter, eq_next_iter)) { // the assumption is that each edge is crossed at most twice - CGAL_assertion_msg(crossed_edges.count (curr_iter) < 2, + CGAL_assertion_msg(crossed_edges.count(curr_iter) < 2, "crossed_edges should contain each halfedge at most twice."); - CGAL_assertion_msg(crossed_edges.count (next_iter) < 2, + CGAL_assertion_msg(crossed_edges.count(next_iter) < 2, "crossed_edges should contain each halfedge at most twice."); crossed_edges.insert(curr_iter); crossed_edges.insert(curr_iter->twin()); @@ -158,8 +144,7 @@ _walk_from_vertex(Vertex_const_handle nearest_vertex, result_type obj = _find_face_around_vertex(vh, p, new_vertex); if (new_vertex) { // We found a vertex closer to p; Continue using this vertex. - const Vertex_const_handle* p_vh = - Result().template assign(&obj); + const auto* p_vh = std::get_if(&obj); CGAL_assertion(p_vh != nullptr); vh = *p_vh; continue; @@ -167,15 +152,13 @@ _walk_from_vertex(Vertex_const_handle nearest_vertex, // If p is located on an edge or on a vertex, return the object // that wraps this arrangement feature. - if (Result().template assign(&obj) || - Result().template assign(&obj)) + if (std::get_if(&obj) || + std::get_if(&obj)) return obj; - const Face_const_handle* p_fh = - Result().template assign(&obj); - if (p_fh) - // Walk to p from the face we have located: - return _walk_from_face(*p_fh, vh->point(), p, crossed_edges); + const auto* p_fh = std::get_if(&obj); + // Walk to p from the face we have located: + if (p_fh) return _walk_from_face(*p_fh, vh->point(), p, crossed_edges); CGAL_error_msg("_find_face_around_vertex() returned an unknown object."); } @@ -185,31 +168,27 @@ _walk_from_vertex(Vertex_const_handle nearest_vertex, return default_result(); } -//----------------------------------------------------------------------------- -// Locate an edge around a given vertex that is the predecessor of the curve -// connecting the vertex to the query point in a clockwise order. -// +/*! locates an edge around a given vertex that is the predecessor of the curve + * connecting the vertex to the query point in a clockwise order. + */ template typename Arr_landmarks_point_location::result_type Arr_landmarks_point_location:: -_find_face_around_vertex(Vertex_const_handle vh, - const Point_2& p, - bool& new_vertex) const -{ +_find_face_around_vertex(Vertex_const_handle vh, const Point_2& p, + bool& new_vertex) const { new_vertex = false; // Create an x-monotone curve connecting the point associated with the // vertex vp and the query point p. - const Point_2& vp = vh->point(); - X_monotone_curve_2 seg = - m_traits->construct_x_monotone_curve_2_object()(vp, p); - const bool seg_dir_right = - (m_traits->compare_xy_2_object()(vp, p) == SMALLER); - + const Point_2& vp = vh->point(); + X_monotone_curve_2 seg; + Comparison_result res; + std::tie(seg, res) = construct_segment(vp, p, *m_traits, 0); + bool seg_dir_right = (res == SMALLER); // Get the first incident halfedge around v and the next halfedge. - Halfedge_around_vertex_const_circulator first = vh->incident_halfedges(); - Halfedge_around_vertex_const_circulator curr, next; - bool equal_curr = false; + Halfedge_around_vertex_const_circulator first = vh->incident_halfedges(); + Halfedge_around_vertex_const_circulator curr, next; + bool equal_curr = false; next = curr = first; ++next; @@ -241,16 +220,14 @@ _find_face_around_vertex(Vertex_const_handle vh, else { // Traverse the halfedges around v until we find the pair of adjacent // halfedges such as seg is located clockwise in between them. - typename Traits_adaptor_2::Is_between_cw_2 is_between_cw = - m_traits->is_between_cw_2_object(); - bool eq_curr, eq_next; + auto is_between_cw = m_traits->is_between_cw_2_object(); + bool eq_curr, eq_next; while (! is_between_cw(seg, seg_dir_right, curr->curve(), (curr->direction() == ARR_RIGHT_TO_LEFT), next->curve(), (next->direction() == ARR_RIGHT_TO_LEFT), - vp, eq_curr, eq_next)) - { + vp, eq_curr, eq_next)) { // Break the loop if seg equals one of the halfedges next to v. if (eq_curr) { equal_curr = true; @@ -291,10 +268,9 @@ _find_face_around_vertex(Vertex_const_handle vh, // Check whether p lies on the curve associated with the edge. if (m_traits->is_in_x_range_2_object()(curr->curve(), p) && - m_traits->compare_y_at_x_2_object()(p, curr->curve()) == EQUAL) - { + m_traits->compare_y_at_x_2_object()(p, curr->curve()) == EQUAL) { // p is located on the interior of the edge. - Halfedge_const_handle he = curr; + Halfedge_const_handle he = curr; return make_result(he); } @@ -304,22 +280,18 @@ _find_face_around_vertex(Vertex_const_handle vh, return make_result(curr->source()); } -//----------------------------------------------------------------------------- -// Walk from the edge to the query point. -// +/*! walks from the edge to the query point. + */ template typename Arr_landmarks_point_location::result_type Arr_landmarks_point_location:: -_walk_from_edge(Halfedge_const_handle eh, - const Point_2& np, - const Point_2& p, - Halfedge_set& crossed_edges) const -{ +_walk_from_edge(Halfedge_const_handle eh, const Point_2& np, const Point_2& p, + Halfedge_set& crossed_edges) const { CGAL_assertion_msg(! eh->is_fictitious(), "_walk_from_edge() from a fictitious edge."); const X_monotone_curve_2& cv = eh->curve() ; - Comparison_result res; + Comparison_result res; X_monotone_curve_2 seg = m_traits->construct_x_monotone_curve_2_object()(np, p); @@ -345,8 +317,7 @@ _walk_from_edge(Halfedge_const_handle eh, if (m_traits->is_in_x_range_2_object()(seg, temp_p)) { //we must make sure that eh is not a tip on an "antena" if (m_traits->compare_y_at_x_2_object()(temp_p, seg) == EQUAL && - eh->prev() != eh->twin()) - { + eh->prev() != eh->twin()) { // the assumption is that each edge is crossed at most twice CGAL_assertion_msg(crossed_edges.count(eh->prev()) < 2, "crossed_edges should contain each halfedge at most twice."); @@ -367,8 +338,7 @@ _walk_from_edge(Halfedge_const_handle eh, if (m_traits->is_in_x_range_2_object()(seg, temp_p)) { //we must make sure that eh is not a tip on an "antena" if (m_traits->compare_y_at_x_2_object()(temp_p, seg) == EQUAL && - eh->next() != eh->twin()) - { + eh->next() != eh->twin()) { // the assumption is that each edge is crossed at most twice CGAL_assertion_msg(crossed_edges.count(eh->next()) < 2, "crossed_edges should contain each halfedge at most twice."); @@ -428,89 +398,71 @@ _walk_from_edge(Halfedge_const_handle eh, return (_walk_from_vertex(vh, p, crossed_edges)); } -//----------------------------------------------------------------------------- -// In case the arrangement's curve contained in the segment -// from the nearest landmark to the query point -// +/*! deals with an arrangement curve contained in the segment from the nearest + * landmark to the query point + */ template typename Arr_landmarks_point_location::result_type Arr_landmarks_point_location:: -_deal_with_curve_contained_in_segment(Halfedge_const_handle he, - bool p_is_left, +_deal_with_curve_contained_in_segment(Halfedge_const_handle he, bool p_is_left, const Point_2& p, - Halfedge_set& crossed_edges) const -{ + Halfedge_set& crossed_edges) const { // in this case we want to walk from to the query point from the nearest // vertex either the halfedge's source or target - Vertex_const_handle vh; - bool target_is_left; - if (m_traits->compare_xy_2_object() - (he->source()->point(),he->target()->point()) == LARGER) - target_is_left = true; - else - target_is_left = false; + auto cmp_xy = m_traits->compare_xy_2_object(); + bool target_is_left = + (cmp_xy(he->source()->point(), he->target()->point()) == LARGER); + + Vertex_const_handle vh; if (p_is_left) { - if (target_is_left) - vh = he->target(); - else - vh = he->source(); + if (target_is_left) vh = he->target(); + else vh = he->source(); } else { - if (target_is_left) - vh = he->source(); - else - vh = he->target(); + if (target_is_left) vh = he->source(); + else vh = he->target(); } // vh is the closest vertex among the halfedge's end points return (_walk_from_vertex(vh, p, crossed_edges)); } -//----------------------------------------------------------------------------- -// Walk from the given face to the query point. -// +/*! walks from the given face to the query point. + */ template typename Arr_landmarks_point_location::result_type Arr_landmarks_point_location:: -_walk_from_face(Face_const_handle face, - const Point_2& np, - const Point_2& p, - Halfedge_set& crossed_edges) const -{ +_walk_from_face(Face_const_handle face, const Point_2& np, const Point_2& p, + Halfedge_set& crossed_edges) const { // Construct an x-monotone curve connecting the nearest landmark point np // to the query point p and check which CCB intersects this segment. - X_monotone_curve_2 seg = - m_traits->construct_x_monotone_curve_2_object()(np, p); - const bool p_is_left = - (m_traits->compare_xy_2_object()(np, p) == LARGER); + X_monotone_curve_2 seg; + Comparison_result res; + std::tie(seg, res) = construct_segment(np, p, *m_traits, 0); + const bool p_is_left = (res == LARGER); - Inner_ccb_const_iterator inner_ccb_iter; - Outer_ccb_const_iterator outer_ccb_iter; - const Halfedge_const_handle invalid_he; - Halfedge_const_handle he; - Face_const_handle new_face; - bool is_on_edge; - bool is_target; - bool cv_is_contained_in_seg; - Vertex_const_handle new_vertex; - const Vertex_const_handle invalid_vertex; + const Halfedge_const_handle invalid_he; + const Vertex_const_handle invalid_vertex; + bool cv_is_contained_in_seg; do { // Check whether p lies inside the current face (including its holes): - if (p_arr->topology_traits()->is_in_face(&(*face), p, nullptr)) - { + if (p_arr->topology_traits()->is_in_face(&(*face), p, nullptr)) { // We know that p is located inside the current face, and we check // whether it lies inside one of its holes (or on the boundary of // its holes). cv_is_contained_in_seg = false; - new_face = face; - for (inner_ccb_iter = face->inner_ccbs_begin(); - inner_ccb_iter != face->inner_ccbs_end(); ++inner_ccb_iter) - { - he = _intersection_with_ccb(*inner_ccb_iter,seg, p, p_is_left, - crossed_edges,is_on_edge, is_target, - cv_is_contained_in_seg,new_vertex); - if (he == invalid_he && cv_is_contained_in_seg) - { + auto new_face = face; + // Do not use 'auto' to define the iterator, as MSVC2017 complains. + for (Inner_ccb_const_iterator inner_ccb_iter = face->inner_ccbs_begin(); + inner_ccb_iter != face->inner_ccbs_end(); ++inner_ccb_iter) { + bool is_on_edge; + bool is_target; + Vertex_const_handle new_vertex; + Halfedge_const_handle he = + _intersection_with_ccb(*inner_ccb_iter,seg, p, p_is_left, + crossed_edges, is_on_edge, is_target, + cv_is_contained_in_seg, new_vertex); + if (he == invalid_he && cv_is_contained_in_seg) { return _deal_with_curve_contained_in_segment(*inner_ccb_iter, p_is_left,p, crossed_edges); @@ -535,8 +487,7 @@ _walk_from_face(Face_const_handle face, // Check if we found a new face (hole) containing p. If not, the current // face contains p. - if (new_face == face) - return make_result(face); + if (new_face == face) return make_result(face); // Continue from the new face (hole). face = new_face; @@ -544,13 +495,17 @@ _walk_from_face(Face_const_handle face, else { // We know that p is not located inside the current face. We therefore // look for an edge on its outer boundary that intersects seg. - new_face = face; - for (outer_ccb_iter = face->outer_ccbs_begin(); - outer_ccb_iter != face->outer_ccbs_end(); ++outer_ccb_iter) - { - he = _intersection_with_ccb(*outer_ccb_iter,seg, p, p_is_left, - crossed_edges,is_on_edge, is_target, - cv_is_contained_in_seg,new_vertex); + auto new_face = face; + // Do not use 'auto' to define the iterator, as MSVC2017 complains. + for (Inner_ccb_const_iterator outer_ccb_iter = face->outer_ccbs_begin(); + outer_ccb_iter != face->outer_ccbs_end(); ++outer_ccb_iter) { + bool is_on_edge; + bool is_target; + Vertex_const_handle new_vertex; + Halfedge_const_handle he = + _intersection_with_ccb(*outer_ccb_iter,seg, p, p_is_left, + crossed_edges, is_on_edge, is_target, + cv_is_contained_in_seg, new_vertex); if (he == invalid_he && cv_is_contained_in_seg) { return _deal_with_curve_contained_in_segment(*outer_ccb_iter, p_is_left,p, @@ -585,10 +540,9 @@ _walk_from_face(Face_const_handle face, return default_result(); } -//----------------------------------------------------------------------------- -// Find a halfedge on the given CCB that intersects the given x-monotone -// curve, connecting the current landmark to the query point. -// +/*! finds a halfedge on the given CCB that intersects the given x-monotone + * curve, connecting the current landmark to the query point. + */ template typename Arr_landmarks_point_location::Halfedge_const_handle Arr_landmarks_point_location:: @@ -598,17 +552,15 @@ _intersection_with_ccb(Ccb_halfedge_const_circulator circ, Halfedge_set& crossed_edges, bool& is_on_edge, bool& is_target, bool& cv_is_contained_in_seg, - Vertex_const_handle & new_vertex) const -{ + Vertex_const_handle& new_vertex) const { is_on_edge = false; is_target = false; // Go over the CCB. - typename Traits_adaptor_2::Is_in_x_range_2 is_in_x_range = - m_traits->is_in_x_range_2_object(); - Ccb_halfedge_const_circulator curr = circ , temp_circ; - const Halfedge_const_handle invalid_he; - Halfedge_const_handle he; + auto is_in_x_range = m_traits->is_in_x_range_2_object(); + Ccb_halfedge_const_circulator curr = circ , temp_circ; + const Halfedge_const_handle invalid_he; + Halfedge_const_handle he; bool cv_and_seg_overlap; do { he = curr; @@ -646,33 +598,28 @@ _intersection_with_ccb(Ccb_halfedge_const_circulator circ, // Check whether the current curve intersects seg an odd number of times. if (_have_odd_intersections(he->curve(), seg, p_is_left, is_on_edge,cv_and_seg_overlap, - cv_is_contained_in_seg) - && !(cv_and_seg_overlap || cv_is_contained_in_seg)) - { + cv_is_contained_in_seg) && + ! (cv_and_seg_overlap || cv_is_contained_in_seg)) { // Check if the query point lies on the current edge, or whether // it lies in its interior. if (is_on_edge) return _in_case_p_is_on_edge(he,crossed_edges,p,is_target); if ((!curr->target()->is_at_open_boundary()) && - is_in_x_range(seg, curr->target()->point())) - { + is_in_x_range(seg, curr->target()->point())) { // if the target point of curr is located on seg // we should walk from it to the query point if (m_traits->compare_y_at_x_2_object() - (curr->target()->point(), seg) == EQUAL) - { + (curr->target()->point(), seg) == EQUAL) { new_vertex = curr->target(); } } else if ((!curr->source()->is_at_open_boundary()) && - is_in_x_range(seg , curr->source()->point() )) - { + is_in_x_range(seg , curr->source()->point())) { // if the source point of curr is located on seg // we should walk from it to the query point if (m_traits->compare_y_at_x_2_object() - (curr->source()->point() , seg) == EQUAL) - { + (curr->source()->point(), seg) == EQUAL) { new_vertex = curr->source(); } } @@ -718,8 +665,7 @@ Arr_landmarks_point_location:: _in_case_p_is_on_edge(Halfedge_const_handle he, Halfedge_set& crossed_edges, const Point_2 & p, - bool & is_target) const -{ + bool & is_target) const { // cv and seg overlap, obviously we crossed it // the assumption is that each edge is crossed at most twice CGAL_assertion_msg(crossed_edges.count(he) < 2, @@ -728,14 +674,12 @@ _in_case_p_is_on_edge(Halfedge_const_handle he, crossed_edges.insert(he->twin()); // Check if p equals one of the edge end-vertices. if (! he->target()->is_at_open_boundary() && - m_traits->compare_xy_2_object()(he->target()->point(), p) == EQUAL) - { + m_traits->equal_2_object()(he->target()->point(), p)) { // p is the target of the current halfedge. is_target = true; } else if (! he->source()->is_at_open_boundary() && - m_traits->compare_xy_2_object()(he->source()->point(), p) == EQUAL) - { + m_traits->equal_2_object()(he->source()->point(), p)) { // Take the twin halfedge, so p equals its target. he = he->twin(); is_target = true; @@ -744,21 +688,17 @@ _in_case_p_is_on_edge(Halfedge_const_handle he, return he; } -//----------------------------------------------------------------------------- -// Check whether the given curve intersects a simple segment, which connects -// the current landmark to the query point, an odd number of times. -// +/*! checks whether the given curve intersects a simple segment, which connects + * the current landmark to the query point, an odd number of times. + */ template bool Arr_landmarks_point_location:: _have_odd_intersections(const X_monotone_curve_2& cv, const X_monotone_curve_2& seg, - bool p_is_left, - bool& p_on_curve, + bool p_is_left, bool& p_on_curve, bool& cv_and_seg_overlap, - bool& cv_is_contained_in_seg) const -{ - typename Traits_adaptor_2::Is_in_x_range_2 is_in_x_range = - m_traits->is_in_x_range_2_object(); + bool& cv_is_contained_in_seg) const { + auto is_in_x_range = m_traits->is_in_x_range_2_object(); p_on_curve = false; cv_and_seg_overlap = false; cv_is_contained_in_seg = false; @@ -776,9 +716,9 @@ _have_odd_intersections(const X_monotone_curve_2& cv, cv_right = m_traits->construct_max_vertex_2_object()(cv); if (cv_left_is_closed && cv_right_is_closed) { if (is_in_x_range(seg,cv_left) && is_in_x_range(seg,cv_right)) { - if ((m_traits->compare_y_at_x_2_object()(cv_left, seg) == EQUAL) && - (m_traits->compare_y_at_x_2_object()(cv_right, seg) == EQUAL)) - { + auto cmp_y_at_x = m_traits->compare_y_at_x_2_object(); + if ((cmp_y_at_x(cv_left, seg) == EQUAL) && + (cmp_y_at_x(cv_right, seg) == EQUAL)) { // cv is contained in seg non of the answer true or false is correct // we must set a special flag to distinguish this case cv_is_contained_in_seg = true; @@ -791,22 +731,17 @@ _have_odd_intersections(const X_monotone_curve_2& cv, if (cv_left_is_closed) { // Check if the left endpoint of cv has the same x-coordinate as the // right endpoint of seg. - if (m_traits->compare_x_2_object() - (m_traits->construct_min_vertex_2_object()(cv), seg_right) == EQUAL) - { - if (! p_is_left && - m_traits->compare_xy_2_object() - (m_traits->construct_min_vertex_2_object()(cv), seg_right) == EQUAL) - { + auto min_p = m_traits->construct_min_vertex_2_object()(cv); + if (equal_x_2(min_p, seg_right, Left_or_right_sides_category())) { + if (! p_is_left && m_traits->equal_2_object()(min_p, seg_right)) { p_on_curve = true; return true; } else if (m_traits->is_vertical_2_object()(seg)) { + auto cmp_y_at_x = m_traits->compare_y_at_x_2_object(); // Special treatment for vertical segments. - Comparison_result res_l = - m_traits->compare_y_at_x_2_object()(seg_left, cv); - Comparison_result res_r = - m_traits->compare_y_at_x_2_object()(seg_right, cv); + Comparison_result res_l = cmp_y_at_x(seg_left, cv); + Comparison_result res_r = cmp_y_at_x(seg_right, cv); if ((p_is_left && res_l == EQUAL) || (! p_is_left && res_r == EQUAL)) { p_on_curve = true; return true; @@ -819,23 +754,17 @@ _have_odd_intersections(const X_monotone_curve_2& cv, if (cv_right_is_closed) { // Check if the right endpoint of cv has the same x-coordinate as the // left endpoint of seg. - if (m_traits->compare_x_2_object() - (m_traits->construct_max_vertex_2_object()(cv), seg_left) == EQUAL) - { - if (p_is_left && - m_traits->compare_xy_2_object() - (m_traits->construct_max_vertex_2_object()(cv), seg_left) == EQUAL) - { + auto max_p = m_traits->construct_max_vertex_2_object()(cv); + if (equal_x_2(max_p, seg_left, Left_or_right_sides_category())) { + if (p_is_left && m_traits->equal_2_object()(max_p, seg_left)) { p_on_curve = true; return true; } else if (m_traits->is_vertical_2_object()(seg)) { // Special treatment for vertical segments. - Comparison_result res_l = - m_traits->compare_y_at_x_2_object()(seg_left, cv); - Comparison_result res_r = - m_traits->compare_y_at_x_2_object()(seg_right, cv); - + auto cmp_y_at_x = m_traits->compare_y_at_x_2_object(); + Comparison_result res_l = cmp_y_at_x(seg_left, cv); + Comparison_result res_r = cmp_y_at_x(seg_right, cv); if ((p_is_left && res_l == EQUAL) || (! p_is_left && res_r == EQUAL)) { p_on_curve = true; return true; @@ -846,8 +775,8 @@ _have_odd_intersections(const X_monotone_curve_2& cv, } } // Compare the two left ends of cv and seg. - Comparison_result left_res; - const Arr_parameter_space bx_l = + Comparison_result left_res; + const Arr_parameter_space bx_l = m_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END); if (bx_l == ARR_LEFT_BOUNDARY) { // The left end of cv lies to the left of seg_left: @@ -858,11 +787,11 @@ _have_odd_intersections(const X_monotone_curve_2& cv, // The left end of cv lies to the right of seg_left. // Compare the left endpoint of cv to seg. left_res = m_traits->compare_y_at_x_2_object() - (m_traits->construct_min_vertex_2_object()(cv), seg); + (m_traits->construct_min_vertex_2_object()(cv), seg); left_res = CGAL::opposite(left_res); } else { - const Arr_parameter_space by_l = + const Arr_parameter_space by_l = m_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END); if (by_l == ARR_BOTTOM_BOUNDARY) // The left end of cv is at y = -oo, so cv obviously lies above it. @@ -876,8 +805,7 @@ _have_odd_intersections(const X_monotone_curve_2& cv, Comparison_result res = m_traits->compare_xy_2_object()(cv_left, seg_left); if (res != LARGER) { left_res = m_traits->compare_y_at_x_2_object()(seg_left, cv); - if (p_is_left && left_res == EQUAL) - { + if (p_is_left && left_res == EQUAL) { // In this case the query point p, which is the left endpoint of seg, // lies on cv. p_on_curve = true; @@ -904,8 +832,7 @@ _have_odd_intersections(const X_monotone_curve_2& cv, // we must set a special flag to distinguish this case if (is_in_x_range(cv,( p_is_left ? seg_left : seg_right))) if (m_traits->compare_y_at_x_2_object() - ((p_is_left ? seg_left : seg_right), cv) == EQUAL) - { + ((p_is_left ? seg_left : seg_right), cv) == EQUAL) { p_on_curve = true; } cv_and_seg_overlap = true; @@ -913,8 +840,8 @@ _have_odd_intersections(const X_monotone_curve_2& cv, } } // Compare the two right ends of cv and seg. - Comparison_result right_res; - const Arr_parameter_space bx_r = + Comparison_result right_res; + const Arr_parameter_space bx_r = m_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END); if (bx_r == ARR_RIGHT_BOUNDARY) { // The right end of cv lies to the right of seg_right: @@ -925,11 +852,11 @@ _have_odd_intersections(const X_monotone_curve_2& cv, // The right end of cv lies to the left of seg_right. // Compare the right endpoint of cv to seg. right_res = m_traits->compare_y_at_x_2_object() - (m_traits->construct_max_vertex_2_object()(cv), seg); + (m_traits->construct_max_vertex_2_object()(cv), seg); right_res = CGAL::opposite(right_res); } else { - const Arr_parameter_space by_r = + const Arr_parameter_space by_r = m_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END); if (by_r == ARR_BOTTOM_BOUNDARY) // The right end of cv is at y = -oo, so cv obviously lies above it. @@ -972,8 +899,7 @@ _have_odd_intersections(const X_monotone_curve_2& cv, // we must set a special flag to distinguish this case if (is_in_x_range(cv, (p_is_left ? seg_left : seg_right))) if (m_traits->compare_y_at_x_2_object() - ((p_is_left ? seg_left : seg_right), cv) == EQUAL) - { + ((p_is_left ? seg_left : seg_right), cv) == EQUAL) { p_on_curve = true; } cv_and_seg_overlap = true; @@ -986,6 +912,6 @@ _have_odd_intersections(const X_monotone_curve_2& cv, return (left_res != right_res); } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h index c7bd903ee70..f40b9e1edea 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h @@ -98,14 +98,14 @@ public: bool is_empty() const { return nn.is_empty(); } private: - /*! Copy constructor - not supported. */ + /*! Copy constructor not supported. */ Arr_landmarks_generator_base(const Self&); - /*! Assignment operator - not supported. */ + /*! Assignment operator not supported. */ Self& operator=(const Self& ); public: - /*! Constructor from an arrangement. + /*! constructs from an arrangement. * \param arr (in) The arrangement. */ Arr_landmarks_generator_base(const Base_aos& arr) : @@ -120,7 +120,7 @@ public: // inherited class. } - /*! Create the landmarks set (choosing the landmarks) , + /*! creates the landmarks set (choosing the landmarks) , * and saving them in the nearest-neighbor search structure. */ virtual void build_landmark_set() { @@ -136,7 +136,7 @@ public: updated = true; } - /*! clear the set of landmarks. + /*! clears the set of landmarks. */ virtual void clear_landmark_set() { nn.clear(); @@ -144,7 +144,7 @@ public: updated = false; } - /*! Obtain the nearest neighbor (landmark) to the given point. + /*! obtains the nearest neighbor (landmark) to the given point. * \param p The query point. * \param obj Output: The location of the nearest landmark point in the * arrangement (a vertex, halfedge, or face handle). @@ -399,7 +399,7 @@ public: //@} protected: - /*! Create the list of landmarks with their location. + /*! creates the list of landmarks with their location. * This is a pure virtual function, and the class that inherites from * this generator must implement it. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h index c242d29e2d2..e64affe3012 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h @@ -82,14 +82,14 @@ protected: // number of landmarks as parameter private: - /*! Copy constructor - not supported. */ + /*! Copy constructor not supported. */ Arr_grid_landmarks_generator(const Self&); - /*! Assignment operator - not supported. */ + /*! Assignment operator not supported. */ Self& operator=(const Self&); public: - /*! Constructor from an arrangement. + /*! constructs from an arrangement. * \param arr (in) The arrangement. */ Arr_grid_landmarks_generator(const Arrangement_2& arr) : @@ -111,7 +111,7 @@ public: build_landmark_set();//this-> } - /*! Create the landmarks set (choosing the landmarks), + /*! creates the landmarks set (choosing the landmarks), * and store them in the nearest neighbor search structure. */ virtual void build_landmark_set() @@ -128,7 +128,7 @@ public: this->updated = true; } - /*! Clear the set of landmarks. + /*! clears the set of landmarks. */ virtual void clear_landmark_set() { @@ -136,7 +136,7 @@ public: this->updated = false; } - /*! Obtain the nearest neighbor (landmark) to the given point. + /*! obtains the nearest neighbor (landmark) to the given point. * \param q The query point. * \param obj (out) The location of the nearest landmark point in the * arrangement (a vertex, halfedge, or face handle). @@ -165,7 +165,7 @@ public: } protected: - /*! Create a set of landmark points on a grid. + /*! creates a set of landmark points on a grid. */ virtual void _create_points_set(Points_set& points) { @@ -261,6 +261,6 @@ protected: } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h index 61fe87106b5..217815c5e04 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h @@ -64,10 +64,10 @@ public: Approximate_number_type m_vec[2]; // Approximate point x and y-coordinates. public: - /*! Default constructor. */ + /*! constructs default. */ NN_Point_2() { m_vec[0] = m_vec[1] = 0; } - /*! Constructor from a point. */ + /*! constructs from a point. */ NN_Point_2(const Point_2& p) : m_point(p) { @@ -77,7 +77,7 @@ public: m_vec[1] = m_traits.approximate_2_object()(p, 1); } - /*! Constructor from a point and an its location in the arrangement. */ + /*! constructs from a point and an its location in the arrangement. */ NN_Point_2(const Point_2& p, const PL_result_type obj) : m_point(p), m_object(obj) @@ -94,10 +94,10 @@ public: /* Get the object representing the location in the arrangement. */ const PL_result_type& object() const { return (m_object); } - /*! Get an iterator for the approximate coordinates. */ + /*! obtains an iterator for the approximate coordinates. */ const Approximate_number_type* begin() const { return (m_vec); } - /*! Get a past-the-end iterator for the approximate coordinates. */ + /*! obtains a past-the-end iterator for the approximate coordinates. */ const Approximate_number_type* end() const { return (m_vec + 2); } /*! Equality operators. */ @@ -116,11 +116,11 @@ public: { typedef const Approximate_number_type* result_type; - /*! Get an iterator for the approximate coordinates. */ + /*! obtains an iterator for the approximate coordinates. */ const Approximate_number_type* operator()(const NN_Point_2& nnp) const { return (nnp.begin()); } - /*! Get a past-the-end iterator for the approximate coordinates. */ + /*! obtains a past-the-end iterator for the approximate coordinates. */ const Approximate_number_type* operator()(const NN_Point_2& nnp, int) const { return (nnp.end()); } }; @@ -143,24 +143,23 @@ public: private: typedef Arr_landmarks_nearest_neighbor Self; - /*! Copy constructor - not supported. */ + /*! Copy constructor not supported. */ Arr_landmarks_nearest_neighbor(const Self&); - /*! Assignment operator - not supported. */ + /*! Assignment operator not supported. */ Self& operator=(const Self&); public: - /*! Default constructor. */ + /*! constructs default. */ Arr_landmarks_nearest_neighbor () : m_tree(nullptr), m_is_empty(true) {} - /*! Destructor. */ + /*! destructs. */ ~Arr_landmarks_nearest_neighbor() { clear(); } - /*! - * Allocate the search tree and initialize it with landmark points. + /*! allocates the search tree and initialize it with landmark points. * \param begin An iterator for the first landmark point. * \param end A past-the-end iterator for the landmark points. * \pre The search tree is not initialized. @@ -181,7 +180,7 @@ public: } } - /*! Clear the search tree. */ + /*! clears the search tree. */ void clear() { if (m_tree != nullptr) @@ -190,8 +189,7 @@ public: m_is_empty = true; } - /*! - * Find the nearest landmark point to the query point. + /*! finds the nearest landmark point to the query point. * \param q The query point. * \param obj Output: The location of the nearest landmark point in the * arrangement (a vertex, halfedge, or face handle). @@ -215,6 +213,6 @@ public: } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h index 391fb264658..729b3fcc831 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h @@ -171,7 +171,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -352,7 +352,7 @@ public: }; - /*! Obtain a Compare_curve_end_x_2 functor object. */ + /*! obtains a Compare_curve_end_x_2 functor object. */ Compare_curve_end_x_2 compare_curve_end_x_2_object () const { return Compare_curve_end_x_2(this); @@ -371,7 +371,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -481,7 +481,7 @@ public: }; - /*! Obtain a Compare_y_at_x_2 functor object. */ + /*! obtains a Compare_y_at_x_2 functor object. */ Compare_curve_end_y_at_x_2 compare_curve_end_y_at_x_2_object () const { return Compare_curve_end_y_at_x_2(this); @@ -498,7 +498,7 @@ public: const Traits* m_traits; const Traits_base* m_traits_base; //MICHAL: rational-upd - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -586,7 +586,7 @@ public: }; - /*! Obtain an Equal_curve_end_2 functor object. */ + /*! obtains an Equal_curve_end_2 functor object. */ Equal_curve_end_2 equal_curve_end_2_object () const { return Equal_curve_end_2(this); @@ -601,7 +601,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -613,8 +613,7 @@ public: friend class Td_traits; public: - /*! - * Compare two edge ends lexigoraphically: by x, then by y. + /*! compares two edge ends lexigoraphically: by x, then by y. * \param cv1, cv1_end The first cv end. * \param cv2, cv2_end The second cv end. * \return LARGER if x(cv1-end) > x(cv2-end), @@ -860,15 +859,12 @@ public: } }; - /*! Obtain a Compare_curve_end_xy_2 functor object. */ + /*! obtains a Compare_curve_end_xy_2 functor object. */ Compare_curve_end_xy_2 compare_curve_end_xy_2_object () const { return Compare_curve_end_xy_2(this); } - - - // Td_traits class ctors and dtor Td_traits(const Traits_base& t) : Traits_base(t) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h index f540146b2cb..aef731fa798 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h @@ -85,20 +85,20 @@ protected: enum { INVALID_INDEX = 0xffffffff }; public: - /*! Construct default. */ + /*! constructs default. */ Arr_polycurve_basic_traits_2() : m_subcurve_traits(new Subcurve_traits_2()), m_own_traits(true) {} - /*! Construct from a subcurve traits. + /*! constructs from a subcurve traits. * \param seg_traits an already existing subcurve tarits, which is passed in; * it will be used by the class. */ Arr_polycurve_basic_traits_2(const Subcurve_traits_2* geom_traits) : m_subcurve_traits(geom_traits), m_own_traits(false) {} - /*! Construct copy. + /*! constructs copy. * If the 'other' polycurve traits owns its subcurve traits, then make * this polycurve traits own its subcurve traits as well * \param other the other traits. @@ -117,7 +117,7 @@ public: ~Arr_polycurve_basic_traits_2() { if (m_own_traits) delete m_subcurve_traits; } - /*! Obtain the subcurve traits. + /*! obtains the subcurve traits. * \return the subcurve traits. */ const Subcurve_traits_2* subcurve_traits_2() const @@ -147,13 +147,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_x_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare the \f$x\f$-coordinates of two directional points. + /*! compares the \f$x\f$-coordinates of two directional points. * \param p1 the first directional point. * \param p2 the second directional point. * \return `SMALLER` - \f$x\f$(`p1`) < \f$x\f$(`p2`); @@ -165,7 +165,7 @@ public: Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { return m_poly_traits.subcurve_traits_2()->compare_x_2_object()(p1, p2); } - /*! Compare two ends of \f$x\f$-monotone curves in \f$x\f$. + /*! compares two ends of \f$x\f$-monotone curves in \f$x\f$. * \param xs1 the first curve. * \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve * `xs1`: @@ -177,7 +177,7 @@ public: Arr_curve_end ce1, const Point_2& p2) { return operator()(xs1, ce1, p2, All_sides_oblivious_category()); } - /*! Compare two ends of \f$x\f$-monotone curves in x. + /*! compares two ends of \f$x\f$-monotone curves in x. * \param xs1 the first curve. * \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve * `xs1`: @@ -296,7 +296,7 @@ public: } }; - /*! Obtain a Compare_x_2 functor object. */ + /*! obtains a Compare_x_2 functor object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } //! Compare two curve-ends or points lexigoraphically: by x, then by y. @@ -310,13 +310,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_xy_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare two directional points lexigoraphically: by \f$x\f$, then by + /*! compares two directional points lexigoraphically: by \f$x\f$, then by * \f$y\f$. * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. @@ -332,7 +332,7 @@ public: Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { return m_poly_traits.subcurve_traits_2()->compare_xy_2_object()(p1, p2); } - /*! Compare two ends of \f$x\f$-monotone curves lexicographically. + /*! compares two ends of \f$x\f$-monotone curves lexicographically. * \param xs1 the first curve. * \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve * `xs1`: @@ -344,7 +344,7 @@ public: Arr_curve_end ce1, const Point_2& p2) { return operator()(xs1, ce1, p2, All_sides_oblivious_category()); } - /*! Compare two ends of \f$x\f$-monotone curves lexicographically. + /*! compares two ends of \f$x\f$-monotone curves lexicographically. * \param xs1 the first curve. * \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve * `xs1`: @@ -517,7 +517,7 @@ public: } }; - /*! Obtain a Compare_xy_2 functor object. */ + /*! obtains a Compare_xy_2 functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } /*! A functor that obtain the lexicographically smallest endpoint of an @@ -533,13 +533,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /* Constructor. */ + /*! constructs. */ Construct_min_vertex_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Obtain the left endpoint of the \f$x\f$-monotone polycurve. The return + /*! obtains the left endpoint of the \f$x\f$-monotone polycurve. The return * type is the same as the return type of the corresponding operator in the * functor of the subtraits, which is either by value or by reference. * \param xcv the polycurve curve. @@ -561,7 +561,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(*this); } @@ -578,13 +578,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Construct_max_vertex_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Obtain the right endpoint of the \f$x\f$-monotone polycurve. The return + /*! obtains the right endpoint of the \f$x\f$-monotone polycurve. The return * type is the same as the return type of the corresponding operator in the * functor of the subtraits, which is either by value or by reference. * \param xcv the polycurve. @@ -603,7 +603,7 @@ public: } }; - /*! Obtain a Construct_max_vertex_2 functor object. */ + /*! obtains a Construct_max_vertex_2 functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(*this); } @@ -618,13 +618,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Is_vertical_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Check whether the given \f$x\f$-monotone curve is a vertical segment. + /*! checks whether the given \f$x\f$-monotone curve is a vertical segment. * \param cv the curve. * \return `true` if the curve is a vertical segment; `false` otherwise. */ @@ -637,7 +637,7 @@ public: } }; - /*! Obtain an Is_vertical_2 functor object. */ + /*! obtains an Is_vertical_2 functor object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(*this); } /*! A functor that compares the \f$y\f$-coordinates of a point and an @@ -762,13 +762,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_y_at_x_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Obtain the location of the given point with respect to the input curve. + /*! obtains the location of the given point with respect to the input curve. * \param p the point. * \param xcv the polycurve curve. * \pre `p` is in the \f$x\f$-range of `xcv`. @@ -781,7 +781,7 @@ public: const X_monotone_curve_2& xcv) const { return operator()(p, xcv, All_sides_oblivious_category()); } - /*! Obtain the location of the given curve_end with respect to the input + /*! obtains the location of the given curve_end with respect to the input * curve. * \param xcv The polycurve curve. * \param ce the curve-end indicator of the \f$x\f$-monotone subcurve xl: @@ -801,7 +801,7 @@ public: { return operator()(xs1, ce1, xs2, All_sides_oblivious_category()); } }; - /*! Obtain a Compare_y_at_x_2 functor object. */ + /*! obtains a Compare_y_at_x_2 functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } @@ -818,13 +818,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_y_at_x_left_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare the y value of two \f$x\f$-monotone curves immediately to the + /*! compares the y value of two \f$x\f$-monotone curves immediately to the * left of their intersection point. * \param cv1 the first polycurve curve. * \param cv2 the second polycurve curve. @@ -851,7 +851,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_left_2 functor object. */ + /*! obtains a Compare_y_at_x_left_2 functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(*this); } @@ -868,13 +868,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_y_at_x_right_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to * the right of their intersection point. * \param cv1 the first curve. * \param cv2 the second curve. @@ -901,7 +901,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_right_2 functor object. + /*! obtains a Compare_y_at_x_right_2 functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(*this); } @@ -919,11 +919,11 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Equal_2(const Polycurve_basic_traits_2& poly_tr) : m_poly_traits(poly_tr) {} public: - /*! Check whether the two points are the same. + /*! checks whether the two points are the same. * \param p1 the first point. * \param p2 the second point. * \return `true` if the two point are the same; `false` otherwise. @@ -931,7 +931,7 @@ public: bool operator()(const Point_2& p1, const Point_2& p2) const { return m_poly_traits.subcurve_traits_2()->equal_2_object()(p1, p2); } - /*! Check whether the two \f$x\f$-monotone curves are the same (have the + /*! checks whether the two \f$x\f$-monotone curves are the same (have the * same graph). * \param cv1 the first curve. * \param cv2 the second curve. @@ -1008,7 +1008,7 @@ public: } }; - /*! Obtain an Equal_2 functor object. */ + /*! obtains an Equal_2 functor object. */ Equal_2 equal_2_object() const { return Equal_2(*this); } /*! A functor that lexicographically compares the endpoints of a curve. */ @@ -1022,13 +1022,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_endpoints_xy_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare the endpoints of an \(x\)-monotone curve lexicographically. + /*! compares the endpoints of an \(x\)-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param cv the curve. * \return `SMALLER` if `cv` is oriented left-to-right; @@ -1062,13 +1062,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor */ + /*! constructs */ Construct_opposite_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Construct the reversed \f$x\f$-monotone polycurve of the input. + /*! constructs the reversed \f$x\f$-monotone polycurve of the input. * Note that the functor constructs the opposites of _all_ subcurves * constituting `xcv`. * \param xcv the \f$x\f$-monotone polycurve to be reveres @@ -1132,7 +1132,7 @@ public: using Approximate_point_2 = typename has_approximate_2::Approximate_point_2; - /*! Obtain an Approximate_2 functor object. */ + /*! obtains an Approximate_2 functor object. */ Approximate_2 approximate_2_object_impl(std::false_type) const { return subcurve_traits_2()->approximate_2_object(); } @@ -1152,7 +1152,7 @@ public: //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - /*! Constructor. */ + /*! constructs. */ Construct_point_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} @@ -1160,7 +1160,7 @@ public: friend class Arr_polycurve_basic_traits_2; public: - /*! Construct a point. + /*! constructs a point. * Apply perfect forwarding. */ template @@ -1171,7 +1171,7 @@ public: } }; - /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + /*! obtains a Construct_x_monotone_curve_2 functor object. */ Construct_point_2 construct_point_2_object() const { return Construct_point_2(*this); } @@ -1186,13 +1186,14 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Construct_x_monotone_curve_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Obtain an \f$x\f$-monotone polycurve that consists of one given subcurve. + /*! obtains an \f$x\f$-monotone polycurve that consists of one given + * subcurve. * \param seg input subcurve. * \pre seg is not degenerated. * \return an \f$x\f$-monotone polycurve with one subcurve. @@ -1223,7 +1224,7 @@ public: return X_monotone_curve_2(seg); } - /*! Construct an \f$x\f$-monotone polycurve, which is well-oriented, from a + /*! constructs an \f$x\f$-monotone polycurve, which is well-oriented, from a * range of elements. * \pre the elements in the range should form a continuous well-oriented * \f$x\f$-monotone polycurve. @@ -1238,7 +1239,7 @@ public: return constructor_impl(begin, end, Is_point()); } - /*! Construct an \f$x\f$-monotone polycurve from a range of points. + /*! constructs an \f$x\f$-monotone polycurve from a range of points. * The polycurve may be oriented left-to-right or right-to-left * depending on the lexicographical order of the points in the input. * \pre range contains at least two points. @@ -1253,7 +1254,7 @@ public: std::true_type) const { CGAL_error_msg("Cannot construct a polycurve from a range of points!"); } - /*! Obtain an \f$x\f$-monotone polycurve from a range of subcurves. + /*! obtains an \f$x\f$-monotone polycurve from a range of subcurves. * \param begin An iterator pointing to the first subcurve in the range. * \param end An iterator pointing to the past-the-end subcurve * in the range. @@ -1345,7 +1346,7 @@ public: } }; - /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + /*! obtains a Construct_x_monotone_curve_2 functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } @@ -1368,13 +1369,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Parameter_space_in_x_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Obtains the parameter space at the end of a curve along the + /*! obtains the parameter space at the end of a curve along the * \f$x\f$-axis. Note that if the curve-end coincides with a pole, then * unless the curve coincides with the identification curve, the curve-end * is considered to be approaching the boundary, but not on the boundary. @@ -1405,7 +1406,7 @@ public: return geom_traits->parameter_space_in_x_2_object()(xs, ce); } - /*! Obtains the parameter space at a point along the \f$x\f$-axis. + /*! obtains the parameter space at a point along the \f$x\f$-axis. * \param p the point. * \return the parameter space at `p`. * \pre `p` does not lie on the vertical identification curve. @@ -1416,7 +1417,7 @@ public: } }; - /*! Obtain a Parameter_space_in_x_2 function object */ + /*! obtains a Parameter_space_in_x_2 function object */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(*this); } @@ -1433,13 +1434,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Parameter_space_in_y_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Obtains the parameter space at the end of an curve along the + /*! obtains the parameter space at the end of an curve along the * \f$y\f$-axis. Note that if the curve-end coincides with a pole, then * unless the curve coincides with the identification curve, the curve-end * is considered to be approaching the boundary, but not on the boundary. @@ -1470,7 +1471,7 @@ public: return geom_traits->parameter_space_in_y_2_object()(xs, ce); } - /*! Obtains the parameter space at a point along the \f$y\f$-axis. + /*! obtains the parameter space at a point along the \f$y\f$-axis. * \param p the point. * \return the parameter space at `p`. * \pre p does not lie on the horizontal identification curve. @@ -1482,7 +1483,7 @@ public: } }; - /*! Obtain a Parameter_space_in_y_2 function object */ + /*! obtains a Parameter_space_in_y_2 function object */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(*this); } @@ -1499,13 +1500,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_x_on_boundary_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare the \f$x\f$-coordinates of a point with the \f$x\f$-coordinate + /*! compares the \f$x\f$-coordinates of a point with the \f$x\f$-coordinate * of an \f$x\f$-curve-end on the boundary. * \param point the point. * \param xcv the \f$x\f$-monotone curve, the endpoint of which is compared. @@ -1525,7 +1526,7 @@ public: Arr_curve_end ce) const { return operator()(point, xcv, ce, Bottom_or_top_sides_category()); } - /*! Compare the \f$x\f$-coordinates of 2 curve-ends on the boundary of the + /*! compares the \f$x\f$-coordinates of 2 curve-ends on the boundary of the * parameter space. * \param xcv1 the first curve. * \param ce1 the first curve-end indicator: @@ -1553,7 +1554,7 @@ public: { return operator()(xcv1, ce1, xcv2, ce2, Bottom_or_top_sides_category()); } private: - /*! \brief compares the \f$x\f$-coordinates of a point with the + /*! compares the \f$x\f$-coordinates of a point with the * \f$x\f$-coordinate of an \f$x\f$-monotone curve-end on the boundary. */ Comparison_result operator()(const Point_2& point, @@ -1570,7 +1571,7 @@ public: return geom_traits->compare_x_on_boundary_2_object()(point, xs, ce); } - /*! \brief compares the \f$x\f$-coordinates of 2 curve-ends on the boundary + /*! compares the \f$x\f$-coordinates of 2 curve-ends on the boundary * of the parameter space. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, @@ -1597,13 +1598,12 @@ public: const Arr_curve_end ce) const { return (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1; } - /*! Given a point \f$p\f$, an x-monotone curve \f$C(t) = (X(t),Y(t))\f$, - * and an enumerator that specifies either the minimum end or the - * maximum end of the curve, and thus maps to a parameter value - * \f$d \in \{0,1\}\f$, compare x_p and limit{t => d} X(t). - * If the parameter space is unbounded, a precondition ensures that \f$C\f$ - * has a vertical asymptote at its \f$d\f$-end; that is - * limit{t => d} X(t) is finite. + /*! given a point \f$p\f$, an \f$x\f$-monotone curve \f$C(t) = + * (X(t),Y(t))\f$, and an enumerator that specifies either the minimum end + * or the maximum end of the curve, and thus maps to a parameter value \f$d + * \in \{0,1\}\f$, compares x_p and limit{t => d} X(t). If the parameter + * space is unbounded, a precondition ensures that \f$C\f$ has a vertical + * asymptote at its \f$d\f$-end; that is limit{t => d} X(t) is finite. */ Comparison_result operator()(const Point_2& p, const X_monotone_curve_2& xcv, @@ -1616,7 +1616,7 @@ public: return cmp_x_on_boundary(p, xcv[index], ce); } - /*! Given two \f$x\f$-monotone curves \f$C_1(t) = (X_1(t),Y_1(t))\f$ and + /*! given two \f$x\f$-monotone curves \f$C_1(t) = (X_1(t),Y_1(t))\f$ and * \f$C2_(t) = (X_2(t),Y_2(t))\f$ and two enumerators that specify either * the minimum ends or the maximum ends of the curves, and thus map to * parameter values \f$d_1 \in \{0,1\}\f$ and \f$d_2 \in \{0,1\}\f$ for @@ -1624,7 +1624,7 @@ public: * limit{t => d1} X1(t) and limit{t => d2} X2(t). * If the parameter space is unbounded, a precondition ensures that * \f$C_1\f$ and \f$C_2\f$ have vertical asymptotes at their respective - * ends; that is, limit{t => d1} X1(t) and limit{t =? d2} X2(t) are finite. + * ends; that is, limit{t => d1} X1(t) and limit{t => d2} X2(t) are finite. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, Arr_curve_end ce1/* for xcv1 */, @@ -1649,7 +1649,7 @@ public: } }; - /*! Obtain a Compare_x_on_boundary_2 function object. */ + /*! obtains a Compare_x_on_boundary_2 function object. */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(*this); } @@ -1703,13 +1703,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_y_on_boundary_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare the \f$y\f$-coordinate of two given points that lie on the + /*! compares the \f$y\f$-coordinate of two given points that lie on the * vertical identification curve. * \param p1 the first point. * \param p2 the second point. @@ -1725,7 +1725,7 @@ public: } }; - /*! Obtain a Compare_y_on_boundary_2 function object */ + /*! obtains a Compare_y_on_boundary_2 function object */ Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(*this); } @@ -1742,13 +1742,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_y_near_boundary_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare the \f$y\f$-coordinates of 2 curves at their ends near the + /*! compares the \f$y\f$-coordinates of 2 curves at their ends near the * boundary of the parameter space. * \param xcv1 the first curve. * \param xcv2 the second curve. @@ -1780,7 +1780,7 @@ public: } }; - /*! Obtain a Compare_y_near_boundary_2 function object */ + /*! obtains a Compare_y_near_boundary_2 function object */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(*this); } @@ -1797,13 +1797,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Is_on_y_identification_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Determine whether a point lies in the vertical boundary. + /*! determines whether a point lies in the vertical boundary. * \param p the point. * \return a Boolean indicating whether `p` lies in the vertical boundary. */ @@ -1812,7 +1812,7 @@ public: return geom_traits->is_on_y_identification_2_object()(p); } - /*! Determine whether an \f$x\f$-monotone curve lies in the vertical + /*! determines whether an \f$x\f$-monotone curve lies in the vertical * boundary. * \param xcv the \f$x\f$-monotone curve. * \return a Boolean indicating whether `xcv` lies in the vertical boundary. @@ -1825,7 +1825,7 @@ public: } }; - /*! Obtain a Is_on_y_identification_2 function object */ + /*! obtains a Is_on_y_identification_2 function object */ Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(*this); } @@ -1842,13 +1842,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Is_on_x_identification_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Determine whether a point lies in the vertical boundary. + /*! determines whether a point lies in the vertical boundary. * \param p the point. * \return a Boolean indicating whether `p` lies in the vertical boundary. */ @@ -1857,7 +1857,7 @@ public: return geom_traits->is_on_x_identification_2_object()(p); } - /*! Determine whether an \f$x\f$-monotone curve lies in the vertical + /*! determines whether an \f$x\f$-monotone curve lies in the vertical * boundary. * \param `xcv` the \f$x\f$-monotone curve. * \return a Boolean indicating whether `xcv` lies in the vertical boundary. @@ -1870,7 +1870,7 @@ public: } }; - /*! Obtain a Is_on_x_identification_2 function object */ + /*! obtains a Is_on_x_identification_2 function object */ Is_on_x_identification_2 is_on_x_identification_2_object() const { return Is_on_x_identification_2(*this); } @@ -1906,13 +1906,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Push_back_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Append a subcurve to an existing \f$x\f$-monotone polycurve at the back. + /*! appends a subcurve to an existing \f$x\f$-monotone polycurve at the back. */ void operator()(X_monotone_curve_2& xcv, const X_monotone_subcurve_2& seg) const @@ -2071,7 +2071,7 @@ public: } }; - /*! Obtain a Push_back_2 functor object. */ + /*! obtains a Push_back_2 functor object. */ Push_back_2 push_back_2_object() const { return Push_back_2(*this); } /* Functor to augment a polycurve by adding a subcurve at the front. @@ -2087,7 +2087,7 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Push_front_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} @@ -2225,7 +2225,7 @@ public: } }; - /*! Obtain a Push_front_2 functor object. */ + /*! obtains a Push_front_2 functor object. */ Push_front_2 push_front_2_object() const { return Push_front_2(*this); } //! A functor that trimps an \f$x\f$-monotone curve. @@ -2239,11 +2239,11 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Trim_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! \brief returns a trimmed version of the polycurve with `source` and + /*! returns a trimmed version of the polycurve with `source` and * `target` as end points. */ X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv, @@ -2339,7 +2339,7 @@ public: } }; - /*! Obtain a Trim_2 functor object. */ + /*! obtains a Trim_2 functor object. */ Trim_2 trim_2_object() const { return Trim_2(*this); } ///@} @@ -2349,7 +2349,7 @@ protected: * Roadmap: locate() should return an iterator to the located subcurve */ - /*! Obtain the index of the subcurve in the polycurve that contains a point + /*! obtains the index of the subcurve in the polycurve that contains a point * \f$q\f$ in its \f$x\f$-range. The function performs a binary search, so if * the point \f$q\f$ is in the \f$x\f$-range of the polycurve with \f$n\f$ * subcurves, the subcurve containing it can be located in \cgalBigO{log n} @@ -2491,7 +2491,7 @@ protected: { return m_compare(xs, ce, m_x_monotone_subcurve, m_curve_end); } }; - /*! Locate the index of a curve in a polycurve that contains an endpoint + /*! locates the index of a curve in a polycurve that contains an endpoint * of a curve. * This implementation is used in the case where at least one side of the * parameter space is not oblivious. @@ -2521,7 +2521,7 @@ protected: return locate_gen(xcv, compare); } - /*! Locate the index of a curve in a polycurve that contains an endpoint + /*! locates the index of a curve in a polycurve that contains an endpoint * of a curve. * This implementation is used in the case where all sides of the parameter * space is oblivious. @@ -2540,7 +2540,7 @@ protected: return locate(xcv, p); } - /*! Locate the index of a curve in a polycurve that contains a point. + /*! locates the index of a curve in a polycurve that contains a point. * This implementation is used in the case where at least one side of the * parameter space is not oblivious. * \param(in) xcv the given polycurve. @@ -2567,7 +2567,7 @@ protected: return locate_gen(xcv, compare); } - /*! Locate the index of a curve in a polycurve that contains a point. + /*! locates the index of a curve in a polycurve that contains a point. * This implementation is used in the case where all sides of the parameter * space are oblivious. * \param(in) xcv the given polycurve. @@ -2599,7 +2599,7 @@ protected: return locate_gen(xcv, compare); } - /*! Find the index of the subcurve in the polycurve that is defined to the + /*! finds the index of the subcurve in the polycurve that is defined to the * left (or to the right) of the point `q`. * \param cv the polycurve curve. * \param q the point. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h index 8096e6b59b4..8c78432ad12 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h @@ -111,10 +111,10 @@ private: using Self = Arr_polycurve_traits_2; public: - /*! Default constructor */ + /*! constructs default */ Arr_polycurve_traits_2() : Base() {} - /*! Constructor with given subcurve traits + /*! constructs with given subcurve traits * \param seg_traits an already existing subcurve tarits which is passed will * be used by the class. */ @@ -141,7 +141,7 @@ public: } }; - /*! Obtain a number_of_points_2 functor object. */ + /*! obtains a `Number_of_points_2` functor object. */ Number_of_points_2 number_of_points_2_object() const { return Number_of_points_2(); } @@ -163,12 +163,12 @@ public: const Polycurve_traits_2& m_poly_traits; public: - /*! Constructor. */ + /*! constructs. */ Make_x_monotone_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {} - /*! Subdivide a given curve into x-monotone sub-curves and insert them into + /*! subdivides a given curve into x-monotone sub-curves and insert them into * a given output iterator. * * \pre if `cv` is not empty then it must be continuous and well-oriented. @@ -470,7 +470,7 @@ public: { return operator_impl(cv, oi, All_sides_oblivious_category()); } }; - /*! Obtain a Make_x_monotone_2 functor object. */ + /*! obtains a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(*this); } @@ -483,7 +483,7 @@ public: using Polycurve_traits_2 = Arr_polycurve_traits_2; public: - /*! Constructor. */ + /*! constructs. */ Push_back_2(const Polycurve_traits_2& traits) : Base::Push_back_2(traits) {} // Normally, the moment the compiler finds a name, it stops looking. In @@ -493,21 +493,21 @@ public: // code below. using Base::Push_back_2::operator(); - // /*! Append a subcurve to an existing x-monotone polycurve at the back. + // /*! appends a subcurve to an existing x-monotone polycurve at the back. // */ // void operator()(X_monotone_curve_2& xcv, // const X_monotone_subcurve_2& seg) // const // { Base::Push_back_2::operator()(xcv, seg); } - /* Append a subcurve to an existing polycurve at the back. + /* appends a subcurve to an existing polycurve at the back. * If the polycurve is empty, the subcurve will be its only subcurve. */ void operator()(Curve_2& cv, const Subcurve_2& seg) const { cv.push_back(seg); } }; - /*! Obtain a Push_back_2 functor object. */ + /*! obtains a `Push_back_2` functor object. */ Push_back_2 push_back_2_object() const { return Push_back_2(*this); } /* Functor to augment a polycurve by either adding a vertex or a subcurve @@ -519,7 +519,7 @@ public: using Polycurve_traits_2 = Arr_polycurve_traits_2; public: - /*! Constructor. */ + /*! constructs. */ Push_front_2(const Polycurve_traits_2& traits) : Base::Push_front_2(traits) {} @@ -531,19 +531,19 @@ public: // code below. using Base::Push_front_2::operator(); - // /*! Append a subcurve to an existing x-monotone polycurve at the front. + // /*! appends a subcurve to an existing x-monotone polycurve at the front. // */ // void operator()(X_monotone_curve_2& xcv, // const X_monotone_subcurve_2& seg) // const // { Base::Push_front_2::operator()(xcv, seg); } - /* Append a subcurve to an existing polycurve at the front. */ + /* appends a subcurve to an existing polycurve at the front. */ void operator()(Curve_2& cv, const Subcurve_2& seg) const { cv.push_front(seg); } }; - /*! Obtain a Push_front_2 functor object. */ + /*! obtains a `Push_front_2` functor object. */ Push_front_2 push_front_2_object() const { return Push_front_2(*this); } class Split_2 { @@ -554,11 +554,11 @@ public: const Polycurve_traits_2& m_poly_traits; public: - /*! Constructor. */ + /*! constructs. */ Split_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Split a given x-monotone curve at a given point into two sub-curves. + /*! splits a given x-monotone curve at a given point into two sub-curves. * \param cv The curve to split * \param p The split point. * \param c1 Output: The left resulting subcurve(p is its right endpoint). @@ -659,7 +659,7 @@ public: } }; - /*! Obtain a Split_2 functor object. */ + /*! obtains a `Split_2` functor object. */ Split_2 split_2_object() const { return Split_2(*this); } class Intersect_2 { @@ -670,10 +670,10 @@ public: const Polycurve_traits_2& m_poly_traits; public: - /*! Constructor. */ + /*! constructs. */ Intersect_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {} - /*! Find the intersections of the two given curves and insert them into the + /*! finds the intersections of the two given curves and insert them into the * given output iterator. As two subcurves may itersect only once, only a * single intersection will be contained in the iterator. * Note: If the intersection yields an overlap then it will be oriented @@ -996,7 +996,7 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! obtains an `Intersect_2` functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } class Are_mergeable_2 { @@ -1007,10 +1007,10 @@ public: const Polycurve_traits_2& m_poly_traits; public: - /*! Constructor. */ + /*! constructs. */ Are_mergeable_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {} - /*! Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given x-monotone curves. * \param cv1 The first curve. * \param cv2 The second curve. * \return(true) if the two curves are mergeable, that is, they share a @@ -1047,7 +1047,7 @@ public: } }; - /*! Obtain an Are_mergeable_2 functor object. */ + /*! obtains an `Are_mergeable_2` functor object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(*this); } @@ -1065,12 +1065,12 @@ public: const Geometry_traits& m_poly_traits; public: - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Merge_2(const Geometry_traits& traits) : m_poly_traits(traits) {} - /*! Merge two given x-monotone curves into a single curve(segment). + /*! merges two given x-monotone curves into a single curve(segment). * \param cv1 The first curve. * \param cv2 The second curve. * \param c Output: The merged curve. @@ -1122,7 +1122,7 @@ public: } }; - /*! Obtain a Merge_2 functor object. */ + /*! obtains a `Merge_2` functor object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } ///@} @@ -1137,15 +1137,15 @@ public: const Polycurve_traits_2& m_poly_traits; public: - /*! Constructor. */ + /*! constructs. */ Construct_curve_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {} - /*! Obtain a polycurve that consists of one given subcurve. */ + /*! obtains a polycurve that consists of one given subcurve. */ Curve_2 operator()(const Subcurve_2& seg) const { return Curve_2(seg); } - /* Construct a well-oriented polycurve from a range of either + /* constructs a well-oriented polycurve from a range of either * `SubcurveTraits::Point_2` or `SubcurveTraits::Subcurve_2`. */ template @@ -1156,7 +1156,7 @@ public: return constructor_impl(begin, end, Is_point()); } - /*! Construction of a polycurve from a range of points. + /*! constructs a polycurve from a range of points. * \pre The range contains at least two points * \pre Consecutive points are disjoint. * \return Well-oriented polycurve connecting the given @@ -1186,12 +1186,12 @@ public: } }; - /*! Obtain a Construct_curve_2 functor object. */ + /*! obtains a `Construct_curve_2` functor object. */ Construct_curve_2 construct_curve_2_object() const { return Construct_curve_2(*this); } }; -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polyline_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polyline_traits_2.h index be6fb987894..90864a7f64e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polyline_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polyline_traits_2.h @@ -118,10 +118,10 @@ public: //@} public: - /*! Construct default. */ + /*! constructs default. */ Arr_polyline_traits_2() : Base() {} - /*! Construct from a segment traits + /*! constructs from a segment traits * \param geom_traits an already existing segment tarits which is passed will * be used by the class. */ @@ -139,7 +139,7 @@ public: typedef Arr_polyline_traits_2 Polyline_traits_2; public: - /*! Constructor. */ + /*! constructs. */ Push_back_2(const Polyline_traits_2& traits) : Base::Push_back_2(traits) {} @@ -151,16 +151,16 @@ public: // code below. using Base::Push_back_2::operator(); - // /*! Append a segment `seg` to an existing polyline `cv` at the back. */ + // /*! appends a segment `seg` to an existing polyline `cv` at the back. */ // void operator()(Curve_2& cv, const Segment_2& seg) const // { Base::Push_back_2::operator() (cv, seg); } - // /* Append a segment `seg` to an existing polyline `xcv` at the back. */ + // /* appends a segment `seg` to an existing polyline `xcv` at the back. */ // void operator()(X_monotone_curve_2& xcv, // const X_monotone_subcurve_2& seg) const // { Base::Push_back_2::operator()(xcv, seg); } - /* Append a point `p` to an existing polyline `cv` at the back. */ + /* appends a point `p` to an existing polyline `cv` at the back. */ void operator()(Curve_2& cv, const Point_2& p) const { typedef typename Curve_2::size_type size_type; size_type num_seg = cv.number_of_subcurves(); @@ -187,7 +187,7 @@ public: } } - /* Append a point `p` to an existing polyline `xcv` at the back. */ + /* appends a point `p` to an existing polyline `xcv` at the back. */ void operator()(X_monotone_curve_2& xcv, const Point_2& p) const { typedef typename X_monotone_curve_2::size_type size_type; @@ -237,7 +237,7 @@ public: } }; - /*! Obtain a Push_back_2 functor object. */ + /*! obtains a Push_back_2 functor object. */ Push_back_2 push_back_2_object() const { return Push_back_2(*this); } /* Functor to augment a polyline by either adding a vertex or a segment @@ -249,7 +249,7 @@ public: typedef Arr_polyline_traits_2 Polyline_traits_2; public: - /*! Constructor. */ + /*! constructs. */ Push_front_2(const Polyline_traits_2& traits) : Base::Push_front_2(traits) {} @@ -261,11 +261,11 @@ public: // code below. using Base::Push_front_2::operator(); - // /*! Append a segment `seg` to an existing polyline `cv` at the front. */ + // /*! appends a segment `seg` to an existing polyline `cv` at the front. */ // void operator()(Curve_2& cv, const Subcurve_2& seg) const // { Base::Push_front_2::operator()(cv, seg); } - // /*! Append a segment `seg` to an existing polyline `xcv` at the front. */ + // /*! appends a segment `seg` to an existing polyline `xcv` at the front. */ // void operator()(X_monotone_curve_2& xcv, // const X_monotone_subcurve_2& seg) const // { Base::Push_front_2::operator()(xcv, seg); } @@ -294,7 +294,7 @@ public: } } - /*! Append a point `p` to an existing polyline `xcv` at the front. */ + /*! appends a point `p` to an existing polyline `xcv` at the front. */ void operator()(const X_monotone_curve_2& xcv, Point_2& p) const { const auto* geom_traits = this->m_poly_traits.subcurve_traits_2(); @@ -339,10 +339,10 @@ public: } }; - /*! Obtain a Push_front_2 functor object. */ + /*! obtains a Push_front_2 functor object. */ Push_front_2 push_front_2_object() const { return Push_front_2(*this); } - /*! Construct a general curve from : + /*! constructs a general curve from : * 1. two points, * 2. a sub curve, * 3. a range of points, or @@ -353,7 +353,7 @@ public: typedef Arr_polyline_traits_2 Polyline_traits_2; public: - /*! Constructor. + /*! constructs. */ Construct_curve_2(const Polyline_traits_2& traits) : Base::Construct_curve_2(traits) @@ -402,7 +402,7 @@ public: std::false_type) const { return Base::Construct_curve_2::operator()(begin, end); } - /*! Construction of a polyline from a range of points. + /*! constructs a polyline from a range of points. * \pre The range contains at least two points * \pre Consecutive points are disjoint. * \return Well-oriented polyline connecting the given points. The order @@ -443,11 +443,11 @@ public: } }; - /*! Obtain a Construct_curve_2 functor object. */ + /*! obtains a Construct_curve_2 functor object. */ Construct_curve_2 construct_curve_2_object() const { return Construct_curve_2(*this); } - /*! Construct an x-monotone curve. */ + /*! constructs an x-monotone curve. */ class Construct_x_monotone_curve_2 : public Base::Construct_x_monotone_curve_2 { @@ -455,13 +455,13 @@ public: typedef Arr_polyline_traits_2 Polyline_traits_2; public: - /*! Constructor. + /*! constructs. */ Construct_x_monotone_curve_2(const Polyline_traits_2& traits) : Base::Construct_x_monotone_curve_2(traits) {} - /*! Obtain an x-monotone polyline connecting two given endpoints. + /*! obtains an x-monotone polyline connecting two given endpoints. * \param p The first point. * \param q The second point. * \pre p and q must not be the same. @@ -485,7 +485,7 @@ public: return X_monotone_curve_2(seg); } - /*! Obtain an x-monotone polyline that consists of one given segment. + /*! obtains an x-monotone polyline that consists of one given segment. * \param seg input segment. * \pre seg is not degenerated. * \return An x-monotone polyline with one segment. @@ -493,7 +493,7 @@ public: X_monotone_curve_2 operator()(const X_monotone_subcurve_2& seg) const { return Base::Construct_x_monotone_curve_2::operator()(seg); } - /*! Construct an x-monotone polyline from a range of elements. + /*! constructs an x-monotone polyline from a range of elements. * \pre Range should from a continuous well-oriented x-monotone polyline. */ template @@ -590,7 +590,7 @@ public: } }; - /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + /*! obtains a Construct_x_monotone_curve_2 functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } @@ -605,7 +605,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits. */ Approximate_2(const Traits& traits) : @@ -622,8 +622,7 @@ public: Approximate_point_2 operator()(const Point_2& p) const { return Base::Approximate_2::operator()(p); } - /*! Obtain an approximation of an \f$x\f$-monotone curve. - */ + /*! obtains an approximation of an \f$x\f$-monotone curve. */ template OutputIterator operator()(const X_monotone_curve_2& xcv, double /* error */, OutputIterator oi, bool l2r = true) const { @@ -647,11 +646,10 @@ public: } }; - /*! Obtain an Approximate_2 functor object. */ + /*! obtains an Approximate_2 functor object. */ Approximate_2 approximate_2_object() const { return Approximate_2(*this); } - /*! Deprecated! - * Obtain the segment traits. + /*! obtains the segment traits. * \return the segment traits. */ CGAL_DEPRECATED const Segment_traits_2* segment_traits_2() const diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h index f908224fe26..4101d509f37 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h @@ -26,8 +26,6 @@ #include #include - - namespace CGAL { /*! \class @@ -161,7 +159,7 @@ public: /*! The traits */ const Traits* _traits; - /*! Constructor + /*! constructs * \param traits the traits */ Construct_x_monotone_curve_2(const Traits* traits) : _traits(traits) {} @@ -299,7 +297,7 @@ public: /*! The traits */ const Traits* _traits; - /*! Constructor + /*! constructs * \param traits the traits */ Construct_curve_2(const Traits* traits) : _traits(traits) {} @@ -424,7 +422,7 @@ public: /*! The traits */ const Traits* _traits; - /*! Constructor + /*! constructs * \param traits the traits */ Construct_point_2(const Traits* traits) : _traits(traits) {} @@ -502,8 +500,7 @@ public: class Compare_x_2 { public: - /*! - * Compare the x-coordinates of two points. + /*! compares the x-coordinates of two points. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2); @@ -517,7 +514,7 @@ public: } }; - /*! Obtain a Compare_x_2 functor object. */ + /*! obtains a Compare_x_2 functor object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(); @@ -533,7 +530,7 @@ public: /*! The traits */ const Traits* _traits; - /*! Constructor + /*! constructs * \param traits the traits */ Compare_xy_2(const Traits* traits) : _traits(traits) {} @@ -541,8 +538,7 @@ public: friend class Arr_rational_function_traits_2; public: - /*! - * Compares two points lexigoraphically: by x, then by y. + /*! compares two points lexigoraphically: by x, then by y. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2); @@ -555,7 +551,7 @@ public: } }; - /*! Obtain a Compare_xy_2 functor object. */ + /*! obtains a Compare_xy_2 functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(this); @@ -565,8 +561,7 @@ public: class Construct_min_vertex_2 { public: - /*! - * Get the left endpoint of the x-monotone curve (segment). + /*! obtains the left endpoint of the x-monotone curve (segment). * \param cv The curve. * \return The left endpoint. */ @@ -576,7 +571,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); @@ -586,8 +581,7 @@ public: class Construct_max_vertex_2 { public: - /*! - * Get the right endpoint of the x-monotone curve (segment). + /*! obtains the right endpoint of the x-monotone curve (segment). * \param cv The curve. * \return The right endpoint. */ @@ -597,7 +591,7 @@ public: } }; - /*! Obtain a Construct_max_vertex_2 functor object. */ + /*! obtains a Construct_max_vertex_2 functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); @@ -607,8 +601,7 @@ public: class Is_vertical_2 { public: - /*! - * Check whether the given x-monotone curve is a vertical segment. + /*! checks whether the given x-monotone curve is a vertical segment. * \param cv The curve. * \return (true) if the curve is a vertical segment; (false) otherwise. */ @@ -619,7 +612,7 @@ public: } }; - /*! Obtain an Is_vertical_2 functor object. */ + /*! obtains an Is_vertical_2 functor object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); @@ -632,10 +625,11 @@ public: { private: Cache& _cache; + public: Compare_y_at_x_2(Cache& cache) : _cache(cache) {} - /*! - * Return the location of the given point with respect to the input curve. + + /*! returns the location of the given point with respect to the input curve. * \param cv The curve. * \param p The point. * \pre p is in the x-range of cv. @@ -650,7 +644,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_2 functor object. */ + /*! obtains a Compare_y_at_x_2 functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object () const { return Compare_y_at_x_2(_cache); @@ -665,9 +659,9 @@ public: Cache& _cache; public: - Compare_y_at_x_left_2(Cache& cache) :_cache(cache) {} - /*! - * Compares the y value of two x-monotone curves immediately to the left + Compare_y_at_x_left_2(Cache& cache) : _cache(cache) {} + + /*! compares the y value of two x-monotone curves immediately to the left * of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. @@ -697,7 +691,7 @@ public: return cv1.compare_at_intersection (cv2,p,true,_cache);} }; - /*! Obtain a Compare_y_at_x_left_2 functor object. */ + /*! obtains a Compare_y_at_x_left_2 functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(_cache); @@ -713,8 +707,8 @@ public: public: Compare_y_at_x_right_2(Cache& cache) :_cache(cache) {} - /*! - * Compares the y value of two x-monotone curves immediately to the right + + /*! compares the y value of two x-monotone curves immediately to the right * of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. @@ -747,7 +741,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_right_2 functor object. */ + /*! obtains a Compare_y_at_x_right_2 functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const { return Compare_y_at_x_right_2(_cache); @@ -762,7 +756,7 @@ public: /*! The traits */ const Traits* _traits; - /*! Constructor + /*! constructs * \param traits the traits */ Equal_2(const Traits* traits) : _traits(traits) {} @@ -770,8 +764,7 @@ public: friend class Arr_rational_function_traits_2; public: - /*! - * Check if the two x-monotone curves are the same (have the same graph). + /*! checks if the two x-monotone curves are the same (have the same graph). * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are the same; (false) otherwise. @@ -785,8 +778,7 @@ public: return (cv1.equals(cv2)); } - /*! - * Check if the two points are the same. + /*! checks if the two points are the same. * \param p1 The first point. * \param p2 The second point. * \return (true) if the two point are the same; (false) otherwise. @@ -802,7 +794,7 @@ public: } }; - /*! Obtain an Equal_2 functor object. */ + /*! obtains an Equal_2 functor object. */ Equal_2 equal_2_object() const { return Equal_2(this); @@ -816,7 +808,7 @@ public: */ class Make_x_monotone_2 { public: - /*! Subdivide a given rational-function curve into x-monotone subcurves + /*! subdivides a given rational-function curve into x-monotone subcurves * and insert them to a given output iterator. * \param cv the curve. * \param oi the output iterator for the result. Its dereference type is a @@ -840,7 +832,7 @@ public: } }; - /*! Obtain a Make_x_monotone_2 functor object. */ + /*! obtains a Make_x_monotone_2 functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(); } @@ -852,8 +844,7 @@ public: public: Split_2(Cache& cache) : _cache(cache) {} - /*! - * Split a given x-monotone curve at a given point into two sub-curves. + /*! splits a given x-monotone curve at a given point into two sub-curves. * \param cv The curve to split * \param p The split point. * \param c1 Output: The left resulting subcurve (p is its right endpoint). @@ -867,7 +858,7 @@ public: } }; - /*! Obtain a Split_2 functor object. */ + /*! obtains a Split_2 functor object. */ Split_2 split_2_object() const { return Split_2(_cache); @@ -880,8 +871,7 @@ public: Cache& _cache; public: Intersect_2(Cache& cache) : _cache(cache) {} - /*! - * Find the intersections of the two given curves and insert them to the + /*! finds the intersections of the two given curves and insert them to the * given output iterator. As two segments may itersect only once, only a * single will be contained in the iterator. * \param cv1 The first curve. @@ -898,7 +888,7 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! obtains an Intersect_2 functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(_cache); @@ -908,8 +898,7 @@ public: class Are_mergeable_2 { public: - /*! - * Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given x-monotone curves. * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are mergeable - if they are supported @@ -922,7 +911,7 @@ public: } }; - /*! Obtain an Are_mergeable_2 functor object. */ + /*! obtains an Are_mergeable_2 functor object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(); @@ -939,7 +928,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Merge_2(const Traits* traits) : m_traits(traits) {} @@ -947,8 +936,7 @@ public: friend class Arr_rational_function_traits_2; public: - /*! - * Merge two given x-monotone curves into a single curve (segment). + /*! merges two given x-monotone curves into a single curve (segment). * \param cv1 The first curve. * \param cv2 The second curve. * \param c Output: The merged curve. @@ -965,7 +953,7 @@ public: } }; - /*! Obtain a Merge_2 functor object. */ + /*! obtains a Merge_2 functor object. */ Merge_2 merge_2_object() const { return Merge_2(this); @@ -981,7 +969,7 @@ public: */ class Parameter_space_in_x_2 { public: - /*! Obtains the parameter space at the end of a line along the x-axis. + /*! obtains the parameter space at the end of a line along the x-axis. * \param xcv the line * \param ce the line end indicator: * ARR_MIN_END - the minimal end of xc or @@ -1000,7 +988,7 @@ public: xcv.left_parameter_space_in_x() : xcv.right_parameter_space_in_x(); } - /*! Obtains the parameter space at a point along the x-axis. + /*! obtains the parameter space at a point along the x-axis. * \param p the point. * \return the parameter space at p. */ @@ -1010,7 +998,7 @@ public: } }; - /*! Obtain a Parameter_space_in_x_2 function object */ + /*! obtains a Parameter_space_in_x_2 function object */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(); } @@ -1019,7 +1007,7 @@ public: */ class Parameter_space_in_y_2 { public: - /*! Obtains the parameter space at the end of a line along the y-axis . + /*! obtains the parameter space at the end of a line along the y-axis . * Note that if the line end coincides with a pole, then unless the line * coincides with the identification arc, the line end is considered to * be approaching the boundary, but not on the boundary. @@ -1043,7 +1031,7 @@ public: xcv.left_parameter_space_in_y() : xcv.right_parameter_space_in_y(); } - /*! Obtains the parameter space at a point along the y-axis. + /*! obtains the parameter space at a point along the y-axis. * \param p the point. * \return the parameter space at p. */ @@ -1053,7 +1041,7 @@ public: } }; - /*! Obtain a Parameter_space_in_y_2 function object */ + /*! obtains a Parameter_space_in_y_2 function object */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(); } @@ -1063,7 +1051,7 @@ public: */ class Compare_x_near_boundary_2 { public: - /*! Compare the x-coordinate of a point with the x-coordinate of + /*! compares the x-coordinate of a point with the x-coordinate of * a line end near the boundary at y = +/- oo. * \param p the point direction. * \param xcv the line, the endpoint of which is compared. @@ -1087,7 +1075,7 @@ public: return (r == NEGATIVE) ? POSITIVE : NEGATIVE ; } - /*! Compare the x-coordinates of 2 arcs ends near the boundary of the + /*! compares the x-coordinates of 2 arcs ends near the boundary of the * parameter space at y = +/- oo. * \param xcv1 the first arc. * \param ce1 the first arc end indicator - @@ -1113,7 +1101,7 @@ public: } }; - /*! Obtain a Compare_x_near_boundary_2 function object */ + /*! obtains a Compare_x_near_boundary_2 function object */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(); } #endif @@ -1127,7 +1115,7 @@ public: Cache& _cache; public: - /*! Compare the y-coordinates of 2 lines at their ends near the boundary + /*! compares the y-coordinates of 2 lines at their ends near the boundary * of the parameter space at x = +/- oo. * \param xcv1 the first arc. * \param xcv2 the second arc. @@ -1147,7 +1135,7 @@ public: } }; - /*! Obtain a Compare_y_near_boundary_2 function object */ + /*! obtains a Compare_y_near_boundary_2 function object */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(_cache); } @@ -1158,7 +1146,7 @@ public: class Compare_x_on_boundary_2 { public: - /*! Compares the x coordinate of p with the curve end + /*! compares the x coordinate of p with the curve end * of xcv that is defined by ce at its limit. * Returns SMALLER, EQUAL, or LARGER accordingly. */ @@ -1171,7 +1159,8 @@ public: return CGAL::compare(p.x(), (ce == ARR_MIN_END) ? xcv.left_x() : xcv.right_x()); } - /*! Compares the curve end of xcv1 that is defined by ce1 + + /*! compares the curve end of xcv1 that is defined by ce1 * with the curve end of xcv2 that is defined by ce2 * at their limits in x. * Returns SMALLER, EQUAL, or LARGER accordingly. @@ -1192,7 +1181,7 @@ public: }; //Compare_x_on_boundary_2 - /*! Obtain a Compare_x_on_boundary_2 function object */ + /*! obtains a Compare_x_on_boundary_2 function object */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(); } //@} @@ -1208,7 +1197,8 @@ public: public: Compare_x_near_boundary_2(Cache& cache) : _cache(cache) {} - /*! Compares the curve end of xcv1 that is defined by ce1 + + /*! compares the curve end of xcv1 that is defined by ce1 * with the curve end of xcv2 that is defined by ce2 * at their limits in x. * Returns SMALLER, EQUAL, or LARGER accordingly. @@ -1221,16 +1211,14 @@ public: } }; //Compare_x_near_boundary_2 - /*! Obtain a Compare_x_near_boundary_2 function object */ + /*! obtains a Compare_x_near_boundary_2 function object */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(_cache); } class Compare_endpoints_xy_2 { public: - - /*! - * Compare the endpoints of an $x$-monotone curve lexicographically. + /*! compares the endpoints of an $x$-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param cv The curve. * \return SMALLER if the curve is directed right; @@ -1245,7 +1233,7 @@ public: } }; - /*! Obtain a Compare_endpoints_xy_2 functor object. */ + /*! obtains a Compare_endpoints_xy_2 functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); @@ -1254,9 +1242,7 @@ public: class Construct_opposite_2 { public: - - /*! - * Construct an opposite x-monotone (with swapped source and target). + /*! constructs an opposite x-monotone (with swapped source and target). * \param cv The curve. * \return The opposite curve. */ @@ -1266,7 +1252,7 @@ public: } }; - /*! Obtain a Construct_opposite_2 functor object. */ + /*! obtains a Construct_opposite_2 functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); @@ -1300,10 +1286,10 @@ public: { _cache.cleanup(); } -}; //Arr_rational_function_traits_2 +}; // Arr_rational_function_traits_2 -} //namespace CGAL { +} // namespace CGAL { #include -#endif //CGAL_ARR_RATIONAL_ARC_TRAITS_D_1_H +#endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index b080305c6f8..0e2d4819b1b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -96,23 +96,23 @@ public: /// \name Creation //@{ - /*! Construct default. */ + /*! constructs default. */ _Segment_cached_2(); - /*! Construct a segment from a Kernel segment. + /*! constructs a segment from a Kernel segment. * \param seg the segment. * \pre the segment is not degenerate. */ _Segment_cached_2(const Segment_2& seg); - /*! Construct a segment from two endpoints. + /*! constructs a segment from two endpoints. * \param source the source point. * \param target the target point. * \param `source` and `target` are not equal. */ _Segment_cached_2(const Point_2& source, const Point_2& target); - /*! Construct a segment from two endpoints on a supporting line. + /*! constructs a segment from two endpoints on a supporting line. * \param line the supporting line. * \param source the source point. * \param target the target point. @@ -121,7 +121,7 @@ public: _Segment_cached_2(const Line_2& line, const Point_2& source, const Point_2& target); - /*! Construct a segment from all fields. + /*! constructs a segment from all fields. * \param line the supporting line. * \param source the source point. * \param target the target point. @@ -133,7 +133,7 @@ public: const Point_2& source, const Point_2& target, bool is_directed_right, bool is_vert, bool is_degen); - /*! Assign. + /*! assigns. * \param seg the source segment to copy from * \pre the segment is not degenerate. */ @@ -144,44 +144,44 @@ public: /// \name Accessors //@{ - /*! Obtain the supporting line. + /*! obtains the supporting line. * \return the supporting line. */ const Line_2& line() const; - /*! Obtain the segment source. + /*! obtains the segment source. * \return the segment source. */ const Point_2& source() const; - /*! Obtain the segment target. + /*! obtains the segment target. * \return the segment target. */ const Point_2& target() const; - /*! Determine whether the curve is vertical. + /*! determines whether the curve is vertical. * \return a Boolean flag indicating whether the curve is vertical. */ bool is_vertical() const; - /*! Determine whether the curve is degenerate. + /*! determines whether the curve is degenerate. * return a Boolean flag indicating whether the curve is degenerate. */ bool is_degenerate() const; - /*! Determine whether the curve is lexicographically directed from left to + /*! determines whether the curve is lexicographically directed from left to * right. * \return a Boolean flag indicating whether the curve is lexicographically * directed from left to right. */ bool is_directed_right() const; - /*! Obtain the (lexicographically) left endpoint. + /*! obtains the (lexicographically) left endpoint. * \return the (lexicographically) left endpoint. */ const Point_2& left() const; - /*! Obtain the (lexicographically) right endpoint. + /*! obtains the (lexicographically) right endpoint. * \return the (lexicographically) right endpoint. */ const Point_2& right() const; @@ -191,13 +191,13 @@ public: /// \name Modifiers //@{ - /*! Set the (lexicographically) left endpoint. + /*! sets the (lexicographically) left endpoint. * \param p the point to set. * \pre p lies on the supporting line to the left of the right endpoint. */ void set_left(const Point_2& p); - /*! Set the (lexicographically) right endpoint. + /*! sets the (lexicographically) right endpoint. * \param p the point to set. * \pre p lies on the supporting line to the right of the left endpoint. */ @@ -208,15 +208,18 @@ public: /// \name Deprecated //@{ - /*! Determine whether the given point is in the x-range of the segment. + /*! determine whether the given point is in the \f$x\f$-range of the segment. * \param p the query point. - * \return (true) is in the x-range of the segment; (false) if it is not. + * \return (true) is in the \f$x\f$-range of the segment; (false) if it is + * not. */ CGAL_DEPRECATED bool is_in_x_range(const Point_2& p) const; - /*! Determine whether the given point is in the y-range of the segment. + /*! determines whether the given point is in the \f$y\f$-range of the + * segment. * \param p the query point. - * \return (true) is in the y-range of the segment; (false) if it is not. + * \return (true) is in the \f$y\f$-range of the segment; (false) if it is + * not. */ CGAL_DEPRECATED bool is_in_y_range(const Point_2& p) const; @@ -231,7 +234,7 @@ public: typedef unsigned int Multiplicity; public: - /*! Construct default. */ + /*! constructs default. */ Arr_segment_traits_2() {} /// \name Basic functor definitions. @@ -244,7 +247,7 @@ public: //! The traits (in case it has state). const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_x_2(const Traits& traits) : m_traits(traits) {} @@ -252,12 +255,12 @@ public: friend class Arr_segment_traits_2; public: - /*! Compare the x-coordinates of two points. + /*! compares the \f$x\f$-coordinates of two points. * \param p1 the first point. * \param p2 the second point. - * \return LARGER if x(p1) > x(p2); - * SMALLER if x(p1) < x(p2); - * EQUAL if x(p1) = x(p2). + * \return `LARGER` if x(p1) > x(p2); + * `SMALLER` if x(p1) < x(p2); + * `EQUAL` if x(p1) = x(p2). */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { @@ -266,7 +269,7 @@ public: } }; - /*! Obtain a Compare_x_2 functor object. */ + /*! obtains a `Compare_x_2` functor object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } class Compare_xy_2 { @@ -276,7 +279,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_xy_2(const Traits& traits) : m_traits(traits) {} @@ -284,7 +287,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Compare two points lexicographically: by x, then by y. + /*! compares two points lexicographically: by x, then by y. * \param p1 the first point. * \param p2 the second point. * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2); @@ -298,12 +301,12 @@ public: } }; - /*! Obtain a Compare_xy_2 functor object. */ + /*! obtains a `Compare_xy_2` functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } class Construct_min_vertex_2 { public: - /*! Obtain the left endpoint of the x-monotone curve (segment). + /*! obtains the left endpoint of the \f$x\f$-monotone curve (segment). * \param cv the curve. * \return the left endpoint. */ @@ -311,13 +314,13 @@ public: { return (cv.left()); } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a `Construct_min_vertex_2` functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } class Construct_max_vertex_2 { public: - /*! Obtain the right endpoint of the x-monotone curve (segment). + /*! obtains the right endpoint of the \f$x\f$-monotone curve (segment). * \param cv the curve. * \return the right endpoint. */ @@ -325,13 +328,13 @@ public: { return (cv.right()); } }; - /*! Obtain a Construct_max_vertex_2 functor object. */ + /*! obtains a `Construct_max_vertex_2` functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } class Is_vertical_2 { public: - /*! Check whether the given x-monotone curve is a vertical segment. + /*! checks whether the given \f$x\f$-monotone curve is a vertical segment. * \param cv the curve. * \return (true) if the curve is a vertical segment; (false) otherwise. */ @@ -339,17 +342,17 @@ public: { return (cv.is_vertical()); } }; - /*! Obtain an Is_vertical_2 functor object. */ + /*! obtains an `Is_vertical_2` functor object. */ Is_vertical_2 is_vertical_2_object () const { return Is_vertical_2(); } class Compare_y_at_x_2 { protected: typedef Arr_segment_traits_2 Traits; - /*! the traits (in case it has state) */ + /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_at_x_2(const Traits& traits) : m_traits(traits) {} @@ -357,13 +360,13 @@ public: friend class Arr_segment_traits_2; public: - /*! Return the location of the given point with respect to the input curve. + /*! returns the location of the given point with respect to the input curve. * \param cv the curve. * \param p the point. - * \pre p is in the x-range of cv. - * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve; - * LARGER if y(p) > cv(x(p)), i.e. the point is above the curve; - * EQUAL if p lies on the curve. + * \pre `p` is in the \f$x\f$-range of `cv`. + * \return `SMALLER` if y(p) < cv(x(p)), i.e. the point is below the curve; + * `LARGER` if y(p) > cv(x(p)), i.e. the point is above the curve; + * `EQUAL` if `p` lies on the curve. */ Comparison_result operator()(const Point_2& p, const X_monotone_curve_2& cv) const @@ -387,7 +390,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_2 functor object. */ + /*! obtains a `Compare_y_at_x_2` functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } @@ -398,7 +401,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_at_x_left_2(const Traits& traits) : m_traits(traits) {} @@ -406,15 +409,15 @@ public: friend class Arr_segment_traits_2; public: - /*! Compare the y value of two x-monotone curves immediately to the left - * of their intersection point. + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the left of their intersection point. * \param cv1 the first curve. * \param cv2 the second curve. * \param p the intersection point. - * \pre the point p lies on both curves, and both of them must be also be + * \pre the point `p` lies on both curves, and both of them must be also be * defined (lexicographically) to its left. - * \return the relative position of cv1 with respect to cv2 immediately to - * the left of p: SMALLER, LARGER or EQUAL. + * \return the relative position of `cv1` with respect to `cv2` immediately + * to the left of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -441,7 +444,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_left_2 functor object. */ + /*! obtains a `Compare_y_at_x_left_2` functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(*this); } @@ -452,7 +455,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_at_x_right_2(const Traits& traits) : m_traits(traits) {} @@ -460,15 +463,15 @@ public: friend class Arr_segment_traits_2; public: - /*! Compare the y value of two x-monotone curves immediately to the right - * of their intersection point. + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the right of their intersection point. * \param cv1 the first curve. * \param cv2 the second curve. * \param p the intersection point. - * \pre the point p lies on both curves, and both of them must be also be + * \pre the point `p` lies on both curves, and both of them must be also be * defined (lexicographically) to its right. - * \return the relative position of cv1 with respect to cv2 immediately to - * the right of p: SMALLER, LARGER or EQUAL. + * \return the relative position of `cv1` with respect to `cv2` immediately + * to the right of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -493,7 +496,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_right_2 functor object. */ + /*! obtains a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(*this); } @@ -504,7 +507,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Equal_2(const Traits& traits) : m_traits(traits) {} @@ -512,8 +515,8 @@ public: friend class Arr_segment_traits_2; public: - /*! Check whether the two x-monotone curves are the same (have the same - * graph). + /*! checks whether the two \f$x\f$-monotone curves are the same (have the + * same graph). * \param cv1 the first curve. * \param cv2 the second curve. * \return (true) if the two curves are the same; (false) otherwise. @@ -528,7 +531,7 @@ public: equal(cv1.right(), cv2.right())); } - /*! Determine whether the two points are the same. + /*! determines whether the two points are the same. * \param p1 the first point. * \param p2 the second point. * \return (true) if the two point are the same; (false) otherwise. @@ -540,7 +543,7 @@ public: } }; - /*! Obtain an Equal_2 functor object. */ + /*! obtains an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(*this); } //@} @@ -549,13 +552,13 @@ public: //@{ /*! \class Make_x_monotone_2 - * A functor for subdividing a curve into x-monotone curves. + * A functor for subdividing a curve into \f$x\f$-monotone curves. */ class Make_x_monotone_2 { public: - /*! Subdivide a given curve into x-monotone subcurves and insert them into - * a given output iterator. As segments are always x_monotone a single - * object is inserted. + /*! subdivides a given curve into \f$x\f$-monotone subcurves and insert them + * into a given output iterator. As segments are always \f$x\f$_monotone a + * single object is inserted. * \param cv the curve. * \param oi the output iterator for the result. Its dereference type is a * variant that wraps a \c Point_2 or an \c X_monotone_curve_2 @@ -573,7 +576,7 @@ public: } }; - /*! Obtain a Make_x_monotone_2 functor object. */ + /*! obtains a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(); } @@ -584,7 +587,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Split_2(const Traits& traits) : m_traits(traits) {} @@ -592,12 +595,13 @@ public: friend class Arr_segment_traits_2; public: - /*! Split a given x-monotone curve at a given point into two sub-curves. + /*! split a given \f$x\f$-monotone curve at a given point into two + * sub-curves. * \param cv the curve to split * \param p the split point. - * \param c1 Output: the left resulting subcurve (p is its right endpoint). - * \param c2 Output: the right resulting subcurve (p is its left endpoint). - * \pre p lies on cv but is not one of its endpoints. + * \param c1 Output: the left resulting subcurve (`p` is its right endpoint). + * \param c2 Output: the right resulting subcurve (`p` is its left endpoint). + * \pre `p` lies on cv but is not one of its endpoints. */ void operator()(const X_monotone_curve_2& cv, const Point_2& p, X_monotone_curve_2& c1, X_monotone_curve_2& c2) const @@ -619,7 +623,7 @@ public: } }; - /*! Obtain a Split_2 functor object. */ + /*! obtains a `Split_2` functor object. */ Split_2 split_2_object() const { return Split_2(*this); } class Intersect_2 { @@ -629,7 +633,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Construct + /*! constructs * \param traits the traits (in case it has state) */ Intersect_2(const Traits& traits) : m_traits(traits) {} @@ -679,7 +683,7 @@ public: return false; } - /*! Determine whether the bounding boxes of two segments overlap + /*! determines whether the bounding boxes of two segments overlap */ bool do_bboxes_overlap(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2) const @@ -692,7 +696,7 @@ public: } public: - /*! Find the intersections of the two given curves and insert them into the + /*! finds the intersections of the two given curves and insert them into the * given output iterator. As two segments may intersect only once, only a * single intersection will be contained in the iterator. * \param cv1 the first curve. @@ -778,7 +782,7 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! obtains an `Intersect_2` functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } class Are_mergeable_2 { @@ -788,7 +792,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Are_mergeable_2(const Traits& traits) : m_traits(traits) {} @@ -796,12 +800,12 @@ public: friend class Arr_segment_traits_2; public: - /*! Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given \f$x\f$-monotone curves. * \param cv1 the first curve. * \param cv2 the second curve. * \return (true) if the two curves are mergeable, that is, if they are * supported by the same line; (false) otherwise. - * \pre cv1 and cv2 share a common endpoint. + * \pre `cv1` and `cv2` share a common endpoint. */ bool operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2) const @@ -819,12 +823,12 @@ public: } }; - /*! Obtain an Are_mergeable_2 functor object. */ + /*! obtains an `Are_mergeable_2` functor object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(*this); } /*! \class Merge_2 - * A functor that merges two x-monotone arcs into one. + * A functor that merges two \f$x\f$-monotone arcs into one. */ class Merge_2 { protected: @@ -833,7 +837,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Merge_2(const Traits& traits) : m_traits(traits) {} @@ -841,7 +845,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Merge two given x-monotone curves into a single curve (segment). + /*! merges two given \f$x\f$-monotone curves into a single curve (segment). * \param cv1 the first curve. * \param cv2 the second curve. * \param c Output: the merged curve. @@ -872,7 +876,7 @@ public: } }; - /*! Obtain a Merge_2 functor object. */ + /*! obtains a `Merge_2` functor object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } //@} @@ -889,7 +893,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits. */ Approximate_2(const Traits& traits) : m_traits(traits) {} @@ -897,24 +901,24 @@ public: friend class Arr_segment_traits_2; public: - /*! Obtain an approximation of a point coordinate. + /*! obtains an approximation of a point coordinate. * \param p the exact point. * \param i the coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return An approximation of p's x-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). + * \pre `i` is either 0 or 1. + * \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). */ Approximate_number_type operator()(const Point_2& p, int i) const { CGAL_precondition((i == 0) || (i == 1)); return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y())); } - /*! Obtain an approximation of a point. + /*! obtains an approximation of a point. */ Approximate_point_2 operator()(const Point_2& p) const { return Approximate_point_2(operator()(p, 0), operator()(p, 1)); } - /*! Obtain an approximation of an \f$x\f$-monotone curve. + /*! obtains an approximation of an \f$x\f$-monotone curve. */ template OutputIterator operator()(const X_monotone_curve_2& xcv, double /* error */, @@ -933,7 +937,7 @@ public: } }; - /*! Obtain an Approximate_2 functor object. */ + /*! obtains an `Approximate_2` functor object. */ Approximate_2 approximate_2_object() const { return Approximate_2(*this); } //! Functor @@ -944,7 +948,7 @@ public: //! The traits (in case it has state). const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Construct_x_monotone_curve_2(const Traits& traits) : m_traits(traits) {} @@ -954,7 +958,7 @@ public: public: typedef typename Kernel::Segment_2 Segment_2; - /*! Obtain an x-monotone curve connecting two given endpoints. + /*! obtains an \f$x\f$-monotone curve connecting two given endpoints. * \param source the first point. * \param target the second point. * \pre `source` and `target` must not be equal. @@ -975,7 +979,7 @@ public: is_directed_right, is_vert, is_degen); } - /*! Obtain an \f$x\f$-monotone curve given a Kernel segment. + /*! obtains an \f$x\f$-monotone curve given a Kernel segment. * \param seg the segment. * \return the \f$x\f$-monotone curve. * \pre the segment is not degenerate. @@ -998,7 +1002,7 @@ public: is_directed_right, is_vert, is_degen); } - /*! Obtain an \f$x\f$-monotone curve given two endpoints and the supporting + /*! obtains an \f$x\f$-monotone curve given two endpoints and the supporting * line. * \param line the supporting line. * \param the source point. @@ -1026,7 +1030,7 @@ public: } }; - /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + /*! obtains a `Construct_x_monotone_curve_2` functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } //@} @@ -1037,7 +1041,7 @@ public: //! Functor typedef Construct_x_monotone_curve_2 Construct_curve_2; - /*! Obtain a Construct_curve_2 functor object. */ + /*! obtains a `Construct_curve_2` functor object. */ Construct_curve_2 construct_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } //@} @@ -1052,18 +1056,18 @@ public: /*! The traits (in case it has state). */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Trim_2(const Traits& traits) : m_traits(traits) {} friend class Arr_segment_traits_2; - /*! Obtain a trimmed version of a line. - * \param xseg the x-monotone segment. + /*! obtains a trimmed version of a line. + * \param xseg the \f$x\f$-monotone segment. * \param src the new start endpoint. * \param tgt the new end endpoint. - * \return the trimmed x-monotone segment. + * \return the trimmed \f$x\f$-monotone segment. * \pre src != tgt * \pre both points must lie on segment */ @@ -1094,12 +1098,12 @@ public: } }; - /*! Obtain a Trim_2 functor object */ + /*! obtains a `Trim_2` functor object */ Trim_2 trim_2_object() const { return Trim_2(*this); } class Compare_endpoints_xy_2 { public: - /*! Compare the endpoints of an $x$-monotone curve lexicographically. + /*! compares the endpoints of an $x$-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param cv the curve. * \return SMALLER if the curve is directed right; @@ -1109,13 +1113,13 @@ public: { return (cv.is_directed_right()) ? (SMALLER) : (LARGER); } }; - /*! Obtain a Compare_endpoints_xy_2 functor object. */ + /*! obtains a `Compare_endpoints_xy_2` functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); } class Construct_opposite_2 { public: - /*! Construct an opposite x-monotone (with swapped source and target). + /*! Construct an opposite \f$x\f$-monotone (with swapped source and target). * \param cv the curve. * \return the opposite curve. */ @@ -1123,7 +1127,7 @@ public: { return (cv.flip()); } }; - /*! Obtain a Construct_opposite_2 functor object. */ + /*! obtains a `Construct_opposite_2` functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); } //@} @@ -1146,7 +1150,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Determine whether a given point is in the \f$x\f$-range of a given + /*! determines whether a given point is in the \f$x\f$-range of a given * segment. * \param cv the segment. * \param p the point. @@ -1166,7 +1170,7 @@ public: } }; - /*! Obtain an Is_in_x_range_2 functor object */ + /*! obtains an `Is_in_x_range_2` functor object */ Is_in_x_range_2 is_in_x_range_2_object() const { return Is_in_x_range_2(*this); } @@ -1185,7 +1189,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Determine whether a given point is in the \f$y\f$-range of a given + /*! determines whether a given point is in the \f$y\f$-range of a given * segment. * \param cv the segment. * \param p the point. @@ -1205,7 +1209,7 @@ public: } }; - /*! Obtain an Is_in_y_range_2 functor object */ + /*! obtains an `Is_in_y_range_2` functor object */ Is_in_y_range_2 is_in_y_range_2_object() const { return Is_in_y_range_2(*this); } @@ -1367,7 +1371,7 @@ template bool Arr_segment_traits_2::_Segment_cached_2::is_directed_right() const { return m_is_directed_right; } -//! \brief obtain the segment source. +//! \brief obtains the segment source. template const typename Kernel::Point_2& Arr_segment_traits_2::_Segment_cached_2::source() const { return m_ps; } @@ -1419,7 +1423,9 @@ void Arr_segment_traits_2::_Segment_cached_2::set_right(const Point_2& p else m_ps = p; } -//! \brief determines whether the given point is in the x-range of the segment. +/*! \brief determines whether the given point is in the \f$x\f$-range of the + * segment. + */ template bool Arr_segment_traits_2::_Segment_cached_2:: is_in_x_range(const Point_2& p) const @@ -1435,7 +1441,9 @@ is_in_x_range(const Point_2& p) const return (res2 != LARGER); } -//! \brief determines whether the given point is in the y-range of the segment. +/*! \brief determines whether the given point is in the \f$y\f$-range of the + * segment. + */ template bool Arr_segment_traits_2::_Segment_cached_2:: is_in_y_range(const Point_2& p) const diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h index 718679797d1..1474086e5b5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h @@ -137,7 +137,7 @@ private: typedef typename Polyhedron::Vertex_handle Polyhedron_vertex_handle; - /*! Constructor */ + /*! constructs */ Point_adder(Builder& B) : m_B(B) {} Polyhedron_vertex_handle operator()(PointIterator pi) @@ -158,7 +158,7 @@ private: typedef typename Polyhedron::Vertex_handle Polyhedron_vertex_handle; - /*! Constructor */ + /*! constructs */ Point_adder(Builder& B) : m_B(B) {} Polyhedron_vertex_handle operator()(Point_3* pi) @@ -206,7 +206,7 @@ private: size_type m_marked_facet_index; public: - /*! Constructor */ + /*! constructs */ Build_surface(const PointIterator& points_begin, const PointIterator& points_end, size_type num_points, @@ -222,19 +222,19 @@ private: m_marked_facet_index(0) {} - /*! Destructor */ + /*! destructs */ virtual ~Build_surface() {} - /*! Set the marked-vertex index */ + /*! sets the marked-vertex index */ void set_marked_vertex_index(size_type id) {m_marked_vertex_index = id;} - /*! Set the marked-edge index */ + /*! sets the marked-edge index */ void set_marked_edge_index(size_type id) {m_marked_edge_index = id;} - /*! Set the marked-face index */ + /*! sets the marked-face index */ void set_marked_facet_index(size_type id) {m_marked_facet_index = id;} - /*! Add vertices to the current facet. */ + /*! adds vertices to the current facet. */ template void add_vertices_to_facet(Iterator begin, Iterator end, Builder& B) { for (Iterator it = begin; it != end; ++it) B.add_vertex_to_facet(*it); } @@ -315,7 +315,7 @@ private: } } - /*! Update the polyhedron */ + /*! updates the polyhedron */ template void update_polyhedron(Polyhedron& polyhedron, const PointIterator& points_begin, @@ -348,17 +348,17 @@ private: } } - /*! Obtain the normal of a facet of a polyhedron that supports normals */ + /*! obtains the normal of a facet of a polyhedron that supports normals */ template const Vector_3& get_normal(const Facet& facet, std::true_type) const { return facet->plane(); } - /*! Obtain the normal of a facet of a polyhedron that supports planes */ + /*! obtains the normal of a facet of a polyhedron that supports planes */ template Vector_3 get_normal(const Facet& facet, std::false_type) const { return facet->plane().orthogonal_vector(); } - /*! Process a polyhedron vertex recursively constructing the Gaussian map + /*! processes a polyhedron vertex recursively constructing the Gaussian map * of the polyhedron * \param src the polyhedron vertex currently processed * \param first_time true if the invocation to this function is the first @@ -486,7 +486,7 @@ private: } while (hec != begin_hec); } - /*! Compute the spherical gaussian map of a convex polyhedron + /*! computes the spherical gaussian map of a convex polyhedron * \param polyhedron the input polyhedron */ void compute_sgm(Polyhedron& polyhedron) @@ -513,7 +513,7 @@ private: } public: - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_initializer(PolyhedralSgm& sgm) : Base(sgm), m_visitor(nullptr), @@ -522,10 +522,10 @@ public: m_marked_facet_index(0) {} - /*! Destructor */ + /*! destructs */ virtual ~Arr_polyhedral_sgm_initializer() {} - /*! Initialize the Gaussian map + /*! initializes the Gaussian map * \param polyhedron * \param visitor * \pre The polyhedron polyhedron does not have coplanar facets. @@ -552,7 +552,7 @@ public: compute_sgm(polyhedron); } - /*! Initialize the Spherical Gaussian map */ + /*! initializes the Spherical Gaussian map */ template void operator()(const PointIterator& points_begin, const PointIterator& points_end, @@ -587,13 +587,13 @@ public: polyhedron.clear(); } - /*! Set the marked-vertex index */ + /*! sets the marked-vertex index */ void set_marked_vertex_index(size_type id) {m_marked_vertex_index = id;} - /*! Set the marked-edge index */ + /*! sets the marked-edge index */ void set_marked_edge_index(size_type id) {m_marked_edge_index = id;} - /*! Set the marked-face index */ + /*! sets the marked-face index */ void set_marked_facet_index(size_type id) {m_marked_facet_index = id;} }; @@ -637,7 +637,7 @@ private: /*! Indicated whether the center has been calculated */ bool m_dirty_center; - /*! Calculate the center of the polyhedron */ + /*! calculates the center of the polyhedron */ void calculate_center() { // Count them: @@ -656,13 +656,13 @@ private: } public: - /*! Parameter-less Constructor */ + /*! constructs default */ Arr_polyhedral_sgm() : m_dirty_center(true) {} - /*! Copy Constructor */ + /*! constructs copy */ Arr_polyhedral_sgm(const Self& sgm) { assign(sgm); } - /*! Assign a spherical Gaussian map to this */ + /*! assigns a spherical Gaussian map to this */ void assign(const Self& sgm) { // Call the assign of the base class. @@ -692,10 +692,10 @@ public: } } - /*! Destructor */ + /*! destructs */ virtual ~Arr_polyhedral_sgm() { clear(); } - /*! Clear the internal representation and auxiliary data structures + /*! clears the internal representation and auxiliary data structures */ void clear() { @@ -703,7 +703,7 @@ public: Base::clear(); } - // /*! Compute the minkowski sum of a range of objects of type + // /*! computes the minkowski sum of a range of objects of type // * Arr_polyhedral_sgm // */ // template @@ -714,7 +714,7 @@ public: // minkowski_sum(sgm1, sgm2); // } - // /*! Compute the minkowski sum of a range of objects of type + // /*! computes the minkowski sum of a range of objects of type // * Arr_polyhedral_sgm // */ // template @@ -726,7 +726,7 @@ public: // minkowski_sum(sgm1, sgm2, overlay_traits); // } - /*! Compute the Minkowski sum of 2 objects of type Arr_polyhedral_sgm + /*! computes the Minkowski sum of 2 objects of type Arr_polyhedral_sgm * \param sgm1 the first Arr_polyhedral_sgm object * \param sgm2 the second Arr_polyhedral_sgm object */ @@ -740,7 +740,7 @@ public: // print_stat(); } - /*! Compute the Minkowski sum of 2 objects of type Arr_polyhedral_sgm + /*! computes the Minkowski sum of 2 objects of type Arr_polyhedral_sgm * \param sgm1 the first Arr_polyhedral_sgm object * \param sgm2 the second Arr_polyhedral_sgm object */ @@ -750,11 +750,11 @@ public: OverlayTraits& overlay_traits) { CGAL::overlay(sgm1, sgm2, *this, overlay_traits); } - /*! Obtain the number of (primal) vertices */ + /*! obtains the number of (primal) vertices */ size_type number_of_vertices() const { return (static_cast(this))->number_of_faces(); } - /*! Obtain the number of (primal) edges + /*! obtains the number of (primal) edges * \return the number of (primal) edges. * Edges that connect vertices of degree 2 are not counted, as they have * been introduced only to make non-x-monotone curves x-monotone. @@ -769,7 +769,7 @@ public: return (static_cast(this))->number_of_edges() - size; } - /*! Obtain the number of (primal) facets + /*! obtains the number of (primal) facets * \return the number of (primal) facets. * Vertices of degree 2 are not counted, as they have been introduced only * to make non-x-monotone curves x-monotone. @@ -791,7 +791,7 @@ public: std::cout << "vertex of polyhedron = " << vit->point() << std::endl; } - /*! Print statistics */ + /*! prints statistics */ void print_stat() { Base::print_stat(); @@ -804,6 +804,6 @@ public: } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h index e491479ff03..98b523efc15 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h @@ -25,7 +25,7 @@ namespace CGAL { template class Arr_polyhedral_sgm_arr_vertex : public CGAL::Arr_vertex_base { public: - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_arr_vertex() {} }; @@ -44,10 +44,10 @@ private: unsigned int m_arr_mask; public: - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_arr_halfedge() : m_arr_mask(0x0) {} - /*! Add a arrangement to the mask of the original arrangements in the + /*! adds a arrangement to the mask of the original arrangements in the * minkowski sum. * \param arr_id the id of the added arrangement */ @@ -58,12 +58,12 @@ public: */ bool is_arr(unsigned int id) const { return m_arr_mask & (0x1 << id); } - /*! Obtain the mask of the ids of the original arrangements that contributed + /*! obtains the mask of the ids of the original arrangements that contributed * the halfedge while performing the minkowski sum */ unsigned int arr_mask() const { return m_arr_mask; } - /*! Set the arr of an edge with a value. + /*! sets the arr of an edge with a value. * \param arr_id the id to set to. */ void set_arr(unsigned int id) { m_arr_mask = id; } @@ -80,23 +80,23 @@ private: bool m_is_set; public: - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_arr_face() : m_is_set(false) { } - /*! Set the 3D point of the original polyhedron */ + /*! sets the 3D point of the original polyhedron */ void set_point(const Point_3 & point) { m_point = point; m_is_set = true; } - /*! Obtain the 3D point of the original polyhedron */ + /*! obtains the 3D point of the original polyhedron */ const Point_3 & point() const { return m_point; } - /*! \brief returns true iff the point has been set already */ + /*! returns true iff the point has been set already */ bool is_set() const { return m_is_set; } - /*! \brief resets the flag */ + /*! resets the flag */ void set_is_set(bool flag) { m_is_set = flag; } }; @@ -108,10 +108,10 @@ class Arr_polyhedral_sgm_arr_dcel : Arr_polyhedral_sgm_arr_face > { public: - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_arr_dcel() {} }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h index 0da90ca6a01..f445a8200e8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h @@ -62,30 +62,30 @@ private: public: using Point = typename Base::Point; - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_polyhedron_3_vertex() : Base(), m_processed(false), m_marked(false) {} - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_polyhedron_3_vertex(const Point & p) : Base(p), m_processed(false), m_marked(false) {} - /*! Obtain the mutable (geometrical) point. Delegate */ + /*! obtains the mutable (geometrical) point. Delegate */ Point& point() { return Base::point(); } - /*! Obtain the constant (geometrical) point. Delegate */ + /*! obtains the constant (geometrical) point. Delegate */ const Point& point () const { return Base::point(); } /*! Set the flag */ void set_processed(bool processed) { m_processed = processed; } - /*! Obtain the flag */ + /*! obtains the flag */ bool processed() const { return m_processed; } /*! Set the "marked" flag */ void set_marked(bool marked) { m_marked = marked; } - /*! Obtain the "marked" flag */ + /*! obtains the "marked" flag */ bool marked() const { return m_marked; } }; @@ -101,20 +101,20 @@ private: bool m_marked; public: - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_polyhedron_3_halfedge() : m_processed(false), m_marked(false) {} - /*! Set the flag */ + /*! sets the flag */ void set_processed(bool processed) { m_processed = processed; } - /*! Obtain the flag */ + /*! obtains the flag */ bool processed() const { return m_processed; } - /*! Set the "marked" flag */ + /*! sets the "marked" flag */ void set_marked(bool marked) { m_marked = marked; } - /*! Obtain the "marked" flag */ + /*! obtains the "marked" flag */ bool marked() const { return m_marked; } }; @@ -136,25 +136,25 @@ private: public: using Plane = typename Base::Plane; - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_polyhedron_3_face() : m_vertex(nullptr), m_marked(false) {} - /*! Obtain the mutable plane. Delegate */ + /*! obtains the mutable plane. Delegate */ Plane& plane() { return Base::plane(); } - /*! Obtain the constant plane. Delegate */ + /*! obtains the constant plane. Delegate */ const Plane& plane() const { return Base::plane(); } - /*! Obtain the vertex */ + /*! obtains the vertex */ Arr_vertex_handle vertex() { return m_vertex; } - /*! Set the vertex */ + /*! sets the vertex */ void set_vertex(Arr_vertex_handle vertex) { m_vertex = vertex; } - /*! Set the "marked" flag */ + /*! sets the "marked" flag */ void set_marked(bool marked) { m_marked = marked; } - /*! Obtain the "marked" flag */ + /*! obtains the "marked" flag */ bool marked() const { return m_marked; } }; @@ -200,11 +200,11 @@ struct Arr_polyhedral_sgm_polyhedron_items : public Polyhedron_items_3 { template struct Arr_polyhedral_sgm_polyhedron_3 : public Polyhedron_3> { - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_polyhedron_3() {} }; -} //namespace CGAL +} // namespace CGAL //! Make the polyhedron a model of FaceGraph #define CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS \ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h index a04cd735e9a..19d39ee8483 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h @@ -113,10 +113,10 @@ public: private: //! A container of boundary vertices. struct Vertex_key_comparer { - /*! Construct default */ + /*! constructs default */ Vertex_key_comparer() : m_geom_traits(nullptr) {} - /*! Construct */ + /*! constructs */ Vertex_key_comparer(const Gt_adaptor_2* geom_traits) : m_geom_traits(geom_traits) {} @@ -165,18 +165,18 @@ public: ///! \name Construction methods. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arr_spherical_topology_traits_2(); - /*! Constructor from a geometry-traits object. + /*! constructs from a geometry-traits object. * \param traits the traits. */ Arr_spherical_topology_traits_2(const Gt2* traits); - /*! Destructor */ + /*! destructs */ ~Arr_spherical_topology_traits_2(); - /*! Assign the contents of another topology-traits class. + /*! assigns the contents of another topology-traits class. * \param other the other spherical topology-traits. */ void assign(const Self& other); @@ -185,65 +185,65 @@ public: ///! \name Topology-traits methods. //@{ - /*! Obtain the DCEL (const version). */ + /*! obtains the DCEL (const version). */ const Dcel& dcel() const { return (m_dcel); } - /*! Obtain the DCEL (non-const version). */ + /*! obtains the DCEL (non-const version). */ Dcel& dcel() { return m_dcel; } - /*! Determine whether the DCEL reprsenets an empty structure. + /*! determines whether the DCEL reprsenets an empty structure. * \return true if the dcel reprsenets an empty structure; false otherwise. */ bool is_empty_dcel() const { return (m_dcel.size_of_vertices() == 0); } - /*! Initialize an empty DCEL structure. */ + /*! initializes an empty DCEL structure. */ void init_dcel(); - /*! Make the necessary updates after the DCEL structure have been updated. */ + /*! makes the necessary updates after the DCEL structure have been updated. */ void dcel_updated(); - /*! Determine whether the given vertex is concrete. + /*! determines whether the given vertex is concrete. * \param v the vertex. * \return true if v is mapped to a point on the discontinuity arc; false * otherwise. */ bool is_concrete_vertex(const Vertex* /* v */) const { return true; } - /*! Obtain the number of concrete vertices. + /*! obtains the number of concrete vertices. * \return the number of concrete vertices. */ Size number_of_concrete_vertices() const { return (m_dcel.size_of_vertices()); } - /*! Determine whether the given vertex is valid. + /*! determines whether the given vertex is valid. * \param v the vertex. * \todo why is this needed, and where used? */ bool is_valid_vertex(const Vertex* /* v */) const { return true; } - /*! Obtain the number of valid vertices. */ + /*! obtains the number of valid vertices. */ Size number_of_valid_vertices() const { return (m_dcel.size_of_vertices()); } - /*! Determine whether the given halfedge is valid. */ + /*! determines whether the given halfedge is valid. */ bool is_valid_halfedge(const Halfedge* /* he */) const { return true; } - /*! Obtain the number of valid halfedges. */ + /*! obtains the number of valid halfedges. */ Size number_of_valid_halfedges() const { return (m_dcel.size_of_halfedges()); } - /*! Determine whether the given face is valid. */ + /*! determine whether the given face is valid. */ bool is_valid_face(const Face* /* f */) const { return true; } - /*! Obtain the number of valid faces. */ + /*! obtains the number of valid faces. */ Size number_of_valid_faces() const { return m_dcel.size_of_faces(); } - /*! Obtain the spherical face (const version). */ + /*! obtains the spherical face (const version). */ const Face* spherical_face() const { return m_spherical_face; } - /*! Obtain the spherical face (non-const version). */ + /*! obtains the spherical face (non-const version). */ Face* spherical_face() { return m_spherical_face; } - /*! Obtain the face containing the south pole (const version). */ + /*! obtains the face containing the south pole (const version). */ const Face* south_face() const { if (m_boundary_vertices.empty()) return m_spherical_face; @@ -251,7 +251,7 @@ public: return _face_below_vertex_on_discontinuity(it->second); } - /*! Obtain the face containing the south pole (non-const version). */ + /*! obtains the face containing the south pole (non-const version). */ Face* south_face() { if (m_boundary_vertices.empty()) return m_spherical_face; @@ -259,19 +259,19 @@ public: return _face_below_vertex_on_discontinuity(it->second); } - /*! Obtain the south pole (const version). */ + /*! obtains the south pole (const version). */ const Vertex* south_pole() const { return m_south_pole; } - /*! Obtain the south pole (non-const version). */ + /*! obtains the south pole (non-const version). */ Vertex* south_pole() { return m_south_pole; } - /*! Obtain the north pole (const version). */ + /*! obtains the north pole (const version). */ const Vertex* north_pole() const { return m_north_pole; } - /*! Obtain the north pole (non-const version). */ + /*! obtains the north pole (non-const version). */ Vertex* north_pole() { return m_north_pole; } - /*! Obtain a vertex on the line of discontinuity that corresponds to + /*! obtains a vertex on the line of discontinuity that corresponds to * the given point (or return NULL if no such vertex exists). */ Vertex* discontinuity_vertex(const Point_2& pt) @@ -280,7 +280,7 @@ public: return (it != m_boundary_vertices.end()) ? it->second : nullptr; } - /*! Obtain a vertex on the line of discontinuity that corresponds to + /*! obtains a vertex on the line of discontinuity that corresponds to * the given point (or return NULL if no such vertex exists). */ const Vertex* discontinuity_vertex(const Point_2& pt) const @@ -290,7 +290,7 @@ public: } // TODO remove if all occurrences have been replaced with the new signature that queries for a point - /*! Obtain a vertex on the line of discontinuity that corresponds to + /*! obtains a vertex on the line of discontinuity that corresponds to * the given curve-end (or return NULL if no such vertex exists). */ Vertex* discontinuity_vertex(const X_monotone_curve_2& xc, Arr_curve_end ind) @@ -404,7 +404,7 @@ public: ///! \name Topology-traits methods. //@{ - /*! Receive a notification on the creation of a new boundary vertex that + /*! receives a notification on the creation of a new boundary vertex that * corresponds to a point. * \param v The new boundary vertex. * \param p The point. @@ -416,7 +416,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y); - /*! Receive a notification on the creation of a new boundary vertex that + /*! receives a notification on the creation of a new boundary vertex that * corresponds to a given curve end. * \param v The new boundary vertex. * \param xc The x-monotone curve. @@ -430,7 +430,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y); - /*! Determines whether the function should decide on swapping the predecssor + /*! determines whether the function should decide on swapping the predecssor * halfedges that imply two ccb (and whose signs are given here). * If true, swap_predecessors will be correctly set. If false, * generic way of searching for lexicographically minimal point and checking @@ -445,8 +445,8 @@ public: bool& swap_predecessors) const; - /*! Given signs of two ccbs that show up when splitting upon insertion of - * curve into two, determine what happens to the face(s). + /*! given signs of two ccbs that show up when splitting upon insertion of + * curve into two, determines what happens to the face(s). * \param signs1 signs in x and y of the first implied ccb * \param signs2 signs in x and y of the secondd implied ccb * \return A pair indicating whether the insertion will cause the face @@ -464,7 +464,7 @@ public: return (std::make_pair(true, true)); } - /*! Determine whether a given point lies in the interior of a given face. + /*! determines whether a given point lies in the interior of a given face. * \param f The face. * \param p The query point. * \param v The vertex associated with p (if exists). @@ -473,7 +473,7 @@ public: */ bool is_in_face(const Face* f, const Point_2& p, const Vertex* v) const; - /*! Compare the relative y-position of a given point and a given edge. + /*! compares the relative y-position of a given point and a given edge. * \param p The point. * \param he The edge (one of the pair of halfedges). * \pre p should lie in the x-range of the given edge. @@ -482,7 +482,7 @@ public: Comparison_result compare_y_at_x(const Point_2& p, const Halfedge* he) const; - /*! Determine whether a given vertex is associated with a given curve end. + /*! determines whether a given vertex is associated with a given curve end. * \param v The vertex. * \param xc The x-monotone curve. * \param ind The curve end. @@ -495,8 +495,8 @@ public: const X_monotone_curve_2& xc, Arr_curve_end ind, Arr_parameter_space ps_x, Arr_parameter_space ps_y) const; - /*! Given a curve end with boundary conditions and a face that contains the - * interior of the curve, find a place for a boundary vertex that will + /*! given a curve end with boundary conditions and a face that contains the + * interior of the curve, finds a place for a boundary vertex that will * represent the curve end along the face boundary. * \param f The face. * \param xc The x-monotone curve. @@ -513,7 +513,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y); - /*! Locate the predecessor halfedge for the given curve around a given + /*! locates the predecessor halfedge for the given curve around a given * vertex with boundary conditions. * \param v The vertex. * \param cv The x-monotone curve. @@ -530,7 +530,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y) const; - /*! Locate a DCEL feature that contains the given curve end. + /*! locates a DCEL feature that contains the given curve end. * \param xc The x-monotone curve. * \param ind The curve end. * \param ps_x The boundary condition of the curve end in x. @@ -543,7 +543,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y); - /*! Split a fictitious edge using the given vertex. + /*! splits a fictitious edge using the given vertex. * \param e The edge to split (one of the pair of halfedges). * \param v The split vertex. * \pre e is a fictitious halfedge. @@ -557,20 +557,20 @@ public: return nullptr; } - /*! Determine whether the given face is unbounded. + /*! determines whether the given face is unbounded. * \param f The face. * \return true if f is unbounded; false otherwise. * All faces on a sphere are bounded: */ bool is_unbounded(const Face* /* f */) const { return false; } - /*! Determine whether the given boundary vertex is redundant. + /*! determines whether the given boundary vertex is redundant. * \param v The vertex. * \return Whether v is redundant, and should be erased. */ bool is_redundant(const Vertex* v) const; - /*! Erase the given redundant vertex by merging a fictitious edge. + /*! erases the given redundant vertex by merging a fictitious edge. * The function does not free the vertex v itself. * \param v The vertex. * \pre v is a redundant vertex. @@ -579,16 +579,17 @@ public: Halfedge* erase_redundant_vertex(Vertex* v); //! reference_face (const version). - /*! The function returns a reference face of the arrangement. - All reference faces of arrangements of the same type have a common - point. - \return A pointer to the reference face. - */ + /*! returns a reference face of the arrangement. All reference faces of + * arrangements of the same type have a common point. + * + * \return A pointer to the reference face. + */ const Face* reference_face() const { return spherical_face(); } //! reference_face (non-const version). - /*! The function returns a reference face of the arrangement. + /*! returns a reference face of the arrangement. * All reference faces of arrangements of the same type have a common point. + * * \return A pointer to the reference face. */ Face* reference_face() { return spherical_face(); } @@ -598,7 +599,7 @@ protected: /// \name Auxiliary functions. //@{ - /*! Obtain the curve associated with a boundary vertex. + /*! obtains the curve associated with a boundary vertex. * \param v The boundary vertex. * \param ind Output: ARR_MIN_END if the vertex is induced by the minimal end; * ARR_MAX_END if it is induced by the curve's maximal end. @@ -607,7 +608,7 @@ protected: */ const X_monotone_curve_2& _curve(const Vertex* v, Arr_curve_end& ind) const; - /*! Return the halfedge, the target vertex of which is given, that is + /*! returns the halfedge, the target vertex of which is given, that is * the predecessor of a halfedge, the curve of which is given, that is about * to be inserted into the dcel. */ @@ -615,7 +616,7 @@ protected: const X_monotone_curve_2& xc, Arr_curve_end ind) const; - /*! Return the halfedge, the target vertex of which is a given pole, + /*! returns the halfedge, the target vertex of which is a given pole, * that is the predecessor of a halfedge, the curve of which is given, that * is about to be inserted into the dcel. */ @@ -623,7 +624,7 @@ protected: Arr_curve_end ind) const; - /*! Return the face that lies below the given vertex, which lies + /*! returns the face that lies below the given vertex, which lies * on the line of discontinuity. */ Face* _face_below_vertex_on_discontinuity(Vertex* v) const; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h index 16dc60a93fd..18543867132 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h @@ -53,7 +53,7 @@ protected: Face_const_handle m_unb_face; // The unbounded arrangement face. public: - /*! Constructor. + /*! constructs. * \param arr The arrangement. */ Arr_bounded_planar_batched_pl_helper(const Arrangement_2* arr) : @@ -76,7 +76,7 @@ public: void after_handle_event(Event* /* event */) { return; } //@} - /*! Get the current top face. */ + /*! obtains the current top face. */ Face_const_handle top_face() const { return (m_unb_face); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h index e68f2798020..cb108ec55ab 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h @@ -85,12 +85,12 @@ protected: Indices_list m_emptylist; public: - /*! Constructor. */ + /*! constructs. */ Arr_bounded_planar_construction_helper(Arrangement_2* arr) : m_top_traits(arr->topology_traits()) {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_bounded_planar_construction_helper() {} @@ -115,20 +115,20 @@ public: Indices_list& halfedge_indices_list() { return m_emptylist; } - /*! Collect a subcurve index that does not see any status-line from below. */ + /*! collects a subcurve index that does not see any status-line from below. */ void add_subcurve_in_top_face(unsigned int /* index */) { return; } /*! A notification invoked before the given event it deallocated. */ void before_deallocate_event(Event* /* event */) { return; } //@} - /*! Set the map that maps each halfedge to the list of subcurve indices + /*! sets the map that maps each halfedge to the list of subcurve indices * that "see" the halfedge from below. */ void set_halfedge_indices_map(Halfedge_indices_map& /* table */) { return; } - /*! Determine if we should swap the order of predecessor halfedges when + /*! determines if we should swap the order of predecessor halfedges when * calling insert_at_vertices_ex() . */ bool swap_predecessors(Event* /* event */) const @@ -138,7 +138,7 @@ public: return false; } - /*! Get the current top face. */ + /*! obtains the current top face. */ Face_handle top_face() const { return m_unb_face; } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h index a1ec7663df9..fc015fd9ec1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h @@ -75,7 +75,7 @@ protected: Face_handle_blue m_blue_ubf; // Blue unbounded face. public: - /*! Constructor, given the input red and blue arrangements. */ + /*! constructs, given the input red and blue arrangements. */ Arr_bounded_planar_overlay_helper(const Ar2* red_arr, const Ab2* blue_arr) : m_red_top_traits (red_arr->topology_traits()), m_blue_top_traits (blue_arr->topology_traits()) @@ -98,10 +98,10 @@ public: void before_handle_event(Event* /* e */) {} //@} - /*! Obtain the current red top face. */ + /*! obtains the current red top face. */ Face_handle_red red_top_face() const { return m_red_ubf; } - /*! Obtain the current blue top face. */ + /*! obtains the current blue top face. */ Face_handle_blue blue_top_face() const { return m_blue_ubf; } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h index ba76651f9d7..67025ec9621 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h @@ -57,7 +57,7 @@ protected: Face_const_handle m_unb_face; // The unbounded arrangement face. public: - /*! Constructor. + /*! constructs. * \param arr The arrangement. */ Arr_bounded_planar_vert_decomp_helper(const Arrangement_2* arr) : @@ -80,10 +80,10 @@ public: void after_handle_event(Event* /* event */) { return; } //@} - /*! Get the current top object. */ + /*! obtains the current top object. */ Vert_type top_object() const { return Vert_type(m_unb_face); } - /*! Get the current bottom object. */ + /*! obtains the current bottom object. */ Vert_type bottom_object() const { return Vert_type(m_unb_face); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h index 0ceba209b57..aa58d4d20c5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h @@ -82,20 +82,20 @@ public: ///! \name Construction methods. //@{ - /*! Default constructor. */ + /*! constructs defaults. */ Arr_planar_topology_traits_base_2() : m_own_geom_traits(true) { m_geom_traits = new Traits_adaptor_2; } - /*! Constructor with a geometry-traits class. */ + /*! constructs with a geometry-traits class. */ Arr_planar_topology_traits_base_2 (const Geometry_traits_2* geom_traits) : m_own_geom_traits(false) { m_geom_traits = static_cast(geom_traits); } - /*! Assign the contents of another topology-traits class. */ + /*! assigns the contents of another topology-traits class. */ void assign(const Self& other); - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_planar_topology_traits_base_2() { // Clear the DCEL. @@ -112,13 +112,13 @@ public: ///! \name Common topology-traits methods. //@{ - /*! Get the DCEL (const version). */ + /*! obtains the DCEL (const version). */ const Dcel& dcel() const { return m_dcel; } - /*! Get the DCEL (non-const version). */ + /*! obtains the DCEL (non-const version). */ Dcel& dcel() { return (m_dcel); } - /*! Receive a notification on the creation of a new boundary vertex that + /*! receives a notification on the creation of a new boundary vertex that * corresponds to a given point. * \param v The new boundary vertex. * \param p The point. @@ -134,7 +134,7 @@ public: return; } - /*! Receive a notification on the creation of a new boundary vertex that + /*! receives a notification on the creation of a new boundary vertex that * corresponds to the given curve end. * \param v The new boundary vertex. * \param cv The x-monotone curve. @@ -152,7 +152,7 @@ public: return; } - /*! Determines whether the function should decide on swapping the predecssor + /*! determines whether the function should decide on swapping the predecssor * halfedges that imply two ccb (and whose signs are given here). * If true, swap_predecessors will be correctly set. If false, * generic way of searching for lexicographically minimal point and checking @@ -171,8 +171,8 @@ public: return false; } - /*! Given signs of two ccbs that show up when splitting upon insertion of - * curve into two, determine what happens to the face(s). + /*! given signs of two ccbs that show up when splitting upon insertion of + * curve into two, determines what happens to the face(s). * \param signs1 signs in x and y of the first implied ccb * \param signs2 signs in x and y of the secondd implied ccb * \return A pair indicating whether the insertion will cause the face @@ -190,7 +190,7 @@ public: return std::make_pair(true, true); } - /*! Determine whether the given point lies in the interior of the given face. + /*! determines whether the given point lies in the interior of the given face. * \param f The face. * \param p The query point. * \param v The vertex associated with p (if exists). @@ -211,7 +211,7 @@ public: /// \name Additional predicates, specialized for this topology-traits class. //@{ - /*! Compare the given vertex (which may lie at infinity) and the given point. + /*! compares the given vertex (which may lie at infinity) and the given point. * \param p The point. * \param v The vertex. * \return The result of the comparison of the x-coordinates of p and v. @@ -219,7 +219,7 @@ public: virtual Comparison_result compare_x(const Point_2& p, const Vertex* v) const = 0; - /*! Compare the given vertex (which may lie at infinity) and the given point. + /*! compares the given vertex (which may lie at infinity) and the given point. * \param p The point. * \param v The vertex. * \return The result of the xy-lexicographic comparison of p and v. @@ -227,7 +227,7 @@ public: virtual Comparison_result compare_xy(const Point_2& p, const Vertex* v) const = 0; - /*! Compare the relative y-position of the given point and the given edge + /*! compares the relative y-position of the given point and the given edge * (which may be fictitious). * \param p The point. * \param he The edge (one of the pair of halfedges). diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h index 53bf38c7fb0..f4b7b5b635d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h @@ -57,7 +57,7 @@ protected: Face_const_handle m_spherical_face; public: - /*! Constructor. + /*! constructs. * \param arr The arrangement. */ Arr_spherical_batched_pl_helper(const Arrangement_2* arr) : @@ -124,7 +124,7 @@ public: } //@} - /*! Obtain the current top face. */ + /*! obtains the current top face. */ Face_const_handle top_face() const { return m_spherical_face; } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h index 51bcab049d6..6fb0f56ce17 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h @@ -102,14 +102,14 @@ protected: Halfedge_indices_map* m_he_ind_map_p; public: - /*! Constructor. */ + /*! constructs. */ Arr_spherical_construction_helper(Arrangement_2* arr) : m_top_traits(arr->topology_traits()), m_arr_access(*arr), m_he_ind_map_p(nullptr) {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_spherical_construction_helper() {} /// \name Notification functions. @@ -127,25 +127,25 @@ public: /*! A notification invoked when a new subcurve is created. */ virtual void add_subcurve(Halfedge_handle , Subcurve* ) { return; } - /*! Collect a subcurve index that does not see any status-line from below. + /*! collects a subcurve index that does not see any status-line from below. */ void add_subcurve_in_top_face(unsigned int index) { m_subcurves_at_nf.push_back(index); } - /*! Obtain the indices of the halfedges that "see" the north. */ + /*! obtains the indices of the halfedges that "see" the north. */ Indices_list& halfedge_indices_list() { return m_subcurves_at_nf; } /*! A notification invoked before the given event it deallocated. */ void before_deallocate_event(Event* /* event */) {} //@} - /*! Set the map that maps each halfedge to the list of subcurve indices + /*! sets the map that maps each halfedge to the list of subcurve indices * that "see" the halfedge from below. */ void set_halfedge_indices_map(Halfedge_indices_map& table) { m_he_ind_map_p = &table; } - /*! Determine if we should swap the order of predecessor halfedges when + /*! determines if we should swap the order of predecessor halfedges when * calling insert_at_vertices_ex() . */ bool swap_predecessors(Event* event) const @@ -157,10 +157,10 @@ public: event->parameter_space_in_y() == ARR_TOP_BOUNDARY); } - /*! Get the current top face. */ + /*! obtains the current top face. */ virtual Face_handle top_face() const { return m_spherical_face; } - /*! Splice the indices list of the given halfedge, inserting the + /*! splices the indices list of the given halfedge, inserting the * indices of the halfedges that "see" the north pole. */ void splice_indices_list(Halfedge_handle he) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h index 28a89150af8..b45c3a50408 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h @@ -78,10 +78,10 @@ protected: Halfedge_handle m_spherical_halfedge; public: - /*! Constructor */ + /*! constructs */ Arr_spherical_insertion_helper(Arrangement_2 *arr) : Base(arr) {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_spherical_insertion_helper() {} /// \name Notification functions. @@ -104,7 +104,7 @@ public: /*! A notification invoked when a new subcurve is created. */ virtual void add_subcurve(Halfedge_handle he, Subcurve* sc); - /*! Get the current top face. */ + /*! obtains the current top face. */ virtual Face_handle top_face() const; private: @@ -256,7 +256,7 @@ add_subcurve(Halfedge_handle he, Subcurve* /* sc */) } } -/*! Get the current top face. */ +/*! obtains the current top face. */ template typename Arr_spherical_insertion_helper::Face_handle Arr_spherical_insertion_helper::top_face() const diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h index 50dff010180..69e5775a426 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h @@ -83,7 +83,7 @@ protected: Face_handle_blue m_blue_nf; public: - /*! Constructor, given the input red and blue arrangements. */ + /*! constructs, given the input red and blue arrangements. */ Arr_spherical_overlay_helper(const Ar2* red_arr, const Ab2* blue_arr) : m_red_top_traits(red_arr->topology_traits()), m_blue_top_traits(blue_arr->topology_traits()) @@ -270,21 +270,21 @@ public: } //@} - /*! Get the current red top face. */ + /*! obtains the current red top face. */ Face_handle_red red_top_face() const { return m_red_nf; } - /*! Get the current blue top face. */ + /*! obtains the current blue top face. */ Face_handle_blue blue_top_face() const { return m_blue_nf; } - /*! Obtain the red topology traits. */ + /*! obtains the red topology traits. */ const Topology_traits_red* red_topology_traits() const { return m_red_top_traits; } - /*! Obtain the blue topology traits. */ + /*! obtains the blue topology traits. */ const Topology_traits_blue* blue_topology_traits() const { return m_blue_top_traits; } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h index 931359c3f11..b05b1c6ce37 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h @@ -64,7 +64,7 @@ protected: Face_const_handle m_south_face; // Current south face. public: - /*! Constructor. + /*! constructs. * \param arr The arrangement. */ Arr_spherical_vert_decomp_helper(const Arrangement_2* arr) : @@ -84,14 +84,14 @@ public: void after_handle_event(Event * event); //@} - /*! Get the current top object. */ + /*! obtains the current top object. */ Vert_type top_object () const { return (m_valid_north_pole) ? Vert_type(m_north_pole) : Vert_type(m_north_face); } - /*! Get the current bottom object. */ + /*! obtains the current bottom object. */ Vert_type bottom_object () const { return (m_valid_south_pole) ? diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h index c83b3b6f324..8224e3df73b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h @@ -56,8 +56,7 @@ protected: Halfedge_const_handle m_top_fict; // The current top fictitious halfedge. public: - /*! - * Constructor. + /*! constructs. * \param arr The arrangement. */ Arr_unb_planar_batched_pl_helper(const Arrangement_2* arr) : @@ -76,7 +75,7 @@ public: void after_handle_event(Event* event); //@} - /*! Get the current top face. */ + /*! obtains the current top face. */ Face_const_handle top_face() const { return (m_top_fict->face()); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h index 4c408625e0c..8f2d123c7ff 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h @@ -103,7 +103,7 @@ protected: // (stored in the visitor class). public: - /*! Constructor. */ + /*! constructs. */ Arr_unb_planar_construction_helper(Arrangement_2* arr) : m_top_traits(arr->topology_traits()), m_arr_access(*arr), @@ -112,7 +112,7 @@ public: m_he_ind_map_p(nullptr) {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_unb_planar_construction_helper(){} /// \name Notification functions. @@ -121,8 +121,7 @@ public: /* A notification issued before the sweep process starts. */ virtual void before_sweep(); - /*! - * A notification invoked before the sweep-line starts handling the given + /*! A notification invoked before the sweep-line starts handling the given * event. */ virtual void before_handle_event(Event* event); @@ -132,11 +131,11 @@ public: Subcurve* /* sc */) {} - /*! Collect a subcurve index that does not see any status-line from below. */ + /*! collects a subcurve index that does not see any status-line from below. */ void add_subcurve_in_top_face(unsigned int index) { m_subcurves_at_ubf.push_back(index); } - /*! Get the indices of the halfedges below the subcurve. */ + /*! obtains the indices of the halfedges below the subcurve. */ Indices_list& halfedge_indices_list() { return (m_subcurves_at_ubf); } @@ -150,15 +149,13 @@ public: } //@} - /*! - * Set the map that maps each halfedge to the list of subcurve indices + /*! sets the map that maps each halfedge to the list of subcurve indices * that "see" the halfedge from below. */ void set_halfedge_indices_map(Halfedge_indices_map& table) { m_he_ind_map_p = &table; } - /*! - * Determine if we should swap the order of predecessor halfedges when + /*! determines if we should swap the order of predecessor halfedges when * calling insert_at_vertices_ex() . */ bool swap_predecessors(Event* event) const @@ -170,7 +167,7 @@ public: (event->parameter_space_in_y() == ARR_TOP_BOUNDARY)); } - /*! Get the current top face. */ + /*! obtains the current top face. */ Face_handle top_face() const { return (m_th->face()); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h index 5b244411e8a..b4204b695a4 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h @@ -81,7 +81,7 @@ protected: Vertex_handle_blue v_blue_tl; // Blue top-left fictitious vertex. public: - /*! Constructor, given the input red and blue arrangements. */ + /*! constructs, given the input red and blue arrangements. */ Arr_unb_planar_overlay_helper(const Ar2* red_arr, const Ab2* blue_arr) : m_red_top_traits(red_arr->topology_traits()), m_blue_top_traits(blue_arr->topology_traits()) @@ -99,10 +99,10 @@ public: void before_handle_event(Event* e); //@} - /*! Get the current red top face. */ + /*! obtains the current red top face. */ Face_handle_red red_top_face() const { return (m_red_th->face()); } - /*! Get the current blue top face. */ + /*! obtains the current blue top face. */ Face_handle_blue blue_top_face() const { return (m_blue_th->face()); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h index 2b0abaceb4b..9700dd8f5af 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h @@ -60,7 +60,7 @@ protected: // halfedge. public: - /*! Constructor. + /*! constructs. * \param arr The arrangement. */ Arr_unb_planar_vert_decomp_helper(const Arrangement_2* arr) : @@ -79,10 +79,10 @@ public: void after_handle_event(Event* event); //@} - /*! Get the current top object. */ + /*! obtains the current top object. */ Vert_type top_object() const { return Vert_type(m_top_fict); } - /*! Get the current bottom object. */ + /*! obtains the current bottom object. */ Vert_type bottom_object() const { return Vert_type(m_bottom_fict); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index 66dd1834a8c..9fcf72dc557 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -17,15 +17,10 @@ #include /*! \file - * A tracing traits-class for the arrangement package. - * This is a meta-traits class. It is parameterized with another traits class - * and inherits from it. For each traits method it prints out its input - * parameters and its output result */ #include #include - #include #include @@ -35,206 +30,208 @@ namespace CGAL { /*! \class - * A model of the ArrangementTraits_2 concept that counts the methods invoked. + * A metadata traits-class decorator for the arrangement package. It traces the + * invocations of traits-class functors. It is parameterized with another traits + * class and inherits from it. For each traits method it prints out its input + * parameters and its output result. + * + * It models all the concepts that the original traits models. */ -template -class Arr_tracing_traits_2 : public Base_traits { +template +class Arr_tracing_traits_2 : public BaseTraits { public: enum Operation_id { - COMPARE_X_OP = 0, - COMPARE_XY_OP, - CONSTRUCT_MIN_VERTEX_OP, - CONSTRUCT_MAX_VERTEX_OP, - IS_VERTICAL_OP, - COMPARE_Y_AT_X_OP, - EQUAL_POINTS_OP, - EQUAL_CURVES_OP, - COMPARE_Y_AT_X_LEFT_OP, - COMPARE_Y_AT_X_RIGHT_OP, + COMPARE_X_2_OP = 0, + COMPARE_XY_2_OP, + CONSTRUCT_MIN_VERTEX_2_OP, + CONSTRUCT_MAX_VERTEX_2_OP, + IS_VERTICAL_2_OP, + COMPARE_Y_AT_X_2_OP, + EQUAL_POINTS_2_OP, + EQUAL_CURVES_2_OP, + COMPARE_Y_AT_X_LEFT_2_OP, + COMPARE_Y_AT_X_RIGHT_2_OP, - MAKE_X_MONOTONE_OP, - SPLIT_OP, - INTERSECT_OP, + MAKE_X_MONOTONE_2_OP, + SPLIT_2_OP, + INTERSECT_2_OP, - ARE_MERGEABLE_OP, - MERGE_OP, + ARE_MERGEABLE_2_OP, + MERGE_2_OP, - CONSTRUCT_OPPOSITE_OP, - COMPARE_ENDPOINTS_XY_OP, + CONSTRUCT_2_OPPOSITE_2_OP, + COMPARE_ENDPOINTS_XY_2_OP, + APPROXIMATE_2_OP, - PARAMETER_SPACE_IN_X_OP, - IS_ON_X_IDENTIFICATION_OP, - COMPARE_Y_ON_BOUNDARY_OP, - COMPARE_Y_NEAR_BOUNDARY_OP, + PARAMETER_SPACE_IN_X_2_OP, + IS_ON_X_IDENTIFICATION_2_OP, + COMPARE_Y_ON_BOUNDARY_2_OP, + COMPARE_Y_NEAR_BOUNDARY_2_OP, - PARAMETER_SPACE_IN_Y_OP, - IS_ON_Y_IDENTIFICATION_OP, - COMPARE_X_ON_BOUNDARY_OP, - COMPARE_X_NEAR_BOUNDARY_OP, + PARAMETER_SPACE_IN_Y_2_OP, + IS_ON_Y_IDENTIFICATION_2_OP, + COMPARE_X_ON_BOUNDARY_2_OP, + COMPARE_X_NEAR_BOUNDARY_2_OP, NUMBER_OF_OPERATIONS }; -private: - typedef Base_traits Base; - typedef Arr_tracing_traits_2 Self; + using Base = BaseTraits; - /*! A set of bits that indicate whether operations should be traced */ - unsigned int m_flags; +private: + //! A set of bits that indicate whether operations should be traced. + unsigned long long m_flags; bool compare_x_op() const - { return (0 != (m_flags & (0x1 << COMPARE_X_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_X_2_OP))); } bool compare_xy_op() const - { return (0 != (m_flags & (0x1 << COMPARE_XY_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_XY_2_OP))); } bool construct_min_vertex_op() const - { return (0 != (m_flags & (0x1 << CONSTRUCT_MIN_VERTEX_OP))); } + { return (0 != (m_flags & (0x1ull << CONSTRUCT_MIN_VERTEX_2_OP))); } bool construct_max_vertex_op() const - { return (0 != (m_flags & (0x1 << CONSTRUCT_MAX_VERTEX_OP))); } + { return (0 != (m_flags & (0x1ull << CONSTRUCT_MAX_VERTEX_2_OP))); } bool is_vertical_op() const - { return (0 != (m_flags & (0x1 << IS_VERTICAL_OP))); } + { return (0 != (m_flags & (0x1ull << IS_VERTICAL_2_OP))); } bool compare_y_at_x_op() const - { return (0 != (m_flags & (0x1 << COMPARE_Y_AT_X_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_Y_AT_X_2_OP))); } bool equal_points_op() const - { return (0 != (m_flags & (0x1 << EQUAL_POINTS_OP))); } + { return (0 != (m_flags & (0x1ull << EQUAL_POINTS_2_OP))); } bool equal_curves_op() const - { return (0 != (m_flags & (0x1 << EQUAL_CURVES_OP))); } + { return (0 != (m_flags & (0x1ull << EQUAL_CURVES_2_OP))); } bool compare_y_at_x_left_op() const - { return (0 != (m_flags & (0x1 << COMPARE_Y_AT_X_LEFT_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_Y_AT_X_LEFT_2_OP))); } bool compare_y_at_x_right_op() const - { return (0 != (m_flags & (0x1 << COMPARE_Y_AT_X_RIGHT_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_Y_AT_X_RIGHT_2_OP))); } bool make_x_monotone_op() const - { return (0 != (m_flags & (0x1 << MAKE_X_MONOTONE_OP))); } + { return (0 != (m_flags & (0x1ull << MAKE_X_MONOTONE_2_OP))); } bool split_op() const - { return (0 != (m_flags & (0x1 << SPLIT_OP))); } + { return (0 != (m_flags & (0x1ull << SPLIT_2_OP))); } bool intersect_op() const - { return (0 != (m_flags & (0x1 << INTERSECT_OP))); } + { return (0 != (m_flags & (0x1ull << INTERSECT_2_OP))); } bool are_mergeable_op() const - { return (0 != (m_flags & (0x1 << ARE_MERGEABLE_OP))); } + { return (0 != (m_flags & (0x1ull << ARE_MERGEABLE_2_OP))); } bool merge_op() const - { return (0 != (m_flags & (0x1 << MERGE_OP))); } + { return (0 != (m_flags & (0x1ull << MERGE_2_OP))); } bool construct_opposite_op() const - { return (0 != (m_flags & (0x1 << CONSTRUCT_OPPOSITE_OP))); } + { return (0 != (m_flags & (0x1ull << CONSTRUCT_2_OPPOSITE_2_OP))); } bool compare_endpoints_xy_op() const - { return (0 != (m_flags & (0x1 << COMPARE_ENDPOINTS_XY_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_ENDPOINTS_XY_2_OP))); } + + bool approximate_op() const + { return (0 != (m_flags & (0x1ull << APPROXIMATE_2_OP))); } // left-right bool parameter_space_in_x_op() const - { return (0 != (m_flags & (0x1 << PARAMETER_SPACE_IN_X_OP))); } + { return (0 != (m_flags & (0x1ull << PARAMETER_SPACE_IN_X_2_OP))); } bool is_on_x_identification_op() const - { return m_flags & (0x1 << IS_ON_X_IDENTIFICATION_OP); } + { return (0 != (m_flags & (0x1ull << IS_ON_X_IDENTIFICATION_2_OP))); } bool compare_y_on_boundary_op() const - { return (0 != (m_flags & (0x1 << COMPARE_Y_ON_BOUNDARY_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_Y_ON_BOUNDARY_2_OP))); } bool compare_y_near_boundary_op() const - { return m_flags & (0x1 << COMPARE_Y_NEAR_BOUNDARY_OP); } + { return (0 != (m_flags & (0x1ull << COMPARE_Y_NEAR_BOUNDARY_2_OP))); } // bottom-top bool parameter_space_in_y_op() const - { return (0 != (m_flags & (0x1 << PARAMETER_SPACE_IN_Y_OP))); } + { return (0 != (m_flags & (0x1ull << PARAMETER_SPACE_IN_Y_2_OP))); } bool is_on_y_identification_op() const - { return m_flags & (0x1 << IS_ON_Y_IDENTIFICATION_OP); } + { return (0 != (m_flags & (0x1ull << IS_ON_Y_IDENTIFICATION_2_OP))); } bool compare_x_on_boundary_op() const - { return (0 != (m_flags & (0x1 << COMPARE_X_ON_BOUNDARY_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_X_ON_BOUNDARY_2_OP))); } bool compare_x_near_boundary_op() const - { return m_flags & (0x1 << COMPARE_X_NEAR_BOUNDARY_OP); } + { return (0 != (m_flags & (0x1ull << COMPARE_X_NEAR_BOUNDARY_2_OP))); } public: - /*! Construct default */ + /*! constructs default. */ template - Arr_tracing_traits_2(Args ... args) : - Base(args...) - { - enable_all_traces(); - } + Arr_tracing_traits_2(Args ... args) : Base(std::forward(args)...) + { enable_all_traces(); } - /*! Disable copy constructor. - */ + /*! disables copy constructor. */ Arr_tracing_traits_2(const Arr_tracing_traits_2&) = delete; - /*! Enable the trace of a traits operation - * \param id the operation identifier + /*! enables the trace of a traits operation. + * \param id the operation identifier. */ - void enable_trace(Operation_id id) { m_flags |= 0x1 << id; } + void enable_trace(Operation_id id) { m_flags |= 0x1ull << id; } - /*! Enable the trace of all traits operations - * \param id the operation identifier + /*! enables the trace of all traits operations. */ void enable_all_traces() { m_flags = 0xffffffff; } - /*! Disable the trace of a traits operation - * \param id the operation identifier + /*! disables the trace of a traits operation. + * \param id the operation identifier. */ - void disable_trace(Operation_id id) { m_flags &= ~(0x1 << id); } + void disable_trace(Operation_id id) { m_flags &= ~(0x1ull << id); } - /*! Disable the trace of all traits operations - * \param id the operation identifier + /*! disables the trace of all traits operations. */ void disable_all_traces() { m_flags = 0x0; } - /// \name Types and functors inherited from the base + /// \name Types and functors inherited from `BaseTraits` //@{ // Traits types: - typedef typename Base::Has_left_category Has_left_category; - typedef typename Base::Has_merge_category Has_merge_category; - typedef typename Base::Has_do_intersect_category Has_do_intersect_category; + using Has_left_category = typename Base::Has_left_category; + using Has_merge_category = typename Base::Has_merge_category; + using Has_do_intersect_category = typename Base::Has_do_intersect_category; - typedef typename internal::Arr_complete_left_side_category< Base >::Category - Left_side_category; - typedef typename internal::Arr_complete_bottom_side_category< Base >::Category - Bottom_side_category; - typedef typename internal::Arr_complete_top_side_category< Base >::Category - Top_side_category; - typedef typename internal::Arr_complete_right_side_category< Base >::Category - Right_side_category; + using Left_side_category = + typename internal::Arr_complete_left_side_category< Base >::Category; + using Bottom_side_category = + typename internal::Arr_complete_bottom_side_category< Base >::Category; + using Top_side_category = + typename internal::Arr_complete_top_side_category< Base >::Category; + using Right_side_category = + typename internal::Arr_complete_right_side_category< Base >::Category; - typedef typename Base::Point_2 Point_2; - typedef typename Base::X_monotone_curve_2 X_monotone_curve_2; - typedef typename Base::Curve_2 Curve_2; - typedef typename Base::Multiplicity Multiplicity; + using Point_2 = typename Base::Point_2; + using X_monotone_curve_2 = typename Base::X_monotone_curve_2; + using Curve_2 = typename Base::Curve_2; + using Multiplicity = typename Base::Multiplicity; + //@} - /*! A functor that compares the x-coordinates of two points */ + /*! A functor that compares the \f$x\f$-coordinates of two points. */ class Compare_x_2 { private: typename Base::Compare_x_2 m_object; bool m_enabled; public: - /*! Construct */ - Compare_x_2(const Base* base, bool enabled = true) : - m_object(base->compare_x_2_object()), m_enabled(enabled) {} + /*! constructs */ + Compare_x_2(const Base& base, bool enabled = true) : + m_object(base.compare_x_2_object()), m_enabled(enabled) {} - /*! Operate - * \param p1 first point - * \param p2 second point - * \return the comparison result + /*! operates + * \param p1 first point. + * \param p2 second point. + * \return the comparison result. */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const - { - if (!m_enabled) return m_object(p1, p2); + Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { + if (! m_enabled) return m_object(p1, p2); std::cout << "compare_x" << std::endl << " p1: " << p1 << std::endl << " p2: " << p2 << std::endl; @@ -244,25 +241,26 @@ public: } }; - /*! A functor that compares two points lexigoraphically: by x, then by y. */ + /*! A functor that compares two points lexigoraphically: by \f$x\f$, then by + * \f$y\f$. + */ class Compare_xy_2 { private: typename Base::Compare_xy_2 m_object; bool m_enabled; public: - /*! Construct */ - Compare_xy_2(const Base* base, bool enabled = true) : - m_object(base->compare_xy_2_object()), m_enabled(enabled) {} + /*! constructs */ + Compare_xy_2(const Base& base, bool enabled = true) : + m_object(base.compare_xy_2_object()), m_enabled(enabled) {} - /*! Operate - * \param p1 the first point - * \param p2 the second point - * \return the comparison result + /*! operates + * \param p1 the first point. + * \param p2 the second point. + * \return the comparison result. */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const - { - if (!m_enabled) return m_object(p1, p2); + Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { + if (! m_enabled) return m_object(p1, p2); std::cout << "compare_xy" << std::endl << " p1: " << p1 << std::endl << " p2: " << p2 << std::endl; @@ -272,76 +270,82 @@ public: } }; - /*! A functor that obtains the left endpoint of an x-monotone curve. */ + /*! A functor that obtains the left endpoint of an \f$x\f$-monotone curve. */ class Construct_min_vertex_2 { private: typename Base::Construct_min_vertex_2 m_object; bool m_enabled; public: - /*! Construct */ - Construct_min_vertex_2(const Base* base, bool enabled = true) : - m_object(base->construct_min_vertex_2_object()), m_enabled(enabled) {} + /*! constructs */ + Construct_min_vertex_2(const Base& base, bool enabled = true) : + m_object(base.construct_min_vertex_2_object()), m_enabled(enabled) {} - /*! Operate - * \param xcv the curve the left endpoint of which is obtained - * \return the left endpoint + /*! operates + * \param xcv the curve the left endpoint of which is obtained. + * \return the left endpoint. */ - const Point_2 operator()(const X_monotone_curve_2& xcv) const - { - if (!m_enabled) return m_object(xcv); + using Subcurve_ctr_minv = typename Base::Construct_min_vertex_2; + using Return_type = + decltype(std::declval(). + operator()(std::declval())); + Return_type operator()(const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(xcv); std::cout << "construct_min_vertex" << std::endl << " xcv: " << xcv << std::endl; - Point_2 p = m_object(xcv); + Return_type p = m_object(xcv); std::cout << " result: " << p << std::endl; return p; } }; - /*! A functor that obtains the right endpoint of an x-monotone curve. */ + /*! A functor that obtains the right endpoint of an \f$x\f$-monotone curve. */ class Construct_max_vertex_2 { private: typename Base::Construct_max_vertex_2 m_object; bool m_enabled; public: - /*! Construct */ - Construct_max_vertex_2(const Base* base, bool enabled = true) : - m_object(base->construct_max_vertex_2_object()), m_enabled(enabled) {} + /*! constructs */ + Construct_max_vertex_2(const Base& base, bool enabled = true) : + m_object(base.construct_max_vertex_2_object()), m_enabled(enabled) {} - /*! Operate - * \param xcv the curve the right endpoint of which is obtained - * \return the right endpoint + /*! operates + * \param xcv the curve the right endpoint of which is obtained. + * \return the right endpoint. */ - const Point_2 operator()(const X_monotone_curve_2& xcv) const - { - if (!m_enabled) return m_object(xcv); + using Subcurve_ctr_maxv = typename Base::Construct_max_vertex_2; + using Return_type = + decltype(std::declval(). + operator()(std::declval())); + Return_type operator()(const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(xcv); std::cout << "construct_max_vertex" << std::endl << " xcv: " << xcv << std::endl; - Point_2 p = m_object(xcv); + Return_type p = m_object(xcv); std::cout << " result: " << p << std::endl; return p; } }; - /*! A functor that checks whether a given x-monotone curve is vertical. */ + /*! A functor that checks whether a given \f$x\f$-monotone curve is vertical. + */ class Is_vertical_2 { private: typename Base::Is_vertical_2 m_object; bool m_enabled; public: - /*! Construct */ - Is_vertical_2(const Base* base, bool enabled = true) : - m_object(base->is_vertical_2_object()), m_enabled(enabled) {} + /*! constructs */ + Is_vertical_2(const Base& base, bool enabled = true) : + m_object(base.is_vertical_2_object()), m_enabled(enabled) {} - /*! Operate - * \param xcv the curve - * \return a Boolean that indicates whether the curve is vertical or not + /*! operates + * \param xcv the curve. + * \return a Boolean that indicates whether the curve is vertical or not. */ - bool operator()(const X_monotone_curve_2& xcv) const - { - if (!m_enabled) return m_object(xcv); + bool operator()(const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(xcv); std::cout << "is_vertical" << std::endl << " xcv: " << xcv << std::endl; bool is_vertical = m_object(xcv); @@ -350,8 +354,8 @@ public: } }; - /*! A functor that compares the y-coordinates of a point and an - * x-monotone curve at the point x-coordinate. + /*! A functor that compares the \f$y\f$-coordinates of a point and an + * \f$x\f$-monotone curve at the point \f$x\f$-coordinate. */ class Compare_y_at_x_2 { private: @@ -359,19 +363,18 @@ public: bool m_enabled; public: - /*! Construct */ - Compare_y_at_x_2(const Base* base, bool enabled = true) : - m_object(base->compare_y_at_x_2_object()), m_enabled(enabled) {} + /*! constructs */ + Compare_y_at_x_2(const Base& base, bool enabled = true) : + m_object(base.compare_y_at_x_2_object()), m_enabled(enabled) {} - /*! Operate - * \param p the point - * \param xcv the curve - * \return the comparison result + /*! operates + * \param p the point. + * \param xcv the curve. + * \return the comparison result. */ Comparison_result operator()(const Point_2& p, - const X_monotone_curve_2& xcv) const - { - if (!m_enabled) return m_object(p, xcv); + const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(p, xcv); std::cout << "compare_y_at_x" << std::endl << " p: " << p << std::endl << " xcv: " << xcv << std::endl; @@ -381,8 +384,8 @@ public: } }; - /*! A functor that checks whether two points and two x-monotone curves are - * identical. + /*! A functor that checks whether two points and two \f$x\f$-monotone curves + * are identical. */ class Equal_2 { private: @@ -391,23 +394,23 @@ public: bool m_enabled_curve; public: - /*! Construct */ - Equal_2(const Base* base, + /*! constructs */ + Equal_2(const Base& base, bool enabled_point = true, bool enabled_curve = true) : - m_object(base->equal_2_object()), + m_object(base.equal_2_object()), m_enabled_point(enabled_point), m_enabled_curve(enabled_curve) {} - /*! Operate - * \param xcv1 the first curve - * \param xcv2 the second curve - * \return true if the x-monotone curves are equal and false otherwise + /*! operates + * \param xcv1 the first curve. + * \param xcv2 the second curve. + * \return true if the \f$x\f$-monotone curves are equal and false + * otherwise. */ bool operator()(const X_monotone_curve_2& xcv1, - const X_monotone_curve_2& xcv2) const - { - if (!m_enabled_curve) return m_object(xcv1, xcv2); + const X_monotone_curve_2& xcv2) const { + if (! m_enabled_curve) return m_object(xcv1, xcv2); std::cout << "equal 1" << std::endl << " xcv1: " << xcv1 << std::endl << " xcv1: " << xcv1 << std::endl; @@ -416,14 +419,13 @@ public: return equal; } - /*! Operate - * \param p1 the first point - * \param p2 the second point - * \return true if the points are equal and false otherwise + /*! operates + * \param p1 the first point. + * \param p2 the second point. + * \return true if the points are equal and false otherwise. */ - bool operator()(const Point_2& p1, const Point_2& p2) const - { - if (!m_enabled_point) return m_object(p1, p2); + bool operator()(const Point_2& p1, const Point_2& p2) const { + if (! m_enabled_point) return m_object(p1, p2); std::cout << "equal 2" << std::endl << " p1: " << p1 << std::endl << " p2: " << p2 << std::endl; @@ -433,8 +435,9 @@ public: } }; - /*! A functor that compares compares the y-coordinates of two x-monotone - * curves immediately to the left of their intersection point. + /*! A functor that compares compares the \f$y\f$-coordinates of two + * \f$x\f$-monotone curves immediately to the left of their intersection + * point. */ class Compare_y_at_x_left_2 { private: @@ -442,21 +445,20 @@ public: bool m_enabled; public: - /*! Construct */ - Compare_y_at_x_left_2(const Base* base, bool enabled = true) : - m_object(base->compare_y_at_x_left_2_object()), m_enabled(enabled) {} + /*! constructs */ + Compare_y_at_x_left_2(const Base& base, bool enabled = true) : + m_object(base.compare_y_at_x_left_2_object()), m_enabled(enabled) {} - /*! Operate - * \param xcv1 the first curve - * \param xcv2 the second curve - * \param p the reference point - * \return the comparison result + /*! operates + * \param xcv1 the first curve. + * \param xcv2 the second curve. + * \param p the reference point. + * \return the comparison result. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, - const Point_2& p) const - { - if (!m_enabled) return m_object(xcv1, xcv2, p); + const Point_2& p) const { + if (! m_enabled) return m_object(xcv1, xcv2, p); std::cout << "compare_y_at_x_left" << std::endl << " p: " << p << std::endl << " xcv1: " << xcv1 << std::endl @@ -467,8 +469,9 @@ public: } }; - /*! A functor that compares compares the y-coordinates of two x-monotone - * curves immediately to the right of their intersection point. + /*! A functor that compares compares the \f$y\f$-coordinates of two + * \f$x\f$-monotone curves immediately to the right of their intersection + * point. */ class Compare_y_at_x_right_2 { private: @@ -476,21 +479,20 @@ public: bool m_enabled; public: - /*! Construct */ - Compare_y_at_x_right_2(const Base* base, bool enabled = true) : - m_object(base->compare_y_at_x_right_2_object()), m_enabled(enabled) {} + /*! constructs */ + Compare_y_at_x_right_2(const Base& base, bool enabled = true) : + m_object(base.compare_y_at_x_right_2_object()), m_enabled(enabled) {} - /*! Operate - * \param xcv1 the first curve - * \param xcv2 the second curve - * \param p the reference point - * \return the comparison result + /*! operates + * \param xcv1 the first curve. + * \param xcv2 the second curve. + * \param p the reference point. + * \return the comparison result. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, - const Point_2& p) const - { - if (!m_enabled) return m_object(xcv1, xcv2, p); + const Point_2& p) const { + if (! m_enabled) return m_object(xcv1, xcv2, p); std::cout << "compare_y_at_x_right" << std::endl << " p: " << p << std::endl << " xcv1: " << xcv1 << std::endl @@ -505,7 +507,7 @@ public: //@{ /*! \class Make_x_monotone_2 - * A functor for subdividing curves into x-monotone curves. + * A functor for subdividing curves into \f$x\f$-monotone curves. */ class Make_x_monotone_2 { private: @@ -513,32 +515,30 @@ public: bool m_enabled; public: - /*! Construct */ - Make_x_monotone_2(const Base* base, bool enabled = true) : - m_object(base->make_x_monotone_2_object()), m_enabled(enabled) {} + /*! constructs */ + Make_x_monotone_2(const Base& base, bool enabled = true) : + m_object(base.make_x_monotone_2_object()), m_enabled(enabled) {} - /*! Subdivide a given curve into x-monotone subcurves and insert them into - * a given output iterator. + /*! subdivides a given curve into \f$x\f$-monotone subcurves and insert them + * into a given output iterator. * \param cv the curve. * \param oi an output iterator for the result. Its value type is a variant - * that wraps Point_2 or X_monotone_curve_2 objects. + * that wraps `Point_2` or `X_monotone_curve_2` objects. * \return the output iterator. */ template - OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const - { + OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { if (! m_enabled) return m_object(cv, oi); std::cout << "make_x_monotone" << std::endl << " cv: " << cv << std::endl; - typedef std::variant - Make_x_monotone_result; + using Make_x_monotone_result = std::variant; std::list container; m_object(cv, std::back_inserter(container)); if (container.empty()) return oi; - size_t i = 0; + std::size_t i = 0; for (auto it = container.begin(); it != container.end(); ++it) { if (const auto* xcv = std::get_if(&*it)) { std::cout << " result[" << i++ << "]: xcv: " << *xcv << std::endl; @@ -559,27 +559,27 @@ public: } }; - /*! A functor that splits an x-monotone curve at a point. */ + /*! A functor that splits an \f$x\f$-monotone curve at a point. */ class Split_2 { private: typename Base::Split_2 m_object; bool m_enabled; public: - /*! Construct */ - Split_2(const Base* base, bool enabled = true) : - m_object(base->split_2_object()), m_enabled(enabled) {} + /*! constructs */ + Split_2(const Base& base, bool enabled = true) : + m_object(base.split_2_object()), m_enabled(enabled) {} - /*! Operate - * \param xcv - * \param p - * \param xcv1 - * \param xcv2 + /*! operates + * \param xcv the curve to split. + * \param p the split point. + * \param xcv1 the left resulting subcurve (`p` is its right endpoint).. + * \param xcv2 the right resulting subcurve (`p` is its left endpoint).. + * \pre `p` lies on `cv` but is not one of its end-points. */ void operator()(const X_monotone_curve_2& xcv, const Point_2& p, - X_monotone_curve_2& xcv1, X_monotone_curve_2& xcv2) const - { - if (!m_enabled) { + X_monotone_curve_2& xcv1, X_monotone_curve_2& xcv2) const { + if (! m_enabled) { m_object(xcv, p, xcv1, xcv2); return; } @@ -592,34 +592,34 @@ public: } }; - /*! A functor that computes intersections between two x-monotone curves. */ + /*! A functor that computes intersections between two \f$x\f$-monotone curves. + */ class Intersect_2 { private: typename Base::Intersect_2 m_object; bool m_enabled; public: - /*! Construct */ - Intersect_2(const Base* base, bool enabled = true) : - m_object(base->intersect_2_object()), m_enabled(enabled) {} + /*! constructs */ + Intersect_2(const Base& base, bool enabled = true) : + m_object(base.intersect_2_object()), m_enabled(enabled) {} - /*! Compute the intersections of the two given curves and insert them into + /*! computes the intersections of the two given curves and insert them into * a given output iterator. - * \param xcv1 the first curve - * \param xcv2 the ssecond curve + * \param xcv1 the first curve. + * \param xcv2 the ssecond curve. * \param oi the output iterator for the result. It value type is a variant - * that wraps an x-monotone overlapping curve or a pair that - * consists of the intersection point and its multiplicity + * that wraps an \f$x\f$-monotone overlapping curve or a pair that + * consists of the intersection point and its multiplicity. * \return the past-the-end output iterator. */ template OutputIterator operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, - OutputIterator oi) const - { - typedef std::pair Intersection_point; - typedef std::variant - Intersection_result; + OutputIterator oi) const { + using Intersection_point = std::pair; + using Intersection_result = + std::variant; if (! m_enabled) return m_object(xcv1, xcv2, oi); @@ -630,7 +630,7 @@ public: m_object(xcv1, xcv2, std::back_inserter(container)); if (container.empty()) return oi; - unsigned int i = 0; + std::size_t i = 0; for (const auto& item : container) { const X_monotone_curve_2* xcv = std::get_if(&item); if (xcv != nullptr) { @@ -652,30 +652,30 @@ public: } }; - /*! A functor that tests whether two x-monotone curves can be merged. */ + /*! A functor that tests whether two \f$x\f$-monotone curves can be merged. */ class Are_mergeable_2 { private: const Base& m_base_traits; bool m_enabled; public: - /*! Construct */ + /*! constructs */ Are_mergeable_2(const Base& base, bool enabled = true) : m_base_traits(base), m_enabled(enabled) {} - /*! Operate - * \param xcv1 the first curve - * \param xcv2 the second curve + /*! operates + * \param xcv1 the first curve. + * \param xcv2 the second curve. * \return true if the two curve are mergeable and false otherwise. * Two curves are mergeable if they have the same underlying theoretical - * curve + * curve. */ bool operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2) const { return are_mergable_2_impl(xcv1, xcv2, 0); } private: - /*! The base does not have Are_mergable_2 + /*! The base does not have `Are_mergable_2`. */ template bool are_mergable_2_impl(const X_monotone_curve_2& /* xcv1 */, @@ -684,7 +684,7 @@ public: return false; } - /*! The base does have Are_mergable_2 + /*! The base does have `Are_mergable_2`. */ template auto are_mergable_2_impl(const X_monotone_curve_2& xcv1, @@ -701,26 +701,25 @@ public: } }; - /*! A functor that merges two x-monotone curves into one. */ + /*! A functor that merges two \f$x\f$-monotone curves into one. */ class Merge_2 { private: typename Base::Merge_2 m_object; bool m_enabled; public: - /*! Construct */ - Merge_2(const Base* base, bool enabled = true) : - m_object(base->merge_2_object()), m_enabled(enabled) {} + /*! constructs */ + Merge_2(const Base& base, bool enabled = true) : + m_object(base.merge_2_object()), m_enabled(enabled) {} - /*! Operate - * \param xcv1 the first curve - * \param xcv2 the second curve - * \param xcv the merged curve + /*! operates + * \param xcv1 the first curve. + * \param xcv2 the second curve. + * \param xcv the merged curve. */ void operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, - X_monotone_curve_2& xcv) const - { + X_monotone_curve_2& xcv) const { std::cout << "merge" << std::endl << " xcv1: " << xcv1 << std::endl << " xcv2: " << xcv2 << std::endl; @@ -729,24 +728,23 @@ public: } }; - /*! A fnuctor that constructs an opposite x-monotone curve. */ + /*! A fnuctor that constructs an opposite \f$x\f$-monotone curve. */ class Construct_opposite_2 { private: typename Base::Construct_opposite_2 m_object; bool m_enabled; public: - /*! Construct */ - Construct_opposite_2(const Base* base, bool enabled = true) : - m_object(base->construct_opposite_2_object()), m_enabled(enabled) {} + /*! constructs */ + Construct_opposite_2(const Base& base, bool enabled = true) : + m_object(base.construct_opposite_2_object()), m_enabled(enabled) {} - /*! Operate - * \param xcv the curve - * \return the opposite curve + /*! operates + * \param xcv the curve. + * \return the opposite curve. */ - X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv) - { - if (!m_enabled) return m_object(xcv); + X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(xcv); std::cout << "construct_opposite" << std::endl << " xcv: " << xcv << std::endl; X_monotone_curve_2 xcv_out = m_object(xcv); @@ -755,7 +753,7 @@ public: } }; - /*! A functor that compares the two endpoints of an x-monotone curve + /*! A functor that compares the two endpoints of an \f$x\f$-monotone curve * lexigoraphically. */ class Compare_endpoints_xy_2 { @@ -764,17 +762,16 @@ public: bool m_enabled; public: - /*! Construct */ - Compare_endpoints_xy_2(const Base* base, bool enabled = true) : - m_object(base->compare_endpoints_xy_2_object()), m_enabled(enabled) {} + /*! constructs */ + Compare_endpoints_xy_2(const Base& base, bool enabled = true) : + m_object(base.compare_endpoints_xy_2_object()), m_enabled(enabled) {} - /*! Operate - * \param xcv the curve - * \return the comparison result + /*! operates + * \param xcv the curve. + * \return the comparison result. */ - Comparison_result operator()(const X_monotone_curve_2& xcv) - { - if (!m_enabled) return m_object(xcv); + Comparison_result operator()(const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(xcv); std::cout << "compare_endpoints_xy" << std::endl << " xcv: " << xcv << std::endl; Comparison_result cr = m_object(xcv); @@ -783,10 +780,76 @@ public: } }; + /*! A functor that approximates coordinates, points, and \f$x\f$-monotone + * curves. + */ + class Approximate_2 { + private: + using Approximate_number_type = typename Base::Approximate_number_type; + using Approximate_point_2 = typename Base::Approximate_point_2; + + typename Base::Approximate_2 m_object; + bool m_enabled; + + public: + /*! constructs */ + Approximate_2(const Base& base, bool enabled = true) : + m_object(base.approximate_2_object()), m_enabled(enabled) + {} + + /*! obtains an approximation of a point coordinate. + * \param p the exact point. + * \param i the coordinate index (either 0 or 1). + * \pre `i` is either 0 or 1. + * \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). + */ + Approximate_number_type operator()(const Point_2& p, std::size_t i) const { + if (! m_enabled) return m_object(p, i); + std::cout << "approximate_2" << std::endl + << " p: " << p << ", i: " << i << std::endl; + auto res = m_object(p, i); + std::cout << " result: " << res << std::endl; + return res; + } + + /*! obtains an approximation of a point. + */ + Approximate_point_2 operator()(const Point_2& p) const { + if (! m_enabled) return m_object(p); + std::cout << "approximate_2" << std::endl + << " p: " << p << std::endl; + auto res = m_object(p); + std::cout << " result: " << res << std::endl; + return res; + } + + /*! obtains an approximation of an \f$x\f$-monotone curve. + */ + template + OutputIterator operator()(const X_monotone_curve_2& xcv, double error, + OutputIterator oi, bool l2r = true) const { + if (! m_enabled) return m_object(xcv, error, oi, l2r); + std::cout << "approximate_2" << std::endl + << " xcv: " << xcv << ", error: " << error + << ", l2r: " << l2r << std::endl; + std::list container; + m_object(xcv, error, std::back_inserter(container), l2r); + if (container.empty()) return oi; + + std::size_t i = 0; + for (const auto& point : container) { + std::cout << " result[" << i++ << "]: " << point << std::endl; + *oi++ = point; + } + return oi; + } + }; + // left-right - /*! A functor that determines whether an endpoint of an x-monotone curve lies - * on a boundary of the parameter space along the x axis. + /*! A functor that determines whether an endpoint of an \f$x\f$-monotone curve + * lies on a boundary of the parameter space along the \f$x\f$-axis. */ class Parameter_space_in_x_2 { private: @@ -794,37 +857,35 @@ public: bool m_enabled; public: - /*! Construct */ - Parameter_space_in_x_2(const Base* base, bool enabled = true) : - m_object(base->parameter_space_in_x_2_object()), m_enabled(enabled) + /*! constructs */ + Parameter_space_in_x_2(const Base& base, bool enabled = true) : + m_object(base.parameter_space_in_x_2_object()), m_enabled(enabled) {} - /*! Operate - * \param xcv the curve the end of which is tested - * \param ce the curve-end identifier - * \return the boundary type + /*! operates + * \param xcv the curve the end of which is tested. + * \param ce the curve-end identifier. + * \return the boundary type. */ Arr_parameter_space operator()(const X_monotone_curve_2& xcv, - Arr_curve_end ce) const - { - if (!m_enabled) return m_object(xcv, ce); + Arr_curve_end ce) const { + if (! m_enabled) return m_object(xcv, ce); std::cout << "parameter_space_in_x" << std::endl - << " ce: " << ce << ", xcv: " << xcv << std::endl; + << " xcv: " << xcv << ", ce: " << ce << std::endl; Arr_parameter_space bt = m_object(xcv, ce); std::cout << " result: " << bt << std::endl; return bt; } - /*! A functor that obtains the parameter space at a point along the x-axis. - * Every non-interior point is assumed to lie on the left-right - * identification. - * Points at the poles additionally lie on the bottom or top boundary. + /*! A functor that obtains the parameter space at a point along the + * \f$x\f$-axis. Every non-interior point is assumed to lie on the + * left-right identification. Points at the poles additionally lie on the + * bottom or top boundary. * \param p the point. - * \return the parameter space at p. + * \return the parameter space at `p`. */ - Arr_parameter_space operator()(const Point_2& p) const - { - if (!m_enabled) return m_object(p); + Arr_parameter_space operator()(const Point_2& p) const { + if (! m_enabled) return m_object(p); std::cout << "parameter_space_in_x" << std::endl << " p: " << p << std::endl; Arr_parameter_space bt = m_object(p); @@ -834,7 +895,7 @@ public: }; /*! A functor that determines whether a point or curve is on - * x-identification. + * \f$x\f$-identification. */ class Is_on_x_identification_2 { private: @@ -842,15 +903,15 @@ public: bool m_enabled; public: - /*! Construct */ - Is_on_x_identification_2(const Base* base, bool enabled = true) : - m_object(base->is_on_x_identification_2_object()), m_enabled(enabled) {} - /*! Operate + /*! constructs */ + Is_on_x_identification_2(const Base& base, bool enabled = true) : + m_object(base.is_on_x_identification_2_object()), m_enabled(enabled) {} + + /*! operates * \param p1 the point. */ - bool operator()(const Point_2& p) const - { - if (!m_enabled) return m_object(p); + bool operator()(const Point_2& p) const { + if (! m_enabled) return m_object(p); std::cout << "is_on_x_identification" << std::endl << " p: " << p << std::endl; bool cr = m_object(p); @@ -858,12 +919,11 @@ public: return cr; } - /*! Operate - * \param xcv1 the curve + /*! operates + * \param xcv1 the curve. */ - bool operator()(const X_monotone_curve_2& xcv) const - { - if (!m_enabled) return m_object(xcv); + bool operator()(const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(xcv); std::cout << "is_on_x_identification" << std::endl << " xcv: " << xcv << std::endl; bool cr = m_object(xcv); @@ -872,7 +932,7 @@ public: } }; - /*! A functor that compares the y-coordinate of two given points + /*! A functor that compares the \f$y\f$-coordinate of two given points * that lie on vertical boundaries. */ class Compare_y_on_boundary_2 { @@ -881,19 +941,18 @@ public: bool m_enabled; public: - /*! Construct */ - Compare_y_on_boundary_2(const Base* base, bool enabled = true) : - m_object(base->compare_y_on_boundary_2_object()), + /*! constructs */ + Compare_y_on_boundary_2(const Base& base, bool enabled = true) : + m_object(base.compare_y_on_boundary_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param p1 the first point. * \param p2 the second point. */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const - { - if (!m_enabled) return m_object(p1, p2); + Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { + if (! m_enabled) return m_object(p1, p2); std::cout << "compare_y_on_boundary" << std::endl << " p1: " << p1 << std::endl << " p2: " << p2 << std::endl; @@ -903,7 +962,7 @@ public: } }; - /*! A functor that compares the y-coordinates of curve ends near the + /*! A functor that compares the \f$y\f$-coordinates of curve ends near the * boundary of the parameter space. */ class Compare_y_near_boundary_2 { @@ -912,21 +971,20 @@ public: bool m_enabled; public: - /*! Construct */ - Compare_y_near_boundary_2(const Base* base, bool enabled = true) : - m_object(base->compare_y_near_boundary_2_object()), m_enabled(enabled) {} + /*! constructs */ + Compare_y_near_boundary_2(const Base& base, bool enabled = true) : + m_object(base.compare_y_near_boundary_2_object()), m_enabled(enabled) {} - /*! Operate - * \param xcv1 the first curve the end point of which is tested - * \param xcv2 the second curve the end point of which is tested - * \param ce the curve-end identifier - * \return the comparison result + /*! operates + * \param xcv1 the first curve the end point of which is tested. + * \param xcv2 the second curve the end point of which is tested. + * \param ce the curve-end identifier. + * \return the comparison result. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, - Arr_curve_end ce) const - { - if (!m_enabled) return m_object(xcv1, xcv2, ce); + Arr_curve_end ce) const { + if (! m_enabled) return m_object(xcv1, xcv2, ce); std::cout << "compare_y_near_boundary" << std::endl << " ce: " << ce << std::endl << " xcv1: " << xcv1 << std::endl @@ -939,8 +997,8 @@ public: // bottom-top - /*! A functor that determines whether an endpoint of an x-monotone arc lies - * on a boundary of the parameter space along the y axis. + /*! A functor that determines whether an endpoint of an \f$x\f$-monotone arc + * lies on a boundary of the parameter space along the \f$y\f$-axis. */ class Parameter_space_in_y_2 { private: @@ -948,19 +1006,18 @@ public: bool m_enabled; public: - /*! Construct */ - Parameter_space_in_y_2(const Base* base, bool enabled = true) : - m_object(base->parameter_space_in_y_2_object()), m_enabled(enabled) {} + /*! constructs */ + Parameter_space_in_y_2(const Base& base, bool enabled = true) : + m_object(base.parameter_space_in_y_2_object()), m_enabled(enabled) {} - /*! Operate - * \param xcv the curve the end of which is tested - * \param ce the curve-end identifier - * \return the boundary type + /*! operates + * \param xcv the curve the end of which is tested. + * \param ce the curve-end identifier. + * \return the boundary type. */ Arr_parameter_space operator()(const X_monotone_curve_2& xcv, - Arr_curve_end ce) const - { - if (!m_enabled) return m_object(xcv, ce); + Arr_curve_end ce) const { + if (! m_enabled) return m_object(xcv, ce); std::cout << "parameter_space_in_y" << std::endl << " ce: " << ce << ", xcv: " << xcv << std::endl; Arr_parameter_space bt = m_object(xcv, ce); @@ -968,13 +1025,12 @@ public: return bt; } - /*! Operate - * \param p the point - * \return the boundary type + /*! operates + * \param p the point. + * \return the boundary type. */ - Arr_parameter_space operator()(const Point_2& p) const - { - if (!m_enabled) return m_object(p); + Arr_parameter_space operator()(const Point_2& p) const { + if (! m_enabled) return m_object(p); std::cout << "parameter_space_in_y" << std::endl << " point: " << p << std::endl; Arr_parameter_space bt = m_object(p); @@ -984,7 +1040,7 @@ public: }; /*! A functor that determines whether a point or curve is on - * y-identification. + * \f$y\f$-identification. */ class Is_on_y_identification_2 { private: @@ -992,15 +1048,15 @@ public: bool m_enabled; public: - /*! Construct */ - Is_on_y_identification_2(const Base* base, bool enabled = true) : - m_object(base->is_on_y_identification_2_object()), m_enabled(enabled) {} - /*! Operate + /*! constructs */ + Is_on_y_identification_2(const Base& base, bool enabled = true) : + m_object(base.is_on_y_identification_2_object()), m_enabled(enabled) {} + + /*! operates * \param p1 the point. */ - bool operator()(const Point_2& p) const - { - if (!m_enabled) return m_object(p); + bool operator()(const Point_2& p) const { + if (! m_enabled) return m_object(p); std::cout << "is_on_y_identification" << std::endl << " p: " << p << std::endl; bool cr = m_object(p); @@ -1008,12 +1064,11 @@ public: return cr; } - /*! Operate - * \param xcv1 the curve + /*! operates + * \param xcv1 the curve. */ - bool operator()(const X_monotone_curve_2& xcv) const - { - if (!m_enabled) return m_object(xcv); + bool operator()(const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(xcv); std::cout << "is_on_y_identification" << std::endl << " xcv: " << xcv << std::endl; bool cr = m_object(xcv); @@ -1022,7 +1077,7 @@ public: } }; - /*! A functor that compares the x-coordinate of two given points + /*! A functor that compares the \f$x\f$-coordinate of two given points * that lie on horizontal boundaries. */ class Compare_x_on_boundary_2 { @@ -1031,16 +1086,16 @@ public: bool m_enabled; public: - /*! Construct */ - Compare_x_on_boundary_2(const Base* base, bool enabled = true) : - m_object(base->compare_x_on_boundary_2_object()), m_enabled(enabled) {} - /*! Operate + /*! constructs */ + Compare_x_on_boundary_2(const Base& base, bool enabled = true) : + m_object(base.compare_x_on_boundary_2_object()), m_enabled(enabled) {} + + /*! operates * \param p1 the first point. * \param p2 the second point. */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const - { - if (!m_enabled) return m_object(p1, p2); + Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { + if (! m_enabled) return m_object(p1, p2); std::cout << "compare_x_on_boundary" << std::endl << " p1: " << p1 << std::endl << " p2: " << p2 << std::endl; @@ -1049,16 +1104,15 @@ public: return cr; } - /*! Operate + /*! operates * \param pt the point. * \param xcv the curve. - * \param ce the curve-end + * \param ce the curve-end. */ Comparison_result operator()(const Point_2& pt, const X_monotone_curve_2& xcv, - Arr_curve_end ce) const - { - if (!m_enabled) return m_object(pt, xcv, ce); + Arr_curve_end ce) const { + if (! m_enabled) return m_object(pt, xcv, ce); std::cout << "compare_x_on_boundary" << std::endl << " pt: " << pt << std::endl << " xcv: " << xcv << std::endl @@ -1068,18 +1122,17 @@ public: return cr; } - /*! Operate + /*! operates * \param xcv1 the first curve. - * \param ce1 the first curve-end + * \param ce1 the first curve-end. * \param xcv2 the second curve. - * \param ce2 the second curve-end + * \param ce2 the second curve-end. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, Arr_curve_end ce1, const X_monotone_curve_2& xcv2, - Arr_curve_end ce2) const - { - if (!m_enabled) return m_object(xcv2, ce1, xcv2, ce2); + Arr_curve_end ce2) const { + if (! m_enabled) return m_object(xcv2, ce1, xcv2, ce2); std::cout << "compare_x_on_boundary" << std::endl << "xcv1: " << xcv1 << std::endl << " ce1: " << ce1 << std::endl @@ -1091,7 +1144,7 @@ public: } }; - /*! A functor that compares the x-coordinates of curve ends near the + /*! A functor that compares the \f$x\f$-coordinates of curve ends near the * boundary of the parameter space. */ class Compare_x_near_boundary_2 { @@ -1100,22 +1153,21 @@ public: bool m_enabled; public: - /*! Construct */ - Compare_x_near_boundary_2(const Base* base, bool enabled = true) : - m_object(base->compare_x_near_boundary_2_object()), m_enabled(enabled) {} + /*! constructs */ + Compare_x_near_boundary_2(const Base& base, bool enabled = true) : + m_object(base.compare_x_near_boundary_2_object()), m_enabled(enabled) {} - /*! Operate - * \param xcv1 the first curve the end of which is to be compared - * \param ce1 the identifier of the end of the first curve - * \param xcv2 the second curve the end of which is to be compared - * \param ce2 the identifier of the end of the second curve - * \return the comparison result + /*! operates + * \param xcv1 the first curve the end of which is to be compared. + * \param ce1 the identifier of the end of the first curve. + * \param xcv2 the second curve the end of which is to be compared. + * \param ce2 the identifier of the end of the second curve. + * \return the comparison result. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, - Arr_curve_end ce) const - { - if (!m_enabled) return m_object(xcv1, xcv2, ce); + Arr_curve_end ce) const { + if (! m_enabled) return m_object(xcv1, xcv2, ce); std::cout << "compare_x_near_boundary 2" << std::endl << " xcv1: " << xcv1 << std::endl << " xcv2: " << xcv2 << std::endl @@ -1132,92 +1184,94 @@ public: //@{ Compare_x_2 compare_x_2_object() const - { return Compare_x_2(this, compare_x_op()); } + { return Compare_x_2(*this, compare_x_op()); } Compare_xy_2 compare_xy_2_object() const - { return Compare_xy_2(this, compare_xy_op()); } + { return Compare_xy_2(*this, compare_xy_op()); } Construct_min_vertex_2 construct_min_vertex_2_object() const - { return Construct_min_vertex_2(this, construct_min_vertex_op()); } + { return Construct_min_vertex_2(*this, construct_min_vertex_op()); } Construct_max_vertex_2 construct_max_vertex_2_object() const - { return Construct_max_vertex_2(this, construct_max_vertex_op()); } + { return Construct_max_vertex_2(*this, construct_max_vertex_op()); } Is_vertical_2 is_vertical_2_object() const - { return Is_vertical_2(this, is_vertical_op()); } + { return Is_vertical_2(*this, is_vertical_op()); } Compare_y_at_x_2 compare_y_at_x_2_object() const - { return Compare_y_at_x_2(this, compare_y_at_x_op()); } + { return Compare_y_at_x_2(*this, compare_y_at_x_op()); } Equal_2 equal_2_object() const - { return Equal_2(this, equal_points_op(), equal_curves_op()); } + { return Equal_2(*this, equal_points_op(), equal_curves_op()); } Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const - { return Compare_y_at_x_left_2(this, compare_y_at_x_left_op()); } + { return Compare_y_at_x_left_2(*this, compare_y_at_x_left_op()); } Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const - { return Compare_y_at_x_right_2(this, compare_y_at_x_right_op()); } + { return Compare_y_at_x_right_2(*this, compare_y_at_x_right_op()); } Make_x_monotone_2 make_x_monotone_2_object() const - { return Make_x_monotone_2(this, make_x_monotone_op()); } + { return Make_x_monotone_2(*this, make_x_monotone_op()); } Split_2 split_2_object() const - { return Split_2(this, split_op()); } + { return Split_2(*this, split_op()); } Intersect_2 intersect_2_object() const - { return Intersect_2(this, intersect_op()); } + { return Intersect_2(*this, intersect_op()); } Are_mergeable_2 are_mergeable_2_object() const - { return Are_mergeable_2(this, are_mergeable_op()); } + { return Are_mergeable_2(*this, are_mergeable_op()); } Merge_2 merge_2_object() const - { return Merge_2(this, merge_op()); } + { return Merge_2(*this, merge_op()); } Construct_opposite_2 construct_opposite_2_object() const - { return Construct_opposite_2(this, construct_opposite_op()); } + { return Construct_opposite_2(*this, construct_opposite_op()); } Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const - { return Compare_endpoints_xy_2(this, compare_endpoints_xy_op()); } + { return Compare_endpoints_xy_2(*this, compare_endpoints_xy_op()); } + + Approximate_2 approximate_2_object() const + { return Approximate_2(*this, approximate_op()); } // left-right Parameter_space_in_x_2 parameter_space_in_x_2_object() const - { return Parameter_space_in_x_2(this, parameter_space_in_x_op()); } + { return Parameter_space_in_x_2(*this, parameter_space_in_x_op()); } Is_on_x_identification_2 is_on_x_identification_2_object() const - { return Is_on_x_identification_2(this, is_on_x_identification_op()); } + { return Is_on_x_identification_2(*this, is_on_x_identification_op()); } Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const - { return Compare_y_on_boundary_2(this, compare_y_on_boundary_op()); } + { return Compare_y_on_boundary_2(*this, compare_y_on_boundary_op()); } Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const - { return Compare_y_near_boundary_2(this, compare_y_near_boundary_op()); } + { return Compare_y_near_boundary_2(*this, compare_y_near_boundary_op()); } // bottom-top Parameter_space_in_y_2 parameter_space_in_y_2_object() const - { return Parameter_space_in_y_2(this, parameter_space_in_y_op()); } + { return Parameter_space_in_y_2(*this, parameter_space_in_y_op()); } Is_on_y_identification_2 is_on_y_identification_2_object() const - { return Is_on_y_identification_2(this, is_on_y_identification_op()); } + { return Is_on_y_identification_2(*this, is_on_y_identification_op()); } Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const - { return Compare_x_on_boundary_2(this, compare_x_on_boundary_op()); } + { return Compare_x_on_boundary_2(*this, compare_x_on_boundary_op()); } Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const - { return Compare_x_near_boundary_2(this, compare_x_near_boundary_op()); } + { return Compare_x_near_boundary_2(*this, compare_x_near_boundary_op()); } //@} }; template -OutputStream& operator<<(OutputStream& os, Comparison_result cr) -{ +OutputStream& operator<<(OutputStream& os, Comparison_result cr) { os << ((cr == SMALLER) ? "SMALLER" : (cr == EQUAL) ? "EQUAL" : "LARGER"); return os; } -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h index 5776d9cf3ab..7a85d050790 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h @@ -130,7 +130,7 @@ protected: inline Result_type default_result() const { return Result::default_result(); } public: - /*! Default constructor. */ + /*! constructs default. */ Arr_trapezoid_ric_point_location (bool with_guarantees = true, double depth_thrs = CGAL_TD_DEFAULT_DEPTH_THRESHOLD, @@ -141,7 +141,7 @@ public: td.size_threshold(size_thrs); } - /*! Constructor given an arrangement. */ + /*! constructs given an arrangement. */ Arr_trapezoid_ric_point_location (const Base_aos& arr, bool with_guarantees = true, @@ -157,7 +157,7 @@ public: _construct_td(); } - /*! Destructor. */ + /*! destructs. */ ~Arr_trapezoid_ric_point_location() { } /*! defines whether the underlying search structure guarantees logarithmic @@ -190,7 +190,7 @@ public: void print_dag(std::ostream& out) const { td.print_dag(out); } #endif - /*! Locate the arrangement feature containing the given point. + /*! locates the arrangement feature containing the given point. * \param p The query point. * \return An object representing the arrangement feature containing the * query point. This object is either a Face_const_handle or a @@ -198,7 +198,7 @@ public: */ result_type locate(const Point_2& p) const; - /*! Locate the arrangement feature which a upward vertical ray emanating from + /*! locates the arrangement feature which a upward vertical ray emanating from * the given point hits. * \param p The query point. * \return An object representing the arrangement feature the ray hits. @@ -208,7 +208,7 @@ public: result_type ray_shoot_up(const Point_2& p) const { return (_vertical_ray_shoot(p, true)); } - /*! Locate the arrangement feature which a downward vertical ray emanating + /*! locates the arrangement feature which a downward vertical ray emanating * from the given point hits. * \param p The query point. * \return An object representing the arrangement feature the ray hits. @@ -307,7 +307,7 @@ public: //#endif protected: - /*! Construct the trapezoidal decomposition. */ + /*! constructs the trapezoidal decomposition. */ void _construct_td() { td.clear(); @@ -322,7 +322,7 @@ protected: td.insert(he_container.begin(), he_container.end()); } - /*! Obtain the unbounded face that contains the point when the trapezoid is + /*! obtains the unbounded face that contains the point when the trapezoid is * unbounded * \param tr The unbounded trapezoid whose face we should get * \param p The query point. @@ -334,7 +334,7 @@ protected: const Point_2& p, Arr_all_sides_oblivious_tag) const; - /*! Obtain the unbounded face that contains the point when the trapezoid is + /*! obtains the unbounded face that contains the point when the trapezoid is * unbounded * \param tr The unbounded trapezoid whose face we should get * \param p The query point. @@ -346,7 +346,7 @@ protected: const Point_2& p, Arr_not_all_sides_oblivious_tag) const; - /*! Locate the arrangement feature which a vertical ray emanating from the + /*! locates the arrangement feature which a vertical ray emanating from the * given point hits, considering isolated vertices. * \param p The query point. * \param shoot_up Indicates whether the ray is directed upward or downward. @@ -356,9 +356,8 @@ protected: */ result_type _vertical_ray_shoot(const Point_2& p, bool shoot_up) const; - /*! In vertical ray shoot, when the closest halfedge is found - * (or unbounded face) - * we check the isolated vertices inside the face to check whether there + /*! in vertical ray shoot, when the closest halfedge is found (or unbounded + * face) checks the isolated vertices inside the face to check whether there * is an isolated vertex right above/below the query point. */ result_type _check_isolated_for_vertical_ray_shoot diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h index 664aa1a4864..aedd32ed0a0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h @@ -124,20 +124,20 @@ public: ///! \name Construction methods. //@{ - /*! Construct Default. */ + /*! constructs Default. */ Arr_unb_planar_topology_traits_2(); - /*! Constructor with a geometry-traits class. */ + /*! constructs with a geometry-traits class. */ Arr_unb_planar_topology_traits_2(const Gt2* tr); - /*! Assign the contents of another topology-traits class. */ + /*! assigns the contents of another topology-traits class. */ void assign(const Self& other); //@} ///! \name Accessing the DCEL and constructing iterators. //@{ - /*! Determine whether the DCEL reprsenets an empty structure. */ + /*! determines whether the DCEL reprsenets an empty structure. */ bool is_empty_dcel() const { // An empty arrangement contains just two four vertices at infinity @@ -146,44 +146,44 @@ public: this->m_dcel.size_of_halfedges() == 8); } - /*! Check whether the given vertex is concrete (associated with a point). */ + /*! checks whether the given vertex is concrete (associated with a point). */ bool is_concrete_vertex(const Vertex* v) const { return (! v->has_null_point()); } - /*! Obtain the number of concrete vertices. + /*! obtains the number of concrete vertices. * \return All vertices not lying at infinity are concrete. */ Size number_of_concrete_vertices() const { return (this->m_dcel.size_of_vertices() - n_inf_verts); } - /*! Check if the given vertex is valid (not a fictitious one). */ + /*! checks if the given vertex is valid (not a fictitious one). */ bool is_valid_vertex(const Vertex* v) const { return (! v->has_null_point() || ((v != v_bl) && (v != v_tl) && (v != v_br) && (v != v_tr))); } - /*! Obtain the number of valid vertices. + /*! obtains the number of valid vertices. * \return All vertices, except the four fictitious one, are valid. */ Size number_of_valid_vertices() const { return (this->m_dcel.size_of_vertices() - 4); } - /*! Check whether the given halfedge is valid (not a fictitious one). */ + /*! checks whether the given halfedge is valid (not a fictitious one). */ bool is_valid_halfedge(const Halfedge* he) const { return (! he->has_null_curve()); } - /*! Obtain the number of valid halfedges. + /*! obtains the number of valid halfedges. * \return the number of valid halfedges, not including fictitious halfedges. * Note that each vertex at infinity induces two fictitious halfedges */ Size number_of_valid_halfedges() const { return (this->m_dcel.size_of_halfedges() - 2*n_inf_verts); } - /*! Check whether the given face is valid (not a fictitious one). */ + /*! checks whether the given face is valid (not a fictitious one). */ bool is_valid_face (const Face* f) const { return (! f->is_fictitious()); } - /*! Obtain the number of valid faces. + /*! obtains the number of valid faces. * \return the number of valid faces, not including ficitious DCEL faces. */ Size number_of_valid_faces() const @@ -259,15 +259,15 @@ public: ///! \name Topology-traits methods. //@{ - /*! Initialize an empty DCEL structure. + /*! initializes an empty DCEL structure. */ void init_dcel(); - /*! Make the necessary updates after the DCEL structure have been updated. + /*! makes the necessary updates after the DCEL structure have been updated. */ void dcel_updated(); - /*! Check if the given vertex is associated with the given curve end. + /*! checks if the given vertex is associated with the given curve end. * \param v The vertex. * \param cv The x-monotone curve. * \param ind The curve end. @@ -280,8 +280,8 @@ public: const X_monotone_curve_2& cv, Arr_curve_end ind, Arr_parameter_space ps_x, Arr_parameter_space ps_y) const; - /*! Given a curve end with boundary conditions and a face that contains the - * interior of the curve, find a place for a boundary vertex that will + /*! givens a curve end with boundary conditions and a face that contains the + * interior of the curve, finds a place for a boundary vertex that will * represent the curve end along the face boundary. * \param f The face. * \param cv The x-monotone curve. @@ -299,7 +299,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y); - /*! Locate the predecessor halfedge for the given curve around a given + /*! locates the predecessor halfedge for the given curve around a given * vertex with boundary conditions. * \param v The vertex. * \param cv The x-monotone curve. @@ -321,7 +321,7 @@ public: return (nullptr); } - /*! Locate a DCEL feature that contains the given unbounded curve end. + /*! locates a DCEL feature that contains the given unbounded curve end. * \param cv The x-monotone curve. * \param ind The curve end. * \param ps_x The boundary condition of the curve end in x. @@ -337,7 +337,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y); - /*! Split a fictitious edge using the given vertex. + /*! splits a fictitious edge using the given vertex. * \param e The edge to split (one of the pair of halfedges). * \param v The split vertex. * \pre e is a fictitious halfedge. @@ -346,19 +346,19 @@ public: */ Halfedge* split_fictitious_edge(Halfedge* e, Vertex* v); - /*! Determine whether the given face is unbounded. + /*! determines whether the given face is unbounded. * \param f The face. * \return Whether f is unbounded. */ bool is_unbounded(const Face* f) const; - /*! Determine whether the given boundary vertex is redundant. + /*! determines whether the given boundary vertex is redundant. * \param v The vertex. * \return Whether v is redundant, and should be erased. */ bool is_redundant(const Vertex* v) const; - /*! Erase the given redundant vertex by merging a fictitious edge. + /*! erases the given redundant vertex by merging a fictitious edge. * The function does not free the vertex v itself. * \param v The vertex. * \pre v is a redundant vertex. @@ -366,12 +366,12 @@ public: */ Halfedge* erase_redundant_vertex(Vertex* v); - //! reference_face (const version). - /*! The function returns a reference face of the arrangement. - All reference faces of arrangements of the same type have a common - point. - \return A pointer to the reference face. - */ + //! reference_face (const version). + /*! returns a reference face of the arrangement. All reference faces of + * arrangements of the same type have a common point. + * + * \return A pointer to the reference face. + */ const Face* reference_face() const { CGAL_assertion(v_tr->halfedge()->direction() == ARR_LEFT_TO_RIGHT); @@ -379,10 +379,10 @@ public: } //! reference_face (non-const version). - /*! The function returns a reference face of the arrangement. - All reference faces of arrangements of the same type have a common - point. - \return A pointer to the reference face. + /*! returns a reference face of the arrangement. All reference faces of + * arrangements of the same type have a common point. + * + * \return A pointer to the reference face. */ Face* reference_face() { @@ -398,41 +398,41 @@ public: /*! This function is used by the "walk" point-location strategy. */ const Face* initial_face() const { return fict_face; } - /*! Obtain the fictitious face (const version). */ + /*! obtains the fictitious face (const version). */ const Face* fictitious_face() const { return fict_face; } - /*! Obtain the fictitious face (non-const version). */ + /*! obtains the fictitious face (non-const version). */ Face* fictitious_face() { return fict_face; } - /*! Obtain the bottom-left fictitious vertex (const version). */ + /*! obtains the bottom-left fictitious vertex (const version). */ const Vertex* bottom_left_vertex() const { return (v_bl); } - /*! Obtain the bottom-left fictitious vertex (non-const version). */ + /*! obtains the bottom-left fictitious vertex (non-const version). */ Vertex* bottom_left_vertex() { return (v_bl); } - /*! Obtain the top-left fictitious vertex (const version). */ + /*! obtains the top-left fictitious vertex (const version). */ const Vertex* top_left_vertex() const { return (v_tl); } - /*! Obtain the top-left fictitious vertex (non-const version). */ + /*! obtains the top-left fictitious vertex (non-const version). */ Vertex* top_left_vertex() { return (v_tl); } - /*! Obtain the bottom-right fictitious vertex (const version). */ + /*! obtains the bottom-right fictitious vertex (const version). */ const Vertex* bottom_right_vertex() const { return (v_br); } - /*! Obtain the bottom-right fictitious vertex (non-const version). */ + /*! obtains the bottom-right fictitious vertex (non-const version). */ Vertex* bottom_right_vertex() { return (v_br); } - /*! Obtain the top-right fictitious vertex (const version). */ + /*! obtains the top-right fictitious vertex (const version). */ const Vertex* top_right_vertex() const { return (v_tr); } - /*! Obtain the top-right fictitious vertex (non-const version). */ + /*! obtains the top-right fictitious vertex (non-const version). */ Vertex* top_right_vertex() { return (v_tr); } //@} /// \name Additional predicates, specialized for this topology-traits class. //@{ - /*! Compare the given vertex (which may lie at infinity) and the given point. + /*! compares the given vertex (which may lie at infinity) and the given point. * \param p The point. * \param v The vertex. * \return The result of the comparison of the x-coordinates of p and v. @@ -440,7 +440,7 @@ public: virtual Comparison_result compare_x(const Point_2& p, const Vertex* v) const; - /*! Compare the given vertex (which may lie at infinity) and the given point. + /*! compares the given vertex (which may lie at infinity) and the given point. * \param p The point. * \param v The vertex. * \return The result of the xy-lexicographic comparison of p and v. @@ -448,7 +448,7 @@ public: virtual Comparison_result compare_xy(const Point_2& p, const Vertex* v) const; - /*! Compare the relative y-position of the given point and the given edge + /*! compares the relative y-position of the given point and the given edge * (which may be fictitious). * \param p The point. * \param he The edge (one of the pair of halfedges). @@ -464,7 +464,7 @@ protected: /// \name Auxiliary functions. //@{ - /*! Obtain the curve associated with a boundary vertex. + /*! obtains the curve associated with a boundary vertex. * \param v The vertex as infinity. * \param ind Output: ARR_MIN_END if the vertex is induced by the minimal end; * ARR_MAX_END if it is induced by the curve's maximal end. @@ -473,7 +473,7 @@ protected: */ const X_monotone_curve_2* _curve(const Vertex* v, Arr_curve_end& ind) const; - /*! Check whether the given infinite curve end lies on the given fictitious + /*! checks whether the given infinite curve end lies on the given fictitious * halfedge. * \param cv The curve. * \param ind Whether we refer to the minimal or maximal end of cv. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h b/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h index a9682dc5bad..054c0b67275 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h @@ -62,24 +62,24 @@ private: enum {MIN_REV_MAP_SIZE = 32}; public: - /*! Default constructor. */ + /*! constructs default. */ Arr_vertex_index_map() : Base(), n_vertices(0), rev_map(MIN_REV_MAP_SIZE) {} - /*! Constructor with an associated arrangement. */ + /*! constructs with an associated arrangement. */ Arr_vertex_index_map(const Base_aos& arr) : Base(const_cast(arr)) { _init(); } - /*! Copy constructor. */ + /*! constructs copy. */ Arr_vertex_index_map(const Self& other) : Base(const_cast(*(other.arrangement()))) { _init(); } - /*! Assignment operator. */ + /*! assigns. */ Self& operator= (const Self& other) { if (this == &other) return (*this); @@ -89,13 +89,13 @@ public: return (*this); } - /*! Get the index of a given vertex. + /*! obtains the index of a given vertex. * \param v A handle to the vertex. * \pre v is a valid vertex in the arrangement. */ unsigned int operator[](Vertex_handle v) const { return index_map[v]; } - /*! Get the vertex given its index. + /*! obtains the vertex given its index. * \param i The index of the vertex. * \pre i is less than the number of vertices in the graph. */ @@ -107,27 +107,27 @@ public: /// \name Notification functions, to keep the mapping up-to-date. //@{ - /*! Update the mapping after the arrangement has been assigned with another + /*! updates the mapping after the arrangement has been assigned with another * arrangement. */ virtual void after_assign() override { _init(); } - /*! Update the mapping after the arrangement is cleared. + /*! updates the mapping after the arrangement is cleared. */ virtual void after_clear() override { _init(); } - /*! Update the mapping after attaching to a new arrangement. + /*! updates the mapping after attaching to a new arrangement. */ virtual void after_attach() override { _init(); } - /*! Update the mapping after detaching the arrangement. + /*! updates the mapping after detaching the arrangement. */ virtual void after_detach() override { n_vertices = 0; index_map.clear(); } - /*! Update the mapping after the creation of a new vertex. + /*! updates the mapping after the creation of a new vertex. * \param v A handle to the created vertex. */ virtual void after_create_vertex(Vertex_handle v) override { @@ -142,7 +142,7 @@ public: rev_map[n_vertices - 1] = v; } - /*! Update the mapping after the creation of a new boundary vertex. + /*! updates the mapping after the creation of a new boundary vertex. * \param v A handle to the created vertex. */ virtual void after_create_boundary_vertex(Vertex_handle v) override { @@ -158,7 +158,7 @@ public: rev_map[n_vertices - 1] = v; } - /*! Update the mapping before the removal of a vertex. + /*! updates the mapping before the removal of a vertex. * \param v A handle to the vertex to be removed. */ virtual void before_remove_vertex(Vertex_handle v) override { @@ -189,7 +189,7 @@ public: //@} private: - /*! Initialize the map for the given arrangement. */ + /*! initializes the map for the given arrangement. */ void _init() { // Get the number of vertices and allocate the reverse map accordingly. n_vertices = @@ -215,7 +215,7 @@ private: } }; -/*! Get the index property-map function. Provided so that boost is able to +/*! obtains the index property-map function. Provided so that boost is able to * access the Arr_vertex_index_map above. * \param index_map The index map. * \param v A vertex handle. @@ -226,7 +226,7 @@ unsigned int get(const CGAL::Arr_vertex_index_map& index_map, typename Arrangement::Vertex_handle v) { return index_map[v]; } -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h index dbeab324b12..0534f232388 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h @@ -122,17 +122,17 @@ public: /// \name Constructors. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arrangement_2 () : Base () {} - /*! Copy constructor (from a base arrangement). */ + /*! constructs copy (from a base arrangement). */ Arrangement_2 (const Base& base) : Base (base) {} - /*! Constructor given a traits object. */ + /*! constructs given a traits object. */ Arrangement_2 (const Traits_2 *tr) : Base (tr) {} @@ -141,14 +141,14 @@ public: /// \name Assignment functions. //@{ - /*! Assignment operator (from a base arrangement). */ + /*! assigns (from a base arrangement). */ Self& operator= (const Base& base) { Base::assign (base); return (*this); } - /*! Assign an arrangement. */ + /*! assign an arrangement. */ void assign (const Base& base) { Base::assign (base); @@ -159,13 +159,13 @@ public: ///! \name Specialized access methods. //@{ - /*! Obtain the geometry-traits class. */ + /*! obtains the geometry-traits class. */ const Traits_2* traits() const { return (this->geometry_traits()); } - /*! Obtain the number of vertices at infinity. */ + /*! obtains the number of vertices at infinity. */ Size number_of_vertices_at_infinity() const { // The vertices at infinity are valid, but not concrete: @@ -173,7 +173,7 @@ public: this->topology_traits()->number_of_concrete_vertices()); } - /*! Obtain the unbounded face (non-const version). */ + /*! obtains the unbounded face (non-const version). */ Face_handle unbounded_face () { // The fictitious un_face contains all other valid faces in a single @@ -193,7 +193,7 @@ public: return (Face_handle (p_oc->face())); } - /*! Get the unbounded face (const version). */ + /*! obtains the unbounded face (const version). */ Face_const_handle unbounded_face () const { // The fictitious un_face contains all other valid faces in a single diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h index d044c21edf0..5ac5c4d6bd9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h @@ -108,10 +108,10 @@ protected: public: /// \name Construction. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arr_traits_basic_adaptor_2() : Base() {} - /*! Constructor from a base-traits class. */ + /*! Constructs from a base-traits class. */ Arr_traits_basic_adaptor_2(const Base& traits) : Base(traits) {} //@} @@ -132,7 +132,7 @@ public: */ class Compare_y_at_x_2 { public: - /*! Return the location of the given point with respect to the input curve. + /*! returns the location of the given point with respect to the input curve. * \param cv the curve. * \param p the point. * \pre p is in the x-range of cv. @@ -151,7 +151,7 @@ public: //! The base traits. const Self& m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -456,7 +456,7 @@ public: } }; - /*! Obtain an Compare_y_at_x_2 function object. */ + /*! obtains an Compare_y_at_x_2 function object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } @@ -465,8 +465,7 @@ public: */ class Compare_y_at_x_left_2 { public: - /*! - * Compare two curves immediately to the left of their intersection point. + /*! compares two curves immediately to the left of their intersection point. * \param xcv1 The first curve. * \param xcv2 The second curve. * \param p The query point. @@ -490,7 +489,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -502,8 +501,7 @@ public: //! Allow its functor obtaining function calling the private constructor. friend class Arr_traits_basic_adaptor_2; - /*! - * Implementation of the operator() in case the HasLeft tag is true. + /*! Implementation of the operator() in case the HasLeft tag is true. */ Comparison_result _compare_y_at_x_left_imp(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, @@ -514,8 +512,7 @@ public: return (base->compare_y_at_x_left_2_object()(xcv1, xcv2, p)); } - /*! - * Implementation of the operator() in case the HasLeft tag is false. + /*! Implementation of the operator() in case the HasLeft tag is false. */ Comparison_result _compare_y_at_x_left_imp(const X_monotone_curve_2& xcv1, @@ -584,7 +581,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_left_2 function object. */ + /*! obtains a Compare_y_at_x_left_2 function object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(this); } @@ -592,8 +589,7 @@ public: */ class Do_intersect_2 { public: - /*! - * Determine whether two x-monotone curves intersect. + /*! determines whether two x-monotone curves intersect. * \param xcv1 the first curve. * \param xcv2 the second curve. * \return true if xcv1 and xcv2 intersect false otherwise. @@ -612,7 +608,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param self The traits adaptor class. It must be passed, to handle * non stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -624,8 +620,7 @@ public: //! Allow its functor obtaining function calling the private constructor. friend class Arr_traits_basic_adaptor_2; - /*! - * Implementation of the operator() in case the HasDoIntersect tag is true. + /*! Implementation of the operator() in case the HasDoIntersect tag is true. */ bool _do_intersect_imp(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, @@ -635,8 +630,7 @@ public: return (base->do_intersect_2_object()(xcv1, xcv2)); } - /*! - * Implementation of the operator() in case the HasDoIntersect tag is false. + /*! Implementation of the operator() in case the HasDoIntersect tag is false. */ bool _do_intersect_imp(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, @@ -651,7 +645,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_left_2 function object. */ + /*! obtains a Compare_y_at_x_left_2 function object. */ Do_intersect_2 do_intersect_2_object() const { return Do_intersect_2(this); } //@} @@ -666,7 +660,7 @@ public: */ class Parameter_space_in_x_2 { public: - /*! Obtain the location of the given curve end in x. + /*! obtains the location of the given curve end in x. * \param xcv The curve. * \param ind ARR_MIN_END if we refer to xcv's minimal end, * ARR_MAX_END if we refer to its maximal end. @@ -681,7 +675,7 @@ public: return parameter_space_in_x(xcv, ind, Left_or_right_sides_category()); } - /*! Obtain the location of the given point end in x. + /*! obtains the location of the given point end in x. * \param p The point. * \return The location of the point end in x direction. */ @@ -697,7 +691,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -767,7 +761,7 @@ public: } }; - /*! Obtain an Parameter_space_in_x_2 function object. */ + /*! obtains an Parameter_space_in_x_2 function object. */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(this); } @@ -779,7 +773,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -792,7 +786,7 @@ public: friend class Arr_traits_basic_adaptor_2; public: - /*! Determines whether a point lies on the vertical identification curve + /*! determines whether a point lies on the vertical identification curve * \param p the point. * \return true if p lies on the vertical identification curve, and * false otherwise. @@ -800,7 +794,7 @@ public: bool operator()(const Point_2& p) const { return is_on_y_idn(p, Ioyi_2_point_tag()); } - /*! Determines whether an x-monotone curve coicide with the vertical + /*! determines whether an x-monotone curve coicide with the vertical * identification curve * \param xcv the point. * \return true if xcv coincides with an identification curve, @@ -823,7 +817,7 @@ public: { CGAL_error(); return false; } }; - /*! Obtain a Is_on_y_identification_2 function object. */ + /*! obtains a Is_on_y_identification_2 function object. */ Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(this); @@ -837,7 +831,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -849,8 +843,7 @@ public: //! Allow its functor obtaining function calling the private constructor. friend class Arr_traits_basic_adaptor_2; - /*! - * Implementation of the operator() in case the base should used. + /*! Implementation of the operator() in case the base should used. */ Comparison_result comp_y_near_bnd(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, @@ -858,8 +851,7 @@ public: Arr_use_traits_tag) const { return m_base->compare_y_near_boundary_2_object()(xcv1, xcv2, ce); } - /*! - * Implementation of the operator() in case the dummy should be used. + /*! Implementation of the operator() in case the dummy should be used. */ Comparison_result comp_y_near_bnd(const X_monotone_curve_2&, const X_monotone_curve_2&, @@ -867,8 +859,7 @@ public: { CGAL_error(); return EQUAL; } public: - /*! - * Compare the relative y-positions of two curve ends. + /*! compares the relative y-positions of two curve ends. * \param xcv1 The first curve. * \param xcv2 The second curve. * \param ce The relevant end of xcv1 and xcv2. @@ -888,7 +879,7 @@ public: } }; - /*! Obtain a Compare_y_near_boundary_2 functor. */ + /*! obtains a Compare_y_near_boundary_2 functor. */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(this); } @@ -900,7 +891,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -912,22 +903,20 @@ public: //! Allow its functor obtaining function calling the private constructor. friend class Arr_traits_basic_adaptor_2; - /*! - * Implementation of the operator() in case the base should be used. + /*! Implementation of the operator() in case the base should be used. */ Comparison_result comp_y_on_bnd(const Point_2& p1, const Point_2& p2, Arr_use_traits_tag) const { return m_base->compare_y_on_boundary_2_object()(p1, p2); } - /*! - * Implementation of the operator() in case the dummy should be used. + /*! Implementation of the operator() in case the dummy should be used. */ Comparison_result comp_y_on_bnd(const Point_2&, const Point_2&, Arr_use_dummy_tag) const { CGAL_error(); return SMALLER; } public: - /*! Compare the relative y-positions of two points. + /*! compares the relative y-positions of two points. * \param p1 The first point. * \param p2 The second point. * \pre Both points lie on vertical boundaries. @@ -944,7 +933,7 @@ public: } }; - /*! Obtain a Compare_y_on_boundary_2 function object. */ + /*! obtains a Compare_y_on_boundary_2 function object. */ Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(this); } @@ -955,7 +944,7 @@ public: */ class Parameter_space_in_y_2 { public: - /*! Obtain the location of the given curve end in y. + /*! obtains the location of the given curve end in y. * \param xcv The curve. * \param ind ARR_MIN_END if we refer to xcv's minimal end, * ARR_MAX_END if we refer to its maximal end. @@ -970,7 +959,7 @@ public: return parameter_space_in_y(xcv, ind, Bottom_or_top_sides_category()); } - /*! Obtain the location of the given point end in y. + /*! obtains the location of the given point end in y. * \param p The point. * \return The location of the point end in y direction. */ @@ -981,7 +970,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1054,7 +1043,7 @@ public: } }; - /*! Obtain an Parameter_space_in_y_2 function object. */ + /*! obtains an Parameter_space_in_y_2 function object. */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(this); } @@ -1066,7 +1055,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1079,7 +1068,7 @@ public: friend class Arr_traits_basic_adaptor_2; public: - /*! Determines whether a point lies on the horizontal identification curve + /*! determines whether a point lies on the horizontal identification curve * \param p the point. * \return true if p lies on the vertical identification curve, and * false otherwise. @@ -1087,7 +1076,7 @@ public: bool operator()(const Point_2& p) const { return is_on_idn(p, Ioxi_2_point_tag()); } - /*! Determines whether an x-monotone curve coicide with the horizontal + /*! determines whether an x-monotone curve coicide with the horizontal * identification curve * \param xcv the point. * \return true if xcv coincides with an identification curve, @@ -1110,7 +1099,7 @@ public: { CGAL_error(); return false; } }; - /*! Obtain a Is_on_x_identification_2 function object. */ + /*! obtains a Is_on_x_identification_2 function object. */ Is_on_x_identification_2 is_on_x_identification_2_object() const { return Is_on_x_identification_2(this); } @@ -1122,7 +1111,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1135,7 +1124,7 @@ public: friend class Arr_traits_basic_adaptor_2; public: - /*! Compare the x-coordinate of two given points projected onto the + /*! compares the x-coordinate of two given points projected onto the * horizontal boundaries * \param p1 the first point. * \param p2 the second point. @@ -1145,7 +1134,7 @@ public: return comp_x_on_bnd(p1, p2, Bottom_side_category(), Top_side_category()); } - /*! Compare the x-coordinate of a point and a curve-end projected onto the + /*! compares the x-coordinate of a point and a curve-end projected onto the * horizontal boundaries * \param pt the point. * \param xcv the curve @@ -1156,7 +1145,7 @@ public: Arr_curve_end ce) const { return comp_x_on_bnd(pt, xcv, ce, Bottom_or_top_sides_category()); } - /*! Compare the x-coordinates of two curve-ends projected onto the horizontal + /*! compares the x-coordinates of two curve-ends projected onto the horizontal * boundaries * \param xcv1 the curve * \param ce1 the curve-end @@ -1234,7 +1223,7 @@ public: { CGAL_error(); return SMALLER; } }; - /*! Obtain a Compare_x_on_boundary_2 function object. */ + /*! obtains a Compare_x_on_boundary_2 function object. */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(this); } @@ -1246,7 +1235,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1273,7 +1262,7 @@ public: { CGAL_error(); return EQUAL; } public: - /*! Compare the relative x-positions of two curve ends. + /*! compares the relative x-positions of two curve ends. * \param xcv1 The first curve. * \param xcv2 The second curve. * \param ce ARR_MIN_END if we refer to the curves' minimal end; @@ -1289,7 +1278,7 @@ public: { return _compare_curves(xcv1, xcv2, ce, Cmp_x_nb_2_curve_ends_tag()); } }; - /*! Obtain a Compare_x_near_boundary_2 function object. */ + /*! obtains a Compare_x_near_boundary_2 function object. */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(this); } @@ -1305,7 +1294,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1351,7 +1340,7 @@ public: { CGAL_error(); return EQUAL; } public: - /*! Compare the relative y-positions of two curve ends. + /*! compares the relative y-positions of two curve ends. * \param xcv1 The first curve. * \param ind1 ARR_MIN_END if we refer to xcv1's minimal end; * ARR_MAX_END if we refer to its maximal end. @@ -1394,7 +1383,7 @@ public: } }; - /*! Obtain a Compare_y_curve_ends_2 function object. */ + /*! obtains a Compare_y_curve_ends_2 function object. */ Compare_y_curve_ends_2 compare_y_curve_ends_2_object() const { return Compare_y_curve_ends_2(this); } @@ -1406,7 +1395,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1473,7 +1462,7 @@ public: } public: - /*! Compare the relative x-positions of a point and a curve end. + /*! compares the relative x-positions of a point and a curve end. * \param pt The point * \param xcv The curve. * \param ce ARR_MIN_END if we refer to xcv's minimal end; @@ -1508,7 +1497,7 @@ public: } }; - /*! Obtain a Compare_x_point_curve_end_2 function object. */ + /*! obtains a Compare_x_point_curve_end_2 function object. */ Compare_x_point_curve_end_2 compare_x_point_curve_end_2_object() const { return Compare_x_point_curve_end_2(this); } @@ -1520,7 +1509,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1671,7 +1660,7 @@ public: { CGAL_error(); return CGAL::EQUAL; } public: - /*! Compare the relative x-positions of two curve ends. + /*! compares the relative x-positions of two curve ends. * \param xcv1 The first curve. * \param ind1 ARR_MIN_END if we refer to xcv1's minimal end; * ARR_MAX_END if we refer to its maximal end. @@ -1714,7 +1703,7 @@ public: } }; - /*! Obtain a Compare_x_curve_ends_2 function object. */ + /*! obtains a Compare_x_curve_ends_2 function object. */ Compare_x_curve_ends_2 compare_x_curve_ends_2_object() const { return Compare_x_curve_ends_2(this); } @@ -1723,7 +1712,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1744,7 +1733,7 @@ public: } }; - /*! Obtain a Construct_vertex_at_curve_end_2 function object. */ + /*! obtains a Construct_vertex_at_curve_end_2 function object. */ Construct_vertex_at_curve_end_2 construct_vertex_at_curve_end_2_object() const { return Construct_vertex_at_curve_end_2(this); } @@ -1754,7 +1743,7 @@ public: //! The self traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param self The traits class itself. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1797,7 +1786,7 @@ public: { return _is_closed(xcv, ce); } }; - /*! Obtain a Is_closed_2 function object. */ + /*! obtains a Is_closed_2 function object. */ Is_closed_2 is_closed_2_object() const { return Is_closed_2(this); } @@ -1807,7 +1796,7 @@ public: //@{ class Is_in_x_range_2 { public: - /*! Check whether a given point is in the x-range of the given x-monotone + /*! checks whether a given point is in the x-range of the given x-monotone * curve. * \param xcv The x-monotone curve. * \param p The point. @@ -1820,7 +1809,7 @@ public: Bottom_or_top_sides_category()); } - /*! Check whether the x-ranges of the given x-monotone curves overlap. + /*! checks whether the x-ranges of the given x-monotone curves overlap. * \param xcv1 The first x-monotone curve. * \param xcv2 The second x-monotone curve. * \return (true) if there is an overlap in the x-ranges of the given @@ -1838,7 +1827,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -2153,14 +2142,13 @@ public: //@} }; - /*! Obtain an Is_in_x_range_2 function object. */ + /*! obtains an Is_in_x_range_2 function object. */ Is_in_x_range_2 is_in_x_range_2_object() const { return Is_in_x_range_2(this); } class Compare_y_position_2 { public: - /*! - * Obtain the relative of two x-monotone curves with overlapping x-ranges + /*! obtains the relative of two x-monotone curves with overlapping x-ranges * that are disjoint in their interiors. * \param xcv1 The first x-monotone curve. * \param xcv2 The second x-monotone curve. @@ -2331,7 +2319,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -2344,13 +2332,13 @@ public: friend class Arr_traits_basic_adaptor_2; }; - /*! Obtain a Compare_y_position_2 function object. */ + /*! obtains a Compare_y_position_2 function object. */ Compare_y_position_2 compare_y_position_2_object() const { return Compare_y_position_2(this); } class Is_between_cw_2 { public: - /*! Check whether the given query curve is encountered when rotating the + /*! checks whether the given query curve is encountered when rotating the * first curve in a clockwise direction around a given point until reaching * the second curve. * \param xcv The query curve. @@ -2436,7 +2424,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -3229,14 +3217,13 @@ public: } }; - /*! Obtain an Is_between_cw_2 function object. */ + /*! obtains an Is_between_cw_2 function object. */ Is_between_cw_2 is_between_cw_2_object() const { return Is_between_cw_2(this); } class Compare_cw_around_point_2 { public: - /*! - * Compare the two interior disjoint x-monotone curves in a clockwise + /*! compares the two interior disjoint x-monotone curves in a clockwise * order around their common endpoint. * \param xcv1 The first curve. * \param xcv1_to_right Is xcv1 directed from left to right. @@ -3285,7 +3272,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -3298,7 +3285,7 @@ public: friend class Arr_traits_basic_adaptor_2; }; - /*! Obtain a Compare_cw_around_point_2 function object. */ + /*! obtains a Compare_cw_around_point_2 function object. */ Compare_cw_around_point_2 compare_cw_around_point_2_object() const { return Compare_cw_around_point_2(this); } //@} @@ -3337,10 +3324,10 @@ public: /// \name Construction. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arr_traits_adaptor_2() : Base() {} - /*! Constructor from a base-traits class. */ + /*! constructs from a base-traits class. */ Arr_traits_adaptor_2(const Base_traits_2& traits) : Base(traits) {} //@} @@ -3374,7 +3361,7 @@ public: Intersection_result; public: - /*! Compare two points lexigoraphically: by x, then by y. + /*! compares two points lexigoraphically: by x, then by y. * \param p1 the first point. * \param p2 the second point. * \return SMALLER - x(p1) < x(p2); @@ -3391,7 +3378,7 @@ public: return base.compare_xy_2_object()(p1, p2); } - /*! Compare two x-monotone curves lexigoraphically. + /*! compares two x-monotone curves lexigoraphically. * Input: C1, C2, intersections = empty * compare(C1, C2, intersections) * Compare the left-most points of C1 and C2. @@ -3418,7 +3405,7 @@ public: //! The base traits. const Self& m_self; - /*! Constructor. + /*! constructs. * \param trait The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -3432,7 +3419,7 @@ public: /// Point-curve //@{ - /*! Compare a point and a curve end. + /*! compares a point and a curve end. * Dispatch calls to traits that handle open and close boundaries, resp. * The only reason for this dispatcher is the poor choice of different * names for the Traits functors that handle close and open boundaries: @@ -3447,7 +3434,7 @@ public: /// curve-curve //@{ - /*! Compare a curve end and a curve end. + /*! compares a curve end and a curve end. * Dispatch calls to traits that handle open and close boundaries, resp. * The only reason for this dispatcher is the poor choice of different * names for the Traits functors that handle close and open boundaries: @@ -3461,7 +3448,7 @@ public: { return m_self.compare_x_on_boundary_2_object()(c1, ce1, c2, ce2); } //@} - /*! Compare the max end of two x-monotone curves lexigoraphically. + /*! compares the max end of two x-monotone curves lexigoraphically. */ Comparison_result compare_max_end(const X_monotone_curve_2& c1, const X_monotone_curve_2& c2, @@ -3475,7 +3462,7 @@ public: return operator()(p1, p2); } - /*! Compare the max (right) end of two x-monotone curves lexigoraphically. + /*! compares the max (right) end of two x-monotone curves lexigoraphically. * \pre the curve overlap */ Comparison_result compare_max_end(const X_monotone_curve_2& c1, @@ -3562,7 +3549,7 @@ public: return res; } - /*! Split 2 given curves that overlap and have a common sub-curve on their + /*! splits 2 given curves that overlap and have a common sub-curve on their * right. Then compare the remaining portions of the curves, respectively. */ Comparison_result @@ -3602,7 +3589,7 @@ public: Are_all_sides_oblivious_category()); } - /*! Compare two x-monotone curves lexigoraphically. + /*! compares two x-monotone curves lexigoraphically. */ Comparison_result operator()(const X_monotone_curve_2& c1, const X_monotone_curve_2& c2, @@ -3623,7 +3610,7 @@ public: return compare_remainder(c1, c2, intersections); } - /*! Compare two x-monotone curves lexigoraphically. + /*! compares two x-monotone curves lexigoraphically. */ Comparison_result operator()(const X_monotone_curve_2& c1, const X_monotone_curve_2& c2, @@ -3765,14 +3752,13 @@ public: } }; - /*! Obtain a Compare_xy_2 function object */ + /*! obtains a Compare_xy_2 function object */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } /*! A functor that tests whether two x-monotone curves can be merged. */ class Are_mergeable_2 { public: - /*! - * Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given x-monotone curves. * \param xcv1 The first curve. * \param xcv2 The second curve. * \return (true) if the two curves are mergeable - if they are supported @@ -3789,7 +3775,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -3815,15 +3801,14 @@ public: } }; - /*! Obtain an Are_mergeable_2 function object. */ + /*! obtains an Are_mergeable_2 function object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(this); } /*! A functor that merges two x-monotone curves into one. */ class Merge_2 { public: - /*! - * Merge two given x-monotone curves into a single curve. + /*! merges two given x-monotone curves into a single curve. * \param xcv1 The first curve. * \param xcv2 The second curve. * \param c Output: The merged curve. @@ -3842,7 +3827,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -3870,11 +3855,11 @@ public: } }; - /*! Obtain a Merge_2 function object. */ + /*! obtains a Merge_2 function object. */ Merge_2 merge_2_object() const { return Merge_2(this); } //@} }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h index 190f550479c..fc919193021 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h @@ -88,10 +88,10 @@ protected: bool _end; public: - /*! Default constructor. */ + /*! constructs default. */ Face_neighbor_iterator() : _end (true) {} - /*! Constructor. + /*! constructs. * \param face The face (dual vertex). * \param out_edges Do we need the outgoing or the ingoing halfedges. * \param start Should we start traversing the edges. @@ -167,7 +167,7 @@ protected: } private: - /*! Check two iterators for equality. */ + /*! checks two iterators for equality. */ bool _equal(const Self& it) const { return (_out == it._out && _face == it._face && ((_end && it._end) || @@ -176,7 +176,7 @@ protected: _ccb_curr == it._ccb_curr))); } - /*! Dereference the current circulator. */ + /*! dereferences the current circulator. */ Edge_handle _dereference() const { if (_out) return (_ccb_curr); @@ -237,43 +237,43 @@ protected: public: typedef Face_neighbor_iterator Incident_edge_iterator; - /*! Default constructor. */ + /*! constructs default. */ Dual_arrangement_on_surface() : p_arr(nullptr) {} - /*! Constructor from an arrangement. */ + /*! Constructs from an arrangement. */ Dual_arrangement_on_surface(const Arrangement& arr) : p_arr(const_cast(&arr)) {} - /*! Obtain the primal arrangement (const version). */ + /*! obtains the primal arrangement (const version). */ const Arrangement* arrangement() const { return (p_arr); } - /*! Obtain the primal arrangement (non-const version). */ + /*! obtains the primal arrangement (non-const version). */ Arrangement* arrangement() { return (p_arr); } - /*! Obtain the number of vertices (face of the primal arrangement). */ + /*! obtains the number of vertices (face of the primal arrangement). */ Size number_of_vertices() const { return (p_arr->number_of_faces()); } - /*! Obtain the begin iterator of the vertices of the dual arrangement + /*! obtains the begin iterator of the vertices of the dual arrangement * (faces of the primal arrangement). */ Vertex_iterator vertices_begin() const { return (p_arr->faces_begin()); } - /*! Obtain the pass-the-end iterator of the vertices of the dual arrangement + /*! obtains the pass-the-end iterator of the vertices of the dual arrangement * (faces of the primal arrangement). */ Vertex_iterator vertices_end() const { return (p_arr->faces_end()); } - /*! Obtain the number of edges. */ + /*! obtains the number of edges. */ Size number_of_edges () const { return (p_arr->number_of_halfedges()); } - /*! Obtain the begin iterator of the edges of the dual arrangement. */ + /*! obtains the begin iterator of the edges of the dual arrangement. */ Edge_iterator edges_begin() const { return (p_arr->halfedges_begin()); } - /*! Obtain the pass-the-end iterator of the edges of the dual arrangement. */ + /*! obtains the pass-the-end iterator of the edges of the dual arrangement. */ Edge_iterator edges_end() const { return (p_arr->halfedges_end()); } - /*! Obtain the dual vertex-degree (number of edges forming the face boundary). + /*! obtains the dual vertex-degree (number of edges forming the face boundary). */ Size degree(Vertex_handle v) const { @@ -289,14 +289,14 @@ public: return (deg); } - /*! Traverse the outgoing edges of a given vertex. */ + /*! traverses the outgoing edges of a given vertex. */ Incident_edge_iterator out_edges_begin(Vertex_handle v) const { return (Incident_edge_iterator (v, true, true)); } Incident_edge_iterator out_edges_end(Vertex_handle v) const { return (Incident_edge_iterator (v, true, false)); } - /*! Traverse the ingoing edges of a given vertex. */ + /*! traverses the ingoing edges of a given vertex. */ Incident_edge_iterator in_edges_begin(Vertex_handle v) const { return (Incident_edge_iterator (v, false, true)); } @@ -388,7 +388,7 @@ public: // Functions required by the IncidenceGraph concept: // ------------------------------------------------- -/*! Obtain the out-degree of a vertex in a given dual arrangement. +/*! obtains the out-degree of a vertex in a given dual arrangement. * \param v The vertex. * \param darr The dual arrangement. * \param Number of halfedges around the boundary of the primal face. @@ -400,7 +400,7 @@ out_degree(typename boost::graph_traits > >::vertex_descriptor v, const Dual >& darr) \ { return darr.degree(v); } -/*! Return a range of the out-edges of a vertex given by its descriptor and the +/*! returns a range of the out-edges of a vertex given by its descriptor and the * dual arrangement it belongs to. * \param v The vertex. * \param darr The dual arrangement. @@ -414,7 +414,7 @@ out_edges(typename boost::graph_traits > >::vertex_descriptor v,\ const Dual >& darr) \ { return std::make_pair(darr.out_edges_begin(v), darr.out_edges_end(v)); } \ -/*! Obtain the source vertex of a dual arrangement edge. +/*! obtains the source vertex of a dual arrangement edge. * \param e The edge. * \param darr The dual arrangement. * \return The incident face of e in the primal arrangement. @@ -426,7 +426,7 @@ source(typename boost::graph_traits > >::edge_descriptor e, \ const Dual >& /* darr */) \ { return e->face(); } -/*! Obtain the target vertex of a dual arrangement edge. +/*! obtains the target vertex of a dual arrangement edge. * \param e The edge. * \param darr The dual arrangement. * \return The incident face of the twin of e in the primal arrangement. @@ -441,7 +441,7 @@ target(typename boost::graph_traits > >::edge_descriptor e, \ // Functions required by the BidirectionalGraph concept: // ----------------------------------------------------- -/*! Obtain the in-degree of a vertex in a given dual arrangement. +/*! obtains the in-degree of a vertex in a given dual arrangement. * \param v The vertex. * \param darr The dual arrangement. * \param Number of halfedges around the boundary of the primal face. @@ -453,7 +453,7 @@ in_degree(typename boost::graph_traits > >::vertex_descriptor v,\ const Dual >& darr) \ { return darr.degree(v); } -/*! Return a range of the in-edges of a vertex given by its descriptor and the +/*! returns a range of the in-edges of a vertex given by its descriptor and the * dual arrangement it belongs to. * \param v The vertex. * \param darr The dual arrangement. @@ -467,7 +467,7 @@ in_edges(typename boost::graph_traits > >::vertex_descriptor v,\ const Dual >& darr) \ { return std::make_pair(darr.in_edges_begin(v), darr.in_edges_end(v)); } -/*! Obtain the degree of a vertex in a given dual arrangement. +/*! obtains the degree of a vertex in a given dual arrangement. * \param v The vertex. * \param darr The dual arrangement. * \param Number of ingoing and outgoing halfedges incident to v. @@ -482,7 +482,7 @@ degree(typename boost::graph_traits > >::vertex_descriptor v, \ // Functions required by the VertexListGraph concept: // -------------------------------------------------- -/*! Obtain the number of vertices in the given dual arrangement. +/*! obtains the number of vertices in the given dual arrangement. * \param darr The dual arrangement. * \return Number of faces in the primal arrangement. */ @@ -492,7 +492,7 @@ typename boost::graph_traits > >::vertices_size_type \ num_vertices(const Dual >& darr) \ { return darr.number_of_vertices(); } -/*! Obtain the range of vertices of the given dual arrangement. +/*! obtains the range of vertices of the given dual arrangement. * \param darr The dual arrangement. * \return A pair of vertex iterators. */ @@ -506,7 +506,7 @@ vertices(const Dual >& darr) \ // Functions required by the EdgeListGraph concept: // ------------------------------------------------ -/*! Obtain the number of edges in the given dual arrangement. +/*! obtains the number of edges in the given dual arrangement. * \param darr The dual arrangement. * \return Number of halfedges in the primal arrangement. */ @@ -516,7 +516,7 @@ typename boost::graph_traits > >::edges_size_type \ num_edges(const Dual >& darr) \ { return darr.number_of_edges(); } -/*! Obtain the range of edges of the given dual arrangement. +/*! obtains the range of edges of the given dual arrangement. * \param darr The dual arrangement. * \return A pair of edge iterators. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h index ddf9039744a..4a8d9dff6fd 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h @@ -575,13 +575,13 @@ public: typedef DVertex Base; public: - /*! Default constructor. */ + /*! constructs default. */ Vertex() {} /*! Check whether the vertex lies on an open boundary. */ bool is_at_open_boundary() const { return (Base::has_null_point()); } - /*! Get the vertex degree (number of incident edges). */ + /*! obtains the vertex degree (number of incident edges). */ Size degree() const { if (this->is_isolated()) @@ -601,8 +601,7 @@ public: return (n); } - /*! - * Get the incident halfedges (non-const version). + /*! obtains the incident halfedges (non-const version). * \pre The vertex is not isolated. */ Halfedge_around_vertex_circulator incident_halfedges() @@ -612,8 +611,7 @@ public: (DHalfedge_iter(Base::halfedge())); } - /*! - * Get the incident halfedges (const version). + /*! obtains the incident halfedges (const version). * \pre The vertex is not isolated. */ Halfedge_around_vertex_const_circulator incident_halfedges() const @@ -623,8 +621,7 @@ public: (DHalfedge_const_iter(Base::halfedge())); } - /*! - * Get the face that contains the vertex (non-const version). + /*! obtains the face that contains the vertex (non-const version). * \pre The vertex is isolated. */ Face_handle face() @@ -633,8 +630,7 @@ public: return (DFace_iter(Base::isolated_vertex()->face())); } - /*! - * Get the face that contains the vertex (const version). + /*! obtains the face that contains the vertex (const version). * \pre The vertex is isolated. */ Face_const_handle face() const @@ -664,30 +660,30 @@ public: typedef DHalfedge Base; public: - /*! Default constructor. */ + /*! constructs default. */ Halfedge() {} - /*! Check whether the halfedge is fictitious. */ + /*! checks whether the halfedge is fictitious. */ bool is_fictitious() const { return (Base::has_null_curve()); } - /*! Get the source vertex (non-const version). */ + /*! obtains the source vertex (non-const version). */ Vertex_handle source() { return (DVertex_iter(Base::opposite()->vertex())); } - /*! Get the source vertex (const version). */ + /*! obtains the source vertex (const version). */ Vertex_const_handle source() const { return (DVertex_const_iter(Base::opposite()->vertex())); } - /*! Get the target vertex (non-const version). */ + /*! obtains the target vertex (non-const version). */ Vertex_handle target() { return (DVertex_iter(Base::vertex())); } - /*! Get the target vertex (const version). */ + /*! obtains the target vertex (const version). */ Vertex_const_handle target() const { return (DVertex_const_iter(Base::vertex())); } - /*! Get the incident face (non-const version). */ + /*! obtains the incident face (non-const version). */ Face_handle face() { return (! Base::is_on_inner_ccb()) ? @@ -695,7 +691,7 @@ public: DFace_iter(Base::inner_ccb()->face()); } - /*! Get the incident face (const version). */ + /*! obtains the incident face (const version). */ Face_const_handle face() const { return (! Base::is_on_inner_ccb()) ? @@ -703,35 +699,35 @@ public: DFace_const_iter(Base::inner_ccb()->face()); } - /*! Get the twin halfedge (non-const version). */ + /*! obtains the twin halfedge (non-const version). */ Halfedge_handle twin() { return (DHalfedge_iter(Base::opposite())); } - /*! Get the twin halfedge (const version). */ + /*! obtains the twin halfedge (const version). */ Halfedge_const_handle twin() const { return (DHalfedge_const_iter(Base::opposite())); } - /*! Get the previous halfedge in the chain (non-const version). */ + /*! obtains the previous halfedge in the chain (non-const version). */ Halfedge_handle prev() { return (DHalfedge_iter(Base::prev())); } - /*! Get the previous halfedge in the chain (const version). */ + /*! obtains the previous halfedge in the chain (const version). */ Halfedge_const_handle prev() const { return (DHalfedge_const_iter(Base::prev())); } - /*! Get the next halfedge in the chain (non-const version). */ + /*! obtains the next halfedge in the chain (non-const version). */ Halfedge_handle next() { return (DHalfedge_iter(Base::next())); } - /*! Get the next halfedge in the chain (const version). */ + /*! obtains the next halfedge in the chain (const version). */ Halfedge_const_handle next() const { return (DHalfedge_const_iter(Base::next())); } - /*! Get the connected component of the halfedge (non-const version). */ + /*! obtains the connected component of the halfedge (non-const version). */ Ccb_halfedge_circulator ccb() { return Ccb_halfedge_circulator(DHalfedge_iter(this)); } - /*! Get the connected component of the halfedge (const version). */ + /*! obtains the connected component of the halfedge (const version). */ Ccb_halfedge_const_circulator ccb() const { return Ccb_halfedge_const_circulator(DHalfedge_const_iter(this)); } @@ -757,8 +753,7 @@ public: void set_inner_ccb(DInner_ccb* ); }; - /*! - * \class The arrangement face class. + /*! \class The arrangement face class. */ class Face : public DFace { typedef DFace Base; @@ -767,57 +762,57 @@ public: /*! Default constructor. */ Face() {} - /*! Obtain an iterator for the outer CCBs of the face (non-const version). */ + /*! obtains an iterator for the outer CCBs of the face (non-const version). */ Outer_ccb_iterator outer_ccbs_begin() { return (DOuter_ccb_iter(Base::outer_ccbs_begin())); } - /*! Obtain an iterator for the outer CCBs the face (const version). */ + /*! obtains an iterator for the outer CCBs the face (const version). */ Outer_ccb_const_iterator outer_ccbs_begin() const { return (DOuter_ccb_const_iter(Base::outer_ccbs_begin())); } - /*! Obtain a past-the-end iterator for the outer CCBs (non-const version). */ + /*! obtains a past-the-end iterator for the outer CCBs (non-const version). */ Outer_ccb_iterator outer_ccbs_end() { return (DOuter_ccb_iter(Base::outer_ccbs_end())); } - /*! Obtain a past-the-end iterator for the outer CCBs (const version). */ + /*! obtains a past-the-end iterator for the outer CCBs (const version). */ Outer_ccb_const_iterator outer_ccbs_end() const { return (DOuter_ccb_const_iter(Base::outer_ccbs_end())); } - /*! Obtain an iterator for the inner CCBs of the face (non-const version). */ + /*! obtains an iterator for the inner CCBs of the face (non-const version). */ Inner_ccb_iterator inner_ccbs_begin() { return (DInner_ccb_iter(Base::inner_ccbs_begin())); } - /*! Obtain an iterator for the inner CCBs the face (const version). */ + /*! obtains an iterator for the inner CCBs the face (const version). */ Inner_ccb_const_iterator inner_ccbs_begin() const { return (DInner_ccb_const_iter(Base::inner_ccbs_begin())); } - /*! Obtain a past-the-end iterator for the inner CCBs (non-const version). */ + /*! obtains a past-the-end iterator for the inner CCBs (non-const version). */ Inner_ccb_iterator inner_ccbs_end() { return (DInner_ccb_iter(Base::inner_ccbs_end())); } - /*! Obtain a past-the-end iterator for the inner CCBs (const version). */ + /*! obtains a past-the-end iterator for the inner CCBs (const version). */ Inner_ccb_const_iterator inner_ccbs_end() const { return (DInner_ccb_const_iter(Base::inner_ccbs_end())); } - /*! Obtain an iterator for the isolated_vertices inside the face + /*! obtains an iterator for the isolated_vertices inside the face * (non-const version). */ Isolated_vertex_iterator isolated_vertices_begin() { return (DIso_vertex_iter(Base::isolated_vertices_begin())); } - /*! Obtain an iterator for the isolated_vertices inside the face + /*! obtains an iterator for the isolated_vertices inside the face * (const version). */ Isolated_vertex_const_iterator isolated_vertices_begin() const { return (DIso_vertex_const_iter(Base::isolated_vertices_begin())); } - /*! Obtain a past-the-end iterator for the isolated_vertices + /*! obtains a past-the-end iterator for the isolated_vertices * (non-const version). */ Isolated_vertex_iterator isolated_vertices_end() { return (DIso_vertex_iter(Base::isolated_vertices_end())); } - /*! Obtain a past-the-end iterator for the isolated_vertices + /*! obtains a past-the-end iterator for the isolated_vertices * (const version). */ Isolated_vertex_const_iterator isolated_vertices_end() const @@ -826,14 +821,12 @@ public: /// \name These functions are kept for Arrangement_2 compatibility: //@{ - /*! - * Check whether the face has an outer CCB. + /*! checks whether the face has an outer CCB. */ bool has_outer_ccb() const { return (Base::number_of_outer_ccbs() > 0); } - /*! - * Obtain a circulator for the outer boundary (non-const version). + /*! obtains a circulator for the outer boundary (non-const version). * \pre The face has a single outer CCB. */ Ccb_halfedge_circulator outer_ccb() @@ -845,8 +838,7 @@ public: return Ccb_halfedge_circulator(DHalfedge_iter(he)); } - /*! - * Obtain a circulator for the outer boundary (const version). + /*! obtain a circulator for the outer boundary (const version). * \pre The face has a single outer CCB. */ Ccb_halfedge_const_circulator outer_ccb() const @@ -858,23 +850,23 @@ public: return Ccb_halfedge_const_circulator(DHalfedge_const_iter(he)); } - /*! Obtain the number of holes (inner CCBs) inside the face. */ + /*! obtains the number of holes (inner CCBs) inside the face. */ Size number_of_holes() const { return (Base::number_of_inner_ccbs()); } - /*! Obtain an iterator for the holes inside the face (non-const version). */ + /*! obtains an iterator for the holes inside the face (non-const version). */ Inner_ccb_iterator holes_begin() { return (this->inner_ccbs_begin()); } - /*! Obtain an iterator for the holes inside the face (const version). */ + /*! obtains an iterator for the holes inside the face (const version). */ Inner_ccb_const_iterator holes_begin() const { return (this->inner_ccbs_begin()); } - /*! Obtain a past-the-end iterator for the holes (non-const version). */ + /*! obtains a past-the-end iterator for the holes (non-const version). */ Inner_ccb_iterator holes_end() { return (this->inner_ccbs_end()); } - /*! Obtain a past-the-end iterator for the holes (const version). */ + /*! obtains a past-the-end iterator for the holes (const version). */ Inner_ccb_const_iterator holes_end() const { return (this->inner_ccbs_end()); } //@} @@ -922,55 +914,55 @@ public: /// \name Constructors. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arrangement_on_surface_2(); - /*! Copy constructor. */ + /*! constructs copy. */ Arrangement_on_surface_2(const Self & arr); - /*! Constructor given a traits object. */ + /*! constructs given a traits object. */ Arrangement_on_surface_2(const Geometry_traits_2* geom_traits); //@} /// \name Assignment functions. //@{ - /*! Assignment operator. */ + /*! assigns. */ Self& operator=(const Self& arr); - /*! Assign an arrangement. */ + /*! assigns an arrangement. */ void assign(const Self& arr); //@} /// \name Destruction functions. //@{ - /*! Destructor. */ + /*! destructs. */ virtual ~Arrangement_on_surface_2(); - /*! Change mode. */ + /*! changes mode. */ void set_sweep_mode (bool mode) { m_sweep_mode = mode; } - /*! Clear the arrangement. */ + /*! clears the arrangement. */ virtual void clear(); //@} /// \name Access the traits-class objects. //@{ - /*! Access the geometry-traits object (const version). */ + /*! accesses the geometry-traits object (const version). */ inline const Traits_adaptor_2* traits_adaptor() const { return (m_geom_traits); } - /*! Access the geometry-traits object (const version). */ + /*! accesses the geometry-traits object (const version). */ inline const Geometry_traits_2* geometry_traits() const { return (m_geom_traits); } - /*! Access the topology-traits object (non-const version). */ + /*! accesses the topology-traits object (non-const version). */ inline Topology_traits* topology_traits() { return (&m_topol_traits); } - /*! Access the topology-traits object (const version). */ + /*! accesses the topology-traits object (const version). */ inline const Topology_traits* topology_traits() const { return (&m_topol_traits); } //@} @@ -978,38 +970,37 @@ public: /// \name Access the arrangement dimensions. //@{ - /*! Check whether the arrangement is empty. */ + /*! checks whether the arrangement is empty. */ bool is_empty() const { return (m_topol_traits.is_empty_dcel()); } - /*! - * Check whether the arrangement is valid. In particular, check the + /*! checks whether the arrangement is valid. In particular, check the * validity of each vertex, halfedge and face, their incidence relations * and the geometric properties of the arrangement. */ bool is_valid() const; - /*! Obtain the number of arrangement vertices. */ + /*! obtains the number of arrangement vertices. */ Size number_of_vertices() const { return (m_topol_traits.number_of_concrete_vertices()); } - /*! Obtain the number of isolated arrangement vertices. */ + /*! obtains the number of isolated arrangement vertices. */ Size number_of_isolated_vertices() const { return (_dcel().size_of_isolated_vertices()); } - /*! Obtain the number of arrangement halfedges (the result is always even). */ + /*! obtains the number of arrangement halfedges (the result is always even). */ Size number_of_halfedges() const { return (m_topol_traits.number_of_valid_halfedges()); } - /*! Obtain the number of arrangement edges. */ + /*! obtains the number of arrangement edges. */ Size number_of_edges() const { return (m_topol_traits.number_of_valid_halfedges() / 2); } - /*! Obtain the number of arrangement faces. */ + /*! obtains the number of arrangement faces. */ Size number_of_faces() const { return (m_topol_traits.number_of_valid_faces()); } - /*! Obtain the number of unbounded faces in the arrangement. */ + /*! obtains the number of unbounded faces in the arrangement. */ Size number_of_unbounded_faces() const { Unbounded_face_const_iterator iter = unbounded_faces_begin(); @@ -1028,30 +1019,29 @@ public: /// \name Traversal functions for the arrangement vertices. //@{ - /*! Obtain an iterator for the first vertex in the arrangement. */ + /*! obtains an iterator for the first vertex in the arrangement. */ Vertex_iterator vertices_begin() { return (Vertex_iterator(_dcel().vertices_begin(), _dcel().vertices_end(), _Is_concrete_vertex(&m_topol_traits))); } - /*! Obtain a past-the-end iterator for the arrangement vertices. */ + /*! obtains a past-the-end iterator for the arrangement vertices. */ Vertex_iterator vertices_end() { return (Vertex_iterator(_dcel().vertices_end(), _dcel().vertices_end(), _Is_concrete_vertex(&m_topol_traits))); } - /*! - returns a range over handles of the arrangement vertices. - */ + /*! returns a range over handles of the arrangement vertices. + */ Iterator_range > vertex_handles() { return make_prevent_deref_range(vertices_begin(), vertices_end()); } - /*! Obtain a const iterator for the first vertex in the arrangement. */ + /*! obtains a const iterator for the first vertex in the arrangement. */ Vertex_const_iterator vertices_begin() const { return (Vertex_const_iterator(_dcel().vertices_begin(), @@ -1059,7 +1049,7 @@ public: _Is_concrete_vertex(&m_topol_traits))); } - /*! Obtain a past-the-end const iterator for the arrangement vertices. */ + /*! obtains a past-the-end const iterator for the arrangement vertices. */ Vertex_const_iterator vertices_end() const { return (Vertex_const_iterator(_dcel().vertices_end(), @@ -1067,9 +1057,8 @@ public: _Is_concrete_vertex(&m_topol_traits))); } - /*! - returns a const range (model of `ConstRange`) over handles of the arrangement vertices. - */ + /*! returns a const range (model of `ConstRange`) over handles of the arrangement vertices. + */ Iterator_range > vertex_handles() const { @@ -1081,7 +1070,7 @@ public: /// \name Traversal functions for the arrangement halfedges. //@{ - /*! Obtain an iterator for the first halfedge in the arrangement. */ + /*! obtains an iterator for the first halfedge in the arrangement. */ Halfedge_iterator halfedges_begin() { return (Halfedge_iterator(_dcel().halfedges_begin(), @@ -1089,7 +1078,7 @@ public: _Is_valid_halfedge(&m_topol_traits))); } - /*! Obtain a past-the-end iterator for the arrangement halfedges. */ + /*! obtains a past-the-end iterator for the arrangement halfedges. */ Halfedge_iterator halfedges_end() { return (Halfedge_iterator(_dcel().halfedges_end(), @@ -1097,16 +1086,15 @@ public: _Is_valid_halfedge(&m_topol_traits))); } - /*! - returns a range over handles of the arrangement halfedges. - */ + /*! returns a range over handles of the arrangement halfedges. + */ Iterator_range > halfedge_handles() { return make_prevent_deref_range(halfedges_begin(), halfedges_end()); } - /*! Obtain a const iterator for the first halfedge in the arrangement. */ + /*! obtains a const iterator for the first halfedge in the arrangement. */ Halfedge_const_iterator halfedges_begin() const { return (Halfedge_const_iterator(_dcel().halfedges_begin(), @@ -1114,15 +1102,14 @@ public: _Is_valid_halfedge(&m_topol_traits))); } - /*! Obtain a past-the-end const iterator for the arrangement halfedges. */ + /*! obtains a past-the-end const iterator for the arrangement halfedges. */ Halfedge_const_iterator halfedges_end() const { return (Halfedge_const_iterator(_dcel().halfedges_end(), _dcel().halfedges_end(), _Is_valid_halfedge(&m_topol_traits))); } - /*! - returns a const range (model of `ConstRange`) over handles of the arrangement halfedges. + /*! returns a const range (model of `ConstRange`) over handles of the arrangement halfedges. */ Iterator_range > halfedge_handles() const @@ -1134,22 +1121,21 @@ public: /// \name Traversal functions for the arrangement edges. //@{ - /*! Obtain an iterator for the first edge in the arrangement. */ + /*! obtains an iterator for the first edge in the arrangement. */ Edge_iterator edges_begin() { return (Edge_iterator(_dcel().edges_begin(), _dcel().edges_end(), _Is_valid_halfedge(&m_topol_traits))); } - /*! Obtain a past-the-end iterator for the arrangement edges. */ + /*! obtains a past-the-end iterator for the arrangement edges. */ Edge_iterator edges_end() { return (Edge_iterator(_dcel().edges_end(), _dcel().edges_end(), _Is_valid_halfedge(&m_topol_traits))); } - /*! - returns a range over handles of the arrangement edges. + /*! returns a range over handles of the arrangement edges. */ Iterator_range > edge_handles() @@ -1157,23 +1143,22 @@ public: return make_prevent_deref_range(edges_begin(), edges_end()); } - /*! Obtain a const iterator for the first edge in the arrangement. */ + /*! obtains a const iterator for the first edge in the arrangement. */ Edge_const_iterator edges_begin() const { return (Edge_const_iterator(_dcel().edges_begin(), _dcel().edges_end(), _Is_valid_halfedge(&m_topol_traits))); } - /*! Obtain a past-the-end const iterator for the arrangement edges. */ + /*! obtains a past-the-end const iterator for the arrangement edges. */ Edge_const_iterator edges_end() const { return (Edge_const_iterator(_dcel().edges_end(), _dcel().edges_end(), _Is_valid_halfedge(&m_topol_traits))); } - /*! - returns a const range (model of `ConstRange`) over handles of the arrangement edges. - */ + /*! returns a const range (model of `ConstRange`) over handles of the arrangement edges. + */ Iterator_range > edge_handles() const { @@ -1184,45 +1169,44 @@ public: /// \name Traversal functions for the arrangement faces. //@{ - /*! Obtain an iterator for the first face in the arrangement. */ + /*! obtains an iterator for the first face in the arrangement. */ Face_iterator faces_begin() { return (Face_iterator(_dcel().faces_begin(), _dcel().faces_end(), _Is_valid_face(&m_topol_traits))); } - /*! Obtain a past-the-end iterator for the arrangement faces. */ + /*! obtains a past-the-end iterator for the arrangement faces. */ Face_iterator faces_end() { return (Face_iterator(_dcel().faces_end(), _dcel().faces_end(), _Is_valid_face(&m_topol_traits))); } - /*! - returns a range over handles of the arrangement faces. - */ + /*! returns a range over handles of the arrangement faces. + */ Iterator_range > face_handles() { return make_prevent_deref_range(faces_begin(), faces_end()); } - /*! Obtain a const iterator for the first face in the arrangement. */ + + /*! obtains a const iterator for the first face in the arrangement. */ Face_const_iterator faces_begin() const { return (Face_const_iterator(_dcel().faces_begin(), _dcel().faces_end(), _Is_valid_face(&m_topol_traits))); } - /*! Obtain a past-the-end const iterator for the arrangement faces. */ + /*! obtains a past-the-end const iterator for the arrangement faces. */ Face_const_iterator faces_end() const { return (Face_const_iterator(_dcel().faces_end(), _dcel().faces_end(), _Is_valid_face(&m_topol_traits))); } - /*! - returns a const range (model of `ConstRange`) over handles of the arrangement faces. - */ + /*! returns a const range (model of `ConstRange`) over handles of the arrangement faces. + */ Iterator_range > face_handles() const { @@ -1230,9 +1214,9 @@ public: } //! reference_face (const version). - /*! The function returns a reference face of the arrangement. - * All reference faces of arrangements of the same type have a common - * point. + /*! returns a reference face of the arrangement. All reference faces of + * arrangements of the same type have a common point. + * * \return A const handle to the reference face. */ Face_const_handle reference_face() const @@ -1241,10 +1225,10 @@ public: } //! reference_face (non-const version). - /*! The function returns a reference face of the arrangement. - All reference faces of arrangements of the same type have a common - point. - \return A handle to the reference face. + /*! returns a reference face of the arrangement. All reference faces of + * arrangements of the same type have a common point. + * + * \return A handle to the reference face. */ Face_handle reference_face() { return _handle_for(this->topology_traits()->reference_face()); } @@ -1254,21 +1238,21 @@ public: /// \name Traversal functions for the unbounded faces of the arrangement. //@{ - /*! Obtain an iterator for the first unbounded face in the arrangement. */ + /*! obtains an iterator for the first unbounded face in the arrangement. */ Unbounded_face_iterator unbounded_faces_begin() { return Unbounded_face_iterator(_dcel().faces_begin(), _dcel().faces_end(), _Is_unbounded_face(&m_topol_traits)); } - /*! Obtain a past-the-end iterator for the unbounded arrangement faces. */ + /*! obtains a past-the-end iterator for the unbounded arrangement faces. */ Unbounded_face_iterator unbounded_faces_end() { return Unbounded_face_iterator(_dcel().faces_end(), _dcel().faces_end(), _Is_unbounded_face(&m_topol_traits)); } - /*! Obtain a const iterator for the first unbounded face in the arrangement. */ + /*! obtains a const iterator for the first unbounded face in the arrangement. */ Unbounded_face_const_iterator unbounded_faces_begin() const { return Unbounded_face_const_iterator(_dcel().faces_begin(), @@ -1276,7 +1260,7 @@ public: _Is_unbounded_face(&m_topol_traits)); } - /*! Obtain a past-the-end const iterator for the unbounded arrangement faces. */ + /*! obtains a past-the-end const iterator for the unbounded arrangement faces. */ Unbounded_face_const_iterator unbounded_faces_end() const { return Unbounded_face_const_iterator(_dcel().faces_end(), @@ -1284,7 +1268,7 @@ public: _Is_unbounded_face(&m_topol_traits)); } - /*! Obtain the fictitious face (non-const version). */ + /*! obtains the fictitious face (non-const version). */ Face_handle fictitious_face() { // The fictitious contains all other faces in a single hole inside it. @@ -1292,8 +1276,7 @@ public: Face_handle(const_cast(this->topology_traits()->initial_face())); } - /*! - * Obtain the unbounded face (const version). + /*! obtains the unbounded face (const version). * The fictitious contains all other faces in a single hole inside it. */ Face_const_handle fictitious_face() const @@ -1324,8 +1307,7 @@ public: /// \name Specilaized insertion functions. //@{ - /*! - * Insert a point that forms an isolated vertex in the interior of a given + /*! inserts a point that forms an isolated vertex in the interior of a given * face. * \param p The given point. * \param f The face into which we insert the new isolated vertex. @@ -1333,8 +1315,7 @@ public: */ Vertex_handle insert_in_face_interior(const Point_2& p, Face_handle f); - /*! - * Insert an x-monotone curve into the arrangement as a new hole (inner + /*! inserts an x-monotone curve into the arrangement as a new hole (inner * component) inside the given face. * \param cv The given x-monotone curve. * \param f The face into which we insert the new hole. @@ -1344,8 +1325,7 @@ public: Halfedge_handle insert_in_face_interior(const X_monotone_curve_2& cv, Face_handle f); - /*! - * Insert an x-monotone curve into the arrangement, such that its left + /*! inserts an x-monotone curve into the arrangement, such that its left * endpoint corresponds to a given arrangement vertex. * \param cv The given x-monotone curve. * \param v The given vertex. @@ -1358,8 +1338,7 @@ public: Vertex_handle v, Face_handle f = Face_handle()); - /*! - * Insert an x-monotone curve into the arrangement, such that its left + /*! inserts an x-monotone curve into the arrangement, such that its left * endpoints corresponds to a given arrangement vertex, given the exact * place for the curve in the circular list around this vertex. * \param cv The given x-monotone curve. @@ -1372,8 +1351,7 @@ public: Halfedge_handle insert_from_left_vertex(const X_monotone_curve_2& cv, Halfedge_handle prev); - /*! - * Insert an x-monotone curve into the arrangement, such that its right + /*! inserts an x-monotone curve into the arrangement, such that its right * endpoint corresponds to a given arrangement vertex. * \param cv The given x-monotone curve. * \param v The given vertex. @@ -1386,8 +1364,7 @@ public: Vertex_handle v, Face_handle f = Face_handle()); - /*! - * Insert an x-monotone curve into the arrangement, such that its right + /*! inserts an x-monotone curve into the arrangement, such that its right * endpoints corresponds to a given arrangement vertex, given the exact * place for the curve in the circular list around this vertex. @@ -1401,8 +1378,7 @@ public: Halfedge_handle insert_from_right_vertex(const X_monotone_curve_2& cv, Halfedge_handle prev); - /*! - * Insert an x-monotone curve into the arrangement, such that both its + /*! inserts an x-monotone curve into the arrangement, such that both its * endpoints correspond to given arrangement vertices. * \param cv The given x-monotone curve. * \param v1 The first vertex. @@ -1418,8 +1394,7 @@ public: Vertex_handle v2, Face_handle f = Face_handle()); - /*! - * Insert an x-monotone curve into the arrangement, such that both its + /*! inserts an x-monotone curve into the arrangement, such that both its * endpoints correspond to given arrangement vertices, given the exact * place for the curve in one of the circular lists around a vertex. * \param cv The given x-monotone curve. @@ -1433,8 +1408,7 @@ public: Halfedge_handle prev1, Vertex_handle v2); - /*! - * Insert an x-monotone curve into the arrangement, such that both its + /*! inserts an x-monotone curve into the arrangement, such that both its * endpoints correspond to given arrangement vertices, given the exact * place for the curve in both circular lists around these two vertices. * \param cv the given curve. @@ -1453,8 +1427,7 @@ public: /// \name Vertex manipulation functions. //@{ - /*! - * Replace the point associated with the given vertex. + /*! replaces the point associated with the given vertex. * \param v The vertex to modify. * \param p The point that should be associated with the edge. * \pre p is geometrically equivalent to the current point @@ -1463,8 +1436,7 @@ public: */ Vertex_handle modify_vertex(Vertex_handle v, const Point_2& p); - /*! - * Remove an isolated vertex from the interior of a given face. + /*! removes an isolated vertex from the interior of a given face. * \param v The vertex to remove. * \pre v is an isolated vertex (it has no incident halfedges). * \return A handle for the face containing v. @@ -1476,8 +1448,7 @@ public: /// \name Halfedge manipulation functions. //@{ - /*! - * Replace the x-monotone curve associated with the given edge. + /*! replaces the x-monotone curve associated with the given edge. * \param e The edge to modify. * \param cv The curve that should be associated with the edge. * \pre cv is geometrically equivalent to the current curve @@ -1486,8 +1457,7 @@ public: */ Halfedge_handle modify_edge(Halfedge_handle e, const X_monotone_curve_2& cv); - /*! - * Split a given edge into two, and associate the given x-monotone + /*! splits a given edge into two, and associate the given x-monotone * curves with the split edges. * \param e The edge to split (one of the pair of twin halfedges). * \param cv1 The curve that should be associated with the first split edge. @@ -1503,8 +1473,7 @@ public: const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2); - /*! - * Merge two edges to form a single edge, and associate the given x-monotone + /*! merges two edges to form a single edge, and associate the given x-monotone * curve with the merged edge. * \param e1 The first edge to merge (one of the pair of twin halfedges). * \param e2 The second edge to merge (one of the pair of twin halfedges). @@ -1514,8 +1483,7 @@ public: Halfedge_handle merge_edge(Halfedge_handle e1, Halfedge_handle e2, const X_monotone_curve_2& cv); - /*! - * Remove an edge from the arrangement. + /*! removes an edge from the arrangement. * \param e The edge to remove (one of the pair of twin halfedges). * \param remove_source Should the source vertex of e be removed if it * becomes isolated (true by default). @@ -1529,8 +1497,7 @@ public: //@} - /*! - * Cleans the inner CCB if sweep mode was used, by removing all + /*! cleans the inner CCB if sweep mode was used, by removing all * non-valid inner CCBs */ void clean_inner_ccbs_after_sweep() @@ -1566,12 +1533,12 @@ protected: /// \name Determining the boundary-side conditions. //@{ - /*! Determines whether a boundary-side category indicates an open side. + /*! determines whether a boundary-side category indicates an open side. */ inline bool is_open(Arr_boundary_side_tag) const { return false; } inline bool is_open(Arr_open_side_tag) const { return true; } - /*! Determines whether the given x and y parameter spaces are open. + /*! determines whether the given x and y parameter spaces are open. * These parameter spaces are typically associated with a particular curve * end. * \param ps_x The parameter space in x. @@ -1587,12 +1554,12 @@ protected: } - /*! Determines whether a boundary-side category indicates a constructed side. + /*! determines whether a boundary-side category indicates a constructed side. */ inline bool is_contracted(Arr_boundary_side_tag) const { return false; } inline bool is_contracted(Arr_contracted_side_tag) const { return true; } - /*! Determines whether a boundary-side category indicates a constructed side. + /*! determines whether a boundary-side category indicates a constructed side. */ inline bool is_identified(Arr_boundary_side_tag) const { return false; } inline bool is_identified(Arr_identified_side_tag) const { return true; } @@ -1601,7 +1568,7 @@ protected: /// \name Allocating and de-allocating points and curves. //@{ - /*! Allocate a new point. */ + /*! allocates a new point. */ Point_2*_new_point(const Point_2& pt) { Point_2* p_pt = m_points_alloc.allocate(1); @@ -1609,7 +1576,7 @@ protected: return (p_pt); } - /*! De-allocate a point. */ + /*! deallocates a point. */ void _delete_point(Point_2& pt) { Point_2* p_pt = &pt; @@ -1617,7 +1584,7 @@ protected: m_points_alloc.deallocate(p_pt, 1); } - /*! Allocate a new curve. */ + /*! allocates a new curve. */ X_monotone_curve_2* _new_curve(const X_monotone_curve_2& cv) { X_monotone_curve_2* p_cv = m_curves_alloc.allocate(1); @@ -1625,7 +1592,7 @@ protected: return (p_cv); } - /*! De-allocate a curve. */ + /*! deallocates a curve. */ void _delete_curve(X_monotone_curve_2& cv) { X_monotone_curve_2* p_cv = &cv; @@ -1636,33 +1603,34 @@ protected: /// \name Converting handles to pointers (for the arrangement accessor). //@{ - /*! Access the DCEL (non-const version). */ + /*! accesses the DCEL (non-const version). */ inline Dcel& _dcel() { return (m_topol_traits.dcel()); } - /*! Access the DCEL (const version). */ + + /*! accesses the DCEL (const version). */ inline const Dcel& _dcel() const { return (m_topol_traits.dcel()); } - /*! Convert a vertex handle to a pointer to a DCEL vertex. */ + /*! converts a vertex handle to a pointer to a DCEL vertex. */ inline DVertex* _vertex(Vertex_handle vh) const { return (&(*vh)); } - /*! Convert a constant vertex handle to a pointer to a DCEL vertex. */ + /*! converts a constant vertex handle to a pointer to a DCEL vertex. */ inline const DVertex* _vertex(Vertex_const_handle vh) const { return (&(*vh)); } - /*! Convert a halfedge handle to a pointer to a DCEL halfedge. */ + /*! converts a halfedge handle to a pointer to a DCEL halfedge. */ inline DHalfedge* _halfedge(Halfedge_handle hh) const { return (&(*hh)); } - /*! Convert a constant halfedge handle to a pointer to a DCEL halfedge. */ + /*! converts a constant halfedge handle to a pointer to a DCEL halfedge. */ inline const DHalfedge* _halfedge(Halfedge_const_handle hh) const { return (&(*hh)); } - /*! Convert a face handle to a pointer to a DCEL face. */ + /*! converts a face handle to a pointer to a DCEL face. */ inline DFace* _face(Face_handle fh) const { return (&(*fh)); } - /*! Convert a constant face handle to a pointer to a DCEL face. */ + /*! converts a constant face handle to a pointer to a DCEL face. */ inline const DFace* _face(Face_const_handle fh) const { return (&(*fh)); } //@} @@ -1670,28 +1638,27 @@ protected: /// \name Converting pointers to handles (for the arrangement accessor). //@{ - /*! Convert a pointer to a DCEL vertex to a vertex handle. */ + /*! converts a pointer to a DCEL vertex to a vertex handle. */ Vertex_handle _handle_for(DVertex* v) { return (Vertex_handle(v)); } - /*! Convert a pointer to a DCEL vertex to a constant vertex handle. */ + /*! converts a pointer to a DCEL vertex to a constant vertex handle. */ Vertex_const_handle _const_handle_for(const DVertex* v) const { return (Vertex_const_handle(v)); } - /*! Convert a pointer to a DCEL halfedge to a halfedge handle. */ + /*! converts a pointer to a DCEL halfedge to a halfedge handle. */ Halfedge_handle _handle_for(DHalfedge* he) { return (Halfedge_handle(he)); } - - /*! Convert a pointer to a DCEL halfedge to a constant halfedge handle. */ + /*! convertss a pointer to a DCEL halfedge to a constant halfedge handle. */ Halfedge_const_handle _const_handle_for(const DHalfedge* he) const { return (Halfedge_const_handle(he)); } - /*! Convert a pointer to a DCEL face to a face handle. */ + /*! converts a pointer to a DCEL face to a face handle. */ Face_handle _handle_for(DFace* f) { return (Face_handle(f)); } - /*! Convert a pointer to a DCEL face to a constant face handle. */ + /*! converts a pointer to a DCEL face to a constant face handle. */ Face_const_handle _const_handle_for(const DFace* f) const { return (Face_const_handle(f)); } //@} @@ -1759,7 +1726,7 @@ protected: Arr_parameter_space ps_x2, Arr_parameter_space ps_y2, Arr_all_sides_oblivious_tag) const; - /*! This is the implementation for the case where any one of the 4 boundary + /*! this is the implementation for the case where any one of the 4 boundary * sides can be of any type. */ bool _is_smaller(const X_monotone_curve_2& cv1, const Point_2& p1, @@ -1769,11 +1736,11 @@ protected: Arr_not_all_sides_oblivious_tag) const; /*! Given two x-monotone curves that share their minimal end point. - * The function return true if the y-coordinate of the first curve curve - * near its minimal end smaller than the y-coordinate of the second curve - * (near its minimal end). This function is used, for example, when - * a new curve is to be inserted into the arrangement. In this case the - * search is conducted over the curves that will comprise a new CCB. + * returns true if the y-coordinate of the first curve curve near its minimal + * end smaller than the y-coordinate of the second curve (near its minimal + * end). This function is used, for example, when a new curve is to be + * inserted into the arrangement. In this case the search is conducted over + * the curves that will comprise a new CCB. * * This is the implementation for the case where all 4 boundary sides are * oblivious. @@ -1802,8 +1769,7 @@ protected: Arr_parameter_space ps_y, Arr_not_all_sides_oblivious_tag) const; - /*! - * Locate the place for the given curve around the given vertex. + /*! locates the place for the given curve around the given vertex. * \param v The given arrangement vertex. * \param cv The given x-monotone curve. * \param ind Whether we refer to the minimal or maximal end of cv. @@ -1815,8 +1781,7 @@ protected: DHalfedge* _locate_around_vertex(DVertex* v, const X_monotone_curve_2& cv, Arr_curve_end ind) const; - /*! - * Compute the distance (in halfedges) between two halfedges. + /*! computes the distance (in halfedges) between two halfedges. * \param e1 The source halfedge. * \param e2 The destination halfedge. * \pre e1 and e2 belong to the same connected component @@ -1826,8 +1791,7 @@ protected: unsigned int _halfedge_distance(const DHalfedge* e1, const DHalfedge* e2) const; - /*! - * Compare the length of the induced paths from e1 to e2 and + /*! compares the length of the induced paths from e1 to e2 and * from e2 to e1. * \pre e1 and e2 belong to the same connected component * \return The comparison result @@ -1835,24 +1799,21 @@ protected: Comparison_result _compare_induced_path_length(const DHalfedge* e1, const DHalfedge* e2) const; - /*! - * Update the indices according to boundary locations + /*! updates the indices according to boundary locations */ void _compute_indices(Arr_parameter_space ps_x_curr, Arr_parameter_space ps_y_curr, Arr_parameter_space ps_x_next, Arr_parameter_space ps_y_next, int& x_index, int& y_index, Arr_true) const; - /*! - * Update the indices according to boundary locations (i.e. does nothing) + /*! update the indices according to boundary locations (i.e. does nothing) */ void _compute_indices(Arr_parameter_space ps_x_curr, Arr_parameter_space ps_y_curr, Arr_parameter_space ps_x_next, Arr_parameter_space ps_y_next, int& x_index, int& y_index, Arr_false) const; - /*! - * Is the first given x-monotone curve above the second given? + /*! Is the first given x-monotone curve above the second given? * \param xcv1 the first given curve * \param ps_y1 the parameter space in y of xcv1 * \param xcv2 the second given curve @@ -1866,8 +1827,7 @@ protected: Arr_parameter_space ps_y1, Arr_has_identified_side_tag) const; - /*! - * Is the first given x-monotone curve above the second given? + /*! Is the first given x-monotone curve above the second given? * \param xcv1 the first given curve * \param ps_y1 the parameter space in y of xcv1 * \param xcv2 the second given curve @@ -1881,8 +1841,7 @@ protected: Arr_parameter_space ps_y1, Arr_has_contracted_side_tag) const; - /*! - * Is the first given x-monotone curve above the second given? + /*! Is the first given x-monotone curve above the second given? * \param xcv1 the first given curve * \param ps_y1 the parameter space in y of xcv1 * \param xcv2 the second given curve @@ -1896,8 +1855,7 @@ protected: Arr_parameter_space ps_y1, Arr_boundary_cond_tag) const; - /*! - * Compute the signs (in left/right and bottom/top) of a path + /*! computes the signs (in left/right and bottom/top) of a path * induced by the sequence he_to=>cv,cv_dir=>he_away, and reports * as side-effect the halfedges pointing to local minima copied * to an outputiterator. @@ -1922,8 +1880,7 @@ protected: const DHalfedge* he_away, OutputIterator local_mins_it) const; - /*! - * Compute the signs (in left/right and bottom/top) of a closed ccb (loop) + /*! computes the signs (in left/right and bottom/top) of a closed ccb (loop) * represented by a given halfedge, and the halfedge pointing to the smallest * vertex on the ccb. * \param he The representative halfedge on the ccb. @@ -1942,8 +1899,7 @@ protected: Arr_parameter_space& ps_y_min, int& index_min) const; - /*! - * Compute the signs (in left/right and bottom/top) of a closed ccb (loop) + /*! computes the signs (in left/right and bottom/top) of a closed ccb (loop) * represented by a given halfedge. * \param he The representative halfedge on the ccb. * \return A pair of signs for the induced path. @@ -1953,19 +1909,18 @@ protected: */ std::pair _compute_signs(const DHalfedge* he, Arr_true) const; - /*! Compute the signs (in left/right and bottom/top) of a closed ccb (loop) + /*! computes the signs (in left/right and bottom/top) of a closed ccb (loop) * represented by a given halfedge for the case where non of the boundaries * is identified. * \return the pair (ZERO, ZERO) */ std::pair _compute_signs(const DHalfedge* he, Arr_false) const; - /*! - * Given two predecessor halfedges that will be used for inserting a + /*! given two predecessor halfedges that will be used for inserting a * new halfedge pair (he_to is the predecessor of the directed curve * cv, cv_dir and he_away will be the successor), such that the * insertion will create a new face that forms a hole inside an existing - * face, determine whether he_to=>cv,cv_dir=>he_away will be part + * face, determines whether he_to=>cv,cv_dir=>he_away will be part * of the new outer ccb of the new face. * \param he_to The predecessor halfedge. * \param cv The x-monotone curve we use to connect he_to's target and @@ -1987,16 +1942,14 @@ protected: InputIterator lm_begin, InputIterator lm_end) const; - /*! - * Move a given outer CCB from one face to another. + /*! moves a given outer CCB from one face to another. * \param from_face The face currently containing the component. * \param to_face The face into which we should move the component. * \param he A halfedge lying on the outer component. */ void _move_outer_ccb(DFace* from_face, DFace* to_face, DHalfedge* he); - /*! - * Move a given inner CCB (hole) from one face to another. + /*! moves a given inner CCB (hole) from one face to another. * \param from_face The face currently containing the component. * \param to_face The face into which we should move the component. * \param he A halfedge lying on the inner component. @@ -2010,37 +1963,32 @@ protected: */ void _move_all_inner_ccb(DFace* from_face, DFace* to_face); - /*! - * Insert the given vertex as an isolated vertex inside the given face. + /*! inserts the given vertex as an isolated vertex inside the given face. * \param f The face that should contain the isolated vertex. * \param v The isolated vertex. */ void _insert_isolated_vertex(DFace* f, DVertex* v); - /*! - * Move a given isolated vertex from one face to another. + /*! moves a given isolated vertex from one face to another. * \param from_face The face currently containing the isolated vertex. * \param to_face The face into which we should move the isolated vertex. * \param v The isolated vertex. */ void _move_isolated_vertex(DFace* from_face, DFace* to_face, DVertex* v); - /*! - * Move all isolated vertices from one face to another. + /*! moves all isolated vertices from one face to another. * \param from_face The face currently containing the isolated vertices. * \param to_face The face into which we should move the isolated vertices. */ void _move_all_isolated_vertices(DFace* from_face, DFace* to_face); - /*! - * Create a new vertex and associate it with the given point. + /*! creates a new vertex and associate it with the given point. * \param p The point. * \return A pointer to the newly created vertex. */ DVertex* _create_vertex(const Point_2& p); - /*! - * Create a new boundary vertex. + /*! creates a new boundary vertex. * \param p The point on the boundary. * \param bx The boundary condition in x. * \param by The boundary condition in y. @@ -2051,8 +1999,7 @@ protected: Arr_parameter_space bx, Arr_parameter_space by); - /*! - * Create a new boundary vertex. + /*! creates a new boundary vertex. * \param cv The curve incident to the boundary. * \param ind The relevant curve-end. * \param bx The boundary condition in x. @@ -2065,8 +2012,7 @@ protected: Arr_parameter_space bx, Arr_parameter_space by); - /*! - * Locate the DCEL features that will be used for inserting the given point, + /*! locates the DCEL features that will be used for inserting the given point, * which has a boundary condition, and set a proper vertex there. * \param f The face that contains the point. * \param p The point. @@ -2079,8 +2025,7 @@ protected: Arr_parameter_space bx, Arr_parameter_space by); - /*! - * Locate the DCEL features that will be used for inserting the given curve + /*! locates the DCEL features that will be used for inserting the given curve * end, which has a boundary condition, and set a proper vertex there. * \param f The face that contains the curve end. * \param cv The x-monotone curve. @@ -2098,8 +2043,7 @@ protected: Arr_parameter_space by, DHalfedge** p_pred); - /*! - * Insert an x-monotone curve into the arrangement, such that both its + /*! inserts an x-monotone curve into the arrangement, such that both its * endpoints correspond to free arrangement vertices (newly created vertices * or existing isolated vertices), so a new inner CCB is formed in the face * that contains the two vertices. @@ -2116,8 +2060,7 @@ protected: Arr_halfedge_direction cv_dir, DVertex* v1, DVertex* v2); - /*! - * Insert an x-monotone curve into the arrangement, such that one of its + /*! inserts an x-monotone curve into the arrangement, such that one of its * endpoints corresponds to a given arrangement vertex, given the exact * place for the curve in the circular list around this vertex. The other * endpoint corresponds to a free vertex (a newly created vertex or an @@ -2134,8 +2077,7 @@ protected: Arr_halfedge_direction cv_dir, DVertex* v); - /*! - * Insert an x-monotone curve into the arrangement, where the end vertices + /*! inserts an x-monotone curve into the arrangement, where the end vertices * are given by the target points of two given halfedges. * The two halfedges should be given such that in case a new face is formed, * it will be the incident face of the halfedge directed from the first @@ -2164,46 +2106,40 @@ protected: bool& swapped_predecessors, bool allow_swap_of_predecessors = true); - /*! - * Relocate all inner CCBs and isolated vertices to their proper position, + /*! relocates all inner CCBs and isolated vertices to their proper position, * immediately after a face has split due to the insertion of a new halfedge. * \param new_he The new halfedge that caused the split, such that the new * face lies to its left and the old face to its right. */ void _relocate_in_new_face(DHalfedge* new_he); - /*! - * Relocate all inner CCBs to their proper position, + /*! relocates all inner CCBs to their proper position, * immediately after a face has split due to the insertion of a new halfedge. * \param new_he The new halfedge that caused the split, such that the new * face lies to its left and the old face to its right. */ void _relocate_inner_ccbs_in_new_face(DHalfedge* new_he); - /*! - * Relocate all vertices to their proper position, + /*! relocates all vertices to their proper position, * immediately after a face has split due to the insertion of a new halfedge. * \param new_he The new halfedge that caused the split, such that the new * face lies to its left and the old face to its right. */ void _relocate_isolated_vertices_in_new_face(DHalfedge* new_he); - /*! - * Replace the point associated with the given vertex. + /*! replaces the point associated with the given vertex. * \param v The vertex to modify. * \param p The point that should be associated with the edge. */ void _modify_vertex(DVertex* v, const Point_2& p); - /*! - * Replace the x-monotone curve associated with the given edge. + /*! replaces the x-monotone curve associated with the given edge. * \param e The edge to modify. * \param cv The curve that should be associated with the edge. */ void _modify_edge(DHalfedge* he, const X_monotone_curve_2& cv); - /*! - * Check if the given vertex represents one of the ends of a given curve. + /*! checks if the given vertex represents one of the ends of a given curve. * \param v The vertex. * \param cv The curve. * \param ind Indicates whether the minimal or the maximal end of cv is @@ -2213,8 +2149,7 @@ protected: bool _are_equal(const DVertex* v, const X_monotone_curve_2& cv, Arr_curve_end ind) const; - /*! - * Split a given edge into two at a given point, and associate the given + /*! splits a given edge into two at a given point, and associate the given * x-monotone curves with the split edges. * \param e The edge to split (one of the pair of twin halfedges). * \param p The split point. @@ -2229,8 +2164,7 @@ protected: const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2); - /*! - * Split a given edge into two at a given vertex, and associate the given + /*! splits a given edge into two at a given vertex, and associate the given * x-monotone curves with the split edges. * \param e The edge to split (one of the pair of twin halfedges). * \param v The split vertex. @@ -2245,8 +2179,7 @@ protected: const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2); - /*! - * Remove a pair of twin halfedges from the arrangement. + /*! removes a pair of twin halfedges from the arrangement. * \param e One of the halfedges to be removed. * \param remove_source Should the source vertex of e be removed if it * becomes isolated. @@ -2258,8 +2191,7 @@ protected: */ DFace* _remove_edge(DHalfedge* e, bool remove_source, bool remove_target); - /*! - * Decide whether a hole is created when an edge is removed. + /*! determines whether a hole is created when an edge is removed. * * \param signs1 signs of future ccb1 * \param signs2 signs of future ccb2 @@ -2270,16 +2202,14 @@ protected: std::pair< CGAL::Sign, CGAL::Sign > signs2, bool same_face); - /*! - * Remove a vertex in case it becomes redundant after the deletion of an + /*! removes a vertex in case it becomes redundant after the deletion of an * incident edge. * \param v The vertex. * \param f The face that contains v (in case it becomes isolated). */ void _remove_vertex_if_redundant(DVertex* v, DFace* f); - /*! - * Remove an isolated vertex from the interior of its face (but not from + /*! removes an isolated vertex from the interior of its face (but not from * the DCEL). * \param v The isolated vertex to remove. */ @@ -2289,28 +2219,27 @@ protected: /// \name Auxiliary (protected) functions for validity checking. //@{ - /*! Check the validity of a given vertex. */ + /*! checks the validity of a given vertex. */ bool _is_valid(Vertex_const_handle v) const; - /*! Check the validity of a given halfedge. */ + /*! checks the validity of a given halfedge. */ bool _is_valid(Halfedge_const_handle he) const; - /*! Check the validity of a given face. */ + /*! checks the validity of a given face. */ bool _is_valid(Face_const_handle f) const; - /*! Check the validity of an outer CCB. */ + /*! checks the validity of an outer CCB. */ bool _is_outer_ccb_valid(const DOuter_ccb* oc, const DHalfedge* first) const; - /*! Check the validity of an inner CCB. */ + /*! checks the validity of an inner CCB. */ bool _is_inner_ccb_valid(const DInner_ccb* ic, const DHalfedge* first) const; - /*! - * Check that all vertices are unique (no two vertices with the same + /*! checks that all vertices are unique (no two vertices with the same * geometric point. */ bool _are_vertices_unique() const; - /*! Check that the curves around a given vertex are ordered clockwise. */ + /*! checks that the curves around a given vertex are ordered clockwise. */ bool _are_curves_ordered_cw_around_vertrex(Vertex_const_handle v) const; //@} @@ -2319,14 +2248,12 @@ protected: /// \name Managing and notifying the arrangement observers. //@{ - /*! - * Register a new observer (so it starts receiving notifications). + /*! registers a new observer (so it starts receiving notifications). * \param p_obs A pointer to the observer object. */ void _register_observer(Observer* p_obs) { m_observers.push_back(p_obs); } - /*! - * Unregister a new observer (so it stops receiving notifications). + /*! unregisters a new observer (so it stops receiving notifications). * \param p_obs A pointer to the observer object. * \return Whether the observer was successfully unregistered. */ @@ -2855,8 +2782,8 @@ protected: // For now the solution is to add a dummy variable at the end (referring // to point-location). Maybe the proper solution is to use std::enable_if // together with appropriate tag. -/*! - * Insert a curve or x-monotone curve into the arrangement (incremental + +/*! inserts a curve or x-monotone curve into the arrangement (incremental * insertion). * The inserted curve can be x-monotone (or not) and may intersect the * existing arrangement. @@ -2870,8 +2797,7 @@ void insert(Arrangement_on_surface_2& arr, const Curve& c, const PointLocation& pl, typename PointLocation::Point_2* = 0); -/*! - * Insert a curve or x-monotone curve into the arrangement (incremental +/*! inserts a curve or x-monotone curve into the arrangement (incremental * insertion). * The inserted curve can be x-monotone (or not) and may intersect the * existing arrangement. The default "walk" point-location strategy is used @@ -2883,8 +2809,7 @@ template void insert(Arrangement_on_surface_2& arr, const Curve& c); -/*! - * Insert a range of curves or x-monotone curves into the arrangement +/*! inserts a range of curves or x-monotone curves into the arrangement * (aggregated insertion). * The inserted curves may intersect one another and may also intersect the * existing arrangement. @@ -2897,8 +2822,7 @@ template void insert(Arrangement_on_surface_2& arr, InputIterator begin, InputIterator end); -/*! - * Insert an x-monotone curve into the arrangement (incremental insertion) +/*! inserts an x-monotone curve into the arrangement (incremental insertion) * when the location of the left endpoint of the curve is known and is * given as an isertion hint. * The inserted x-monotone curve may intersect the existing arrangement. @@ -2914,8 +2838,7 @@ void insert(Arrangement_on_surface_2& arr, typename Arr_point_location_result< Arrangement_on_surface_2 >::type obj); -/*! - * Insert an x-monotone curve into the arrangement, such that the curve +/*! inserts an x-monotone curve into the arrangement, such that the curve * interior does not intersect with any existing edge or vertex in the * arrangement (incremental insertion). * \param arr The arrangement. @@ -2932,8 +2855,7 @@ insert_non_intersecting_curve const typename GeomTraits::X_monotone_curve_2& c, const PointLocation& pl); -/*! - * Insert an x-monotone curve into the arrangement, such that the curve +/*! inserts an x-monotone curve into the arrangement, such that the curve * interior does not intersect with any existing edge or vertex in the * arrangement (incremental insertion). The default point-location strategy * is used for the curve insertion. @@ -2949,8 +2871,7 @@ insert_non_intersecting_curve (Arrangement_on_surface_2& arr, const typename GeomTraits::X_monotone_curve_2& c); -/*! - * Insert a range of pairwise interior-disjoint x-monotone curves into +/*! inserts a range of pairwise interior-disjoint x-monotone curves into * the arrangement, such that the curve interiors do not intersect with * any existing edge or vertex in the arrangement (aggregated insertion). * \param arr The arrangement. @@ -2965,8 +2886,7 @@ void insert_non_intersecting_curves (Arrangement_on_surface_2& arr, InputIterator begin, InputIterator end); -/*! - * Remove an edge from the arrangement. In case it is possible to merge +/*! removes an edge from the arrangement. In case it is possible to merge * the edges incident to the end-vertices of the removed edge after its * deletion, the function performs these merges as well. * \param arr The arrangement. @@ -2979,8 +2899,7 @@ remove_edge(Arrangement_on_surface_2& arr, typename Arrangement_on_surface_2::Halfedge_handle e); -/*! - * Insert a vertex that corresponds to a given point into the arrangement. +/*! inserts a vertex that corresponds to a given point into the arrangement. * The inserted point may lie on any existing arrangement feature. * \param arr The arrangement. * \param p The point to be inserted. @@ -2993,8 +2912,7 @@ insert_point(Arrangement_on_surface_2& arr, const typename GeomTraits::Point_2& p, const PointLocation& pl); -/*! - * Insert a vertex that corresponds to a given point into the arrangement. +/*! inserts a vertex that corresponds to a given point into the arrangement. * The inserted point may lie on any existing arrangement feature. * \param arr The arrangement. * \param p The point to be inserted. @@ -3005,8 +2923,7 @@ typename Arrangement_on_surface_2::Vertex_handle insert_point(Arrangement_on_surface_2& arr, const typename GeomTraits::Point_2& p); -/*! - * Remove a vertex from the arrangement. +/*! removes a vertex from the arrangement. * \param arr The arrangement. * \param v The vertex to remove. * \return Whether the vertex has been removed or not. @@ -3018,8 +2935,7 @@ remove_vertex(Arrangement_on_surface_2& arr, TopTraits>::Vertex_handle v); -/*! - * Check the validity of the arrangement. In particular, check that the +/*! checks the validity of the arrangement. In particular, check that the * edegs are disjoint-interior, and the holes are located in their proper * position. * \param arr The arrangement. @@ -3028,7 +2944,7 @@ remove_vertex(Arrangement_on_surface_2& arr, template bool is_valid(const Arrangement_on_surface_2& arr); -/*! Compute the zone of the given x-monotone curve in the existing arrangement. +/*! compute the zone of the given x-monotone curve in the existing arrangement. * Meaning, it output the arrangement's vertices, edges and faces that the * x-monotone curve intersects. * \param arr The arrangement. @@ -3046,8 +2962,7 @@ OutputIterator zone(Arrangement_on_surface_2& arr, OutputIterator oi, const PointLocation& pl); -/*! - * Compute the zone of the given x-monotone curve in the existing arrangement. +/*! computes the zone of the given x-monotone curve in the existing arrangement. * Overloaded version with no point location object - the walk point-location * strategy is used as default. * \param arr The arrangement. @@ -3062,8 +2977,7 @@ OutputIterator zone(Arrangement_on_surface_2& arr, const typename GeomTraits::X_monotone_curve_2& c, OutputIterator oi); -/*! - * Checks if the given curve/x-monotone curve intersects the existing +/*! checks if the given curve/x-monotone curve intersects the existing * arrangement. * \param arr The arrangement. * \param c The curve/x-monotone curve. @@ -3076,8 +2990,7 @@ template & arr, const Curve& c, const PointLocation& pl); -/*! - * Checks if the given curve/x-monotone curve intersects the existing +/*! checks if the given curve/x-monotone curve intersects the existing * arrangement. * Overloaded version with no point location object - the walk point-location * strategy is used as default. @@ -3089,11 +3002,12 @@ template bool do_intersect(Arrangement_on_surface_2& arr, const Curve& c); -} //namespace CGAL +} // namespace CGAL // The function definitions can be found under: #include #include #include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h index 34855a735c8..796d2c92e79 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h @@ -188,29 +188,29 @@ public: Halfedges_set m_halfedges; public: - /*! Default constructor. */ + /*! constructs default. */ Curve_halfedges() {} - /*! Constructor from a given curve. */ + /*! constructs from a given curve. */ Curve_halfedges(const Curve_2& curve) : Curve_2(curve) {} using iterator = typename Halfedges_set::iterator; using const_iterator = typename Halfedges_set::const_iterator; private: - /*! Get the number of edges induced by the curve. */ + /*! obtains the number of edges induced by the curve. */ Size size() const { return m_halfedges.size(); } - /*! Get an iterator for the first edge in the set (const version). */ + /*! obtains an iterator for the first edge in the set (const version). */ const_iterator begin() const { return m_halfedges.begin(); } - /*! Get an iterator for the first edge in the set (non-const version). */ + /*! obtains an iterator for the first edge in the set (non-const version). */ iterator begin() { return m_halfedges.begin(); } - /*! Get a past-the-end iterator for the set edges (const version). */ + /*! obtains a past-the-end iterator for the set edges (const version). */ const_iterator end() const { return m_halfedges.end(); } - /*! Get a past-the-end iterator for the set edges (non-const version). */ + /*! obtains a past-the-end iterator for the set edges (non-const version). */ iterator end() { return m_halfedges.end(); } /*! Insert an edge to the set. */ @@ -220,17 +220,17 @@ public: return res.first; } - /*! Erase an edge, given by its position, from the set. */ + /*! erases an edge, given by its position, from the set. */ void erase(iterator pos) { m_halfedges.erase(pos); } - /*! Erase an edge from the set. */ + /*! erases an edge from the set. */ void _erase(Halfedge_handle he) { size_t res = m_halfedges.erase(he); if (res == 0) res = m_halfedges.erase(he->twin()); CGAL_assertion(res != 0); } - /*! Cleat the edges set. */ + /*! cleats the edges set. */ void clear() { m_halfedges.clear(); } }; @@ -257,8 +257,7 @@ protected: virtual void after_create_edge(Halfedge_handle e) override { _register_edge(e); } - /*! - * Notification before the modification of an existing edge. + /*! Notification before the modification of an existing edge. * \param e A handle to one of the twin halfedges to be updated. * \param c The x-monotone curve to be associated with the edge. */ @@ -318,7 +317,7 @@ protected: private: - /*! Register the given halfedge in the set(s) associated with its curve. + /*! registers the given halfedge in the set(s) associated with its curve. */ void _register_edge(Halfedge_handle e) { for (auto di = e->curve().data().begin(); di != e->curve().data().end(); @@ -328,8 +327,7 @@ protected: } } - /*! - * Unregister the given halfedge from the set(s) associated with its curve. + /*! unregisters the given halfedge from the set(s) associated with its curve. */ void _unregister_edge(Halfedge_handle e) { for (auto di = e->curve().data().begin(); di != e->curve().data().end(); @@ -356,49 +354,49 @@ public: /// \name Constructors. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arrangement_on_surface_with_history_2 (); - /*! Copy constructor. */ + /*! constructs copy. */ Arrangement_on_surface_with_history_2 (const Self& arr); - /*! Constructor given a traits object. */ + /*! constructs from a traits object. */ Arrangement_on_surface_with_history_2 (const Geometry_traits_2 *tr); //@} /// \name Assignment functions. //@{ - /*! Assignment operator. */ + /*! assigns. */ Self& operator= (const Self& arr); - /*! Assign an arrangement with history. */ + /*! assigns an arrangement with history. */ void assign (const Self& arr); //@} /// \name Destruction functions. //@{ - /*! Destructor. */ + /*! destructs. */ virtual ~Arrangement_on_surface_with_history_2 (); - /*! Clear the arrangement. */ + /*! clears the arrangement. */ virtual void clear (); //@} - /*! Access the geometry-traits object (const version). */ + /*! accesses the geometry-traits object (const version). */ inline const Geometry_traits_2 * geometry_traits () const { return (this->m_geom_traits); } - /*! Access the topology-traits object (non-const version). */ + /*! accesses the topology-traits object (non-const version). */ inline Topology_traits * topology_traits () { return (&(this->m_topol_traits)); } - /*! Access the topology-traits object (const version). */ + /*! accesses the topology-traits object (const version). */ inline const Topology_traits* topology_traits () const { return (&(this->m_topol_traits)); @@ -488,8 +486,7 @@ public: /// \name Manipulating edges. //@{ - /*! - * Split a given edge into two at the given split point. + /*! splits a given edge into two at the given split point. * \param e The edge to split (one of the pair of twin halfedges). * \param p The split point. * \pre p lies in the interior of the curve associated with e. @@ -498,8 +495,7 @@ public: */ Halfedge_handle split_edge (Halfedge_handle e, const Point_2& p); - /*! - * Merge two edges to form a single edge. + /*! merges two edges to form a single edge. * \param e1 The first edge to merge (one of the pair of twin halfedges). * \param e2 The second edge to merge (one of the pair of twin halfedges). * \pre e1 and e2 must have a common end-vertex of degree 2 and must @@ -508,8 +504,7 @@ public: */ Halfedge_handle merge_edge (Halfedge_handle e1, Halfedge_handle e2); - /*! - * Check if two edges can be merged to a single edge. + /*! checks if two edges can be merged to a single edge. * \param e1 The first edge (one of the pair of twin halfedges). * \param e2 The second edge (one of the pair of twin halfedges). * \return true iff e1 and e2 are mergeable. @@ -521,8 +516,7 @@ protected: /// \name Curve insertion and deletion. //@{ - /*! - * Insert a curve into the arrangement. + /*! inserts a curve into the arrangement. * \param cv The curve to be inserted. * \param pl a point-location object. * \return A handle to the inserted curve. @@ -550,8 +544,7 @@ protected: return (--ch); } - /*! - * Insert a curve into the arrangement, using the default point-location + /*! inserts a curve into the arrangement, using the default point-location * strategy. * \param cv The curve to be inserted. * \return A handle to the inserted curve. @@ -579,8 +572,7 @@ protected: return (--ch); } - /*! - * Insert a range of curves into the arrangement. + /*! inserts a range of curves into the arrangement. * \param begin An iterator pointing to the first curve in the range. * \param end A past-the-end iterator for the last curve in the range. */ @@ -606,8 +598,7 @@ protected: CGAL::insert (base_arr, data_curves.begin(), data_curves.end()); } - /*! - * Remove a curve from the arrangement (remove all the edges it induces). + /*! removes a curve from the arrangement (remove all the edges it induces). * \param ch A handle to the curve to be removed. * \return The number of removed edges. */ @@ -650,8 +641,7 @@ protected: public: - /*! - * Set our arrangement to be the overlay the two given arrangements. + /*! sets our arrangement to be the overlay the two given arrangements. * \param arr1 The first arrangement. * \param arr2 The second arrangement. * \param overlay_tr An overlay-traits class. @@ -770,8 +760,7 @@ public: // Global insertion, removal and overlay functions. //----------------------------------------------------------------------------- -/*! - * Insert a curve into the arrangement (incremental insertion). +/*! inserts a curve into the arrangement (incremental insertion). * The inserted curve may not necessarily be x-monotone and may intersect the * existing arrangement. * \param arr The arrangement-with-history object. @@ -793,8 +782,7 @@ insert (Arrangement_on_surface_with_history_2& arr, return (arr_access.insert_curve (c, pl)); } -/*! - * Insert a curve into the arrangement (incremental insertion). +/*! inserts a curve into the arrangement (incremental insertion). * The inserted curve may not necessarily be x-monotone and may intersect the * existing arrangement. The default "walk" point-location strategy is used * for inserting the curve. @@ -816,8 +804,7 @@ insert (Arrangement_on_surface_with_history_2& arr, } -/*! - * Insert a range of curves into the arrangement (aggregated insertion). +/*! inserts a range of curves into the arrangement (aggregated insertion). * The inserted curves may intersect one another and may also intersect the * existing arrangement. * \param arr The arrangement-with-history object. @@ -836,8 +823,7 @@ void insert (Arrangement_on_surface_with_history_2& arr, arr_access.insert_curves (begin, end); } -/*! - * Remove a curve from the arrangement (remove all the edges it induces). +/*! removes a curve from the arrangement (remove all the edges it induces). * \param ch A handle to the curve to be removed. * \return The number of removed edges. */ @@ -855,8 +841,7 @@ remove_curve(Arrangement_on_surface_with_history_2& arr, return (arr_access.remove_curve (ch)); } -/*! - * Compute the overlay of two input arrangement. +/*! computes the overlay of two input arrangement. * \param arr1 The first arrangement. * \param arr2 The second arrangement. * \param res Output: The resulting arrangement. @@ -880,8 +865,7 @@ overlay (const Arrangement_on_surface_with_history_2& res._overlay (arr1, arr2, ovl_traits); } -/*! - * Compute the overlay of two input arrangement. +/*! computes the overlay of two input arrangement. * \param arr1 The first arrangement. * \param arr2 The second arrangement. * \param res Output: The resulting arrangement. diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h index 010fa182c00..52da7e5598d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h @@ -128,17 +128,17 @@ public: /// \name Constructors. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arrangement_with_history_2 () : Base () {} - /*! Copy constructor (from a base arrangement). */ + /*! constructs copy (from a base arrangement). */ Arrangement_with_history_2 (const Base & base) : Base (base) {} - /*! Constructor given a traits object. */ + /*! constructs from a traits object. */ Arrangement_with_history_2 (const Traits_2 * tr) : Base (tr) {} @@ -147,14 +147,14 @@ public: /// \name Assignment functions. //@{ - /*! Assignment operator (from a base arrangement). */ + /*! assigns (from a base arrangement). */ Self& operator= (const Base & base) { Base::assign (base); return (*this); } - /*! Assign an arrangement. */ + /*! assigns an arrangement. */ void assign (const Base & base) { Base::assign (base); @@ -165,13 +165,13 @@ public: ///! \name Specialized access methods. //@{ - /*! Get the geometry-traits class (for backward compatibility). */ + /*! obtains the geometry-traits class (for backward compatibility). */ const Traits_2 * traits () const { return (this->geometry_traits()); } - /*! Get the number of vertices at infinity. */ + /*! obtains the number of vertices at infinity. */ Size number_of_vertices_at_infinity () const { // The vertices at infinity are valid, but not concrete: @@ -179,7 +179,7 @@ public: this->topology_traits()->number_of_concrete_vertices()); } - /*! Get the number of unbounded faces. */ + /*! obtains the number of unbounded faces. */ Size number_of_unbounded_faces () const { typename Base::Face_const_iterator fit = this->faces_begin(); @@ -196,7 +196,7 @@ public: return (n_unb); } - /*! Get the unbounded face (non-const version). */ + /*! obtains the unbounded face (non-const version). */ Face_handle unbounded_face () { // The fictitious un_face contains all other valid faces in a single @@ -216,7 +216,7 @@ public: return (Face_handle (p_oc->face())); } - /*! Get the unbounded face (const version). */ + /*! obtains the unbounded face (const version). */ Face_const_handle unbounded_face () const { // The fictitious un_face contains all other valid faces in a single diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h index cb0e7117833..811fdb931e2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h @@ -173,7 +173,7 @@ protected: X_monotone_curve_2 m_sub_cv2; // Auxiliary variable (for curve split). public: - /*! Constructor. + /*! constructs. * \param _arr The arrangement for which we compute the zone. * \param _visitor A pointer to a zone-visitor object. */ @@ -191,7 +191,7 @@ public: visitor->init(&arr); } - /*! Initialize the zone-computation process with a given curve. + /*! initializes the zone-computation process with a given curve. * \param _cv The query curve. * \param pl A point-location object associated with the arrangement. */ @@ -242,7 +242,7 @@ public: } } - /*! Initialize the zone-computation process with a given curve and an object + /*! initializes the zone-computation process with a given curve and an object * that wraps the location of the curve's left end. * \param cv The query curve. * \param obj An object that represents the location of the left end of the @@ -250,13 +250,13 @@ public: */ void init_with_hint(const X_monotone_curve_2& cv, Pl_result_type obj); - /*! Compute the zone of the given curve and issue the appropriate + /*! computes the zone of the given curve and issue the appropriate * notifications for the visitor. */ void compute_zone(); private: - /*! Check whether two curves with a common endpoint overlap. + /*! checks whether two curves with a common endpoint overlap. * \pre p == min_point(cv1) * \pre p == min_point(cv2) * \todo move this function to a more accessible place so that it can be reused @@ -265,7 +265,7 @@ private: const Point_2& p) const { return do_overlap_impl(cv1, cv2, p, Are_all_sides_oblivious_category()); } - /*! Check whether two curves with a common min endpoint overlap. + /*! checks whether two curves with a common min endpoint overlap. */ bool do_overlap_impl(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -273,13 +273,13 @@ private: return m_geom_traits->compare_y_at_x_right_2_object()(cv1, cv2, p) == EQUAL; } - /*! Check whether two curves with a common min endpoint overlap. + /*! checks whether two curves with a common min endpoint overlap. */ bool do_overlap_impl(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, const Point_2& p, Arr_not_all_sides_oblivious_tag) const; - /*! Find a face containing the query curve m_cv around the given vertex. + /*! finds a face containing the query curve m_cv around the given vertex. * In case an overlap occurs, sets m_intersect_he to be the overlapping edge. * \param v The query vertex. * \param he Output: The predecessor of m_cv around the vertex. @@ -288,7 +288,7 @@ private: */ bool _find_prev_around_vertex(Vertex_handle v, Halfedge_handle& he); - /*! Direct the halfedge for the location of the given subcurve around a split + /*! directs the halfedge for the location of the given subcurve around a split * point that occurs in the interior of a given edge, when the subcurve lies * to the right of the split point. * In case of overlaps, it sets also m_found_overlap and m_intersect_he. @@ -306,7 +306,7 @@ private: const Point_2& cv_left_pt, Halfedge_handle query_he); - /*! Direct the halfedge for the location of the given subcurve around a split + /*! directs the halfedge for the location of the given subcurve around a split * point that occurs in the interior of a given edge, when the subcurve lies * to the left of the split point. * \param cv_ins The curve to be inserted, whose right endpoint coincides @@ -321,7 +321,7 @@ private: _direct_intersecting_edge_to_left(const X_monotone_curve_2& cv_ins, Halfedge_handle query_he); - /*! Get the next intersection of m_cv with the given halfedge. + /*! obtains the next intersection of m_cv with the given halfedge. * \param he A handle to the halfedge. * \param skip_first_point Should we skip the first intersection point. * \param intersect_on_right_boundary Output: If an intersetion point is @@ -339,14 +339,14 @@ private: bool skip_first_point, Arr_parameter_space& intersection_location); - /*! Remove the next intersection of m_cv with the given halfedge from the map. + /*! removes the next intersection of m_cv with the given halfedge from the map. * \param he A handle to the halfedge. * \pre The list of intersections with the curve of he has already been * computed, and it is not empty. */ void _remove_next_intersection(Halfedge_handle he); - /*! Check whether the given point lies completely to the left of the given + /*! checks whether the given point lies completely to the left of the given * edge. * \param p The point. * \param he The halfedge. @@ -370,7 +370,7 @@ private: bool _is_to_left_impl(const Point_2& p, Halfedge_handle he, Arr_not_all_sides_oblivious_tag) const; - /*! Check whether the given point lies completely to the right of the given + /*! checks whether the given point lies completely to the right of the given * edge. * \param p The point. * \param he The halfedge. @@ -394,7 +394,7 @@ private: bool _is_to_right_impl(const Point_2& p, Halfedge_handle he, Arr_not_all_sides_oblivious_tag) const; - /*! Check whether an intersection point is valid. A valid intersection point + /*! checks whether an intersection point is valid. A valid intersection point * must be to the left of the left end of the curve involved. */ bool is_intersection_valid(const Point_2& ip, @@ -415,14 +415,14 @@ private: Arr_parameter_space& intersection_location, Arr_boundary_cond_tag) const; - /*! Compute the (lexicographically) leftmost intersection of the query + /*! computes the (lexicographically) leftmost intersection of the query * curve with a given halfedge on the boundary of a face in the arrangement. */ void _leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary, Arr_parameter_space& leftmost_location); - /*! Compute the (lexicographically) leftmost intersection of the query + /*! computes the (lexicographically) leftmost intersection of the query * curve with the boundary of a given face in the arrangement. * The function computes sets m_intersect_p, m_intersect_he (or alternatively * m_overlap_cv and m_intersect_he) and set the flags m_found_intersect and @@ -434,7 +434,7 @@ private: void _leftmost_intersection_with_face_boundary(Face_handle face, bool on_boundary); - /*! Compute the zone of an x-monotone curve in a given arrangement face. + /*! computes the zone of an x-monotone curve in a given arrangement face. * The left endpoint of the curve either lies in the face interior or on * the boundary of the face. * This function updates m_cv and its left endpoint and also sets m_left_v @@ -451,7 +451,7 @@ private: */ bool _zone_in_face(Face_handle face, bool on_boundary); - /*! Compute the zone of an overlapping subcurve m_overlap_cv of m_cv and the + /*! computes the zone of an overlapping subcurve m_overlap_cv of m_cv and the * curve currently associated with m_intersect_he. * This function updates m_cv and its left endpoint and also sets m_left_v * and m_left_he for the remaining portion of the curve. @@ -462,7 +462,7 @@ private: bool _zone_in_overlap(); }; -} //namespace CGAL +} // namespace CGAL // The function definitions can be found under: #include diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h b/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h index 332f1518179..c4acd8c87f6 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h @@ -65,48 +65,48 @@ protected: public: - /*! Default constructor.*/ + /*! constructs default.*/ Arr_text_formatter(): m_out(nullptr), m_in(nullptr) {} - /*! Construct an output formatter. */ + /*! constructs an output formatter. */ Arr_text_formatter(std::ostream& os) : m_out(&os), m_in(nullptr) {} - /*! Construct an input formatter. */ + /*! constructs an input formatter. */ Arr_text_formatter(std::istream& is) : m_out(nullptr), m_in(&is) {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_text_formatter() {} - /*! Set the output stream. */ + /*! sets the output stream. */ void set_out(std::ostream& os) { m_out = &os; } - /*! Set the input stream. */ + /*! sets the input stream. */ void set_in(std::istream& is) { m_in = &is; } - /*! Get the output stream. */ + /*! obtains the output stream. */ inline std::ostream& out() { CGAL_assertion(m_out != nullptr); return (*m_out); } - /*! Get the input stream. */ + /*! obtains the input stream. */ inline std::istream& in() { CGAL_assertion(m_in != nullptr); @@ -116,7 +116,7 @@ public: /// \name Global write functions. //@{ - /*! Write a begin-arrangement comment. */ + /*! writes a begin-arrangement comment. */ void write_arrangement_begin() { CGAL_assertion(m_out != nullptr); @@ -125,51 +125,51 @@ public: _write_comment("BEGIN ARRANGEMENT"); } - /*! Write an end-arrangement comment. */ + /*! writes an end-arrangement comment. */ void write_arrangement_end() { _write_comment("END ARRANGEMENT"); set_mode(*m_out, m_old_out_mode); } - /*! Write a labeled size value. */ + /*! writes a labeled size value. */ void write_size(const char *label, Size size) { _write_comment(label); out() << size << '\n'; } - /*! Write a begin-vertices comment. */ + /*! writes a begin-vertices comment. */ void write_vertices_begin() { _write_comment("BEGIN VERTICES"); } - /*! Write an end-vertices comment. */ + /*! writes an end-vertices comment. */ void write_vertices_end() { _write_comment("END VERTICES"); } - /*! Write a begin-edges comment. */ + /*! writes a begin-edges comment. */ void write_edges_begin() { _write_comment("BEGIN EDGES"); } - /*! Write an end-edges comment. */ + /*! writes an end-edges comment. */ void write_edges_end() { _write_comment("END EDGES"); } - /*! Write a begin-faces comment. */ + /*! writes a begin-faces comment. */ void write_faces_begin() { _write_comment("BEGIN FACES"); } - /*! Write an end-faces comment. */ + /*! writes an end-faces comment. */ void write_faces_end() { _write_comment("END FACES"); @@ -273,7 +273,7 @@ public: /// \name Global read functions. //@{ - /*! Start reading an arrangement. */ + /*! starts reading an arrangement. */ void read_arrangement_begin() { CGAL_assertion(m_in != nullptr); @@ -282,14 +282,14 @@ public: _skip_comments(); } - /*! Read the arrangement edge. */ + /*! reads the arrangement edge. */ void read_arrangement_end() { _skip_comments(); set_mode(*m_in, m_old_in_mode); } - /*! Read a size value (with a label comment line before it). */ + /*! reads a size value (with a label comment line before it). */ Size read_size(const char* /* title */ = nullptr) { std::size_t val; @@ -301,7 +301,7 @@ public: return (val); } - /*! Reading the arrangement vertices. */ + /*! reads the arrangement vertices. */ void read_vertices_begin() { _skip_comments(); @@ -312,7 +312,7 @@ public: _skip_comments(); } - /*! Reading the arrangement edges. */ + /*! reads the arrangement edges. */ void read_edges_begin() { _skip_comments(); @@ -323,7 +323,7 @@ public: _skip_comments(); } - /*! Reading the arrangement faces. */ + /*! reads the arrangement faces. */ void read_faces_begin() { _skip_comments(); @@ -431,13 +431,13 @@ public: protected: - /*! Write a comment line. */ + /*! writes a comment line. */ void _write_comment(const char *str) { out() << "# " << str << std::endl; } - /*! Skip until end of line. */ + /*! skips until end of line. */ void _skip_until_EOL() { CGAL_assertion(m_in != nullptr); @@ -446,7 +446,7 @@ protected: while ((c = m_in->get()) != EOF && c != '\n') {}; } - /*! Skip comment lines. */ + /*! skips comment lines. */ void _skip_comments() { CGAL_assertion(m_in != nullptr); @@ -492,28 +492,28 @@ public: typedef typename Base::Halfedge_const_handle Halfedge_const_handle; typedef typename Base::Face_const_handle Face_const_handle; - /*! Default constructor.*/ + /*! constructs default.*/ Arr_face_extended_text_formatter() : Base() {} - /*! Construct an output formatter. */ + /*! constructs an output formatter. */ Arr_face_extended_text_formatter(std::ostream& os) : Base(os) {} - /*! Construct an input formatter. */ + /*! constructs an input formatter. */ Arr_face_extended_text_formatter(std::istream& is) : Base(is) {} - /*! Write the auxiliary data associated with the given face. */ + /*! writes the auxiliary data associated with the given face. */ virtual void write_face_data(Face_const_handle f) { this->out() << f->data() << '\n'; } - /*! Read a face-data object and attach it to the given face. */ + /*! reads a face-data object and attach it to the given face. */ virtual void read_face_data(Face_handle f) { this->in() >> f->data(); @@ -548,20 +548,20 @@ public: typedef typename Base::Halfedge_const_handle Halfedge_const_handle; typedef typename Base::Face_const_handle Face_const_handle; - /*! Default constructor.*/ + /*! constructs default.*/ Arr_extended_dcel_text_formatter() : Base() {} - /*! Construct an output formatter. */ + /*! constructs an output formatter. */ Arr_extended_dcel_text_formatter(std::ostream& os) : Base(os) {} - /*! Construct an input formatter. */ + /*! constructs an input formatter. */ Arr_extended_dcel_text_formatter(std::istream& is) : Base(is) {} - /*! Write the auxiliary data associated with the given vertex. */ + /*! write the auxiliary data associated with the given vertex. */ virtual void write_vertex_data(Vertex_const_handle v) { this->out() << '\n' << v->data(); } - /*! Read a vertex-data object and attach it to the given vertex. */ + /*! reads a vertex-data object and attach it to the given vertex. */ virtual void read_vertex_data(Vertex_handle v) { using Vertex = typename Arrangement_2::Vertex; using Type = decltype(std::declval().data()); @@ -572,11 +572,11 @@ public: this->_skip_until_EOL(); } - /*! Write the auxiliary data associated with the given halfedge. */ + /*! writes the auxiliary data associated with the given halfedge. */ virtual void write_halfedge_data(Halfedge_const_handle he) { this->out() << '\n' << he->data(); } - /*! Read a halfedge-data object and attach it to the given halfedge. */ + /*! reads a halfedge-data object and attach it to the given halfedge. */ virtual void read_halfedge_data(Halfedge_handle he) { using Halfedge = typename Arrangement_2::Halfedge; using Type = decltype(std::declval().data()); @@ -587,11 +587,11 @@ public: this->_skip_until_EOL(); } - /*! Write the auxiliary data associated with the given face. */ + /*! writes the auxiliary data associated with the given face. */ virtual void write_face_data(Face_const_handle f) { this->out() << f->data() << '\n'; } - /*! Read a face-data object and attach it to the given face. */ + /*! reads a face-data object and attach it to the given face. */ virtual void read_face_data(Face_handle f) { using Face = typename Arrangement_2::Face; using Type = decltype(std::declval().data()); @@ -603,6 +603,6 @@ public: } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h index cf2026e7ef4..1567540b271 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h @@ -79,7 +79,7 @@ namespace CGAL { public: - /*! Constructor. */ + /*! constructs. */ Arrangement_2_writer(const Arrangement_2& arr) : m_arr(arr), m_dcel(nullptr), @@ -90,11 +90,11 @@ namespace CGAL { m_dcel = &(arr_access.dcel()); } - /*! Destructor. */ + /*! destructs. */ virtual ~Arrangement_2_writer() {} - /*! Write the arrangement. */ + /*! writes the arrangement. */ template void operator()(Formatter& formatter) { @@ -141,7 +141,7 @@ namespace CGAL { protected: - /*! Write a vertex. */ + /*! writes a vertex. */ template void _write_vertex(Formatter& formatter, Vertex_const_iterator vit) { @@ -174,7 +174,7 @@ namespace CGAL { formatter.write_vertex_end(); } - /*! Write an edge (a pair of halfedges). */ + /*! writes an edge (a pair of halfedges). */ template void _write_edge(Formatter& formatter, Edge_const_iterator hit) { @@ -215,7 +215,7 @@ namespace CGAL { formatter.write_edge_end(); } - /*! Write a face. */ + /*! writes a face. */ template void _write_face(Formatter& formatter, Face_const_iterator fit) const { @@ -284,7 +284,7 @@ namespace CGAL { formatter.write_face_end(); } - /*! Write the edges along a given CCB. */ + /*! writes the edges along a given CCB. */ template void _write_ccb(Formatter& formatter, const DHalfedge* ccb) const { @@ -298,7 +298,7 @@ namespace CGAL { formatter.write_ccb_halfedges_end(); } - /*! Get the mapped index of a given vertex. */ + /*! obtains the mapped index of a given vertex. */ int _index(const DVertex* v) const { typename Vertex_index_map::const_iterator pos = m_v_index.find(v); @@ -307,7 +307,7 @@ namespace CGAL { return (pos->second); } - /*! Get the mapped index of a given halfedge. */ + /*! obtains the mapped index of a given halfedge. */ int _index(const DHalfedge* he) const { typename Halfedge_index_map::const_iterator pos = m_he_index.find(he); @@ -316,7 +316,7 @@ namespace CGAL { return (pos->second); } - /*! Get the number of edges along a given CCB. */ + /*! obtains the number of edges along a given CCB. */ std::size_t _circulator_size(const DHalfedge* ccb) const { CGAL_assertion(ccb != nullptr); @@ -333,6 +333,6 @@ namespace CGAL { } }; -} //namespace CGAL +} // namespace CGAL -#endif // CGAL_IO_ARRANGEMENT_2_WRITER_H +#endif diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h index 1418044d5f4..e1accd10731 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h @@ -83,7 +83,7 @@ protected: const Gt2* m_base_traits; public: - /*! Constructor. */ + /*! constructs. */ Arr_basic_insertion_traits_2(const Gt2& tr) : m_base_traits(&tr) {} @@ -214,7 +214,7 @@ public: Base_equal_2 m_base_equal; Halfedge_handle invalid_he; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -255,7 +255,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 function object */ + /*! obtains a Construct_min_vertex_2 function object */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return (Construct_min_vertex_2 @@ -270,7 +270,7 @@ public: Base_equal_2 m_base_equal; Halfedge_handle invalid_he; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -312,7 +312,7 @@ public: } }; - /*! Obtain a Construct_max_vertex_2 function object */ + /*! obtains a Construct_max_vertex_2 function object */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return (Construct_max_vertex_2 @@ -325,7 +325,7 @@ public: protected: Base_compare_xy_2 m_base_cmp_xy; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -346,7 +346,7 @@ public: } }; - /*! Obtain a Compare_xy_2 function object */ + /*! obtains a Compare_xy_2 function object */ Compare_xy_2 compare_xy_2_object() const { return (Compare_xy_2(m_base_traits->compare_xy_2_object())); } @@ -357,7 +357,7 @@ public: protected: Base_compare_y_at_x_2 m_base_cmp_y_at_x; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -375,7 +375,7 @@ public: { return (m_base_cmp_y_at_x(p.base(), xcv.base())); } }; - /*! Obtain a Compare_y_at_x_2 function object */ + /*! obtains a Compare_y_at_x_2 function object */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return (Compare_y_at_x_2(m_base_traits->compare_y_at_x_2_object())); } @@ -386,7 +386,7 @@ public: protected: Base_compare_y_at_x_right_2 m_base_cmp_y_at_x_right; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -405,7 +405,7 @@ public: { return (m_base_cmp_y_at_x_right(xcv1.base(), xcv2.base(), p.base())); } }; - /*! Obtain a Compare_y_at_x_right_2 function object */ + /*! obtains a Compare_y_at_x_right_2 function object */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return (Compare_y_at_x_right_2 @@ -419,7 +419,7 @@ public: protected: Base_equal_2 m_base_eq; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -440,7 +440,7 @@ public: { return (m_base_eq(p1.base(), p2.base())); } }; - /*! Obtain an `Equal_2` function object */ + /*! obtains an `Equal_2` function object */ Equal_2 equal_2_object() const { return (Equal_2(m_base_traits->equal_2_object())); } @@ -449,7 +449,7 @@ public: protected: Base_compare_x_2 m_base_cmp_x; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -464,7 +464,7 @@ public: { return (m_base_cmp_x(p1.base(), p2.base())); } }; - /*! Obtain a Compare_x_2 function object */ + /*! obtains a Compare_x_2 function object */ Compare_x_2 compare_x_2_object() const { return (Compare_x_2(m_base_traits->compare_x_2_object())); } @@ -473,7 +473,7 @@ public: protected: Base_is_vertical_2 m_base_is_vert; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -488,7 +488,7 @@ public: { return (m_base_is_vert(xcv.base())); } }; - /*! Obtain a Is_vertical_2 function object */ + /*! obtains a Is_vertical_2 function object */ Is_vertical_2 is_vertical_2_object() const { return (Is_vertical_2(m_base_traits->is_vertical_2_object())); } @@ -502,7 +502,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -526,7 +526,7 @@ public: { return m_base->parameter_space_in_x_2_object()(xcv.base()); } }; - /*! Obtain a Parameter_space_in_x_2 function object */ + /*! obtains a Parameter_space_in_x_2 function object */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(m_base_traits); } @@ -538,7 +538,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -558,7 +558,7 @@ public: { return m_base->is_on_x_identification_2_object()(xcv.base()); } }; - /*! Obtain a Is_on_x_identification_2 function object */ + /*! obtains a Is_on_x_identification_2 function object */ Is_on_x_identification_2 is_on_x_identification_2_object() const { return Is_on_x_identification_2(m_base_traits); } @@ -570,7 +570,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -590,7 +590,7 @@ public: { return m_base->compare_y_on_boundary_2_object()(p1.base(), p2.base()); } }; - /*! Obtain a Compare_y_on_boundary_2 object + /*! obtains a Compare_y_on_boundary_2 object */ Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(m_base_traits); } @@ -603,7 +603,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -628,7 +628,7 @@ public: } }; - /*! Obtain a Compare_y_near_boundary_2 object + /*! obtains a Compare_y_near_boundary_2 object */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(m_base_traits); } @@ -643,7 +643,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -667,7 +667,7 @@ public: { return m_base->parameter_space_in_y_2_object()(xcv.base()); } }; - /*! Obtain a Parameter_space_in_y_2 function object */ + /*! obtains a Parameter_space_in_y_2 function object */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(m_base_traits); } @@ -679,7 +679,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -699,7 +699,7 @@ public: { return m_base->is_on_y_identification_2_object()(xcv.base()); } }; - /*! Obtain a Is_on_y_identification_2 function object */ + /*! obtains a Is_on_y_identification_2 function object */ Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(m_base_traits); } @@ -711,7 +711,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -724,13 +724,13 @@ public: friend class Arr_basic_insertion_traits_2; public: - /*! Use tag dispatching to avoid compilation errors in case the functor + /*! uses tag dispatching to avoid compilation errors in case the functor * is not defined */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { return m_base->compare_x_on_boundary_2_object()(p1.base(), p2.base()); } - /*! Use tag dispatching to avoid compilation errors in case the functor + /*! uses tag dispatching to avoid compilation errors in case the functor * is not defined */ Comparison_result operator()(const Point_2& p, @@ -740,7 +740,7 @@ public: return m_base->compare_x_on_boundary_2_object()(p.base(), xcv.base(), ce); } - /*! Use tag dispatching to avoid compilation errors in case the functor + /*! uses tag dispatching to avoid compilation errors in case the functor * is not defined */ Comparison_result operator()(const X_monotone_curve_2& xcv1, @@ -753,7 +753,7 @@ public: } }; - /*! Obtain a Compare_x_on_boundary_2 object + /*! obtains a Compare_x_on_boundary_2 object */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(m_base_traits); } @@ -766,7 +766,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -779,7 +779,7 @@ public: friend class Arr_basic_insertion_traits_2; public: - /*! Use tag dispatching to avoid compilation errors in case the functor + /*! uses tag dispatching to avoid compilation errors in case the functor * is not defined */ Comparison_result operator()(const X_monotone_curve_2& xcv1, @@ -791,12 +791,12 @@ public: } }; - /*! Obtain a Compare_x_near_boundary_2 object + /*! obtains a Compare_x_near_boundary_2 object */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(m_base_traits); } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h index 89e916f59a1..e14d641cecb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h @@ -101,17 +101,17 @@ protected: // event. public: - /*! Default constructor. */ + /*! constructs default. */ Arr_construction_event_base(): m_halfedge(), m_vertex(), m_right_curves_counter(0) {} - /*! Destructor */ + /*! destructs */ ~Arr_construction_event_base() {} - /*! Add a curve to the right of the event. */ + /*! adds a curve to the right of the event. */ std::pair add_curve_to_right(Subcurve* curve, const Gt2* tr) { @@ -123,7 +123,7 @@ public: return res; } - /*! Add a curve pair to the right of the event. */ + /*! adds a curve pair to the right of the event. */ std::pair add_curve_pair_to_right(Subcurve* sc1, Subcurve* sc2) { @@ -132,7 +132,7 @@ public: return (Base::add_curve_pair_to_right(sc1, sc2)); } - /*! using the additional data that we store at the event, we compute + /*! using the additional data that we store at the event, computes * how much we have to jump (he = he->next()->twin()) from the halfedge * that is stored in the event, to the halfedge that is previous to 'curve' * that is about to be inserted into the arrangement. @@ -173,7 +173,7 @@ public: return (i); } - /*! Return true iff 'curve' is the toppest curve among the halfedges + /*! returns true iff 'curve' is the toppest curve among the halfedges * to the right of the event that were already were inserted to the * arrangement. */ @@ -191,38 +191,38 @@ public: return true; } - /*! Resize the bit-vector indicating whether the incident curves are already + /*! resizes the bit-vector indicating whether the incident curves are already * in the arrangement, and set all flags to false. */ void init_subcurve_in_arrangement_flags(size_t n) { m_isCurveInArr.resize(n, false); } - /*! Check if the i'th subcurve is in the arrangement. */ + /*! checks if the i'th subcurve is in the arrangement. */ bool is_subcurve_in_arrangement(unsigned int i) const { return (m_isCurveInArr[i]); } - /*! Set the flag indicating whether the i'th subcurve is in the arrangement. + /*! sets the flag indicating whether the i'th subcurve is in the arrangement. */ void set_subcurve_in_arrangement(unsigned int i, bool flag) { m_isCurveInArr[i] = flag; } - /*! Set the halfedge handle. */ + /*! sets the halfedge handle. */ void set_halfedge_handle(Halfedge_handle h) { m_halfedge = h; } - /*! Get the halfedge handle. */ + /*! obtains the halfedge handle. */ Halfedge_handle halfedge_handle() const { return m_halfedge; } - /*! Set the vertex handle. */ + /*! sets the vertex handle. */ void set_vertex_handle(Vertex_handle v) { m_vertex = v; } - /*! Get the vertex handle. */ + /*! obtains the vertex handle. */ Vertex_handle vertex_handle() const { return m_vertex; } - /*! Decrement the count of curves to the right that we have't done yet with + /*! decrements the count of curves to the right that we have't done yet with * (haven't been inserted to the arrangement). */ unsigned int dec_right_curves_counter() { return (--m_right_curves_counter); } - /*! Get the number of subcurves to the right of the event that we have't + /*! obtains the number of subcurves to the right of the event that we have't * done yet with (haven't been inserted to the arrangement). */ unsigned int right_curves_counter() const { return (m_right_curves_counter); } diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h index 798cd0f0c18..b9946fa5af6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h @@ -134,7 +134,7 @@ protected: const Vertex_handle m_invalid_vertex; // An invalid vertex handle. public: - /*! Constructor. */ + /*! constructs. */ Arr_construction_ss_visitor(Arrangement_2* arr) : m_helper(arr), m_arr(arr), @@ -145,7 +145,7 @@ public: m_invalid_vertex() { m_helper.set_halfedge_indices_map(m_he_indices_table); } - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_construction_ss_visitor() {} /// \name Sweep-line notifications. @@ -157,14 +157,12 @@ public: /* A notification issued after the sweep process stops. */ inline void after_sweep(); - /*! - * A notification invoked before the sweep-line starts handling the given + /*! A notification invoked before the sweep-line starts handling the given * event. */ inline void before_handle_event(Event* event); - /*! - * A notification invoked after the sweep-line finishes handling the given + /*! A notification invoked after the sweep-line finishes handling the given * event. */ bool after_handle_event(Event* event, Status_line_iterator iter, bool flag); @@ -176,7 +174,7 @@ public: /// \name Insertion functions. //@{ - /*! Insert the given subcurve in the interior of a face. + /*! inserts the given subcurve in the interior of a face. * \param cv The geometric subcurve. * \param sc The sweep-line subcurve information. * \return A handle to the inserted halfedge. @@ -184,7 +182,7 @@ public: virtual Halfedge_handle insert_in_face_interior(const X_monotone_curve_2& cv, Subcurve* sc); - /*! Insert the given subcurve given its left end-vertex. + /*! inserts the given subcurve given its left end-vertex. * \param cv The geometric entity. * \param prev The predecessor halfedge around the left vertex. * \param sc The sweep-line subcurve information. @@ -194,7 +192,7 @@ public: insert_from_left_vertex(const X_monotone_curve_2& cv, Halfedge_handle he, Subcurve* sc); - /*! Insert the given subcurve given its right end-vertex. + /*! inserts the given subcurve given its right end-vertex. * \param cv The geometric entity. * \param prev The predecessor halfedge around the right vertex. * \param sc The sweep-line subcurve information. @@ -205,7 +203,7 @@ public: Halfedge_handle prev, Subcurve* sc); - /*! Insert the given subcurve given its two end-vertices. + /*! inserts the given subcurve given its two end-vertices. * \param cv The geometric subcurve. * \param prev1 The predecessor halfedge around the left vertex. * \param prev2 The predecessor halfedge around the right vertex. @@ -219,7 +217,7 @@ public: Subcurve* sc, bool& new_face_created); - /*! Insert an isolated vertex into the arrangement. + /*! inserts an isolated vertex into the arrangement. * \param pt The point associated with the vertex. * \param iter The location of the corresponding event in the status line. * \return A handle to the inserted vertex. @@ -227,7 +225,7 @@ public: virtual Vertex_handle insert_isolated_vertex(const Point_2& pt, Status_line_iterator iter); - /*! Relocate holes and isolated vertices inside a newly created face f2, + /*! relocates holes and isolated vertices inside a newly created face f2, * that was split from f1 after the insertion of a new edge. * \param he The halfedge that caused the face split. Its incident face is * the new face f2, and the incident face of its twin is f1. @@ -235,23 +233,21 @@ public: void relocate_in_new_face(Halfedge_handle he); //@} - /*! Get the last event associated with the given subcurve. */ + /*! obtains the last event associated with the given subcurve. */ Event* last_event_on_subcurve(Subcurve* sc) { return sc->last_event(); } private: /// \name Auxiliary functions. //@{ - /*! - * Cast a Traits::Point_2 object into an Arrangement_2::Point_2 object. + /*! casts a Traits::Point_2 object into an Arrangement_2::Point_2 object. * These two types may not be the same when the addition visitor inherits * from this base class. */ inline const typename Arrangement_2::Point_2& _point(const Point_2& p) const { return (static_cast(p)); } - /*! - * Cast a Traits::X_monotone_curve_2 object into an + /*! casts a Traits::X_monotone_curve_2 object into an * Arrangement_2::X_monotone_curve_2 object. * These two types may not be the same when the addition visitor inherits * from this base class. @@ -262,18 +258,18 @@ private: return (static_cast(cv)); } - /*! Map the given subcurve index to the given halfedge handle. + /*! maps the given subcurve index to the given halfedge handle. */ void _map_new_halfedge(unsigned int i, Halfedge_handle he); - /*! Move halfedge indices from the top face to the last inserted curve. + /*! moves halfedge indices from the top face to the last inserted curve. * This is the implementation for the case where all 4 boundary sides are * oblivious. */ void move_halfedge_indices(Event* event, Status_line_iterator iter, Arr_all_sides_oblivious_tag); - /*! Move halfedge indices from the top face to the last inserted curve. + /*! moves halfedge indices from the top face to the last inserted curve. * This is the implementation for the case where all 4 boundary sides are * not oblivious. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h index b20b165a6ef..ae838819564 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h @@ -81,14 +81,14 @@ public: typedef Event* Event_ptr; typedef std::list Halfedge_indices_list; - /*! Construct default. */ + /*! constructs default. */ Arr_construction_subcurve_base() : Base(), m_last_event(0), m_index(0) {} - /*! Constructor from an x-monotone curve. */ + /*! constructs from an x-monotone curve. */ Arr_construction_subcurve_base(X_monotone_curve_2& curve) : Base(curve), m_last_event(0), @@ -113,10 +113,10 @@ protected: // may represent a hole. public: - /*! Initialize the curve. */ + /*! initializes the curve. */ void init(const X_monotone_curve_2& curve) { Base::init(curve); } - /*! Set the event associated with the left end of the subcurve. */ + /*! sets the event associated with the left end of the subcurve. */ template void set_left_event(SweepEvent* left) { @@ -124,31 +124,31 @@ public: set_last_event(left); } - /*! Set the last event on the subcurve. */ + /*! sets the last event on the subcurve. */ void set_last_event(Event_ptr e) { m_last_event = e; } - /*! Obtain the last event. */ + /*! obtains the last event. */ Event_ptr last_event() const { return m_last_event; } - /*! Obtain the subcurve index. */ + /*! obtains the subcurve index. */ unsigned int index() const { return m_index; } - /*! Set the subcurve index. */ + /*! sets the subcurve index. */ void set_index(unsigned int i) { m_index = i; } - /*! Check whether the index is valid. */ + /*! checks whether the index is valid. */ bool has_valid_index() const { return (m_index != 0); } - /*! Add an index of a halfedge below the subcurve. */ + /*! adds an index of a halfedge below the subcurve. */ void add_halfedge_index(unsigned int i) { m_halfedge_indices.push_back(i); } - /*! Clear the indices of the halfedges below the subcurve. */ + /*! clears the indices of the halfedges below the subcurve. */ void clear_halfedge_indices() { m_halfedge_indices.clear(); } - /*! Check if there are any halfedges below the subcurve. */ + /*! checks if there are any halfedges below the subcurve. */ bool has_halfedge_indices() const { return (!m_halfedge_indices.empty()); } - /*! Obtain the indices of the halfedges below the subcurve. */ + /*! obtains the indices of the halfedges below the subcurve. */ Halfedge_indices_list& halfedge_indices_list() { return m_halfedge_indices; } }; @@ -200,16 +200,15 @@ public: typedef typename Base::Event_ptr Event_ptr; typedef typename Base::Halfedge_indices_list Halfedge_indices_list; - /*! Construct default. */ + /*! constructs default. */ Arr_construction_subcurve() {} - /*! Constructor from an x-monotone curve. */ + /*! constructs from an x-monotone curve. */ Arr_construction_subcurve(X_monotone_curve_2& curve) : Base(curve) {} }; - } // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h index 0abc509bcd5..c2ce569cc1b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h @@ -70,7 +70,7 @@ public: typedef Tag_false Has_merge_category; public: - /*! Constructor with a traits class. */ + /*! constructs from a traits class. */ Arr_insertion_traits_2(const Gt2& tr) : Base(tr) {} /*! A functor that compares compares the y-coordinates of two x-monotone @@ -81,7 +81,7 @@ public: //! The base operators. Base_intersect_2 m_base_intersect; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -143,7 +143,7 @@ public: } }; - /*! Obtain a Intersect_2 function object */ + /*! obtains a Intersect_2 function object */ Intersect_2 intersect_2_object () const { return (Intersect_2(this->m_base_traits->intersect_2_object())); } @@ -153,7 +153,7 @@ public: //! The base operator. Base_split_2 m_base_split; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -173,7 +173,7 @@ public: } }; - /*! Obtain a Split_2 function object */ + /*! obtains a Split_2 function object */ Split_2 split_2_object() const { return (Split_2(this->m_base_traits->split_2_object())); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h index ae975dbc42c..096504e6ecb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h @@ -90,54 +90,54 @@ protected: // contains the subcurve. public: - /*! Constructor. */ + /*! constructs. */ Arr_overlay_subcurve() : Base(), m_above(nullptr) { m_top_face.red = nullptr; } - /*! constructor given a curve. */ + /*! constructs given a curve. */ Arr_overlay_subcurve(const X_monotone_curve_2& curve) : Base(curve), m_above(nullptr) { m_top_face.red = nullptr; } - /*! Get the subcurve lying above this subcurve in the status line. */ + /*! obtains the subcurve lying above this subcurve in the status line. */ Self* subcurve_above() const { return m_above; } - /*! Set the subcurve above. */ + /*! sets the subcurve above. */ void set_subcurve_above(Self* sc) { m_above = sc; } - /*! Get the color of the associated curve. */ + /*! obtains the color of the associated curve. */ Color color() const { return (this->last_curve().color()); } - /*! Check if two subcurves have the same color. */ + /*! checks if two subcurves have the same color. */ bool has_same_color(const Self* sc) const { return (this->last_curve().color() == sc->color()); } - /*! Get the red halfedge that represents the subcurve. */ + /*! obtains the red halfedge that represents the subcurve. */ Halfedge_handle_red red_halfedge_handle() const { return (this->last_curve().red_halfedge_handle()); } - /*! Get the blue halfedge that represents the subcurve. */ + /*! obtains the blue halfedge that represents the subcurve. */ Halfedge_handle_blue blue_halfedge_handle() const { return (this->last_curve().blue_halfedge_handle()); } - /*! Get the red top face that contains the subcurve. */ + /*! obtains the red top face that contains the subcurve. */ const Face_handle_red red_top_face() const { return Face_handle_red(m_top_face.red); } - /*! Get the blue top face that contains the subcurve. */ + /*! obtains the blue top face that contains the subcurve. */ const Face_handle_blue blue_top_face() const { return Face_handle_blue(m_top_face.blue); } - /*! Set the red top face. */ + /*! sets the red top face. */ void set_red_top_face(Face_handle_red fh) { m_top_face.red = &(*fh); } - /*! Set the blue top face. */ + /*! sets the blue top face. */ void set_blue_top_face(Face_handle_blue fh) { m_top_face.blue = &(*fh); } - /*! Copy the top face from the given subcurve. */ + /*! copies the top face from the given subcurve. */ void set_top_face(const Self* sc) { CGAL_precondition(sc->m_above == nullptr); diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h index 0adb3c3e831..5a3024de96c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h @@ -125,10 +125,10 @@ private: const Gt2* m_base_traits; // The base traits object. public: - /*! Default constructor. */ + /*! constructs default. */ Arr_overlay_traits_2() {} - /*! Constructor from a base traits class. */ + /*! constructs from a base traits class. */ Arr_overlay_traits_2(const Gt2& base_tr) : m_base_traits(&base_tr) {} const Gt2* base_traits() const { return m_base_traits; } @@ -148,21 +148,21 @@ public: Halfedge_handle_blue m_blue_halfedge_handle; // The blue halfedge. public: - /*! Default constructor. */ + /*! constructs default. */ Ex_x_monotone_curve_2() : m_base_xcv(), m_red_halfedge_handle(), m_blue_halfedge_handle() {} - /*! Constructor from a curve. */ + /*! constructs from a curve. */ Ex_x_monotone_curve_2(const Base& xcv) : m_base_xcv(xcv), m_red_halfedge_handle(), m_blue_halfedge_handle() {} - /*! Constructor from a curve and halfedge handles. */ + /*! constructs from a curve and halfedge handles. */ Ex_x_monotone_curve_2(const Base& xcv, Halfedge_handle_red he_r, Halfedge_handle_blue he_b) : @@ -176,27 +176,27 @@ public: (he_b->direction() == ARR_RIGHT_TO_LEFT)); } - /*! Get the base curve (const version). */ + /*! obtains the base curve (const version). */ const Base& base() const { return m_base_xcv; } - /*! Get the base curve (non-const version). */ + /*! obtains the base curve (non-const version). */ Base& base() { return m_base_xcv; } - /*! Casting to a base curve (const version). */ + /*! casts to a base curve (const version). */ operator const Base&() const { return m_base_xcv; } - /*! Casting to a base curve (const version). */ + /*! casts to a base curve (const version). */ operator Base&() { return m_base_xcv; } - /*! Get the red halfedge handle. */ + /*! obtains the red halfedge handle. */ Halfedge_handle_red red_halfedge_handle() const { return m_red_halfedge_handle; } - /*! Get the blue halfedge handle. */ + /*! obtains the blue halfedge handle. */ Halfedge_handle_blue blue_halfedge_handle() const { return m_blue_halfedge_handle; } - /*! Set the red halfedge handle. */ + /*! sets the red halfedge handle. */ void set_red_halfedge_handle(Halfedge_handle_red he_r) { CGAL_precondition((he_r == Halfedge_handle_red()) || @@ -205,7 +205,7 @@ public: m_red_halfedge_handle = he_r; } - /*! Set the blue halfedge handle. */ + /*! sets the blue halfedge handle. */ void set_blue_halfedge_handle(Halfedge_handle_blue he_b) { CGAL_precondition((he_b == Halfedge_handle_blue()) || @@ -214,7 +214,7 @@ public: m_blue_halfedge_handle = he_b; } - /*! Get the color of the subcurve. */ + /*! obtains the color of the subcurve. */ Color color() const { Halfedge_handle_red null_red_he; @@ -258,21 +258,21 @@ public: Optional_cell_blue m_blue_cell; // The "blue" object. public: - /*! Default constructor. */ + /*! constructs default. */ Ex_point_2() : m_base_pt(), m_red_cell(), m_blue_cell() {} - /*! Constructor from a base point. */ + /*! constructs from a base point. */ Ex_point_2(const Base& pt) : m_base_pt(pt), m_red_cell(), m_blue_cell() {} - /*! Constructor from a base point with red and blue objects. */ + /*! constructs from a base point with red and blue objects. */ Ex_point_2(const Base& pt, const Optional_cell_red& cell_red, const Optional_cell_blue& cell_blue) : m_base_pt(pt), @@ -280,53 +280,53 @@ public: m_blue_cell(cell_blue) {} - /*! Get the base point (const version). */ + /*! obtains the base point (const version). */ const Base& base() const { return m_base_pt; } - /*! Get the base point (non-const version). */ + /*! obtains the base point (non-const version). */ Base& base() { return m_base_pt; } - /*! Casting to a base point (const version). */ + /*! casts to a base point (const version). */ operator const Base&() const { return m_base_pt; } - /*! Casting to a base point (non-const version). */ + /*! casts to a base point (non-const version). */ operator Base&() { return m_base_pt; } - /*! Get the red object. */ + /*! obtains the red object. */ const Optional_cell_red& red_cell() const { return m_red_cell; } - /*! Get the blue object. */ + /*! obtains the blue object. */ const Optional_cell_blue& blue_cell() const { return m_blue_cell; } - /*! Check if the red object is empty. */ + /*! checks if the red object is empty. */ bool is_red_cell_empty() const { return !m_red_cell; } - /*! Check if the blue object is empty. */ + /*! checks if the blue object is empty. */ bool is_blue_cell_empty() const { return !m_blue_cell; } - /*! Set the red object. */ + /*! sets the red object. */ void set_red_cell(const Optional_cell_red& cell_red) { m_red_cell = cell_red; } - /*! Set the blue object. */ + /*! sets the blue object. */ void set_blue_cell(const Optional_cell_blue& cell_blue) { m_blue_cell = cell_blue; } - /*! Obtain the red cell handle or nullptr if it doesn't exist. */ + /*! obtains the red cell handle or nullptr if it doesn't exist. */ const Cell_handle_red* red_cell_handle() const { return m_red_cell ? &(*m_red_cell) : nullptr; } - /*! Obtain the blue cell handle or nullptr if it doesn't exist. */ + /*! obtains the blue cell handle or nullptr if it doesn't exist. */ const Cell_handle_blue* blue_cell_handle() const { return m_blue_cell ? &(*m_blue_cell) : nullptr; } - /*! Obtain the red vertex handle or nullptr if it doesn't exist. */ + /*! obtains the red vertex handle or nullptr if it doesn't exist. */ const Vertex_handle_red* red_vertex_handle() const { return m_red_cell ? std::get_if(&(*m_red_cell)) : nullptr; } - /*! Obtain the blue vertex handle or nullptr if it doesn't exist. */ + /*! obtains the blue vertex handle or nullptr if it doesn't exist. */ const Vertex_handle_blue* blue_vertex_handle() const { return @@ -354,7 +354,7 @@ public: //! The base traits. const Arr_overlay_traits_2& m_traits; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -500,7 +500,7 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! obtains an Intersect_2 functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } /*! A functor that splits an arc at a point. */ @@ -509,7 +509,7 @@ public: //! The base operator. Base_split_2 m_base_split; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -535,7 +535,7 @@ public: } }; - /*! Obtain a Split_2 functor object. */ + /*! obtains a Split_2 functor object. */ Split_2 split_2_object() const { return Split_2(m_base_traits->split_2_object()); } @@ -546,7 +546,7 @@ public: Base_construct_min_vertex_2 m_base_min_v; Base_equal_2 m_base_equal; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -588,7 +588,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return @@ -603,7 +603,7 @@ public: Base_construct_max_vertex_2 m_base_max_v; Base_equal_2 m_base_equal; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -645,7 +645,7 @@ public: } }; - /*! Obtain a Construct_max_vertex_2 functor object. */ + /*! obtains a Construct_max_vertex_2 functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return @@ -659,7 +659,7 @@ public: //! The base operator. Base_is_vertical_2 m_base_is_vert; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -674,7 +674,7 @@ public: { return m_base_is_vert(xcv.base()); } }; - /*! Obtain a Is_vertical_2 functor object. */ + /*! obtains a Is_vertical_2 functor object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(m_base_traits->is_vertical_2_object()); } @@ -686,7 +686,7 @@ public: //! The base operator. Base_equal_2 m_base_equal; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -705,7 +705,7 @@ public: { return m_base_equal(xcv1.base(), xcv2.base()); } }; - /*! Obtain an `Equal_2` functor object. */ + /*! obtains an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(m_base_traits->equal_2_object()); } @@ -715,7 +715,7 @@ public: //! The base operator. Base_compare_x_2 m_base_cmp_x; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -730,7 +730,7 @@ public: { return m_base_cmp_x(p1.base(), p2.base()); } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(m_base_traits->compare_x_2_object()); } @@ -740,7 +740,7 @@ public: //! The base operator. Base_compare_xy_2 m_base_cmp_xy; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -781,7 +781,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Compare_xy_2 compare_xy_2_object() const { return (Compare_xy_2(m_base_traits->compare_xy_2_object())); } @@ -793,7 +793,7 @@ public: //! The base operator. Base_compare_y_at_x_2 m_base_cmp_y_at_x; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -811,7 +811,7 @@ public: { return m_base_cmp_y_at_x(p.base(), xcv.base()); } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return (Compare_y_at_x_2(m_base_traits->compare_y_at_x_2_object())); } @@ -823,7 +823,7 @@ public: //! The base operator. Base_compare_y_at_x_right_2 m_base_cmp_y_at_x_right; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -842,7 +842,7 @@ public: { return m_base_cmp_y_at_x_right(xcv1.base(), xcv2.base(), p.base()); } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return @@ -859,7 +859,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -949,7 +949,7 @@ public: } }; - /*! Obtain an Parameter_space_in_x_2 functor object. */ + /*! obtains an Parameter_space_in_x_2 functor object. */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(m_base_traits); } @@ -961,7 +961,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -979,7 +979,7 @@ public: { return m_base->is_on_x_identification_2_object()(xcv.base()); } }; - /*! Obtain an Is_on_x_identification_2 functor object. */ + /*! obtains an Is_on_x_identification_2 functor object. */ Is_on_x_identification_2 is_on_x_identification_2_object() const { return Is_on_x_identification_2(m_base_traits); } @@ -991,7 +991,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle the * case it is not stateless (e.g., it stores data). * The constructor is declared protected to allow only the functor @@ -1008,7 +1008,7 @@ public: { return m_base->compare_y_on_boundary_2_object()(pt1.base(), pt2.base()); } }; - /*! Obtain a Compare_y_on_boundary_2 functor. */ + /*! obtains a Compare_y_on_boundary_2 functor. */ Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(m_base_traits); } @@ -1020,7 +1020,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle the * case it is not stateless (e.g., it stores data). * The constructor is declared protected to allow only the functor @@ -1044,7 +1044,7 @@ public: } }; - /*! Obtain a Compare_y_near_boundary_2 functor. */ + /*! obtains a Compare_y_near_boundary_2 functor. */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(m_base_traits); } @@ -1059,7 +1059,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -1081,7 +1081,7 @@ public: { return m_base->parameter_space_in_y_2_object()(xcv.base()); } }; - /*! Obtain an Parameter_space_in_y_2 functor object. */ + /*! obtains an Parameter_space_in_y_2 functor object. */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(m_base_traits); } @@ -1093,7 +1093,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -1111,7 +1111,7 @@ public: { return m_base->is_on_y_identification_2_object()(xcv.base()); } }; - /*! Obtain an Is_on_y_identification_2 functor object. */ + /*! obtains an Is_on_y_identification_2 functor object. */ Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(m_base_traits); } @@ -1123,7 +1123,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle the * case it is not stateless (e.g., it stores data). * The constructor is declared protected to allow only the functor @@ -1157,7 +1157,7 @@ public: } }; - /*! Obtain a Compare_x_on_boundary_2 functor. */ + /*! obtains a Compare_x_on_boundary_2 functor. */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(m_base_traits); } @@ -1169,7 +1169,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle the * case it is not stateless (e.g., it stores data). * The constructor is declared protected to allow only the functor @@ -1192,7 +1192,7 @@ public: } }; - /*! Obtain a Compare_x_near_boundary_2 functor. */ + /*! obtains a Compare_x_near_boundary_2 functor. */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(m_base_traits); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h b/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h index cd31fc96daf..ae70a142872 100644 --- a/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h +++ b/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h @@ -111,14 +111,13 @@ private: public: - /*! Default constructor. */ + /*! constructs default. */ Halfedge_around_vertex_iterator () : _counter(-1), _cend(-1) {} - /*! - * Constructor. + /*! constructs. * \param circ A circulator for the halfedges around a vertex. * \param out_edges Do we need the outgoing or the ingoing halfedges. * \param counter A counter associated with the iterator. @@ -236,16 +235,16 @@ public: // Types not required by any of these concepts: typedef CGAL::Vertex_around_target_iterator adjacency_iterator; - /*! Constructor. */ + /*! constructs. */ graph_traits (const Arrangement_on_surface_2& arr) : p_arr (const_cast (&arr)), arr_access (const_cast (arr)) {} - /*! Nulls */ + /*! nulls */ static vertex_descriptor null_vertex() { return vertex_descriptor(); } - /*! Traverse the vertices. */ + /*! traverses the vertices. */ vertices_size_type number_of_vertices() { return arr_access.number_of_valid_vertices(); @@ -261,7 +260,7 @@ public: return arr_access.valid_vertices_end(); } - /*! Traverse the edges. */ + /*! traverses the edges. */ edge_iterator edges_begin() { return p_arr->halfedges_begin(); @@ -272,7 +271,7 @@ public: return p_arr->halfedges_end(); } - /*! Get the vertex degree (in degree or out degree). */ + /*! obtains the vertex degree (in degree or out degree). */ degree_size_type degree (vertex_descriptor v) { if (v->is_isolated()) @@ -293,7 +292,7 @@ public: return deg; } - /*! Traverse the outgoing halfedges of a given vertex. */ + /*! traverses the outgoing halfedges of a given vertex. */ out_edge_iterator out_edges_begin (vertex_descriptor v) { if (v->is_isolated()) @@ -311,7 +310,7 @@ public: return out_edge_iterator (v->incident_halfedges(), true, deg, deg); } - /*! Traverse the ingoing halfedges of a given vertex. */ + /*! traverses the ingoing halfedges of a given vertex. */ in_edge_iterator in_edges_begin (vertex_descriptor v) { if (v->is_isolated()) @@ -350,7 +349,7 @@ class graph_traits > : public: - /*! Constructor. */ + /*! constructs. */ graph_traits (const CGAL::Arrangement_2& arr) : Base (arr) {} @@ -363,8 +362,7 @@ namespace CGAL { // Functions required by the IncidenceGraph concept: // ------------------------------------------------- -/*! - * Get the out-degree of a vertex in a given arrangement. +/*! obtains the out-degree of a vertex in a given arrangement. * \param v The vertex. * \param arr The arrangement. * \param Number of outgoing halfedges from v. @@ -385,8 +383,7 @@ out_degree (typename return gt_arr.degree (v); } -/*! - * Return a range of the out-edges of a vertex given by its descriptor and the +/*! returns a range of the out-edges of a vertex given by its descriptor and the * arrangement it belongs to. * \param v The vertex. * \param arr The arrangement. @@ -427,8 +424,7 @@ adjacent_vertices(typename return CGAL::vertices_around_target(v,arr); } -/*! - * Get the source vertex of an arrangement edge. +/*! obtains the source vertex of an arrangement edge. * \param e The edge. * \param arr The arrangement. * \return The source vertex of e. @@ -446,8 +442,7 @@ source (typename return e->source(); } -/*! - * Get the target vertex of an arrangement edge. +/*! obtains the target vertex of an arrangement edge. * \param e The edge. * \param arr The arrangement. * \return The source vertex of e. @@ -468,8 +463,7 @@ target (typename // Functions required by the BidirectionalGraph concept: // ----------------------------------------------------- -/*! - * Get the in-degree of a vertex in a given arrangement. +/*! obtains the in-degree of a vertex in a given arrangement. * \param v The vertex. * \param arr The arrangement. * \param Number of ingoing halfedges to v. @@ -490,8 +484,7 @@ in_degree (typename return gt_arr.degree (v); } -/*! - * Return a range of the in-edges of a vertex given by its descriptor and the +/*! returns a range of the in-edges of a vertex given by its descriptor and the * arrangement it belongs to. * \param v The vertex. * \param arr The arrangement. @@ -518,8 +511,7 @@ in_edges (typename return std::make_pair (gt_arr.in_edges_begin (v), gt_arr.in_edges_end (v)); } -/*! - * Get the degree of a vertex in a given arrangement. +/*! obtains the degree of a vertex in a given arrangement. * \param v The vertex. * \param arr The arrangement. * \param Number of ingoing and outgoing halfedges incident to v. @@ -543,8 +535,7 @@ degree (typename // Functions required by the VertexListGraph concept: // -------------------------------------------------- -/*! - * Get the number of vertices in the given arrangement. +/*! obtains the number of vertices in the given arrangement. * \param arr The arrangement. * \return Number of vertices. */ @@ -560,8 +551,7 @@ num_vertices (const CGAL::Arrangement_on_surface_2& arr) return gt_arr.number_of_vertices(); } -/*! - * Get the range of vertices of the given arrangement. +/*! obtains the range of vertices of the given arrangement. * \param arr The arrangement. * \return A pair of vertex iterators. */ @@ -585,8 +575,7 @@ vertices (const CGAL::Arrangement_on_surface_2& arr) // Functions required by the EdgeListGraph concept: // ------------------------------------------------ -/*! - * Get the number of halfedges in the given arrangement. +/*! obtains the number of halfedges in the given arrangement. * \param arr The arrangement. * \return Number of halfedges (graph edges). */ @@ -599,8 +588,7 @@ num_edges (const CGAL::Arrangement_on_surface_2& arr) return arr.number_of_halfedges(); } -/*! - * Get the range of halfedges of the given arrangement. +/*! obtains the range of halfedges of the given arrangement. * \param arr The arrangement. * \return A pair of halfedge iterators. */ @@ -621,7 +609,7 @@ edges (const CGAL::Arrangement_on_surface_2& arr) return std::make_pair (gt_arr.edges_begin(), gt_arr.edges_end()); } -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/CMakeLists.txt index adb6df001b3..60add4ac51b 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Arrangement_on_surface_2_Tests) enable_testing() 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 deleted file mode 100755 index d8c26c68390..00000000000 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake +++ /dev/null @@ -1,1749 +0,0 @@ -#! /bin/bash - -# This is a script for the CGAL test suite. Such a script must obey -# the following rules: -# -# - the name of the script is cgal_test -# - for every target two one line messages are written to the file 'error.txt' -# the first one indicates if the compilation was successful -# the second one indicates if the execution was successful -# if one of the two was not successful, the line should start with 'ERROR:' -# - running the script should not require any user interaction -# - the script should clean up object files and executables - -# SET PARAMETERS FOR cgal_test - -set -- -cmake -ERRORFILE=error.txt -DO_RUN=y -if [ -z "${MAKE_CMD}" ]; then - MAKE_CMD=make -fi - - -FULL_ERROR_DESCRIPTION_FILE=ProgramOutput.error.txt - -#---------------------------------------------------------------------# -# compile_and_run -#---------------------------------------------------------------------# - -# note that these values shloud match to the values in test_configuration.h file - -CARTESIAN_KERNEL=0 -SIMPLE_CARTESIAN_KERNEL=1 -UNIVARIATE_ALGEBRAIC_KERNEL=2 - -SEGMENT_GEOM_TRAITS=0 -NON_CACHING_SEGMENT_GEOM_TRAITS=1 -POLYLINE_GEOM_TRAITS=2 -NON_CACHING_POLYLINE_GEOM_TRAITS=3 -POLYCURVE_CONIC_GEOM_TRAITS=14 -POLYCURVE_CIRCULAR_ARC_GEOM_TRAITS=15 -POLYCURVE_BEZIER_GEOM_TRAITS=16 -LINEAR_GEOM_TRAITS=4 -CORE_CONIC_GEOM_TRAITS=5 -LINE_ARC_GEOM_TRAITS=6 -CIRCULAR_ARC_GEOM_TRAITS=7 -CIRCULAR_LINE_ARC_GEOM_TRAITS=8 -CIRCLE_SEGMENT_GEOM_TRAITS=9 -BEZIER_GEOM_TRAITS=10 -GEODESIC_ARC_ON_SPHERE_GEOM_TRAITS=11 -RATIONAL_ARC_GEOM_TRAITS=12 -ALGEBRAIC_GEOM_TRAITS=13 -POLYCURVE_CONIC_GEOM_TRAITS=14 -POLYCURVE_CIRCULAR_ARC_GEOM_TRAITS=15 -POLYCURVE_BEZIER_GEOM_TRAITS=16 -FLAT_TORUS_GEOM_TRAITS=17 - -PLANAR_BOUNDED_TOPOL_TRAITS=0 -PLANAR_UNBOUNDED_TOPOL_TRAITS=1 -SPHERICAL_TOPOL_TRAITS=2 - -DOUBLE_NT=0 -MP_FLOAT_NT=1 -GMPZ_NT=2 -LEDA_RAT_NT=3 -QUOTIENT_MP_FLOAT_NT=4 -QUOTIENT_CGAL_GMPZ_NT=5 -CGAL_GMPQ_NT=6 -LAZY_LEDA_RAT_NT=7 -LAZY_CGAL_GMPQ_NT=8 -LAZY_QUOTIENT_MP_FLOAT_NT=9 -LEDA_REAL_NT=10 -CORE_EXPR_NT=11 -LAZY_GMPZ_NT=12 -LEDA_INT_NT=13 -CGAL_GMPZ_NT=14 -CORE_INT_NT=15 -CORE_RAT_NT=16 - -if [ -n "${CGAL_DISABLE_GMP}" ]; then - if [ -n "CGAL_USE_LEDA" ]; then - echo GMP is disabled, try to use LEDA instead. - GMPZ_NT=$LEDA_INT_NT - QUOTIENT_CGAL_GMPZ_NT=$LEDA_RAT_NT - CGAL_GMPQ_NT=$LEDA_RAT_NT - LAZY_CGAL_GMPQ_NT=$LAZY_LEDA_RAT_NT - LAZY_GMPZ_NT=$LAZY_LEDA_RAT_NT - CGAL_GMPZ_NT=$LEDA_INT_NT - else - echo GMP is disabled, try to use MP float instead. - GMPZ_NT=$MP_FLOAT_NT - QUOTIENT_CGAL_GMPZ_NT=$QUOTIENT_MP_FLOAT_NT - CGAL_GMPQ_NT=$QUOTIENT_MP_FLOAT_NT - LAZY_CGAL_GMPQ_NT=$LAZY_QUOTIENT_MP_FLOAT_NT - LAZY_GMPZ_NT=$LAZY_QUOTIENT_MP_FLOAT_NT - CGAL_GMPZ_NT=$MP_FLOAT_NT - fi -fi - -COMPARE=1 -VERTEX=2 -IS_VERTICAL=3 -COMPARE_Y_AT_X=4 -COMPARE_Y_AT_X_LEFT=5 -COMPARE_Y_AT_X_RIGHT=6 -MAKE_X_MONOTONE=7 -INTERSECT=8 -SPLIT=9 -ARE_MERGEABLE=10 -MERGE=11 -ASSERTIONS=12 -CONSTRUCTOR=13 -COMPARE_X_ON_BOUNDARY=16 -COMPARE_X_NEAR_BOUNDARY=17 -COMPARE_Y_NEAR_BOUNDARY=18 -PARAMETER_SPACE_X=19 -PARAMETER_SPACE_Y=20 -X_ON_IDENTIFICATION=21 -Y_ON_IDENTIFICATION=22 -IS_BOUNDED=23 -IS_IN_X_RANGE=24 -COMPARE_Y_POSITION=25 -IS_BETWEEN_CW=26 -COMPARE_CW_AROUND_POINT=27 -PUSH_BACK=28 -PUSH_FRONT=29 -NUMBER_OF_POINTS=32 -COMPARE_ENDPOINTS_XY=33 -CONSTRUCT_OPPOSITE=34 -TRIM=35 - -#---------------------------------------------------------------------# -# configure -#---------------------------------------------------------------------# - -configure() -{ - echo "Configuring... " - rm -rf CMakeCache.txt CMakeFiles/ - if [ -f "$INIT_FILE" ] - then - if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} -DRUNNING_CGAL_AUTO_TEST=TRUE \ - -DCGAL_DIR="$CGAL_DIR" \ - -DCGAL_CXX_FLAGS:STRING="$CGAL_CXX_FLAGS $TESTSUITE_CXXFLAGS -I../../include" \ - -DCGAL_EXE_LINKER_FLAGS="$CGAL_EXE_LINKER_FLAGS $TESTSUITE_LDFLAGS" \ - .' ; then - - echo " successful configuration" >> $ERRORFILE - else - echo " ERROR: configuration" >> $ERRORFILE - fi - else - echo "cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ - -DCGAL_DIR=\"$CGAL_DIR\" \ - -DCGAL_CXX_FLAGS:STRING=\"$TESTSUITE_CXXFLAGS -I../../include\" \ - -DCGAL_EXE_LINKER_FLAGS=\"$TESTSUITE_LDFLAGS\" \ - -DCMAKE_BUILD_TYPE=NOTFOUND \ - ." - if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \ - -DCGAL_DIR="$CGAL_DIR" \ - -DCGAL_CXX_FLAGS:STRING="$TESTSUITE_CXXFLAGS -I../../include" \ - -DCGAL_EXE_LINKER_FLAGS="$TESTSUITE_LDFLAGS" \ - -DCMAKE_BUILD_TYPE=NOTFOUND \ - .' ; then - - echo " successful configuration" >> $ERRORFILE - else - echo " ERROR: configuration" >> $ERRORFILE - fi - fi -} - -compile_test_with_flags() -{ - local name=$1; - local type=$2; - local flags=$3; - - echo "Compiling $name $type ... " - if [ "${TEST_WITH_CMAKE}" != "FALSE" ]; then - export TESTSUITE_CXXFLAGS="$flags" - configure - if eval '${MAKE_CMD} VERBOSE=1 -fMakefile \ - $name' ; then - echo " successful compilation of $name $type" >> $ERRORFILE; - SUCCESS="y" - else - echo " ERROR: compilation of $name $type" >> $ERRORFILE; - SUCCESS="" - fi - else - if eval 'make CGAL_MAKEFILE=$CGAL_MAKEFILE \ - TESTSUITE_CXXFLAGS="$TESTSUITE_CXXFLAGS" \ - TESTSUITE_LDFLAGS="$TESTSUITE_LDFLAGS" $name'; then - echo " successful compilation of $name $type" >> $ERRORFILE; - SUCCESS="y" - else - echo " ERROR: compilation of $name $type" >> $ERRORFILE; - SUCCESS="" - fi - fi -} - -run_test() -{ - # $1 - executable name - - basedata=`basename "$5"` - OUTPUTFILE="ProgramOutput.$1" - rm -f $OUTPUTFILE - COMMAND="./$1" - if [ -f $1.cmd ] ; then - COMMAND="$COMMAND `cat $1.cmd`" - fi - if [ -f $1.cin ] ; then - COMMAND="cat $1.cin | $COMMAND" - fi - OUTPUTFILE="$OUTPUTFILE.$PLATFORM" - echo "Executing $1 ($2) ... " - ulimit -t 3600 2> /dev/null - if eval $COMMAND > $OUTPUTFILE 2>&1 ; then - echo " successful execution of $1" >> $ERRORFILE - else - echo " ERROR: execution of $1" >> $ERRORFILE - cat $OUTPUTFILE >> $FULL_ERROR_DESCRIPTION_FILE - fi -} - -run_test_with_flags() -{ - # $1 - executable name - # $2 - test substring name - - basedata=`basename "$5"` - OUTPUTFILE="ProgramOutput.$1" - rm -f $OUTPUTFILE - COMMAND="./$1" - if [ -f $1.cmd ] ; then - COMMAND="$COMMAND `cat $1.cmd`" - elif [ -f $1.$2.cmd ] ; then - COMMAND="$COMMAND `cat $1.$2.cmd`" - OUTPUTFILE=$OUTPUTFILE.`echo $2 | tr '/' '.'` - fi - if [ -f $1.cin ] ; then - COMMAND="cat $1.cin | $COMMAND" - elif [ -f $1.$2.cin ] ; then - COMMAND="cat $1.$2.cin | $COMMAND" - OUTPUTFILE=$OUTPUTFILE.`echo $2 | tr '/' '.'` - fi - OUTPUTFILE="$OUTPUTFILE.$PLATFORM" - echo "Executing $1 ($2) ... " - ulimit -t 3600 2> /dev/null - if eval $COMMAND > $OUTPUTFILE 2>&1 ; then - echo " successful execution of $1 ($2)" >> $ERRORFILE - else - echo " ERROR: execution of $1 ($2)" >> $ERRORFILE - cat $OUTPUTFILE >> $FULL_ERROR_DESCRIPTION_FILE - fi -} - -run_test_alt() -{ - basedata=`basename "$5"` - OUTPUTFILE=ProgramOutput.$1.`echo $5 | tr '/' '.'`.$6 - #echo ****generating file $OUTPUTFILE - # dirdata=`dirname "$datafile"` - rm -f $OUTPUTFILE - COMMAND="./$1" - echo "Executing $1 $5 $6 ... " - if eval $COMMAND $2 $3 $4 $5 $6 > $OUTPUTFILE 2>&1 ; then - echo " successful execution of $5 $6" >> $ERRORFILE - else - echo " ERROR: execution of $5 $6" >> $ERRORFILE - cat $OUTPUTFILE >> $FULL_ERROR_DESCRIPTION_FILE - fi -} - -run_trapped_test() -{ - #local name=$1; - #local datafile=$2; - - if [ "${OSTYPE}" != "cygwin" ]; then - ulimit -t 1200 - run_test_alt $1 $2 $3 $4 $5 $6 - else - run_test_alt $1 $2 $3 $4 $5 $6 & - WPID=$! - trap "kill -9 $WPID" INT - (sleep 1200; kill -9 $WPID) > /dev/null 2>&1 & - SPID=$! - wait $WPID > /dev/null 2>&1 - # RES=$? - kill -9 $SPID > /dev/null 2>&1 - # return $RES - fi -} - -clean_tests() -{ - if [ "${TEST_WITH_CMAKE}" != "FALSE" ]; then - # - # The clean target generated by CMake under cygwin - # always fails for some reason - # - if ! ( uname | grep -q "CYGWIN" ) ; then - make -fMakefile clean - fi - fi - eval "make clean > /dev/null 2>&1" -} - -compile_and_run() -{ - local name=$1; - - echo "Compiling $name ... " - if [ "${TEST_WITH_CMAKE}" != "FALSE" ]; then - if eval '${MAKE_CMD} VERBOSE=1 -fMakefile $1' ; then - echo " successful compilation of $1" >> $ERRORFILE - SUCCESS="y" - else - echo " ERROR: compilation of $1" >> $ERRORFILE - SUCCESS="" - fi - else - SUCCESS="y" - #TESTSUITE_CXXFLAGS="$TESTSUITE_CXXFLAGS" - TESTSUITE_CXXFLAGS="" - TESTSUITE_LDFLAGS="$TESTSUITE_LDFLAGS" - if eval 'make CGAL_MAKEFILE=$CGAL_MAKEFILE \ - TESTSUITE_CXXFLAGS="$TESTSUITE_CXXFLAGS" \ - TESTSUITE_LDFLAGS="$TESTSUITE_LDFLAGS" $name' ; then - echo " successful compilation of $name" >> $ERRORFILE - else - echo " ERROR: compilation of $name" >> $ERRORFILE - SUCCESS="" - fi - fi - - if [ "${TEST_WITH_CMAKE}" != "FALSE" ]; then - if [ -n "$DO_RUN" ] ; then - if [ -n "${SUCCESS}" ] ; then - run_test $1 - else - echo " ERROR: not executed $1" >> $ERRORFILE - fi - fi - else - if [ -n "${SUCCESS}" ] ; then - OUTPUTFILE=ProgramOutput.$name.$PLATFORM - rm -f $OUTPUTFILE - COMMAND="./$name" - if [ -f $name.cmd ] ; then - COMMAND="$COMMAND `cat $name.cmd`" - fi - if [ -f $name.cin ] ; then - COMMAND="cat $name.cin | $COMMAND" - fi - echo "Executing $name ... " - echo " " - if eval $COMMAND > $OUTPUTFILE 2>&1 ; then - echo " successful execution of $name" >> $ERRORFILE - else - echo " ERROR: execution of $name" >> $ERRORFILE - cat $OUTPUTFILE >> $FULL_ERROR_DESCRIPTION_FILE - fi - else - echo " ERROR: not executed $name" >> $ERRORFILE - fi - fi - clean_tests -} - -compile_and_run_trapped_test() -{ - local name=$1; - - if [ "${OSTYPE}" != "cygwin" ]; then - ulimit -t 1200 - compile_and_run $1 - else - compile_and_run $1 & - WPID=$! - trap "kill -9 $WPID" INT - (sleep 1200; kill -9 $WPID) > /dev/null 2>&1 & - SPID=$! - wait $WPID > /dev/null 2>&1 - # RES=$? - kill -9 $SPID > /dev/null 2>&1 - # return $RES - fi -} - -execute_commands_old_structure() -{ - -# at first the tests where designed in such way that all the test input was -# in one file, the points, the xcurves, the curves and the execution block -# this function is used to execute the old tests, one may use it when needed -# but you should remember that separating the input into smaller files creates -# much more modular and comfortable test suite - -# the old structure is default, so this function executes all commands -# except the commands that are given as arguments - - - commands_indicator[COMPARE]=1 - commands_indicator[VERTEX]=1 - commands_indicator[IS_VERTICAL]=1 - commands_indicator[COMPARE_Y_AT_X]=1 - commands_indicator[COMPARE_Y_AT_X_LEFT]=1 - commands_indicator[COMPARE_Y_AT_X_RIGHT]=1 - commands_indicator[MAKE_X_MONOTONE]=1 - commands_indicator[INTERSECT]=1 - commands_indicator[SPLIT]=1 - commands_indicator[ARE_MERGEABLE]=1 - commands_indicator[MERGE]=1 - commands_indicator[ASSERTIONS]=1 - commands_indicator[CONSTRUCTOR]=1 - i=1 - if [ $# -gt 2 ] ; then - for arg in $* ; do - if [ $i -gt 2 ] ; then - commands_indicator[$arg]=0 - fi - let "i+=1" - done - fi - if [ ${commands_indicator[$COMPARE]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/compare.pt data/empty.zero \ - data/empty.zero data/compare $2 - fi - if [ ${commands_indicator[$VERTEX]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/vertex.pt data/$1/vertex.xcv \ - data/empty.zero data/$1/vertex $2 - fi - if [ ${commands_indicator[$IS_VERTICAL]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/is_vertical.xcv data/empty.zero \ - data/$1/is_vertical $2 - fi - if [ ${commands_indicator[$COMPARE_Y_AT_X]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/compare_y_at_x.pt data/$1/compare_y_at_x.xcv \ - data/empty.zero data/$1/compare_y_at_x $2 - fi - if [ ${commands_indicator[$COMPARE_Y_AT_X_LEFT]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/compare_y_at_x_left.pt data/$1/compare_y_at_x_left.xcv \ - data/empty.zero data/$1/compare_y_at_x_left $2 - fi - if [ ${commands_indicator[$COMPARE_Y_AT_X_RIGHT]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/compare_y_at_x_right.pt data/$1/compare_y_at_x_right.xcv \ - data/empty.zero data/$1/compare_y_at_x_right $2 - fi - if [ ${commands_indicator[$MAKE_X_MONOTONE]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/make_x_monotone.xcv \ - data/$1/make_x_monotone.cv data/$1/make_x_monotone $2 - fi - if [ ${commands_indicator[$INTERSECT]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/intersect.pt data/$1/intersect.xcv \ - data/empty.zero data/$1/intersect $2 - fi - if [ ${commands_indicator[$SPLIT]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/split.pt data/$1/split.xcv \ - data/empty.zero data/$1/split $2 - fi - if [ ${commands_indicator[$ARE_MERGEABLE]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/are_mergeable.xcv \ - data/empty.zero data/$1/are_mergeable $2 - fi - if [ ${commands_indicator[$MERGE]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/merge.xcv \ - data/empty.zero data/$1/merge $2 - fi - if [ ${commands_indicator[$ASSERTIONS]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/$1/assertions.pt data/$1/assertions.xcv \ - data/empty.zero data/$1/assertions $2 - fi - if [ ${commands_indicator[$CONSTRUCTOR]} -ne 0 ] ; then - run_trapped_test test_traits \ - data/empty.zero data/$1/constructor.xcv \ - data/$1/constructor.cv data/$1/constructor $2 - fi -} - -execute_commands_new_structure() -{ - -# the new design for the tests includes separation of the test input into 4 -# parts: points file, xcurves file, curves file and execution block file. -# one may reuse the input files for the various tests - -# the new structure is not default, so this function executes only -# commands that are given as arguments - - commands_indicator[COMPARE]=0 - commands_indicator[VERTEX]=0 - commands_indicator[IS_VERTICAL]=0 - commands_indicator[COMPARE_Y_AT_X]=0 - commands_indicator[COMPARE_Y_AT_X_LEFT]=0 - commands_indicator[COMPARE_Y_AT_X_RIGHT]=0 - commands_indicator[MAKE_X_MONOTONE]=0 - commands_indicator[INTERSECT]=0 - commands_indicator[SPLIT]=0 - commands_indicator[ARE_MERGEABLE]=0 - commands_indicator[MERGE]=0 - commands_indicator[ASSERTIONS]=0 - commands_indicator[CONSTRUCTOR]=0 - commands_indicator[COMPARE_X_ON_BOUNDARY]=0 - commands_indicator[COMPARE_X_NEAR_BOUNDARY]=0 - commands_indicator[COMPARE_Y_NEAR_BOUNDARY]=0 - commands_indicator[PARAMETER_SPACE_X]=0 - commands_indicator[PARAMETER_SPACE_Y]=0 - commands_indicator[EQUAL]=0 - commands_indicator[PUSH_BACK]=0 - commands_indicator[PUSH_FRONT]=0 - commands_indicator[NUMBER_OF_POINTS]=0 - commands_indicator[COMPARE_ENDPOINTS_XY]=0 - commands_indicator[CONSTRUCT_OPPOSITE]=0 - commands_indicator[TRIM]=0 - i=1 - if [ $# -gt 2 ] ; then - for arg in $* ; do - if [ $i -gt 2 ] ; then - commands_indicator[$arg]=1 - fi - let "i+=1" - done - fi - if [ ${commands_indicator[$COMPARE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare $2 - fi - if [ ${commands_indicator[$VERTEX]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/vertex $2 - fi - if [ ${commands_indicator[$IS_VERTICAL]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/is_vertical $2 - fi - if [ ${commands_indicator[$COMPARE_X_ON_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_x_on_boundary $2 - fi - if [ ${commands_indicator[$COMPARE_X_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_x_near_boundary $2 - fi - if [ ${commands_indicator[$COMPARE_Y_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_y_near_boundary $2 - fi - if [ ${commands_indicator[$PARAMETER_SPACE_X]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/parameter_space_x $2 - fi - if [ ${commands_indicator[$PARAMETER_SPACE_Y]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/parameter_space_y $2 - fi - if [ ${commands_indicator[$COMPARE_Y_AT_X]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_y_at_x $2 - fi - if [ ${commands_indicator[$COMPARE_Y_AT_X_LEFT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_y_at_x_left $2 - fi - if [ ${commands_indicator[$COMPARE_Y_AT_X_RIGHT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_y_at_x_right $2 - fi - if [ ${commands_indicator[$MAKE_X_MONOTONE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/make_x_monotone $2 - fi - if [ ${commands_indicator[$INTERSECT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/intersect $2 - fi - if [ ${commands_indicator[$SPLIT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/split $2 - fi - if [ ${commands_indicator[$ARE_MERGEABLE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/are_mergeable $2 - fi - if [ ${commands_indicator[$MERGE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/merge $2 - fi - if [ ${commands_indicator[$ASSERTIONS]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/assertions $2 - fi - if [ ${commands_indicator[$CONSTRUCTOR]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/constructor $2 - fi - if [ ${commands_indicator[$EQUAL]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/equal $2 - fi - if [ ${commands_indicator[$PUSH_BACK]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/push_back $2 - fi - if [ ${commands_indicator[$PUSH_FRONT]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/push_front $2 - fi - if [ ${commands_indicator[$NUMBER_OF_POINTS]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/number_of_points $2 - fi - if [ ${commands_indicator[$COMPARE_ENDPOINTS_XY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_endpoints_xy $2 - fi - if [ ${commands_indicator[$CONSTRUCT_OPPOSITE]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/construct_opposite $2 - fi - if [ ${commands_indicator[$TRIM]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/trim $2 - fi -} - -execute_commands_traits_adaptor() -{ - -# the new structure is not default, so this function executes only -# commands that are given as arguments - - commands_indicator[PARAMETER_SPACE_X]=0 - commands_indicator[PARAMETER_SPACE_Y]=0 - commands_indicator[COMPARE_X_ON_BOUNDARY]=0 - commands_indicator[COMPARE_X_NEAR_BOUNDARY]=0 - commands_indicator[COMPARE_Y_NEAR_BOUNDARY]=0 - commands_indicator[COMPARE_Y_AT_X_LEFT]=0 - commands_indicator[ARE_MERGEABLE]=0 - commands_indicator[MERGE]=0 - commands_indicator[X_ON_IDENTIFICATION]=0 - commands_indicator[Y_ON_IDENTIFICATION]=0 - commands_indicator[IS_BOUNDED]=0 - commands_indicator[IS_IN_X_RANGE]=0 - commands_indicator[COMPARE_Y_POSITION]=0 - commands_indicator[IS_BETWEEN_CW]=0 - commands_indicator[COMPARE_CW_AROUND_POINT]=0 - - i=1 - if [ $# -gt 2 ] ; then - for arg in $* ; do - if [ $i -gt 2 ] ; then - commands_indicator[$arg]=1 - fi - let "i+=1" - done - fi - - if [ ${commands_indicator[$PARAMETER_SPACE_X]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/parameter_space_x $2 - fi - if [ ${commands_indicator[$PARAMETER_SPACE_Y]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/parameter_space_y $2 - fi - if [ ${commands_indicator[$COMPARE_X_ON_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_x_on_boundary $2 - fi - if [ ${commands_indicator[$COMPARE_X_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_x_near_boundary $2 - fi - - if [ ${commands_indicator[$COMPARE_Y_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_y_near_boundary $2 - fi - if [ ${commands_indicator[$COMPARE_Y_AT_X_LEFT]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_y_at_x_left $2 - fi - if [ ${commands_indicator[$ARE_MERGEABLE]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/are_mergeable $2 - fi - if [ ${commands_indicator[$MERGE]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/merge $2 - fi - if [ ${commands_indicator[X_ON_IDENTIFICATION]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/x_on_idintification $2 - fi - if [ ${commands_indicator[Y_ON_IDENTIFICATION]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/x_on_idintification $2 - fi - if [ ${commands_indicator[IS_BOUNDED]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/is_bounded $2 - fi - if [ ${commands_indicator[IS_IN_X_RANGE]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/is_in_x_range $2 - fi - if [ ${commands_indicator[COMPARE_Y_POSITION]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_y_position $2 - fi - if [ ${commands_indicator[IS_BETWEEN_CW]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/is_between_cw $2 - fi - if [ ${commands_indicator[COMPARE_CW_AROUND_POINT]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_cw_around_point $2 - fi -} - -#---------------------------------------------------------------------# -# traits adaptor (segments traits) -#---------------------------------------------------------------------# -test_segment_traits_adaptor() -{ - local nt=$QUOTIENT_MP_FLOAT_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$SEGMENT_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits_adaptor segments "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_traits_adaptor segments segments_traits_adaptor \ - COMPARE_Y_POSITION COMPARE_CW_AROUND_POINT COMPARE_Y_AT_X_LEFT \ - ARE_MERGEABLE MERGE IS_IN_X_RANGE IS_BETWEEN_CW - else - echo " ERROR: not executed test_traits_adaptor segment_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# traits adaptor (linear traits) -#---------------------------------------------------------------------# -test_linear_traits_adaptor() -{ - local nt=$QUOTIENT_MP_FLOAT_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$LINEAR_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits_adaptor linear "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_traits_adaptor linear linear_traits_adaptor \ - COMPARE_Y_AT_X_LEFT ARE_MERGEABLE MERGE IS_IN_X_RANGE \ - COMPARE_Y_POSITION IS_BETWEEN_CW COMPARE_CW_AROUND_POINT - else - echo " ERROR: not executed test_traits_adaptor linear_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# traits adaptor (spherical arcs traits) -#---------------------------------------------------------------------# -test_spherical_arcs_traits_adaptor() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$GEODESIC_ARC_ON_SPHERE_GEOM_TRAITS; - local topol_traits=$SPHERICAL_TOPOL_TRAITS - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits -DTEST_TOPOL_TRAITS=$topol_traits"; - - compile_test_with_flags test_traits_adaptor geodesic_arcs_on_sphere "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_traits_adaptor spherical_arcs spherical_arcs_traits_adaptor \ - COMPARE_Y_AT_X_LEFT ARE_MERGEABLE MERGE IS_IN_X_RANGE \ - COMPARE_Y_POSITION IS_BETWEEN_CW COMPARE_CW_AROUND_POINT - else - echo " ERROR: not executed test_traits_adaptor spherical_arcs_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# compile and run test with traits -#---------------------------------------------------------------------# -compile_and_run_with_flags() -{ - local name=$1; - local type=$2; - local flags=$3; - - compile_test_with_flags $name $type "$flags" - if [ -n "${SUCCESS}" ] ; then - if [ -n "$DO_RUN" ] ; then - run_test_with_flags $name $type - fi - else - echo " ERROR: not executed construction of segments" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# construction with segments -#---------------------------------------------------------------------# -test_construction_segments() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$SEGMENT_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - compile_and_run_with_flags test_construction segments "$flags" -} - -#---------------------------------------------------------------------# -# construction with linear curves -#---------------------------------------------------------------------# -test_construction_linear_curves() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$LINEAR_GEOM_TRAITS; - local topol_traits=$PLANAR_UNBOUNDED_TOPOL_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits -DTEST_TOPOL_TRAITS=$topol_traits"; - compile_and_run_with_flags test_construction linear "$flags" -} - -#---------------------------------------------------------------------# -# construction with geodesic arcs on the sphere -#---------------------------------------------------------------------# -test_construction_spherical_arcs() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$GEODESIC_ARC_ON_SPHERE_GEOM_TRAITS; - local topol_traits=$SPHERICAL_TOPOL_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits -DTEST_TOPOL_TRAITS=$topol_traits"; - compile_and_run_with_flags test_construction geodesic_arcs_on_sphere "$flags" -} - -#---------------------------------------------------------------------# -# construction with polylines -#---------------------------------------------------------------------# -test_construction_polylines() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$POLYLINE_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - compile_and_run_with_flags test_construction polylines "$flags" -} - -#---------------------------------------------------------------------# -# overlay with segments -#---------------------------------------------------------------------# -test_overlay_segments() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$SEGMENT_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - compile_and_run_with_flags test_overlay segments "$flags" -} - -#---------------------------------------------------------------------# -# overlay with geodesic arcs on the sphere -#---------------------------------------------------------------------# -test_overlay_spherical_arcs() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$GEODESIC_ARC_ON_SPHERE_GEOM_TRAITS; - local topol_traits=$SPHERICAL_TOPOL_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits -DTEST_TOPOL_TRAITS=$topol_traits"; - compile_and_run_with_flags test_overlay geodesic_arcs_on_sphere "$flags" -} - -#---------------------------------------------------------------------# -# point location with segments -#---------------------------------------------------------------------# -test_point_location_segments() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$SEGMENT_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - compile_and_run_with_flags test_point_location segments "$flags" -} - -# For backward compatibility -test_point_location_segments_conversion() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$SEGMENT_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits -DCGAL_ARR_POINT_LOCATION_CONVERSION"; - compile_and_run_with_flags test_point_location segments "$flags" -} - -#---------------------------------------------------------------------# -# point location dynamic with segments -#---------------------------------------------------------------------# -test_point_location_dynamic_segments() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$SEGMENT_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - compile_and_run_with_flags test_point_location_dynamic segments "$flags" -} - -#---------------------------------------------------------------------# -# point location with circle segments -#---------------------------------------------------------------------# -test_point_location_circle_segments() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$CIRCLE_SEGMENT_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - compile_and_run_with_flags test_point_location circle_segments "$flags" -} - -#---------------------------------------------------------------------# -# point location with linear objects -#---------------------------------------------------------------------# -test_point_location_linear() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$LINEAR_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - compile_and_run_with_flags test_point_location linear "$flags" -} - -#---------------------------------------------------------------------# -# batchecd point location with segments -#---------------------------------------------------------------------# -test_batched_point_location_segments() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$SEGMENT_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - compile_and_run_with_flags test_batched_point_location segments "$flags" -} - -#---------------------------------------------------------------------# -# batchecd point location with linear objects -#---------------------------------------------------------------------# -test_batched_point_location_linear() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$LINEAR_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - compile_and_run_with_flags test_batched_point_location linear "$flags" -} - -#---------------------------------------------------------------------# -# batchecd point location with geodesic arcs on the sphere -#---------------------------------------------------------------------# -test_batched_point_location_spherical_arcs() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$GEODESIC_ARC_ON_SPHERE_GEOM_TRAITS; - local topol_traits=$SPHERICAL_TOPOL_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits -DTEST_TOPOL_TRAITS=$topol_traits"; - compile_and_run_with_flags test_batched_point_location geodesic_arcs_on_sphere "$flags" -} - -#---------------------------------------------------------------------# -# vertical decomposition with segments -#---------------------------------------------------------------------# -test_vertical_decomposition_segments() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$SEGMENT_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - compile_and_run_with_flags test_vertical_decomposition segments "$flags" -} - -#---------------------------------------------------------------------# -# vertical decomposition with linear objects -#---------------------------------------------------------------------# -test_vertical_decomposition_linear() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$LINEAR_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - compile_and_run_with_flags test_vertical_decomposition linear "$flags" -} - -#---------------------------------------------------------------------# -# vertical decomposition with geodesic arcs on the sphere -#---------------------------------------------------------------------# -test_vertical_decomposition_spherical_arcs() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$LINEAR_GEOM_TRAITS; - local topol_traits=$SPHERICAL_TOPOL_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits -DTEST_TOPOL_TRAITS=$topol_traits"; - compile_and_run_with_flags test_vertical_decomposition geodesic_arcs_on_sphere "$flags" -} - -#---------------------------------------------------------------------# -# segment traits -#---------------------------------------------------------------------# -test_segment_traits() -{ - local nt=$QUOTIENT_MP_FLOAT_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$SEGMENT_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits segments "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_old_structure segments segment_traits \ - VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT CONSTRUCTOR \ - COMPARE_Y_AT_X_RIGHT ARE_MERGEABLE - - execute_commands_new_structure segments segment_traits \ - IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT ARE_MERGEABLE - - run_trapped_test test_traits \ - data/segments/vertex.pt data/segments/xcurves \ - data/empty.zero data/segments/vertex segment_traits - else - echo " ERROR: not executed test_traits segment_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# non-caching segment traits -#---------------------------------------------------------------------# -test_non_caching_segment_traits() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$NON_CACHING_SEGMENT_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits non_caching_segments "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_old_structure segments non_caching_segment_traits \ - VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT CONSTRUCTOR \ - COMPARE_Y_AT_X_RIGHT ARE_MERGEABLE ASSERTIONS - - execute_commands_new_structure segments segment_traits \ - IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT - - run_trapped_test test_traits \ - data/segments/vertex.pt data/segments/xcurves \ - data/empty.zero data/segments/vertex non_caching_segment_traits - else - echo " ERROR: not executed test_traits non_caching_segment_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# polycurve conic traits -#---------------------------------------------------------------------# -test_polycurve_conic_traits() -{ - if [ -n "${CGAL_DISABLE_GMP}" ]; then - echo "CORE is not available, test_polycurve_conic_traits not ran" - return - fi - echo polycurve test starting - local nt=$CORE_EXPR_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$POLYCURVE_CONIC_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits conic_polycurve "$flags" - if [ -n "${SUCCESS}" ] ; then - - # The input arguments for the execute_commands_new_structure, - # 1. polycurve_conics is the directory name in "data" - # 2. polycurve_conic_traits is a string - # Execute_command_new_structure will only run the test on functors provided as the third, fourth and so on arguments. - # To see how the input data directory should be structured for each functor, check the execute_commands_new_structure function in this file. - execute_commands_new_structure polycurves_conics polycurve_conic_traits \ - COMPARE_Y_AT_X \ - INTERSECT \ - EQUAL \ - IS_VERTICAL \ - SPLIT \ - ARE_MERGEABLE \ - COMPARE_Y_AT_X_LEFT \ - COMPARE_Y_AT_X_RIGHT \ - MAKE_X_MONOTONE \ - PUSH_BACK \ - PUSH_FRONT \ - NUMBER_OF_POINTS \ - VERTEX \ - CONSTRUCT_OPPOSITE \ - MERGE \ - COMPARE_ENDPOINTS_XY \ - TRIM - - else - echo " ERROR: not executed test_traits polyline_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# polycurve arc traits -#---------------------------------------------------------------------# -test_polycurve_circular_arc_traits() -{ - local nt=$QUOTIENT_MP_FLOAT_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$POLYCURVE_CIRCULAR_ARC_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits circular_arc_polycurve "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_new_structure polycurves_circular_arcs polycurve_circular_arc_traits \ - COMPARE_Y_AT_X \ - EQUAL \ - IS_VERTICAL \ - SPLIT \ - ARE_MERGEABLE \ - COMPARE_Y_AT_X_LEFT \ - COMPARE_Y_AT_X_RIGHT \ - MAKE_X_MONOTONE \ - PUSH_BACK \ - PUSH_FRONT \ - NUMBER_OF_POINTS \ - VERTEX \ - CONSTRUCT_OPPOSITE \ - MERGE \ - COMPARE_ENDPOINTS_XY \ - INTERSECT - - else - echo " ERROR: not executed test_traits polyline_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# polycurve bezier traits -#---------------------------------------------------------------------# -test_polycurve_bezier_traits() -{ - if [ -n "${CGAL_DISABLE_GMP}" ]; then - echo "CORE is not available, test_polycurve_bezier_traits not ran" - return - fi - local nt=$CORE_EXPR_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$POLYCURVE_BEZIER_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits bezier_polycurve "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_new_structure polycurves_bezier test_polycurve_bezier_traits \ - MERGE \ - EQUAL \ - IS_VERTICAL \ - NUMBER_OF_POINTS \ - PUSH_BACK \ - PUSH_FRONT \ - VERTEX \ - ARE_MERGEABLE \ - COMPARE_ENDPOINTS_XY - # TODO (add data for these tests) - # COMPARE_Y_AT_X \ - # SPLIT \ - # COMPARE_Y_AT_X_LEFT \ - # COMPARE_Y_AT_X_RIGHT \ - # MAKE_X_MONOTONE \ - # CONSTRUCT_OPPOSITE \ - - # INTERSECT - - else - echo " ERROR: not executed test_traits polyline_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# polyline traits -#---------------------------------------------------------------------# -test_polyline_traits() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$POLYLINE_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits test_polylines "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_old_structure polylines polyline_traits \ - CONSTRUCTOR COMPARE_Y_AT_X_LEFT \ - COMPARE_Y_AT_X_RIGHT ARE_MERGEABLE - else - echo " ERROR: not executed test_traits polyline_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# non-caching polyline traits -#---------------------------------------------------------------------# -test_non_caching_polyline_traits() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$NON_CACHING_POLYLINE_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits non_caching_polylines "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_old_structure polylines non_caching_polyline_traits \ - CONSTRUCTOR COMPARE_Y_AT_X_LEFT \ - COMPARE_Y_AT_X_RIGHT ARE_MERGEABLE - else - echo " ERROR: not executed test_traits non_caching_polyline_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# linear traits -#---------------------------------------------------------------------# -test_linear_traits() -{ - local nt=$QUOTIENT_MP_FLOAT_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$LINEAR_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits linear "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_old_structure linear/segments linear_traits.segments \ - VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT \ - COMPARE_Y_AT_X_RIGHT CONSTRUCTOR ARE_MERGEABLE - - execute_commands_new_structure linear/segments linear_traits.segments \ - IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT - - run_trapped_test test_traits \ - data/linear/segments/vertex.pt data/linear/segments/xcurves \ - data/empty.zero data/linear/segments/vertex linear_traits.segments - - execute_commands_old_structure linear/rays linear_traits.rays \ - VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT \ - COMPARE_Y_AT_X_RIGHT CONSTRUCTOR ARE_MERGEABLE - - execute_commands_new_structure linear/rays linear_traits.rays \ - IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT - - run_trapped_test test_traits \ - data/linear/rays/vertex.pt data/linear/rays/xcurves \ - data/empty.zero data/linear/rays/vertex linear_traits.rays - - execute_commands_new_structure linear/lines linear_traits.lines \ - IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT INTERSECT \ - SPLIT MERGE \ - PARAMETER_SPACE_X PARAMETER_SPACE_Y \ - COMPARE_X_ON_BOUNDARY COMPARE_X_NEAR_BOUNDARY COMPARE_Y_NEAR_BOUNDARY - else - echo " ERROR: not executed test_traits linear_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# conic traits -#---------------------------------------------------------------------# -test_conic_traits() -{ - if [ -n "${CGAL_DISABLE_GMP}" ]; then - echo "CORE is not available, test_conic_traits not ran" - return - fi - local nt=$CORE_EXPR_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$CORE_CONIC_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits conics "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_old_structure conics conic_traits \ - INTERSECT SPLIT MERGE COMPARE_Y_AT_X_LEFT \ - COMPARE_Y_AT_X_RIGHT ARE_MERGEABLE - - execute_commands_new_structure conics conic_traits \ - INTERSECT SPLIT MERGE - - run_trapped_test test_traits \ - data/conics/compare.pt data/empty.zero \ - data/empty.zero data/conics/compare conic_traits - else - echo " ERROR: not executed test_traits conic_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# "line arcs" (segments) only -#---------------------------------------------------------------------# -test_line_arc_traits() -{ - local nt=$QUOTIENT_MP_FLOAT_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$LINE_ARC_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits line_arcs "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_old_structure circular_lines line_arc_traits \ - VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT \ - ASSERTIONS COMPARE_Y_AT_X_RIGHT MERGE ARE_MERGEABLE - - execute_commands_new_structure circular_lines line_arc_traits \ - IS_VERTICAL COMPARE_Y_AT_X - - run_trapped_test test_traits \ - data/circular_lines/compare.pt data/empty.zero \ - data/empty.zero data/circular_lines/compare line_arc_traits - - run_trapped_test test_traits \ - data/circular_lines/vertex.pt data/circular_lines/xcurves \ - data/empty.zero data/circular_lines/vertex line_arc_traits - else - echo " ERROR: not executed test_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# circular arcs only -#---------------------------------------------------------------------# -test_circular_arc_traits() -{ - local nt=$QUOTIENT_MP_FLOAT_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$CIRCULAR_ARC_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits circular_arcs "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_old_structure circular_arcs circular_arc_traits \ - VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT \ - ASSERTIONS COMPARE_Y_AT_X_RIGHT MERGE ARE_MERGEABLE - - execute_commands_new_structure circular_arcs circular_arc_traits \ - VERTEX IS_VERTICAL COMPARE_Y_AT_X - else - echo " ERROR: not executed test_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# circular and line arcs -#---------------------------------------------------------------------# -test_circular_line_arc_traits() -{ - local nt=$QUOTIENT_MP_FLOAT_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$CIRCULAR_LINE_ARC_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits circular_line_arcs "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_old_structure circular_line_arcs circular_line_arc_traits \ - VERTEX IS_VERTICAL CONSTRUCTOR COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT \ - ASSERTIONS COMPARE_Y_AT_X_RIGHT MERGE ARE_MERGEABLE - - execute_commands_new_structure circular_line_arcs circular_line_arc_traits \ - IS_VERTICAL COMPARE_Y_AT_X - - run_trapped_test test_traits \ - data/circular_line_arcs/vertex.pt data/circular_line_arcs/xcurves \ - data/empty.zero data/circular_line_arcs/vertex circular_line_arc_traits - else - echo " ERROR: not executed test_traits circular_line_arc_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# circle segment traits -#---------------------------------------------------------------------# -test_circle_segments_traits() -{ - local nt=$QUOTIENT_MP_FLOAT_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$CIRCLE_SEGMENT_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits circle_segments "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_old_structure circle_segments circle_segments_traits \ - VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT \ - COMPARE_Y_AT_X_RIGHT CONSTRUCTOR ARE_MERGEABLE - - run_trapped_test test_traits \ - data/circle_segments/points data/circle_segments/xcurves.8 \ - data/empty.zero data/circle_segments/vertex circle_segments_traits - run_trapped_test test_traits \ - data/empty.zero data/circle_segments/xcurves.8 \ - data/empty.zero data/circle_segments/is_vertical circle_segments_traits - run_trapped_test test_traits \ - data/circle_segments/points data/circle_segments/xcurves.8 \ - data/empty.zero data/circle_segments/compare_y_at_x circle_segments_traits - run_trapped_test test_traits \ - data/circle_segments/points data/circle_segments/xcurves.16 \ - data/empty.zero data/circle_segments/compare_y_at_x_left circle_segments_traits - run_trapped_test test_traits \ - data/circle_segments/points data/circle_segments/xcurves.16 \ - data/empty.zero data/circle_segments/compare_y_at_x_right circle_segments_traits - run_trapped_test test_traits \ - data/empty.zero data/circle_segments/constructor.xcv \ - data/empty.zero data/circle_segments/constructor circle_segments_traits - else - echo " ERROR: not executed test_traits circle_segments_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# bezier traits -#---------------------------------------------------------------------# -test_bezier_traits() -{ - if [ -n "${CGAL_DISABLE_GMP}" ]; then - echo "CORE is not available, test_bezier_traits not ran" - return - fi - local nt=$CORE_EXPR_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$BEZIER_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits Bezier "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_old_structure bezier bezier_traits \ - COMPARE_Y_AT_X_LEFT COMPARE_Y_AT_X_RIGHT SPLIT \ - CONSTRUCTOR ASSERTIONS ARE_MERGEABLE - else - echo " ERROR: not executed test_traits bezier_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# spherical arc traits -#---------------------------------------------------------------------# -test_spherical_arc_traits() -{ - local nt=$CGAL_GMPQ_NT; - local kernel=$CARTESIAN_KERNEL; - local geom_traits=$GEODESIC_ARC_ON_SPHERE_GEOM_TRAITS; - local topol_traits=$SPHERICAL_TOPOL_TRAITS - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits -DTEST_TOPOL_TRAITS=$topol_traits"; - - compile_test_with_flags test_traits geodesic_arcs_on_sphere "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_old_structure spherical_arcs spherical_arc_traits \ - COMPARE_Y_AT_X_LEFT COMPARE_Y_AT_X_RIGHT INTERSECT \ - CONSTRUCTOR \ - COMPARE MAKE_X_MONOTONE SPLIT MERGE ASSERTIONS ARE_MERGEABLE - - execute_commands_new_structure spherical_arcs spherical_arc_traits \ - INTERSECT \ - COMPARE_X_ON_BOUNDARY COMPARE_X_NEAR_BOUNDARY \ - COMPARE_Y_NEAR_BOUNDARY - - run_trapped_test test_traits \ - data/spherical_arcs/compare.pt data/spherical_arcs/compare.xcv \ - data/empty.zero data/spherical_arcs/compare spherical_arc_traits - else - echo " ERROR: not executed test_traits spherical_arc_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# rational arc traits -#---------------------------------------------------------------------# -test_rational_arc_traits() -{ - if [ -n "${CGAL_DISABLE_GMP}" ]; then - echo "CORE is not available, test_rational_arc_traits not ran" - return - fi - local nt=$CORE_INT_NT; - local kernel=$UNIVARIATE_ALGEBRAIC_KERNEL; - local geom_traits=$RATIONAL_ARC_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits rational_arcs "$flags" - if [ -n "${SUCCESS}" ] ; then - run_trapped_test test_traits \ - data/compare.pt data/empty.zero \ - data/empty.zero data/compare rational_arc_traits - - execute_commands_new_structure rational_arcs rational_arc_traits \ - VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT SPLIT MERGE \ - COMPARE_X_ON_BOUNDARY COMPARE_X_NEAR_BOUNDARY COMPARE_Y_NEAR_BOUNDARY - else - echo " ERROR: not executed test_traits rational_arc_traits" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# algebraic traits with GMP/MPFI -#---------------------------------------------------------------------# -test_algebraic_traits_gmp() -{ - #TODO: Adapt - - local nt=$CGAL_GMPZ_NT; - local kernel=$UNIVARIATE_ALGEBRAIC_KERNEL; - local geom_traits=$ALGEBRAIC_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits algebraic "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_new_structure algebraic algebraic_traits_gmp \ - COMPARE COMPARE_Y_AT_X COMPARE_Y_AT_X_RIGHT COMPARE_Y_AT_X_LEFT \ - MAKE_X_MONOTONE IS_VERTICAL VERTEX SPLIT MERGE INTERSECT \ - PARAMETER_SPACE_X PARAMETER_SPACE_Y - else - echo " ERROR: not executed test_traits algebraic_traits_gmp" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# algebraic traits with LEDA -#---------------------------------------------------------------------# -test_algebraic_traits_leda() -{ - #TODO: Adapt - - local nt=$LEDA_INT_NT; - local kernel=$UNIVARIATE_ALGEBRAIC_KERNEL; - local geom_traits=$ALGEBRAIC_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits algebraic "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_new_structure algebraic algebraic_traits_leda \ - COMPARE COMPARE_Y_AT_X COMPARE_Y_AT_X_RIGHT COMPARE_Y_AT_X_LEFT \ - MAKE_X_MONOTONE IS_VERTICAL VERTEX SPLIT MERGE INTERSECT \ - PARAMETER_SPACE_X PARAMETER_SPACE_Y - else - echo " ERROR: not executed test_traits algebraic_traits_leda" >> $ERRORFILE - fi - clean_tests -} - - -#---------------------------------------------------------------------# -# algebraic traits with CORE -#---------------------------------------------------------------------# -test_algebraic_traits_core() -{ - #TODO: Adapt - if [ -n "${CGAL_DISABLE_GMP}" ]; then - echo "CORE is not available, test_algebraic_traits_core not ran" - return - fi - local nt=$CORE_INT_NT; - local kernel=$UNIVARIATE_ALGEBRAIC_KERNEL; - local geom_traits=$ALGEBRAIC_GEOM_TRAITS; - local flags="-DTEST_NT=$nt -DTEST_KERNEL=$kernel -DTEST_GEOM_TRAITS=$geom_traits"; - - compile_test_with_flags test_traits algebraic "$flags" - if [ -n "${SUCCESS}" ] ; then - execute_commands_new_structure algebraic algebraic_traits_core \ - COMPARE COMPARE_Y_AT_X COMPARE_Y_AT_X_RIGHT COMPARE_Y_AT_X_LEFT \ - MAKE_X_MONOTONE IS_VERTICAL VERTEX SPLIT MERGE INTERSECT \ - PARAMETER_SPACE_X PARAMETER_SPACE_Y - else - echo " ERROR: not executed test_traits algebraic_traits_core" >> $ERRORFILE - fi - clean_tests -} - -#---------------------------------------------------------------------# -# remove the previous error file -#---------------------------------------------------------------------# - -rm -f $ERRORFILE -rm -f $FULL_ERROR_DESCRIPTION_FILE -rm -f ProgramOutput.test_* -touch $ERRORFILE - -#---------------------------------------------------------------------# -# compile and run the tests -#---------------------------------------------------------------------# - - - -if [ $# -ne 0 ] ; then - case $1 in - -cmake) TEST_WITH_CMAKE="TRUE" ;; - *)TEST_WITH_CMAKE="FALSE" ;; - esac -else - TEST_WITH_CMAKE="FALSE" -fi - -echo "Run all tests." - -if [ "${TEST_WITH_CMAKE}" != "FALSE" ]; then - configure -fi - -if [ "${TEST_WITH_CMAKE}" != "FALSE" ]; then - compile_and_run construction_test_suite_generator -fi - -test_segment_traits -test_non_caching_segment_traits -test_polyline_traits -test_polycurve_conic_traits -test_polycurve_circular_arc_traits -test_polycurve_bezier_traits -test_non_caching_polyline_traits -test_linear_traits -test_conic_traits - -test_line_arc_traits # "line arcs" (segments) only -test_circular_arc_traits # circular arcs only -test_circular_line_arc_traits # for both - -test_circle_segments_traits -test_bezier_traits - -test_spherical_arc_traits - -test_rational_arc_traits - -test_algebraic_traits_core -test_algebraic_traits_gmp -test_algebraic_traits_leda - -compile_and_run test_data_traits - -compile_and_run test_insertion -compile_and_run test_unbounded_rational_insertion -compile_and_run test_unbounded_rational_direct_insertion -compile_and_run test_rational_function_traits_2 -compile_and_run test_iso_verts - -compile_and_run test_vert_ray_shoot_vert_segments - -test_construction_segments -test_construction_linear_curves -test_construction_spherical_arcs -test_construction_polylines - -test_overlay_segments -test_overlay_spherical_arcs - -test_point_location_segments -test_point_location_segments_conversion -test_point_location_circle_segments -test_point_location_linear - -test_point_location_dynamic_segments - -test_batched_point_location_segments -test_batched_point_location_linear -test_batched_point_location_spherical_arcs - -test_vertical_decomposition_segments -test_vertical_decomposition_linear -# test_vertical_decomposition_spherical_arcs - -compile_and_run test_dual -compile_and_run test_do_intersect -compile_and_run test_zone - -compile_and_run test_observer -compile_and_run test_do_equal - -test_segment_traits_adaptor -test_linear_traits_adaptor -test_spherical_arcs_traits_adaptor - -compile_and_run test_removal -compile_and_run test_unbounded_removal -compile_and_run test_spherical_removal - -compile_and_run test_io - -compile_and_run test_sgm - -compile_and_run test_polycurve_intersection - -# if any error occurred then append the full error description file to error file - -if [ -f $FULL_ERROR_DESCRIPTION_FILE ] ; then - echo "******************** appending all error outputs ********************" >> $ERRORFILE - cat $FULL_ERROR_DESCRIPTION_FILE >> $ERRORFILE -fi diff --git a/BGL/examples/BGL_LCC/CMakeLists.txt b/BGL/examples/BGL_LCC/CMakeLists.txt index da350e1ac2d..10fb6c09dc0 100644 --- a/BGL/examples/BGL_LCC/CMakeLists.txt +++ b/BGL/examples/BGL_LCC/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(BGL_LCC_Examples) # CGAL and its components diff --git a/BGL/examples/BGL_OpenMesh/CMakeLists.txt b/BGL/examples/BGL_OpenMesh/CMakeLists.txt index a5091363a51..c56f97d03d7 100644 --- a/BGL/examples/BGL_OpenMesh/CMakeLists.txt +++ b/BGL/examples/BGL_OpenMesh/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(BGL_OpenMesh_Examples) # CGAL and its components diff --git a/BGL/examples/BGL_arrangement_2/CMakeLists.txt b/BGL/examples/BGL_arrangement_2/CMakeLists.txt index b803d5b9a37..d0347efa6e0 100644 --- a/BGL/examples/BGL_arrangement_2/CMakeLists.txt +++ b/BGL/examples/BGL_arrangement_2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(BGL_arrangement_2_Examples) find_package(CGAL REQUIRED) diff --git a/BGL/examples/BGL_graphcut/CMakeLists.txt b/BGL/examples/BGL_graphcut/CMakeLists.txt index 0de1b979314..8acc8de042c 100644 --- a/BGL/examples/BGL_graphcut/CMakeLists.txt +++ b/BGL/examples/BGL_graphcut/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(BGL_graphcut_Examples) diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index 8c5c669409b..1141da29b73 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(BGL_polyhedron_3_Examples) # CGAL and its components diff --git a/BGL/examples/BGL_surface_mesh/CMakeLists.txt b/BGL/examples/BGL_surface_mesh/CMakeLists.txt index 921104583dc..87982059ae9 100644 --- a/BGL/examples/BGL_surface_mesh/CMakeLists.txt +++ b/BGL/examples/BGL_surface_mesh/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(BGL_surface_mesh_Examples) find_package(CGAL REQUIRED) diff --git a/BGL/examples/BGL_triangulation_2/CMakeLists.txt b/BGL/examples/BGL_triangulation_2/CMakeLists.txt index 7d479d36c4f..d597f2217dd 100644 --- a/BGL/examples/BGL_triangulation_2/CMakeLists.txt +++ b/BGL/examples/BGL_triangulation_2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(BGL_triangulation_2_Examples) find_package(CGAL REQUIRED) diff --git a/BGL/include/CGAL/boost/graph/IO/OM.h b/BGL/include/CGAL/boost/graph/IO/OM.h index 9c582267ae1..052e6915b5a 100644 --- a/BGL/include/CGAL/boost/graph/IO/OM.h +++ b/BGL/include/CGAL/boost/graph/IO/OM.h @@ -110,6 +110,11 @@ bool write_OM(std::string fname, const Graph& g, VPM vpm, VFeaturePM vfpm, EFeat omesh.status(omv).set_feature(isfeature); } + for (auto v : vertices(omesh)) + { + adjust_border_halfedge(v, omesh); + } + return OpenMesh::IO::write_mesh(omesh, fname, OpenMesh::IO::Options::Status, precision); } } // end of internal namespace diff --git a/BGL/include/CGAL/boost/graph/copy_face_graph.h b/BGL/include/CGAL/boost/graph/copy_face_graph.h index e0d4cbd5b95..bbd7a12708b 100644 --- a/BGL/include/CGAL/boost/graph/copy_face_graph.h +++ b/BGL/include/CGAL/boost/graph/copy_face_graph.h @@ -178,6 +178,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm, } // detect if there are some non-manifold umbrellas and fix missing halfedge target pointers + std::map> nm_umbrella_map; typedef typename std::vector::iterator edge_iterator; for (edge_iterator it=new_edges.begin(); it!=new_edges.end(); ++it) { @@ -199,10 +200,19 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm, // we recover tm_v using the halfedge associated to the target vertex of // the halfedge in sm corresponding to nh_t. This is working because we // set the vertex halfedge pointer to the "same" halfedges. - tm_vertex_descriptor tm_v = - target( get(hs_to_ht, halfedge(target(get(ht_to_hs, nh_t), sm), sm)), tm); - for(tm_halfedge_descriptor ht : halfedges_around_target(nh_t, tm)) - set_target(ht, tm_v, tm); + + sm_vertex_descriptor vs = target(get(ht_to_hs, nh_t), sm); + sm_halfedge_descriptor hs = halfedge(vs, sm); + if (hs == boost::graph_traits::null_halfedge()) + { // special case for Face_filtered_graph with a non-manifold input with not all umbrellas selected + nm_umbrella_map[vs].push_back(nh_t); + } + else + { + tm_vertex_descriptor tm_v = target( get(hs_to_ht, hs), tm); + for(tm_halfedge_descriptor ht : halfedges_around_target(nh_t, tm)) + set_target(ht, tm_v, tm); + } } nh_t = opposite(nh_t, tm); } @@ -210,6 +220,18 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm, break; } } + + for (const auto& vs_and_hts : nm_umbrella_map) + { + sm_vertex_descriptor v_sm = vs_and_hts.first; + tm_vertex_descriptor v_tm = add_vertex(tm); + *v2v++=std::make_pair(v_sm, v_tm); + set_halfedge(v_tm, vs_and_hts.second.front(), tm); + put(tm_vpm, v_tm, conv(get(sm_vpm, v_sm))); + + for (tm_halfedge_descriptor h_tm : vs_and_hts.second) + set_target(h_tm, v_tm, tm); + } } } // end of namespace internal diff --git a/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h b/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h index 12faf7e2a0c..9a88014752d 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h @@ -72,16 +72,16 @@ struct property_map namespace CGAL { \ template \ typename boost::property_map >::type \ -get(DTAG t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +get(DTAG t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \ { \ - return get(t, static_cast(g)); \ + return get(t, static_cast(g), default_value); \ } \ \ template \ typename boost::property_map >::const_type \ -get(DTAG t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +get(DTAG t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \ { \ - return get(t, static_cast(g)); \ + return get(t, static_cast(g), default_value); \ }\ } //CGAL namespace @@ -131,16 +131,16 @@ struct property_map namespace CGAL { \ template \ typename boost::property_map >::type \ -get(DTAG t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +get(DTAG t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \ { \ - return get(t, static_cast(g)); \ + return get(t, static_cast(g), default_value); \ } \ \ template \ typename boost::property_map >::const_type \ -get(DTAG t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +get(DTAG t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \ { \ - return get(t, static_cast(g)); \ + return get(t, static_cast(g), default_value); \ }\ } //CGAL namespace diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index 53d474d67e2..bc18562bb6e 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script_with_options # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(BGL_Tests) # CGAL and its components diff --git a/BGL/test/BGL/test_Face_filtered_graph.cpp b/BGL/test/BGL/test_Face_filtered_graph.cpp index d83de2bbdc6..84e1bbbf69f 100644 --- a/BGL/test/BGL/test_Face_filtered_graph.cpp +++ b/BGL/test/BGL/test_Face_filtered_graph.cpp @@ -579,6 +579,102 @@ void test_Polyhedron_tetrahedron() test_mesh(poly_adapter); } +void non_manifoldness_test1() +{ + // works out-of-the-box because Face_filtered_graph handles already non-manifold cycles + SM mesh; + SM::Vertex_index v0=add_vertex(mesh); + SM::Vertex_index v1=add_vertex(mesh); + SM::Vertex_index v2=add_vertex(mesh); + SM::Vertex_index v3=add_vertex(mesh); + SM::Vertex_index v4=add_vertex(mesh); + SM::Vertex_index v5=add_vertex(mesh); + SM::Vertex_index v6=add_vertex(mesh); + + SM::Face_index f0=mesh.add_face(v0,v1,v2); + SM::Face_index f1=mesh.add_face(v0,v3,v4); + SM::Face_index f2=mesh.add_face(v0,v5,v6); + SM::Halfedge_index h = halfedge(f0,mesh); + while(target(h, mesh)!=v0) + h=next(h,mesh); + set_halfedge(v0, h, mesh); + + std::vector selection = {f1, f2}; + CGAL::Face_filtered_graph ffg(mesh, selection); + + SM out; + CGAL::copy_face_graph(ffg, out); + + assert(vertices(out).size()==5); + assert(faces(out).size()==2); +} + +void non_manifoldness_test2() +{ + SM mesh; + SM::Vertex_index v0=add_vertex(mesh); + SM::Vertex_index v0b=add_vertex(mesh); + SM::Vertex_index v0t=add_vertex(mesh); + + SM::Vertex_index v1=add_vertex(mesh); + SM::Vertex_index v2=add_vertex(mesh); + SM::Vertex_index v3=add_vertex(mesh); + + SM::Vertex_index v4=add_vertex(mesh); + SM::Vertex_index v5=add_vertex(mesh); + SM::Vertex_index v6=add_vertex(mesh); + + SM::Vertex_index v7=add_vertex(mesh); + SM::Vertex_index v8=add_vertex(mesh); + SM::Vertex_index v9=add_vertex(mesh); + + SM::Face_index f00=mesh.add_face(v1,v2,v0); + SM::Face_index f01=mesh.add_face(v2,v3,v0); + SM::Face_index f02=mesh.add_face(v3,v1,v0); + + SM::Face_index f10=mesh.add_face(v4,v5,v0b); + SM::Face_index f11=mesh.add_face(v5,v6,v0b); + SM::Face_index f12=mesh.add_face(v6,v4,v0b); + + SM::Face_index f20=mesh.add_face(v7,v8,v0t); + SM::Face_index f21=mesh.add_face(v8,v9,v0t); + SM::Face_index f22=mesh.add_face(v9,v7,v0t); + + assert(f00!=SM::Face_index()); + assert(f01!=SM::Face_index()); + assert(f02!=SM::Face_index()); + assert(f10!=SM::Face_index()); + assert(f11!=SM::Face_index()); + assert(f12!=SM::Face_index()); + assert(f20!=SM::Face_index()); + assert(f21!=SM::Face_index()); + assert(f22!=SM::Face_index()); + + #define UPDATE_V(fX, vX) \ + { SM::Halfedge_index h = halfedge(fX,mesh);\ + while(target(h, mesh)!=vX) h=next(h,mesh);\ + set_target(h, v0, mesh); } + + UPDATE_V(f10, v0b) + UPDATE_V(f11, v0b) + UPDATE_V(f12, v0b) + UPDATE_V(f20, v0t) + UPDATE_V(f21, v0t) + UPDATE_V(f22, v0t) + + remove_vertex(v0b, mesh); + remove_vertex(v0t, mesh); + + std::vector selection = {f10, f11, f12, f20, f21, f22}; + CGAL::Face_filtered_graph ffg(mesh, selection); + + SM out; + CGAL::copy_face_graph(ffg, out); + + assert(vertices(out).size()==7); + assert(faces(out).size()==6); +} + int main(int, char**) { test_graph_range(poly_data()); @@ -590,6 +686,8 @@ int main(int, char**) #endif test_invalid_selections(); + non_manifoldness_test1(); + non_manifoldness_test2(); test_SM_tetrahedron(); test_Polyhedron_tetrahedron(); diff --git a/BGL/test/BGL/test_OpenMesh.cpp b/BGL/test/BGL/test_OpenMesh.cpp index 0dede3e68ed..e3ddcc9c2ca 100644 --- a/BGL/test/BGL/test_OpenMesh.cpp +++ b/BGL/test/BGL/test_OpenMesh.cpp @@ -10,13 +10,29 @@ typedef Traits::edge_descriptor edge_descriptor; typedef Traits::halfedge_descriptor halfedge_descriptor; typedef Traits::vertex_descriptor vertex_descriptor; typedef Traits::face_descriptor face_descriptor; -//typedef Kernel::Point_3 Point_3; int main() { Om om; - for (Om::EdgeHandle ed : edges(om)) { - std::cout << "edge" << std::endl; + for (Om::EdgeHandle ed : edges(om)) + { + CGAL_USE(ed); + } + for (edge_descriptor ed : edges(om)) + { + CGAL_USE(ed); + } + for (halfedge_descriptor hd : halfedges(om)) + { + CGAL_USE(hd); + } + for (face_descriptor fd : faces(om)) + { + CGAL_USE(fd); + } + for (vertex_descriptor vd : vertices(om)) + { + CGAL_USE(vd); } return 0; } diff --git a/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt index 11d40187de3..1d4deb97575 100644 --- a/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt @@ -3,7 +3,7 @@ project(Barycentric_coordinates_2_Benchmarks) -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt index cd3533b5ca7..43a49733d1a 100644 --- a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script. # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Barycentric_coordinates_2_Examples) diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt index c50f052a490..7b01647d5c1 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script. # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Barycentric_coordinates_2_Tests) diff --git a/Basic_viewer/examples/Basic_viewer/CMakeLists.txt b/Basic_viewer/examples/Basic_viewer/CMakeLists.txt index 305e502bd47..4106c9defb4 100644 --- a/Basic_viewer/examples/Basic_viewer/CMakeLists.txt +++ b/Basic_viewer/examples/Basic_viewer/CMakeLists.txt @@ -6,7 +6,7 @@ # Used in /CGAL/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt. # Careful when modifying -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Basic_viewer_Examples) #CGAL_Qt6 is needed for the drawing. diff --git a/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt b/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt index aee59825ba1..99d2c05f6ce 100644 --- a/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt +++ b/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Boolean_set_operations_2_Examples) find_package(CGAL REQUIRED COMPONENTS Core OPTIONAL_COMPONENTS Qt6) diff --git a/Boolean_set_operations_2/test/Boolean_set_operations_2/CMakeLists.txt b/Boolean_set_operations_2/test/Boolean_set_operations_2/CMakeLists.txt index 60bd93b4d37..b7b8ec33bba 100644 --- a/Boolean_set_operations_2/test/Boolean_set_operations_2/CMakeLists.txt +++ b/Boolean_set_operations_2/test/Boolean_set_operations_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Boolean_set_operations_2_Tests) find_package(CGAL REQUIRED) diff --git a/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt b/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt index aed57e369fc..1829009c9c0 100644 --- a/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt +++ b/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Approximate_min_ellipsoid_d_Examples) find_package(CGAL REQUIRED) diff --git a/Bounding_volumes/examples/Min_annulus_d/CMakeLists.txt b/Bounding_volumes/examples/Min_annulus_d/CMakeLists.txt index 9c56c1f8cd2..4d968380aef 100644 --- a/Bounding_volumes/examples/Min_annulus_d/CMakeLists.txt +++ b/Bounding_volumes/examples/Min_annulus_d/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Min_annulus_d_Examples) find_package(CGAL REQUIRED) diff --git a/Bounding_volumes/examples/Min_circle_2/CMakeLists.txt b/Bounding_volumes/examples/Min_circle_2/CMakeLists.txt index 9d537c51338..864ad950c98 100644 --- a/Bounding_volumes/examples/Min_circle_2/CMakeLists.txt +++ b/Bounding_volumes/examples/Min_circle_2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Min_circle_2_Examples) find_package(CGAL REQUIRED) diff --git a/Bounding_volumes/examples/Min_ellipse_2/CMakeLists.txt b/Bounding_volumes/examples/Min_ellipse_2/CMakeLists.txt index 5a8ff8b5094..8e54fb2aab0 100644 --- a/Bounding_volumes/examples/Min_ellipse_2/CMakeLists.txt +++ b/Bounding_volumes/examples/Min_ellipse_2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Min_ellipse_2_Examples) find_package(CGAL REQUIRED) diff --git a/Bounding_volumes/examples/Min_quadrilateral_2/CMakeLists.txt b/Bounding_volumes/examples/Min_quadrilateral_2/CMakeLists.txt index 4ec0538e65a..ee65337ea99 100644 --- a/Bounding_volumes/examples/Min_quadrilateral_2/CMakeLists.txt +++ b/Bounding_volumes/examples/Min_quadrilateral_2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Min_quadrilateral_2_Examples) find_package(CGAL REQUIRED) diff --git a/Bounding_volumes/examples/Min_sphere_d/CMakeLists.txt b/Bounding_volumes/examples/Min_sphere_d/CMakeLists.txt index 52f22930d06..7df4fa04f95 100644 --- a/Bounding_volumes/examples/Min_sphere_d/CMakeLists.txt +++ b/Bounding_volumes/examples/Min_sphere_d/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Min_sphere_d_Examples) find_package(CGAL REQUIRED) diff --git a/Bounding_volumes/examples/Min_sphere_of_spheres_d/CMakeLists.txt b/Bounding_volumes/examples/Min_sphere_of_spheres_d/CMakeLists.txt index 04fdce0a6c7..5a4d610bd42 100644 --- a/Bounding_volumes/examples/Min_sphere_of_spheres_d/CMakeLists.txt +++ b/Bounding_volumes/examples/Min_sphere_of_spheres_d/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Min_sphere_of_spheres_d_Examples) find_package(CGAL REQUIRED) diff --git a/Bounding_volumes/examples/Rectangular_p_center_2/CMakeLists.txt b/Bounding_volumes/examples/Rectangular_p_center_2/CMakeLists.txt index b4232b361a1..5f4df68a419 100644 --- a/Bounding_volumes/examples/Rectangular_p_center_2/CMakeLists.txt +++ b/Bounding_volumes/examples/Rectangular_p_center_2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Rectangular_p_center_2_Examples) find_package(CGAL REQUIRED) diff --git a/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt b/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt index a5b3adfd744..143e296e6ff 100644 --- a/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt +++ b/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Bounding_volumes_Tests) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Box_intersection_d/examples/Box_intersection_d/CMakeLists.txt b/Box_intersection_d/examples/Box_intersection_d/CMakeLists.txt index f1de0dd7150..7cad98a5e06 100644 --- a/Box_intersection_d/examples/Box_intersection_d/CMakeLists.txt +++ b/Box_intersection_d/examples/Box_intersection_d/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Box_intersection_d_Examples) find_package(CGAL REQUIRED) diff --git a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt index a82e578f345..74af1828b43 100644 --- a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt +++ b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Box_intersection_d_Tests) find_package(CGAL REQUIRED) diff --git a/CGAL_Core/examples/Core/CMakeLists.txt b/CGAL_Core/examples/Core/CMakeLists.txt index 5f1d17eeb8a..a3552430f3c 100644 --- a/CGAL_Core/examples/Core/CMakeLists.txt +++ b/CGAL_Core/examples/Core/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Core_Examples) # CGAL and its components diff --git a/CGAL_Core/include/CGAL/CORE/BigFloat.h b/CGAL_Core/include/CGAL/CORE/BigFloat.h index 5b1bd138bca..671e58d644a 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloat.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloat.h @@ -600,6 +600,7 @@ inline long longValue(const BigFloat& bf) { return bf.longValue(); } +//@} } //namespace CORE diff --git a/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc b/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc index 3f53e34da44..b287edaecc7 100644 --- a/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc +++ b/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc @@ -544,7 +544,7 @@ template int BiPoly::getXdegree(){ int deg=-1; for(int i=0; i <=ydeg; i++) - deg = max(deg, coeffX[i].getTrueDegree()); + deg = (max)(deg, coeffX[i].getTrueDegree()); return deg; } diff --git a/CGAL_ImageIO/examples/CGALimageIO/CMakeLists.txt b/CGAL_ImageIO/examples/CGALimageIO/CMakeLists.txt index ee152bc87a8..69a3b23a9d9 100644 --- a/CGAL_ImageIO/examples/CGALimageIO/CMakeLists.txt +++ b/CGAL_ImageIO/examples/CGALimageIO/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(CGALimageIO_Examples) find_package(CGAL REQUIRED COMPONENTS ImageIO) diff --git a/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt b/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt index 9a5154fe35a..92bc01f4576 100644 --- a/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt +++ b/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(CGAL_ImageIO_Tests) find_package(CGAL REQUIRED COMPONENTS ImageIO) diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index 6c942000068..a27008458d1 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(CGAL_ipelets_Demo) if(NOT POLICY CMP0070 AND POLICY CMP0053) diff --git a/CGAL_ipelets/test/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/test/CGAL_ipelets/CMakeLists.txt index ae82aa48f7f..f52731322b7 100644 --- a/CGAL_ipelets/test/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/test/CGAL_ipelets/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(CGAL_ipelets_Tests) find_package(CGAL REQUIRED) diff --git a/CMakeLists.txt b/CMakeLists.txt index cb6cbcce79a..c4ac65d480d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # Top level CMakeLists.txt for CGAL-branchbuild # Minimal version of CMake: -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) message("== CMake setup ==") project(CGAL CXX C) diff --git a/Circular_kernel_2/examples/Circular_kernel_2/CMakeLists.txt b/Circular_kernel_2/examples/Circular_kernel_2/CMakeLists.txt index 7b2f5e9e627..33f717ffe50 100644 --- a/Circular_kernel_2/examples/Circular_kernel_2/CMakeLists.txt +++ b/Circular_kernel_2/examples/Circular_kernel_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Circular_kernel_2_Examples) find_package(CGAL REQUIRED) diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h index b5830954ec7..0bfc65d0a55 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h @@ -1565,7 +1565,7 @@ advanced_make_xy_monotone( const typename CK::Circular_arc_2 &a, double ymax = (is_on_upper) ? to_interval ( CircularFunctors::y_extremal_point(a.supporting_circle(),false).y() ).second : - CGAL::max(left_bb.ymax(),right_bb.ymax()); + (CGAL::max)(left_bb.ymax(),right_bb.ymax()); */ return Bbox_2(left_bb.xmin(),ymin,right_bb.xmax(),ymax); } diff --git a/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt b/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt index c74331fa0da..18d14536942 100644 --- a/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt +++ b/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Circular_kernel_2_Tests) find_package(CGAL REQUIRED) diff --git a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt index 15b323a35e4..eb14ee65d51 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt +++ b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Circular_kernel_3_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) diff --git a/Circular_kernel_3/examples/Circular_kernel_3/CMakeLists.txt b/Circular_kernel_3/examples/Circular_kernel_3/CMakeLists.txt index dd790cb013e..6570aa61957 100644 --- a/Circular_kernel_3/examples/Circular_kernel_3/CMakeLists.txt +++ b/Circular_kernel_3/examples/Circular_kernel_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Circular_kernel_3_Examples) find_package(CGAL REQUIRED) diff --git a/Circular_kernel_3/test/Circular_kernel_3/CMakeLists.txt b/Circular_kernel_3/test/Circular_kernel_3/CMakeLists.txt index 11f64e04486..3194864b973 100644 --- a/Circular_kernel_3/test/Circular_kernel_3/CMakeLists.txt +++ b/Circular_kernel_3/test/Circular_kernel_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Circular_kernel_3_Tests) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Circulator/examples/Circulator/CMakeLists.txt b/Circulator/examples/Circulator/CMakeLists.txt index 45ce196888c..7ac0a4ca88c 100644 --- a/Circulator/examples/Circulator/CMakeLists.txt +++ b/Circulator/examples/Circulator/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Circulator_Examples) find_package(CGAL REQUIRED) diff --git a/Circulator/test/Circulator/CMakeLists.txt b/Circulator/test/Circulator/CMakeLists.txt index 379b55cc364..a502c47e06f 100644 --- a/Circulator/test/Circulator/CMakeLists.txt +++ b/Circulator/test/Circulator/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Circulator_Tests) find_package(CGAL REQUIRED) diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index 803d4279ead..e9e93a6d3a6 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Classification_Examples) # CGAL and its components diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index 332dc9216d8..0135ea6f175 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Classification_Tests) # CGAL and its components diff --git a/Combinatorial_map/examples/Combinatorial_map/CMakeLists.txt b/Combinatorial_map/examples/Combinatorial_map/CMakeLists.txt index 828f4756926..98a1e50f7e1 100644 --- a/Combinatorial_map/examples/Combinatorial_map/CMakeLists.txt +++ b/Combinatorial_map/examples/Combinatorial_map/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Combinatorial_map_Examples) find_package(CGAL REQUIRED) diff --git a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt index b440e257636..271451857f9 100644 --- a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt +++ b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Combinatorial_map_Tests) find_package(CGAL REQUIRED) diff --git a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt index 4f4f2226ffc..2ac677d7d71 100644 --- a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt +++ b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Cone_spanners_2_Examples) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) diff --git a/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt b/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt index e4d05d60618..559a6418940 100644 --- a/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt +++ b/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Cone_spanners_2_Tests) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Constrained_triangulation_3/examples/Constrained_triangulation_3/CMakeLists.txt b/Constrained_triangulation_3/examples/Constrained_triangulation_3/CMakeLists.txt index cfe9100a596..7fa5ee2dd5c 100644 --- a/Constrained_triangulation_3/examples/Constrained_triangulation_3/CMakeLists.txt +++ b/Constrained_triangulation_3/examples/Constrained_triangulation_3/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1...3.23) +cmake_minimum_required(VERSION 3.12...3.31) project(Constrained_triangulation_3_Examples) find_package(CGAL REQUIRED COMPONENTS Qt6) diff --git a/Constrained_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h b/Constrained_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h index c17fc9b992c..39aa8061544 100644 --- a/Constrained_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h +++ b/Constrained_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h @@ -67,7 +67,7 @@ protected: }; using Constraint_hierarchy = - Polyline_constraint_hierarchy_2; + Polyline_constraint_hierarchy_2; public: using Constraint_id = typename Constraint_hierarchy::Constraint_id; @@ -114,10 +114,9 @@ protected: } } auto [contexts_begin, contexts_end] = - self->constraint_hierarchy.contexts_range(v1, v2); + self->constraint_hierarchy.contexts(v1, v2); if(contexts_begin != contexts_end) { - self->add_to_subconstraints_to_conform(v1, v2, - contexts_begin->id()); + self->add_to_subconstraints_to_conform(v1, v2, contexts_begin->id()); } } } @@ -285,7 +284,7 @@ protected: if(lt == T_3::EDGE) { v1 = c->vertex(li); v2 = c->vertex(lj); - if(constraint_hierarchy.is_subconstrained_edge(v1, v2)) { + if(constraint_hierarchy.is_subconstraint(v1, v2)) { split_constrained_edge = true; } } @@ -436,11 +435,10 @@ public: using T_3::is_edge; bool is_conforming() const { - return std::all_of(constraint_hierarchy.sc_begin(), - constraint_hierarchy.sc_end(), + return std::all_of(constraint_hierarchy.subconstraints_begin(), + constraint_hierarchy.subconstraints_end(), [this](const auto &sc) { - const auto va = sc.first.first; - const auto vb = sc.first.second; + const auto [va, vb] = sc; const auto is_edge = this->is_edge(va, vb); #if CGAL_DEBUG_CDT_3 & 128 && CGAL_CAN_USE_CXX20_FORMAT std::cerr << cdt_3_format("is_conforming>> Edge is 3D: {} ({} , {})\n", @@ -528,11 +526,10 @@ public: bool write_missing_segments_file(std::ostream &out) { bool any_missing_segment = false; std::for_each( - constraint_hierarchy.sc_begin(), constraint_hierarchy.sc_end(), + constraint_hierarchy.subconstraints_begin(), constraint_hierarchy.subconstraints_end(), [this, &out, &any_missing_segment](const auto &sc) { - if (!this->is_edge(sc.first.first, sc.first.second)) { - const auto v0 = sc.first.first; - const auto v1 = sc.first.second; + const auto [v0, v1] = sc; + if (!this->is_edge(v0, v1)) { out << "2 " << this->tr().point(v0) << " " << this->tr().point(v1) << '\n'; any_missing_segment = true; @@ -543,10 +540,9 @@ public: void write_all_segments_file(std::ostream &out) { std::for_each( - constraint_hierarchy.sc_begin(), constraint_hierarchy.sc_end(), + constraint_hierarchy.subconstraints_begin(), constraint_hierarchy.subconstraints_end(), [this, &out](const auto &sc) { - const auto v0 = sc.first.first; - const auto v1 = sc.first.second; + const auto [v0, v1] = sc; out << "2 " << this->tr().point(v0) << " " << this->tr().point(v1) << '\n'; }); } @@ -582,7 +578,7 @@ protected: const auto [subconstraint, constraint_id] = subconstraints_to_conform.top(); subconstraints_to_conform.pop(); const auto [va, vb] = subconstraint; - if(!constraint_hierarchy.is_subconstrained_edge(va, vb)) { + if(!constraint_hierarchy.is_subconstraint(va, vb)) { continue; } #if CGAL_DEBUG_CDT_3 & 32 @@ -663,8 +659,8 @@ protected: } auto constraint_extremities(Constraint_id c_id) const { - CGAL_assertion(std::find(this->constraint_hierarchy.c_begin(), - this->constraint_hierarchy.c_end(), c_id) != this->constraint_hierarchy.c_end()); + CGAL_assertion(std::find(this->constraint_hierarchy.constraints_begin(), + this->constraint_hierarchy.constraints_end(), c_id) != this->constraint_hierarchy.constraints_end()); CGAL_assertion(this->constraint_hierarchy.vertices_in_constraint_begin(c_id) != this->constraint_hierarchy.vertices_in_constraint_end(c_id)); #if CGAL_DEBUG_CDT_3 & 8 @@ -696,7 +692,7 @@ protected: boost::container::small_vector adj_vertices; this->finite_adjacent_vertices(va, std::back_inserter(adj_vertices)); for(auto other_v: adj_vertices) { - for(auto context: this->constraint_hierarchy.contexts_range(va, other_v)) { + for(auto context: this->constraint_hierarchy.contexts(va, other_v)) { const Constraint_id c_id = context.id(); if(constraint_id_goes_to_vb(c_id)) return c_id; } diff --git a/Constrained_triangulation_3/include/CGAL/Conforming_constrained_Delaunay_triangulation_3.h b/Constrained_triangulation_3/include/CGAL/Conforming_constrained_Delaunay_triangulation_3.h index 7b5e393a446..c28123dc44f 100644 --- a/Constrained_triangulation_3/include/CGAL/Conforming_constrained_Delaunay_triangulation_3.h +++ b/Constrained_triangulation_3/include/CGAL/Conforming_constrained_Delaunay_triangulation_3.h @@ -77,6 +77,7 @@ auto segment_soup_to_polylines_point_type_aux(const Range_of_segments& segment_s for(auto [a, b]: segment_soup) { return a; } + CGAL_unreachable(); } template @@ -776,7 +777,6 @@ public: auto point_map = parameters::choose_parameter(parameters::get_parameter(np, internal_np::point_map), CGAL::Identity_property_map{}); - auto geom_traits = parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits), Traits{}); auto face_patch_map = parameters::choose_parameter(parameters::get_parameter(np, internal_np::face_patch), boost::identity_property_map{}); using Vertex_handle = typename Triangulation::Vertex_handle; @@ -1921,6 +1921,12 @@ private: auto& [intersecting_edges, intersecting_cells, vertices_of_upper_cavity, vertices_of_lower_cavity, facets_of_upper_cavity, facets_of_lower_cavity] = outputs; + + // to avoid "warning: captured structured bindings are a C++20 extension [-Wc++20-extensions]"" + auto& intersecting_edges_ = intersecting_edges; + auto& vertices_of_upper_cavity_ = vertices_of_upper_cavity; + auto& vertices_of_lower_cavity_ = vertices_of_lower_cavity; + std::set> non_intersecting_edges_set; // marker for already visited elements @@ -2113,6 +2119,7 @@ private: auto test_edge = [&](Cell_handle cell, Vertex_handle v0, int index_v0, Vertex_handle v1, int index_v1, [[maybe_unused]] int expected) { auto value_returned = [this](bool b) { + CGAL_USE(this); #if CGAL_CDT_3_CAN_USE_CXX20_FORMAT if(this->debug_regions()) { std::cerr << cdt_3_format(" return {}\n", b); @@ -2143,7 +2150,7 @@ private: if(v0v1_intersects_region < 0) { std::swap(index_v0, index_v1); } - intersecting_edges.emplace_back(cell, index_v0, index_v1); + intersecting_edges_.emplace_back(cell, index_v0, index_v1); cached_value_it->second = true; return value_returned(true); } else { @@ -2395,10 +2402,10 @@ private: std::swap(v1, v2); } // here v1 is marked and v2 is not if(v1->ccdt_3_data().is_marked(Vertex_marker::CAVITY_ABOVE)) { - vertices_of_upper_cavity.push_back(v2); + vertices_of_upper_cavity_.push_back(v2); v2->ccdt_3_data().set_mark(Vertex_marker::CAVITY_ABOVE); } else if(v1->ccdt_3_data().is_marked(Vertex_marker::CAVITY_BELOW)) { - vertices_of_lower_cavity.push_back(v2); + vertices_of_lower_cavity_.push_back(v2); v2->ccdt_3_data().set_mark(Vertex_marker::CAVITY_BELOW); } } @@ -2743,6 +2750,7 @@ private: map_upper_cavity_vertices_to_ambient_vertices, facets_of_upper_cavity, interior_constrained_faces_upper, cells_of_upper_cavity] = triangulate_cavity(original_intersecting_cells, original_facets_of_upper_cavity, original_vertices_of_upper_cavity); + const auto& upper_cavity_triangulation_ = upper_cavity_triangulation; std::for_each(interior_constrained_faces_upper.begin(), interior_constrained_faces_upper.end(), register_internal_constrained_facet); if(this->debug_copy_triangulation_into_hole()) { @@ -2752,6 +2760,7 @@ private: map_lower_cavity_vertices_to_ambient_vertices, facets_of_lower_cavity, interior_constrained_faces_lower, cells_of_lower_cavity] = triangulate_cavity(original_intersecting_cells, original_facets_of_lower_cavity, original_vertices_of_lower_cavity); + const auto& lower_cavity_triangulation_ = lower_cavity_triangulation; std::for_each(interior_constrained_faces_lower.begin(), interior_constrained_faces_lower.end(), register_internal_constrained_facet); @@ -2764,8 +2773,8 @@ private: return this->vertex_triple_is_facet_of_other_triangulation(*this, v0, v1, v2, tr); }; - const bool fail_upper = !is_fh_facet_of(upper_cavity_triangulation); - const bool fail_lower = !is_fh_facet_of(lower_cavity_triangulation); + const bool fail_upper = !is_fh_facet_of(upper_cavity_triangulation_); + const bool fail_lower = !is_fh_facet_of(lower_cavity_triangulation_); if(fail_upper || fail_lower) { fh->info().is_in_region = 1; auto display_face = [&]() { @@ -2843,6 +2852,7 @@ private: auto add_to_outer_map = [this, &outer_map](typename T_3::Vertex_triple vt, Facet f, [[maybe_unused]] std::string_view extra = {}) { outer_map[vt] = f; + CGAL_USE(this); #if CGAL_CDT_3_CAN_USE_CXX20_FORMAT if(this->debug_copy_triangulation_into_hole()) { CGAL_assertion(vt[0] != vt[1]); @@ -3335,7 +3345,7 @@ private: IO::oformat(mid), IO::oformat(va_3d, with_point_and_info), IO::oformat(vb_3d, with_point_and_info)); } - auto&& contexts = this->constraint_hierarchy.contexts_range(va_3d, vb_3d); + auto&& contexts = this->constraint_hierarchy.contexts(va_3d, vb_3d); #if CGAL_DEBUG_CDT_3 & 64 && CGAL_CAN_USE_CXX20_FORMAT if(std::next(contexts.begin()) != contexts.end()) { std::cerr << "ERROR: Edge is constrained by more than one constraint\n"; diff --git a/Constrained_triangulation_3/include/CGAL/Conforming_constrained_Delaunay_triangulation_vertex_data_3.h b/Constrained_triangulation_3/include/CGAL/Conforming_constrained_Delaunay_triangulation_vertex_data_3.h index 9e8ebd7ff5e..b6439ffb125 100644 --- a/Constrained_triangulation_3/include/CGAL/Conforming_constrained_Delaunay_triangulation_vertex_data_3.h +++ b/Constrained_triangulation_3/include/CGAL/Conforming_constrained_Delaunay_triangulation_vertex_data_3.h @@ -51,10 +51,17 @@ protected: // TODO: check and improve the compactness of this class CDT_3_vertex_type m_vertex_type = CDT_3_vertex_type::FREE; std::bitset(CDT_3_vertex_marker::nb_of_markers)> mark{}; + struct C_id { + void* ptr = nullptr; + std::size_t id = 0; + friend bool operator==(const C_id& lhs, const C_id& rhs) { + return lhs.ptr == rhs.ptr && lhs.id == rhs.id; + } + }; union U { struct On_edge { int nb_of_incident_constraints = 0; - void* c_id = nullptr; + C_id c_id{}; } on_edge; struct On_face{ CDT_3_signed_index face_index = 0; @@ -78,7 +85,8 @@ public: template void set_on_constraint(T constraint_id) { ++u.on_edge.nb_of_incident_constraints; - u.on_edge.c_id = constraint_id.vl_ptr(); + u.on_edge.c_id.ptr = constraint_id.vl_with_info_pointer(); + u.on_edge.c_id.id = static_cast(constraint_id.index()); } int number_of_incident_constraints() const { @@ -110,8 +118,11 @@ public: auto constraint_id(const Triangulation&) const { CGAL_assertion(m_vertex_type != CDT_3_vertex_type::STEINER_IN_FACE); using C_id = typename Triangulation::Constraint_id; - using Vertex_list_ptr = decltype(std::declval().vl_ptr()); - return C_id(static_cast(u.on_edge.c_id)); + using size_type = typename Triangulation::size_type; + using Vertex_list_w_info_ptr = decltype(std::declval().vl_with_info_pointer()); + auto ptr = static_cast(u.on_edge.c_id.ptr); + auto id = static_cast(u.on_edge.c_id.id); + return C_id{ptr, id}; } void set_Steiner_vertex_in_face(CDT_3_signed_index face_index) { diff --git a/Constrained_triangulation_3/include/CGAL/Constrained_triangulation_3/internal/cdt_debug_io.h b/Constrained_triangulation_3/include/CGAL/Constrained_triangulation_3/internal/cdt_debug_io.h index 96b15e548ef..752aaacfec3 100644 --- a/Constrained_triangulation_3/include/CGAL/Constrained_triangulation_3/internal/cdt_debug_io.h +++ b/Constrained_triangulation_3/include/CGAL/Constrained_triangulation_3/internal/cdt_debug_io.h @@ -19,13 +19,8 @@ #include #include #include -#include -#include #include -#include - -#include namespace CGAL { @@ -62,118 +57,6 @@ namespace CGAL { CGAL::IO::write_OFF(out, mesh); } - template - struct CDT_3_read_polygon_mesh_output { - tl::expected polygon_mesh; - - std::size_t nb_of_duplicated_points = 0; - std::size_t nb_of_simplified_polygons = 0; - std::size_t nb_of_new_polygons = 0; - std::size_t nb_of_removed_invalid_polygons = 0; - std::size_t nb_of_removed_duplicated_polygons = 0; - std::size_t nb_of_removed_isolated_points = 0; - - bool polygon_soup_self_intersects = false; - bool polygon_mesh_is_manifold = true; - }; - - template - CDT_3_read_polygon_mesh_output - read_polygon_mesh_for_cdt_3(const std::string &fname, - const NamedParameters &np = parameters::default_values()) - { - CDT_3_read_polygon_mesh_output result; - - namespace PMP = CGAL::Polygon_mesh_processing; - namespace PMP_internal = PMP::internal; - - using VPM = typename CGAL::GetVertexPointMap::type; - using Point = typename boost::property_traits::value_type; - - using parameters::choose_parameter; - using parameters::get_parameter; - - auto verbose = choose_parameter(get_parameter(np, internal_np::verbose), false); - - std::ostringstream local_verbose_output; - auto *cerr_buff = std::cerr.rdbuf(); - std::cerr.rdbuf(local_verbose_output.rdbuf()); - auto restore_cerr = make_scope_exit([&] - { std::cerr.rdbuf(cerr_buff); }); - - auto return_error = [&]() { - result.polygon_mesh = tl::unexpected(std::move(local_verbose_output).str()); - return result; - }; - - using Points = std::vector; - using Face = std::vector; - using Faces = std::vector; - Points points; - Faces faces; - if (!CGAL::IO::read_polygon_soup(fname, points, faces, CGAL::parameters::verbose(true))) - { - if (verbose) - std::cerr << "Warning: cannot read polygon soup" << std::endl; - return return_error(); - } - using Traits = typename PMP_internal::GetPolygonGeomTraits::type; - - auto traits = choose_parameter(get_parameter(np, internal_np::geom_traits)); - - bool do_repair = choose_parameter(get_parameter(np, internal_np::repair_polygon_soup), true); - if (do_repair) - { - result.nb_of_duplicated_points = PMP::merge_duplicate_points_in_polygon_soup(points, faces, np); - result.nb_of_simplified_polygons = PMP_internal::simplify_polygons_in_polygon_soup(points, faces, traits); - result.nb_of_new_polygons = PMP_internal::split_pinched_polygons_in_polygon_soup(points, faces, traits); - result.nb_of_removed_invalid_polygons = PMP_internal::remove_invalid_polygons_in_polygon_soup(points, faces); - result.nb_of_removed_duplicated_polygons = PMP::merge_duplicate_polygons_in_polygon_soup(points, faces, np); - result.nb_of_removed_isolated_points = PMP::remove_isolated_points_in_polygon_soup(points, faces); - } - - // check if the polygon soup is pure triangles, and create a triangulated copy otherwise - bool is_pure_triangles = std::all_of(faces.begin(), faces.end(), [](const Face &f) { return f.size() == 3; }); - - { // Now, call does_triangle_soup_self_intersect. - // ... but that function requires a triangulated soup (triangle soup) - // So, if needed, create a copy of the range of faces, and triangulate it on the fly. - - // create a non-deleting pointer to `faces` (with a null deleter) - using Deleter_function = void(Faces*); - using Deleter = Deleter_function*; // function pointer type - using Ptr = std::unique_ptr; - auto null_deleter = +[](Faces *) {}; - Ptr triangle_faces_ptr{&faces, null_deleter}; - if (!is_pure_triangles) - { - auto faces_copy_ptr = new Faces(faces); // copy `faces` - auto delete_function_ptr = +[](Faces* vector){ delete vector; }; - triangle_faces_ptr = Ptr(faces_copy_ptr, delete_function_ptr); - PMP::triangulate_polygons(points, *triangle_faces_ptr, np); - } - - result.polygon_soup_self_intersects = PMP::does_triangle_soup_self_intersect(points, *triangle_faces_ptr, np); - } - - if (!PMP::orient_polygon_soup(points, faces)) - { - result.polygon_mesh_is_manifold = false; - if (verbose) - std::cerr << "Some duplication happened during polygon soup orientation" << std::endl; - } - - if (!PMP::is_polygon_soup_a_polygon_mesh(faces)) - { - if (verbose) - std::cerr << "Warning: polygon soup does not describe a polygon mesh" << std::endl; - return return_error(); - } - PMP::polygon_soup_to_polygon_mesh(points, faces, *result.polygon_mesh, parameters::default_values(), np); - - return result; - } - -} // end namespace CGAL +} #endif // CGAL_CDT_3_DEBUG_IO_H diff --git a/Constrained_triangulation_3/include/CGAL/Constrained_triangulation_3/internal/read_polygon_mesh_for_cdt_3.h b/Constrained_triangulation_3/include/CGAL/Constrained_triangulation_3/internal/read_polygon_mesh_for_cdt_3.h new file mode 100644 index 00000000000..a70a3177d75 --- /dev/null +++ b/Constrained_triangulation_3/include/CGAL/Constrained_triangulation_3/internal/read_polygon_mesh_for_cdt_3.h @@ -0,0 +1,140 @@ +// Copyright (c) 2023-2025 GeometryFactory Sarl (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Laurent Rineau + +#ifndef CGAL_CDT_3_INTERNAL_READ_POLYGON_MESH_FOR_CDT_3_H +#define CGAL_CDT_3_INTERNAL_READ_POLYGON_MESH_FOR_CDT_3_H + +#include + +#include + +#include +#include +#include +#include + +namespace CGAL { + + template + struct CDT_3_read_polygon_mesh_output { + tl::expected polygon_mesh; + + std::size_t nb_of_duplicated_points = 0; + std::size_t nb_of_simplified_polygons = 0; + std::size_t nb_of_new_polygons = 0; + std::size_t nb_of_removed_invalid_polygons = 0; + std::size_t nb_of_removed_duplicated_polygons = 0; + std::size_t nb_of_removed_isolated_points = 0; + + bool polygon_soup_self_intersects = false; + bool polygon_mesh_is_manifold = true; + }; + + template + CDT_3_read_polygon_mesh_output + read_polygon_mesh_for_cdt_3(const std::string &fname, + const NamedParameters &np = parameters::default_values()) + { + CDT_3_read_polygon_mesh_output result; + + namespace PMP = CGAL::Polygon_mesh_processing; + namespace PMP_internal = PMP::internal; + + using VPM = typename CGAL::GetVertexPointMap::type; + using Point = typename boost::property_traits::value_type; + + using parameters::choose_parameter; + using parameters::get_parameter; + + auto verbose = choose_parameter(get_parameter(np, internal_np::verbose), false); + + std::ostringstream local_verbose_output; + auto *cerr_buff = std::cerr.rdbuf(); + std::cerr.rdbuf(local_verbose_output.rdbuf()); + auto restore_cerr = make_scope_exit([&] + { std::cerr.rdbuf(cerr_buff); }); + + auto return_error = [&]() { + result.polygon_mesh = tl::unexpected(std::move(local_verbose_output).str()); + return result; + }; + + using Points = std::vector; + using Face = std::vector; + using Faces = std::vector; + Points points; + Faces faces; + if (!CGAL::IO::read_polygon_soup(fname, points, faces, CGAL::parameters::verbose(true))) + { + if (verbose) + std::cerr << "Warning: cannot read polygon soup" << std::endl; + return return_error(); + } + using Traits = typename PMP_internal::GetPolygonGeomTraits::type; + + auto traits = choose_parameter(get_parameter(np, internal_np::geom_traits)); + + bool do_repair = choose_parameter(get_parameter(np, internal_np::repair_polygon_soup), true); + if (do_repair) + { + result.nb_of_duplicated_points = PMP::merge_duplicate_points_in_polygon_soup(points, faces, np); + result.nb_of_simplified_polygons = PMP_internal::simplify_polygons_in_polygon_soup(points, faces, traits); + result.nb_of_new_polygons = PMP_internal::split_pinched_polygons_in_polygon_soup(points, faces, traits); + result.nb_of_removed_invalid_polygons = PMP_internal::remove_invalid_polygons_in_polygon_soup(points, faces); + result.nb_of_removed_duplicated_polygons = PMP::merge_duplicate_polygons_in_polygon_soup(points, faces, np); + result.nb_of_removed_isolated_points = PMP::remove_isolated_points_in_polygon_soup(points, faces); + } + + // check if the polygon soup is pure triangles, and create a triangulated copy otherwise + bool is_pure_triangles = std::all_of(faces.begin(), faces.end(), [](const Face &f) { return f.size() == 3; }); + + { // Now, call does_triangle_soup_self_intersect. + // ... but that function requires a triangulated soup (triangle soup) + // So, if needed, create a copy of the range of faces, and triangulate it on the fly. + + // create a non-deleting pointer to `faces` (with a null deleter) + using Deleter_function = void(Faces*); + using Deleter = Deleter_function*; // function pointer type + using Ptr = std::unique_ptr; + auto null_deleter = +[](Faces *) {}; + Ptr triangle_faces_ptr{&faces, null_deleter}; + if (!is_pure_triangles) + { + auto faces_copy_ptr = new Faces(faces); // copy `faces` + auto delete_function_ptr = +[](Faces* vector){ delete vector; }; + triangle_faces_ptr = Ptr(faces_copy_ptr, delete_function_ptr); + PMP::triangulate_polygons(points, *triangle_faces_ptr, np); + } + + result.polygon_soup_self_intersects = PMP::does_triangle_soup_self_intersect(points, *triangle_faces_ptr, np); + } + + if (!PMP::orient_polygon_soup(points, faces)) + { + result.polygon_mesh_is_manifold = false; + if (verbose) + std::cerr << "Some duplication happened during polygon soup orientation" << std::endl; + } + + if (!PMP::is_polygon_soup_a_polygon_mesh(faces)) + { + if (verbose) + std::cerr << "Warning: polygon soup does not describe a polygon mesh" << std::endl; + return return_error(); + } + PMP::polygon_soup_to_polygon_mesh(points, faces, *result.polygon_mesh, parameters::default_values(), np); + + return result; + } + +} // end namespace CGAL + +#endif // CGAL_CDT_3_INTERNAL_READ_POLYGON_MESH_FOR_CDT_3_H diff --git a/Constrained_triangulation_3/test/Constrained_triangulation_3/CMakeLists.txt b/Constrained_triangulation_3/test/Constrained_triangulation_3/CMakeLists.txt index 1c5e2e64588..f4e20efaef9 100644 --- a/Constrained_triangulation_3/test/Constrained_triangulation_3/CMakeLists.txt +++ b/Constrained_triangulation_3/test/Constrained_triangulation_3/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1...3.23) +cmake_minimum_required(VERSION 3.12...3.31) project(Constrained_triangulation_3_Tests) find_package(CGAL REQUIRED) diff --git a/Convex_decomposition_3/examples/Convex_decomposition_3/CMakeLists.txt b/Convex_decomposition_3/examples/Convex_decomposition_3/CMakeLists.txt index 6fb39bf6485..3e4532f6ffc 100644 --- a/Convex_decomposition_3/examples/Convex_decomposition_3/CMakeLists.txt +++ b/Convex_decomposition_3/examples/Convex_decomposition_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Convex_decomposition_3_Examples) find_package(CGAL REQUIRED) diff --git a/Convex_decomposition_3/test/Convex_decomposition_3/CMakeLists.txt b/Convex_decomposition_3/test/Convex_decomposition_3/CMakeLists.txt index 660388d7120..e06420b426b 100644 --- a/Convex_decomposition_3/test/Convex_decomposition_3/CMakeLists.txt +++ b/Convex_decomposition_3/test/Convex_decomposition_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Convex_decomposition_3_Tests) find_package(CGAL REQUIRED) diff --git a/Convex_hull_2/examples/Convex_hull_2/CMakeLists.txt b/Convex_hull_2/examples/Convex_hull_2/CMakeLists.txt index dad37d65a65..76a81ede555 100644 --- a/Convex_hull_2/examples/Convex_hull_2/CMakeLists.txt +++ b/Convex_hull_2/examples/Convex_hull_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Convex_hull_2_Examples) find_package(CGAL REQUIRED) diff --git a/Convex_hull_2/test/Convex_hull_2/CMakeLists.txt b/Convex_hull_2/test/Convex_hull_2/CMakeLists.txt index ba7b0c0b8c1..3a37f23f9aa 100644 --- a/Convex_hull_2/test/Convex_hull_2/CMakeLists.txt +++ b/Convex_hull_2/test/Convex_hull_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Convex_hull_2_Tests) find_package(CGAL REQUIRED) diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index add02f31d30..99b49365013 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Convex_hull_3_Examples) # CGAL and its components diff --git a/Convex_hull_3/test/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/test/Convex_hull_3/CMakeLists.txt index 3f8e9eb6830..600579792d5 100644 --- a/Convex_hull_3/test/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/test/Convex_hull_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Convex_hull_3_Tests) find_package(CGAL REQUIRED) diff --git a/Convex_hull_d/test/Convex_hull_d/CMakeLists.txt b/Convex_hull_d/test/Convex_hull_d/CMakeLists.txt index 5e04a505476..15d4dd6b201 100644 --- a/Convex_hull_d/test/Convex_hull_d/CMakeLists.txt +++ b/Convex_hull_d/test/Convex_hull_d/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Convex_hull_d_Tests) find_package(CGAL REQUIRED) diff --git a/Distance_2/test/Distance_2/CMakeLists.txt b/Distance_2/test/Distance_2/CMakeLists.txt index 18adb56e7b8..944049ddb60 100644 --- a/Distance_2/test/Distance_2/CMakeLists.txt +++ b/Distance_2/test/Distance_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Distance_2_Tests) find_package(CGAL REQUIRED) diff --git a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h index 73f4b0eb69c..f6bf77fd39b 100644 --- a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h @@ -207,7 +207,7 @@ squared_distance(const typename K::Triangle_3& tr1, FT sqd_q2 = CGAL::squared_distance(vertex(tr2, 1), tr1); FT sqd_r2 = CGAL::squared_distance(vertex(tr2, 2), tr1); - const FT m = std::min({sqd_p1, sqd_q1, sqd_r1, sqd_p2, sqd_q2, sqd_r2}); + const FT m = (std::min)({sqd_p1, sqd_q1, sqd_r1, sqd_p2, sqd_q2, sqd_r2}); return m; #endif diff --git a/Distance_3/test/Distance_3/CMakeLists.txt b/Distance_3/test/Distance_3/CMakeLists.txt index 9d4d21a31ec..0bdc29865c1 100644 --- a/Distance_3/test/Distance_3/CMakeLists.txt +++ b/Distance_3/test/Distance_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Distance_3_Tests) find_package(CGAL REQUIRED) diff --git a/Documentation/doc/CMakeLists.txt b/Documentation/doc/CMakeLists.txt index b251731cafc..8695b4b144d 100644 --- a/Documentation/doc/CMakeLists.txt +++ b/Documentation/doc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Documentation NONE) # Check whether this cmake script is the top level one @@ -24,7 +24,7 @@ else() set(CGAL_ROOT "${CMAKE_SOURCE_DIR}") endif() -cmake_minimum_required(VERSION 3.18..3.29) # for list(SORT ... COMPARE NATURAL) +cmake_minimum_required(VERSION 3.18...3.31) # for list(SORT ... COMPARE NATURAL) find_package(Doxygen REQUIRED) find_package(Python3 REQUIRED COMPONENTS Interpreter) diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_intro.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_intro.txt index 0f7d11e3f81..c3f8daef7d7 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_intro.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_intro.txt @@ -169,7 +169,7 @@ complexity are known. Also, the theoretic interest in efficiency for realistic inputs, as opposed to worst-case situations, is growing \cgalCite{v-ffrim-97}. For practical purposes, insight into the constant factors hidden in the -\cgalBigO{ }-notation is necessary, especially if there are several competing +\cgalBigO{~}-notation is necessary, especially if there are several competing algorithms. Therefore, different implementations should be supplied if there is diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_testing.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_testing.txt index 627d452e1b8..fc075c63253 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_testing.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_testing.txt @@ -8,48 +8,27 @@ Before submitting a change for integration into \cgal it is good style to run the testsuite of the modified package and all packages that could be impacted. -Here is what you need: -- A shell such as bash (install Cygwin, when you are on Windows) -- optional: put `Scripts/scripts` and `Scripts/developer_scripts` on your `PATH` environment variable or - Alternatively, you can call the scripts mentioned below using their full path or a relative path -- define the environment variable `CGAL_DIR`. It should be the directory where you built CGAL. -- optional: define the environment variables for Boost, GMP, and any optional third party lib, e.g. Eigen. -- On Windows: define the environment variable `MAKE_CMD` (put the line `export MAKE_CMD=nmake` in your `$HOME/.bashrc` for VC++) -- On Windows: define the environment variable `CMAKE_GENERATOR` (put the line export CMAKE_GENERATOR='-GNMake Makefiles' in your `$HOME/.bashrc` for VC++) -- go in the directory you want to test -- Run `cgal_test_with_cmake` in the `test` and `examples` directories of the package. This should run CMake, compile and run, and you can see what happened in the generated file `error.txt`. +All examples and tests in CGAL are now compatible with `ctest`. So to test all examples or all tests +of a package, you simply need to configure with `cmake` the examples/tests of the package you want to +test, adding the option `CGAL_ENABLE_TESTING` and setting its value to `ON`. In order to report more +warnings, it is recommended to also add the option `CGAL_DEV_MODE` and to set it to `ON`. +Then a call to the command `ctest` will compile and run the tests/examples. + \section fullTestsuite Running the Whole Testsuite We describe here how to proceed to the testing of a full copy of `master` or any branch by creating a flat release (that is having a layout similar to a release rather than a branch layout with header files gathered by packages). -The creation of the flat release is done using the script `create_internal_release` located in the directory `Scripts/developer_scripts`. -Running the script with no argument will give the complete usage of this script. We only describe one way of using it. +The creation of the flat release is done using the `cmake` script `cgal_create_release_with_cmake.cmake` located in the directory `Scripts/developer_scripts`. +You can run it using the option `-P` of `cmake`: `cmake -P cgal_create_release_with_cmake.cmake`. +For an up-to-date documentation of available options, check the comments at the beginning of the script. -The prerequisite is to have a checkout of the branch we want to test. -In the example, it will be located in ~/Git/cgal/. - -First one goes into a directory where the flat release will be created: -\code -> cd /tmp -\endcode - -Then the script `create_internal_release` is ran: -\code - > create_internal_release -r CGAL-I-FOO -a ~/Git/cgal/ -\endcode - -The directory `CGAL-I-FOO` now contains the flat release of the branch in `~/Git/cgal`. -Then you need to compile this flat release and set `CGAL_DIR` accordingly as explained in the installation manual. - -To run the test-suite simply do: -\code - > cd CGAL-I-FOO/test - > ./run_testsuite_with_cmake -\endcode -and wait for the results to be written in the file `error.txt`. +Then for testing all examples, tests, and demos, in a build directory call `cmake` on the created release +(the path is given by the script if not manually specified) +`cmake -DBUILD_TESTING=ON -DWITH_examples=ON -DWITH_tests=ON -DWITH_demos=ON ../CGAL-X.XX/` +Finally, a call to the command `ctest` will compile and run the tests, examples, and demos. */ diff --git a/Documentation/doc/Documentation/Third_party.txt b/Documentation/doc/Documentation/Third_party.txt index 7875c5791d3..5739b44d85e 100644 --- a/Documentation/doc/Documentation/Third_party.txt +++ b/Documentation/doc/Documentation/Third_party.txt @@ -54,7 +54,7 @@ or `h The \stl comes with the compiler, and as such no installation is required. \subsection thirdpartyBoost Boost -Version 1.72 or later +Version 1.74 or later The \boost libraries are a set of portable C++ source libraries. Most of \boost libraries are header-only, but a few of them need to be compiled or @@ -86,7 +86,6 @@ Version supported are GMP Version 5.0.1 or later, MPFR Version 3.0.0 or later The \boost library also provides a module for multi precision integers and rational numbers: \boost multiprecision. -Versions supported are \boost Version 1.72 or later. The components \cgal, and `CGAL_Qt6` require either \gmp and \mpfr, or \boost multiprecision for multi precision numbers. `CGAL_Core` requires \boost multiprecision. diff --git a/Documentation/doc/Documentation/advanced/Configuration_variables.txt b/Documentation/doc/Documentation/advanced/Configuration_variables.txt index d4ac891a30f..399d3e3ea73 100644 --- a/Documentation/doc/Documentation/advanced/Configuration_variables.txt +++ b/Documentation/doc/Documentation/advanced/Configuration_variables.txt @@ -103,21 +103,11 @@ other but never both. \subsection installation_boost Boost Libraries -\subsubsection inst_boost_1_72_plus Version 1.72 and Later Starting from \boost 1.72, the cmake config mode can be used for configuring the \boost version to use by setting the environment variable `Boost_DIR` to the path containing the file `BoostConfig.cmake`. For example if you manually installed \boost 1.77 with `--prefix=`, then you should set `Boost_DIR=/lib/cmake/Boost-1.77.0`. -\subsubsection inst_boost_up_2_1_69 Version 1.69 and Earlier - -\warning If you have a version of Boost greater than 1.69 already installed on your system, and you want to configure and compile with an earlier version of Boost, then you will need to set the CMake variable `Boost_NO_BOOST_CMAKE` to `ON` (otherwise the `FindBoost.cmake` module of CMake will start searching for `BoostConfig.cmake`, and ignore the `BOOST_ROOT` variable). - -In most cases, if \boost is not automatically found, setting the `BOOST_ROOT` -variable is enough. If it is not, you can specify the header and library -directories individually. You can also provide the full pathname to a specific compiled library -if it cannot be found in the library directory or its name is non-standard. - By default, when \boost binary libraries are needed, the shared versions are used if present. You can set the variable `CGAL_Boost_USE_STATIC_LIBS` to `ON` if you want to link @@ -128,17 +118,6 @@ the `.dll` files are found by the dynamic linker, at run time. For example, you can add the path to the \boost `.dll` to the `PATH` environment variable. -| Variable | Description | Type | -| :- | :- | :- | -| `BOOST_ROOT`\cgalFootnote{The environment variable can be spelled either \cgalFootnoteCode{BOOST_ROOT} or \cgalFootnoteCode{BOOSTROOT}} | Root directory of your \boost installation | Either CMake or Environment | -| `Boost_INCLUDE_DIR` | Directory containing the `boost/version.hpp` file | CMake | -| `BOOST_INCLUDEDIR` | Idem | Environment | -| `Boost_LIBRARY_DIRS` | Directory containing the compiled \boost libraries | CMake | -| `BOOST_LIBRARYDIR` | Idem | Environment | -| `Boost_(xyz)_LIBRARY_RELEASE` | Full pathname to a release build of the compiled 'xyz' \boost library | CMake | -| `Boost_(xyz)_LIBRARY_DEBUG` | Full pathname to a debug build of the compiled 'xyz' \boost library | CMake | - - \subsection installation_gmp GMP and MPFR Libraries Under Windows, auto-linking is used, so only the directory diff --git a/Documentation/doc/biblio/cgal_manual.bib b/Documentation/doc/biblio/cgal_manual.bib index 3f0f258a870..d1600747b48 100644 --- a/Documentation/doc/biblio/cgal_manual.bib +++ b/Documentation/doc/biblio/cgal_manual.bib @@ -1355,7 +1355,7 @@ Teillaud" @article{cgal:lrt-ccm-22, author = {Jacques-Olivier Lachaud and Pascal Romon and Boris Thibert}, - journal = {Discrete & Computational Geometry}, + journal = {Discrete \& Computational Geometry}, title = {Corrected Curvature Measures}, volume = {68}, pages = {477-524}, diff --git a/Documentation/doc/biblio/geom.bib b/Documentation/doc/biblio/geom.bib index f92a1b5cbd5..270267703f8 100644 --- a/Documentation/doc/biblio/geom.bib +++ b/Documentation/doc/biblio/geom.bib @@ -2512,7 +2512,7 @@ cell neighborhood in $O(m)$ time." booktitle = {Handbook of Computational Geometry}, publisher = {Elsevier Science Publishers B.V. North-Holland}, address = {Amsterdam}, - year = {2000} + year = {2000}, pages = {49--119}, update = {00.03 bibrelex, 99.03 bibrelex, 98.11 bibrelex, 98.07 mitchell}, annote = {Chapter 2 of su-hcg-00} @@ -142522,7 +142522,7 @@ of geometric optics." title = {{Fast and Robust QEF Minimization using Probabilistic Quadrics}}, author = {Trettner, Philip and Kobbelt, Leif}, year = {2020}, - publisher = {The Eurographics Association and John Wiley & Sons Ltd.}, + publisher = {The Eurographics Association and John Wiley \& Sons Ltd.}, ISSN = {1467-8659}, DOI = {10.1111/cgf.13933} } @@ -152057,12 +152057,13 @@ keywords = {polygonal surface mesh, Surface reconstruction, kinetic framework, s @article{cvl-ew-12, Author = {Cabello, Sergio and de Verdière, {\'E}ric Colin and Lazarus, Francis}, - Title = {Algorithms for the edge-width of an embedded graph}, - Journal = {Computational Geometry}, - Volume = {45}, - Pages = {215--224}, - Year = {2012}, - Url = {https://monge.univ-mlv.fr/~colinde/pub/09edgewidth.pdf} + Title = {Algorithms for the edge-width of an embedded graph}, + Journal = {Computational Geometry}, + Volume = {45}, + Pages = {215--224}, + Year = {2012}, + Url = {https://monge.univ-mlv.fr/~colinde/pub/09edgewidth.pdf} +} @inproceedings{tang2009interactive, title={Interactive Hausdorff distance computation for general polygonal models}, diff --git a/Documentation/doc/resources/1.10.0/BaseDoxyfile.in b/Documentation/doc/resources/1.10.0/BaseDoxyfile.in index 35aaa1e81aa..66f51ad476c 100644 --- a/Documentation/doc/resources/1.10.0/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.10.0/BaseDoxyfile.in @@ -523,6 +523,18 @@ DISABLE_INDEX = YES GENERATE_TREEVIEW = YES +# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the +# FULL_SIDEBAR option determines if the side bar is limited to only the treeview +# area (value NO) or if it should extend to the full height of the window (value +# YES). Setting this to YES gives a layout similar to +# https://docs.readthedocs.io with more room for contents, but less room for the +# project logo, title, and description. If either GENERATE_TREEVIEW or +# DISABLE_INDEX is set to NO, this option has no effect. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FULL_SIDEBAR = NO + # If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg # tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see # https://inkscape.org) to generate formulas as SVG images instead of PNGs for diff --git a/Documentation/doc/resources/1.10.0/CGAL_mathjax.js b/Documentation/doc/resources/1.10.0/CGAL_mathjax.js index 5ba6efa5bfb..8bf80a019b6 100644 --- a/Documentation/doc/resources/1.10.0/CGAL_mathjax.js +++ b/Documentation/doc/resources/1.10.0/CGAL_mathjax.js @@ -32,4 +32,14 @@ MathJax.Hub.Config( } } ); +MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { + var PARSE = MathJax.InputJax.TeX.Parse, + TEXT = PARSE.prototype.InternalText; + PARSE.Augment({ + InternalText: function (text,def) { + text = text.replace(/\\/g,""); + return TEXT.call(this,text,def); + } + }); +}); //]]> diff --git a/Documentation/doc/resources/1.10.0/cgal_stylesheet.css b/Documentation/doc/resources/1.10.0/cgal_stylesheet.css index 88ae087bb3f..2dded66999b 100644 --- a/Documentation/doc/resources/1.10.0/cgal_stylesheet.css +++ b/Documentation/doc/resources/1.10.0/cgal_stylesheet.css @@ -49,48 +49,48 @@ h2 { } .icon-namespace { - font-family: Arial, Helvetica; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: #FF0000; - color: white; - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 22px; + width: 16px; + display: inline-block; + background-color: #FF0000; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; } .icon-class { - font-family: Arial, Helvetica; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: #0000FF; - color: white; - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 22px; + width: 16px; + display: inline-block; + background-color: #0000FF; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; } .icon-concept { - font-family: Arial, Helvetica; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: #67489A; - color: white; - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 22px; + width: 16px; + display: inline-block; + background-color: #67489A; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; } h1.groupheader { diff --git a/Documentation/doc/resources/1.8.13/CGAL_mathjax.js b/Documentation/doc/resources/1.8.13/CGAL_mathjax.js index a1a6e69deb1..cc2dbd79258 100644 --- a/Documentation/doc/resources/1.8.13/CGAL_mathjax.js +++ b/Documentation/doc/resources/1.8.13/CGAL_mathjax.js @@ -31,4 +31,14 @@ MathJax.Hub.Config( } } ); +MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { + var PARSE = MathJax.InputJax.TeX.Parse, + TEXT = PARSE.prototype.InternalText; + PARSE.Augment({ + InternalText: function (text,def) { + text = text.replace(/\\/g,""); + return TEXT.call(this,text,def); + } + }); +}); //]]> diff --git a/Documentation/doc/resources/1.9.6/CGAL_mathjax.js b/Documentation/doc/resources/1.9.6/CGAL_mathjax.js index 5ba6efa5bfb..8bf80a019b6 100644 --- a/Documentation/doc/resources/1.9.6/CGAL_mathjax.js +++ b/Documentation/doc/resources/1.9.6/CGAL_mathjax.js @@ -32,4 +32,14 @@ MathJax.Hub.Config( } } ); +MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { + var PARSE = MathJax.InputJax.TeX.Parse, + TEXT = PARSE.prototype.InternalText; + PARSE.Augment({ + InternalText: function (text,def) { + text = text.replace(/\\/g,""); + return TEXT.call(this,text,def); + } + }); +}); //]]> diff --git a/Documentation/doc/resources/1.9.6/cgal_stylesheet.css b/Documentation/doc/resources/1.9.6/cgal_stylesheet.css index 88ae087bb3f..2dded66999b 100644 --- a/Documentation/doc/resources/1.9.6/cgal_stylesheet.css +++ b/Documentation/doc/resources/1.9.6/cgal_stylesheet.css @@ -49,48 +49,48 @@ h2 { } .icon-namespace { - font-family: Arial, Helvetica; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: #FF0000; - color: white; - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 22px; + width: 16px; + display: inline-block; + background-color: #FF0000; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; } .icon-class { - font-family: Arial, Helvetica; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: #0000FF; - color: white; - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 22px; + width: 16px; + display: inline-block; + background-color: #0000FF; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; } .icon-concept { - font-family: Arial, Helvetica; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: #67489A; - color: white; - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 22px; + width: 16px; + display: inline-block; + background-color: #67489A; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; } h1.groupheader { diff --git a/Envelope_2/examples/Envelope_2/CMakeLists.txt b/Envelope_2/examples/Envelope_2/CMakeLists.txt index 54144877d58..4afdfc6f5f8 100644 --- a/Envelope_2/examples/Envelope_2/CMakeLists.txt +++ b/Envelope_2/examples/Envelope_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Envelope_2_Examples) find_package(CGAL REQUIRED) diff --git a/Envelope_2/test/Envelope_2/CMakeLists.txt b/Envelope_2/test/Envelope_2/CMakeLists.txt index 37225c2f3a0..9e771071fb6 100644 --- a/Envelope_2/test/Envelope_2/CMakeLists.txt +++ b/Envelope_2/test/Envelope_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Envelope_2_Tests) find_package(CGAL REQUIRED) diff --git a/Envelope_3/examples/Envelope_3/CMakeLists.txt b/Envelope_3/examples/Envelope_3/CMakeLists.txt index 089c44b56b4..283a2b54ce4 100644 --- a/Envelope_3/examples/Envelope_3/CMakeLists.txt +++ b/Envelope_3/examples/Envelope_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Envelope_3_Examples) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Envelope_3/test/Envelope_3/CMakeLists.txt b/Envelope_3/test/Envelope_3/CMakeLists.txt index 251474dc57a..b9038463e38 100644 --- a/Envelope_3/test/Envelope_3/CMakeLists.txt +++ b/Envelope_3/test/Envelope_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Envelope_3_Tests) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Filtered_kernel/benchmark/Filtered_kernel/CMakeLists.txt b/Filtered_kernel/benchmark/Filtered_kernel/CMakeLists.txt index 9852fdad283..290027a019c 100644 --- a/Filtered_kernel/benchmark/Filtered_kernel/CMakeLists.txt +++ b/Filtered_kernel/benchmark/Filtered_kernel/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Filtered_kernel_test) add_executable(bench_simple_comparisons bench_simple_comparisons.cpp) diff --git a/Filtered_kernel/examples/Filtered_kernel/CMakeLists.txt b/Filtered_kernel/examples/Filtered_kernel/CMakeLists.txt index bd9a629f447..cd7bdb737ce 100644 --- a/Filtered_kernel/examples/Filtered_kernel/CMakeLists.txt +++ b/Filtered_kernel/examples/Filtered_kernel/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Filtered_kernel_Examples) find_package(CGAL REQUIRED) diff --git a/Filtered_kernel/test/Filtered_kernel/CMakeLists.txt b/Filtered_kernel/test/Filtered_kernel/CMakeLists.txt index da741c2f754..1536d81a950 100644 --- a/Filtered_kernel/test/Filtered_kernel/CMakeLists.txt +++ b/Filtered_kernel/test/Filtered_kernel/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Filtered_kernel_Tests) find_package(CGAL REQUIRED) diff --git a/Generalized_map/examples/Generalized_map/CMakeLists.txt b/Generalized_map/examples/Generalized_map/CMakeLists.txt index d0ec729d64c..84d5801abdc 100644 --- a/Generalized_map/examples/Generalized_map/CMakeLists.txt +++ b/Generalized_map/examples/Generalized_map/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Generalized_map_Examples) find_package(CGAL REQUIRED) diff --git a/Generalized_map/test/Generalized_map/CMakeLists.txt b/Generalized_map/test/Generalized_map/CMakeLists.txt index 24ac67748cd..792b023745e 100644 --- a/Generalized_map/test/Generalized_map/CMakeLists.txt +++ b/Generalized_map/test/Generalized_map/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Generalized_map_Tests) # CGAL and its components diff --git a/Generator/benchmark/Generator/CMakeLists.txt b/Generator/benchmark/Generator/CMakeLists.txt index e1daf72a299..b8d4c9b9e01 100644 --- a/Generator/benchmark/Generator/CMakeLists.txt +++ b/Generator/benchmark/Generator/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Generator_example) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Generator/examples/Generator/CMakeLists.txt b/Generator/examples/Generator/CMakeLists.txt index 39e4934705d..0575929b894 100644 --- a/Generator/examples/Generator/CMakeLists.txt +++ b/Generator/examples/Generator/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Generator_Examples) find_package(CGAL REQUIRED) diff --git a/Generator/test/Generator/CMakeLists.txt b/Generator/test/Generator/CMakeLists.txt index e7708299971..060c4b02905 100644 --- a/Generator/test/Generator/CMakeLists.txt +++ b/Generator/test/Generator/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Generator_Tests) find_package(CGAL REQUIRED) diff --git a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt index d421e758dc2..0f092bdddba 100644 --- a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt +++ b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Alpha_shapes_2_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) diff --git a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt index 79a9c584324..0e495788267 100644 --- a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Apollonius_graph_2_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) diff --git a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt index 7a1c55e2375..a28575fd8a7 100644 --- a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt +++ b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Bounding_volumes_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) diff --git a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt index 3689b6a4495..7f84c3aa5e6 100644 --- a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt +++ b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Circular_kernel_2_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) diff --git a/GraphicsView/demo/Generator/CMakeLists.txt b/GraphicsView/demo/Generator/CMakeLists.txt index 75ab3c6083e..b1b3ef328c6 100644 --- a/GraphicsView/demo/Generator/CMakeLists.txt +++ b/GraphicsView/demo/Generator/CMakeLists.txt @@ -1,6 +1,6 @@ # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Generator_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) diff --git a/GraphicsView/demo/GraphicsView/CMakeLists.txt b/GraphicsView/demo/GraphicsView/CMakeLists.txt index 9568fd3efae..357832f21b3 100644 --- a/GraphicsView/demo/GraphicsView/CMakeLists.txt +++ b/GraphicsView/demo/GraphicsView/CMakeLists.txt @@ -1,6 +1,6 @@ # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(GraphicsView_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt index 0a682e80fa8..b08284c8501 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(L1_Voronoi_diagram_2_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) diff --git a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt index 2dbae37b697..970f4eb17ba 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt +++ b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Largest_empty_rect_2_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) diff --git a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt index f630c8c6e80..08f3756e10f 100644 --- a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Periodic_2_triangulation_2_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index 85a964989c8..eb899f59ba3 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Polygon_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6 Core) diff --git a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt index 7f805e60986..2ea54637c3c 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Segment_Delaunay_graph_2_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6 Core) diff --git a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt index fc773d81ace..d7aafeb267e 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Segment_Delaunay_graph_Linf_2_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6 Core) diff --git a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt index 9d3c41854bf..ea60ca9c267 100644 --- a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt +++ b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Snap_rounding_2_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) diff --git a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt index fd02ea6c1e9..a4a73095859 100644 --- a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt +++ b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Spatial_searching_2_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) diff --git a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt index 3c76339638a..d07003892d3 100644 --- a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt +++ b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Stream_lines_2_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) diff --git a/GraphicsView/demo/Triangulation_2/CMakeLists.txt b/GraphicsView/demo/Triangulation_2/CMakeLists.txt index 141852b3ed5..613df8d2348 100644 --- a/GraphicsView/demo/Triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Triangulation_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Triangulation_2_Demo) set(CMAKE_AUTOMOC ON) diff --git a/GraphicsView/doc/GraphicsView/fig_src/uml-design.pdf b/GraphicsView/doc/GraphicsView/fig_src/uml-design.pdf index 9a27c4e4f65..15cbfc98f09 100644 --- a/GraphicsView/doc/GraphicsView/fig_src/uml-design.pdf +++ b/GraphicsView/doc/GraphicsView/fig_src/uml-design.pdf @@ -1,5 +1,5 @@ %PDF-1.4 -%âãÏÓ +%âãÃÓ 1 0 obj << diff --git a/HalfedgeDS/examples/HalfedgeDS/CMakeLists.txt b/HalfedgeDS/examples/HalfedgeDS/CMakeLists.txt index 49a4bd1c16f..d2669e130dc 100644 --- a/HalfedgeDS/examples/HalfedgeDS/CMakeLists.txt +++ b/HalfedgeDS/examples/HalfedgeDS/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(HalfedgeDS_Examples) find_package(CGAL REQUIRED) diff --git a/HalfedgeDS/test/HalfedgeDS/CMakeLists.txt b/HalfedgeDS/test/HalfedgeDS/CMakeLists.txt index bab4ef15f0a..cd29aa12692 100644 --- a/HalfedgeDS/test/HalfedgeDS/CMakeLists.txt +++ b/HalfedgeDS/test/HalfedgeDS/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(HalfedgeDS_Tests) find_package(CGAL REQUIRED) diff --git a/Hash_map/benchmark/Hash_map/CMakeLists.txt b/Hash_map/benchmark/Hash_map/CMakeLists.txt index 51860317694..860f31fd055 100644 --- a/Hash_map/benchmark/Hash_map/CMakeLists.txt +++ b/Hash_map/benchmark/Hash_map/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Hash_map) # CGAL and its components diff --git a/Hash_map/test/Hash_map/CMakeLists.txt b/Hash_map/test/Hash_map/CMakeLists.txt index c2a6220bc7a..22e0de0f9a6 100644 --- a/Hash_map/test/Hash_map/CMakeLists.txt +++ b/Hash_map/test/Hash_map/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Hash_map_Tests) find_package(CGAL REQUIRED) diff --git a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt index 250921f012f..8bc9d360ca3 100644 --- a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Heat_method_3_Examples) # CGAL and its components diff --git a/Heat_method_3/test/Heat_method_3/CMakeLists.txt b/Heat_method_3/test/Heat_method_3/CMakeLists.txt index 056f15040a3..f8b3f13f0b1 100644 --- a/Heat_method_3/test/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/test/Heat_method_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Heat_method_3_Tests) # CGAL and its components diff --git a/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/CMakeLists.txt index 7664529ebee..55c2cce7fb5 100644 --- a/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Hyperbolic_triangulation_2_benchmark) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt index 7c0da4ed37b..c27e6da78fa 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Hyperbolic_triangulation_2_Demo) # Find includes in corresponding build directories diff --git a/Hyperbolic_triangulation_2/examples/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/examples/Hyperbolic_triangulation_2/CMakeLists.txt index 04291fd4612..48b87097c62 100644 --- a/Hyperbolic_triangulation_2/examples/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/examples/Hyperbolic_triangulation_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Hyperbolic_triangulation_2_Examples) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h index ee95f6c0f85..ac3731b8adc 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h @@ -77,13 +77,17 @@ namespace internal { std::vector< Intersection_result > inters; intersection(*c_pq, *c_qr, std::back_inserter(inters)); - CGAL_assertion(assign(pair, inters[0])); + CGAL_assertion_code(bool ok=) + assign(pair, inters[0]); + CGAL_assertion(ok); if(pair.second == 1) { if(_gt.has_on_bounded_side_2_object()(l_inf, pair.first)) return pair.first; - CGAL_assertion(assign(pair, inters[1])); + CGAL_assertion_code(bool ok=) + assign(pair, inters[1]); + CGAL_assertion(ok); return pair.first; } return pair.first; @@ -104,13 +108,17 @@ namespace internal { std::vector< Intersection_result > inters; intersection(*l, *c, std::back_inserter(inters)); - CGAL_assertion(assign(pair,inters[0])); + CGAL_assertion_code(bool ok=) + assign(pair,inters[0]); + CGAL_assertion(ok); if(pair.second == 1) { if(_gt.has_on_bounded_side_2_object()(l_inf, pair.first)) return pair.first; - CGAL_assertion(assign(pair, inters[1])); + CGAL_assertion_code(bool ok=) + assign(pair, inters[1]); + CGAL_assertion(ok); return pair.first; } return pair.first; @@ -240,12 +248,16 @@ namespace internal { intersection(bis_pq, l_inf, std::back_inserter(inters)); std::pair pair; - CGAL_assertion(assign(pair,inters[0])); + CGAL_assertion_code(bool ok=) + assign(pair,inters[0]); + CGAL_assertion(ok); CGAL_assertion(pair.second == 1); if(_gt.less_y_2_object()(p, q)) return Line_arc_2(bis_pq,a,pair.first); - CGAL_assertion(assign(pair,inters[1])); + CGAL_assertion_code(ok=) + assign(pair,inters[1]); + CGAL_assertion(ok); CGAL_assertion(pair.second == 1); return Line_arc_2(bis_pq,a,pair.first); } @@ -261,7 +273,9 @@ namespace internal { intersection(*c_pq, l_inf, std::back_inserter(inters)); std::pair pair; - CGAL_assertion(assign(pair,inters[0])); + CGAL_assertion_code(bool ok=) + assign(pair,inters[0]); + CGAL_assertion(ok); CGAL_assertion(pair.second == 1); Hyperbolic_point_2 approx_pinf(to_double(pair.first.x()), to_double(pair.first.y())); @@ -275,7 +289,9 @@ namespace internal { return Circular_arc_2(*c_pq, pair.first, a); } - CGAL_assertion(assign(pair,inters[1])); + CGAL_assertion_code(ok=) + assign(pair,inters[1]); + CGAL_assertion(ok); if(_gt.orientation_2_object()(approx_c,approx_a,approx_pinf) == POSITIVE) return Circular_arc_2(*c_pq, pair.first, a); diff --git a/Hyperbolic_triangulation_2/test/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/test/Hyperbolic_triangulation_2/CMakeLists.txt index 4d4c4397245..4c251645f27 100644 --- a/Hyperbolic_triangulation_2/test/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/test/Hyperbolic_triangulation_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Hyperbolic_triangulation_2_Tests) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Inscribed_areas/examples/Inscribed_areas/CMakeLists.txt b/Inscribed_areas/examples/Inscribed_areas/CMakeLists.txt index ae8130bfe5d..b9a8add8e8e 100644 --- a/Inscribed_areas/examples/Inscribed_areas/CMakeLists.txt +++ b/Inscribed_areas/examples/Inscribed_areas/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Inscribed_areas_Examples) find_package(CGAL REQUIRED) diff --git a/Inscribed_areas/test/Inscribed_areas/CMakeLists.txt b/Inscribed_areas/test/Inscribed_areas/CMakeLists.txt index afd79762867..0b5ba8ac02e 100644 --- a/Inscribed_areas/test/Inscribed_areas/CMakeLists.txt +++ b/Inscribed_areas/test/Inscribed_areas/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Inscribed_areas_Tests) find_package(CGAL REQUIRED) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index a393148dc40..e5d5ee5be91 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -3,10 +3,30 @@ ## [Release 6.1](https://github.com/CGAL/cgal/releases/tag/v6.1) +### General Changes +- The minimal supported version of Boost is now 1.74.0. + ### [Algebraic Kernel](https://doc.cgal.org/6.1/Manual/packages.html#PkgAlgebraicKernelD) - **Breaking change**: Classes based on the RS Library are no longer provided. +### [2D Arrangements](https://doc.cgal.org/6.1/Manual/packages.html#PkgArrangementOnSurface2) + +- Introduces two traits decorators, namely `Arr_tracing_traits_2` and `Arr_counting_traits_2`, which can be used to extract debugging and informative metadata about the traits in use while a program is being executed. +- Fixed the Landmark point-location strategy so that it can be applied to arrangements on a sphere. + +### [3D Mesh Generation](https://doc.cgal.org/6.1/Manual/packages.html#PkgMesh3) + +- Added two new meshing parameters that enable mesh initialization customization : + - `initial_points_generator` : enables the user to specify a functor that generates initial points, + - `initial_points` : enables the user to specify a `Range` of initial points. + + +### [2D Triangulations](https://doc.cgal.org/6.1/Manual/packages.html#PkgTriangulation2) + +- **Breaking change**: In the class template `Constrained_triangulation_plus_2`, the value type of the range returned + by `subconstraints()` has changed from `const std::pair*>` to `Subconstraint`. + The old range type is now returned by a new function named `subconstraints_and_contexts()`. ## [Release 6.0.1](https://github.com/CGAL/cgal/releases/tag/v6.0.1) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 6e6104b6f0c..0cdd9edf184 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -4,7 +4,7 @@ # ${CGAL_SOURCE_DIR} and to the root binary directory of the project as # ${CGAL_BINARY_DIR} or ${CGAL_BINARY_DIR}. if(NOT PROJECT_NAME) - cmake_minimum_required(VERSION 3.12...3.29) + cmake_minimum_required(VERSION 3.12...3.31) project(CGAL CXX C) endif() @@ -433,12 +433,12 @@ if("${CMAKE_CXX_COMPILER}" MATCHES "icl" OR "${CMAKE_CXX_COMPILER}" MATCHES ) else() message( - STATUS "Using Intel Compiler version 11 or later. Adding -fp-model strict" + STATUS "Using Intel Compiler version 11 or later. Adding -fp-model=strict" ) if(WIN32) uniquely_add_flags(CGAL_CXX_FLAGS "/fp:strict") else() - uniquely_add_flags(CGAL_CXX_FLAGS "-fp-model strict") + uniquely_add_flags(CGAL_CXX_FLAGS "-fp-model=strict") endif() endif() endif() @@ -826,36 +826,44 @@ if(NOT TARGET ALL_CGAL_TARGETS) add_custom_target(ALL_CGAL_TARGETS) endif() -macro(add_programs subdir target ON_OFF) +function(CGAL_add_subdirectories subdir name ON_OFF) + cmake_minimum_required(VERSION 3.14) + # CMake>=3.14 for `if(DEFINED CACHE{...})` + # see https://cmake.org/cmake/help/v3.31/command/if.html#defined cache_set(CGAL_EXECUTABLE_TARGETS "") - add_custom_target(${target}) - add_dependencies(ALL_CGAL_TARGETS ${target}) + add_custom_target(${name}) + add_dependencies(ALL_CGAL_TARGETS ${name}) - option(WITH_${target} "Select ${target}" ${ON_OFF}) - if(WITH_${target}) - add_subdirectory(${subdir} EXCLUDE_FROM_ALL) + if(DEFINED CACHE{WITH_${name}} AND "${WITH_${name}}" AND CMAKE_PROJECT_NAME STREQUAL "CGAL") + set(ON_OFF ON) + endif() + option(CGAL_WITH_${name} "Compile CGAL ${name}" ${ON_OFF}) + + if(CGAL_WITH_${name}) + CGAL_handle_subdirectories(${subdir} ${name}) endif() cache_get(CGAL_EXECUTABLE_TARGETS) foreach(CGAL_EXECUTABLE_TARGET ${CGAL_EXECUTABLE_TARGETS}) - add_dependencies(${target} ${CGAL_EXECUTABLE_TARGET}) + add_dependencies(${name} ${CGAL_EXECUTABLE_TARGET}) endforeach() -endmacro() +endfunction() # This allows programs to locate CGALConfig.cmake set(CGAL_DIR ${CGAL_BINARY_DIR}) if(NOT RUNNING_CGAL_AUTO_TEST) - add_programs(examples examples OFF) - add_programs(demo demos OFF) + CGAL_add_subdirectories(examples examples OFF) + CGAL_add_subdirectories(demo demos OFF) if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test") - add_programs(test tests OFF) + CGAL_add_subdirectories(test tests OFF) endif() + CGAL_add_subdirectories(benchmark benchmarks OFF) endif() message("== Setting paths ==") diff --git a/Installation/cmake/modules/CGALHelpers.cmake b/Installation/cmake/modules/CGALHelpers.cmake new file mode 100644 index 00000000000..936ef591f03 --- /dev/null +++ b/Installation/cmake/modules/CGALHelpers.cmake @@ -0,0 +1,84 @@ +cmake_minimum_required(VERSION 3.14) +include_guard(GLOBAL) + +function(process_CGAL_subdirectory entry subdir type_name) + # For example, subdir can be "examples", type_name "example", and entry "Mesh_2" + get_filename_component(ENTRY_DIR_NAME "${entry}" NAME) + + if( NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") # out-of-source + make_directory("${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}") + endif() + + message("\n-- Configuring ${subdir} in ${subdir}/${ENTRY_DIR_NAME}") + + set(source_dir "") + if(EXISTS ${entry}/CMakeLists.txt) + set(source_dir ${entry}) + else() + if(CGAL_CREATE_CMAKE_SCRIPT) + execute_process( + COMMAND bash ${CGAL_CREATE_CMAKE_SCRIPT} ${type_name} --source_dir "${entry}" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}" + RESULT_VARIABLE RESULT_VAR OUTPUT_VARIABLE OUTPUT_VAR ERROR_VARIABLE ERROR_VAR) + if(RESULT_VAR) + message(AUTHOR_WARNING "Error with ${CGAL_CREATE_CMAKE_SCRIPT} ${type_name} --source_dir ${entry}\n${OUTPUT_VAR}\n${ERROR_VAR}") + else() + set(source_dir "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}") + endif() + endif() + endif() + if(source_dir) + add_subdirectory( "${source_dir}" "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}" EXCLUDE_FROM_ALL) + endif() +endfunction() + +function(CGAL_handle_subdirectories subdir_name plural_name) + string(TOUPPER "${plural_name}" plural_name_upper) + if("${plural_name}" MATCHES "s$") + string(LENGTH "${plural_name}" plural_name_length) + math(EXPR plural_name_length_minus_one "${plural_name_length} - 1") + string(SUBSTRING "${plural_name}" 0 "${plural_name_length_minus_one}" singular_name) + else() + set(singular_name "${plural_name}") + endif() + + project(CGAL_${plural_name_upper}) + + if(CGAL_BRANCH_BUILD) + + foreach(package ${CGAL_CONFIGURED_PACKAGES}) + #message (STATUS "Current package: ${package}") + file(GLOB listtmp "${package}/${subdir_name}/*") + list(APPEND list CONFIGURE_DEPENDS ${listtmp}) + endforeach() + + else() + + file(GLOB list "${subdir_name}/*") + + endif() + + if(NOT list) + return() + endif() + + list(SORT list) + + message("== Generating build files for ${plural_name} ==") + foreach(entry ${list}) + + if(NOT ${entry} MATCHES ".*\\.svn\$" AND IS_DIRECTORY ${entry}) + + file(GLOB files "${entry}/*.cpp") + + # If there is no .cpp files, ignore the sub-directory + if(files) + process_cgal_subdirectory("${entry}" ${subdir_name} ${singular_name}) + endif() + + endif() + + endforeach() + message("== Generating build files for ${plural_name} (DONE) ==\n") + +endfunction() diff --git a/Installation/cmake/modules/CGAL_Boost_iostreams_support.cmake b/Installation/cmake/modules/CGAL_Boost_iostreams_support.cmake index 0b0a2b80b1b..464d2bdd911 100644 --- a/Installation/cmake/modules/CGAL_Boost_iostreams_support.cmake +++ b/Installation/cmake/modules/CGAL_Boost_iostreams_support.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) if(Boost_IOSTREAMS_FOUND AND NOT TARGET CGAL::Boost_iostreams_support) if( WIN32 ) diff --git a/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake b/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake index d6d992267bb..c0976f84628 100644 --- a/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake +++ b/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake @@ -6,6 +6,19 @@ set(CGAL_CreateSingleSourceCGALProgram_included TRUE) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_add_test.cmake) include(CMakeParseArguments) +function(CGAL_check_target_name target_name new_target_var_name) + set(cmake_reserved_names all ALL_BUILD help install + INSTALL preinstall clean edit_cache + rebuild_cache ZERO_CHECK package PACKAGE package_source test RUN_TESTS) + + while(TARGET "${target_name}" OR target_name IN_LIST cmake_reserved_names) + message(AUTHOR_WARNING "The executable name ${target_name} is reserved by CMake or already exists. Renaming it to ${target_name}_") + set(target_name "${target_name}_") + endwhile() + + set(${new_target_var_name} ${target_name} PARENT_SCOPE) +endfunction() + function(create_single_source_cgal_program firstfile ) set(options NO_TESTING) set(oneValueArgs) @@ -42,6 +55,7 @@ function(create_single_source_cgal_program firstfile ) set( all ${all} ${CMAKE_CURRENT_SOURCE_DIR}/${i} ) endforeach() + CGAL_check_target_name(${exe_name} exe_name) add_executable(${exe_name} ${all}) if(CXX_FEATURES) target_compile_features(${exe_name} PRIVATE ${CXX_FEATURES}) diff --git a/Installation/cmake/modules/CGAL_Macros.cmake b/Installation/cmake/modules/CGAL_Macros.cmake index 596bc592a15..49b6bf19ec2 100644 --- a/Installation/cmake/modules/CGAL_Macros.cmake +++ b/Installation/cmake/modules/CGAL_Macros.cmake @@ -456,51 +456,4 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) endif() -function(process_CGAL_subdirectory entry subdir type_name) - # For example, subdir can be "examples", type_name "example", and entry "Mesh_2" - get_filename_component(ENTRY_DIR_NAME "${entry}" NAME) - - if( NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") # out-of-source - make_directory("${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}") - endif() - - set(ADD_SUBDIR TRUE) - - if(EXISTS ${entry}/../../dont_submit) - file(STRINGS ${entry}/../../dont_submit dont_submit_grep REGEX "^${ENTRY_DIR_NAME}/?\$") - if(dont_submit_grep) - set(ADD_SUBDIR FALSE) - endif() - file(STRINGS ${entry}/../../dont_submit dont_submit_grep REGEX "^${subdir}/${ENTRY_DIR_NAME}/?\$") - if(dont_submit_grep) - set(ADD_SUBDIR FALSE) - endif() - file(STRINGS ${entry}/../../dont_submit dont_submit_grep REGEX "^${subdir}/?\$") - if(dont_submit_grep) - set(ADD_SUBDIR FALSE) - endif() - endif() - - if(ADD_SUBDIR) - message("\n-- Configuring ${subdir} in ${subdir}/${ENTRY_DIR_NAME}") - if(EXISTS ${entry}/CMakeLists.txt) - set(source_dir ${entry}) - add_subdirectory( ${entry} ${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME} ) - else() - if(CGAL_CREATE_CMAKE_SCRIPT) -# message("bah ${CGAL_CREATE_CMAKE_SCRIPT} ${type_name} --source_dir ${entry}") - execute_process( - COMMAND bash ${CGAL_CREATE_CMAKE_SCRIPT} ${type_name} --source_dir "${entry}" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}" - RESULT_VARIABLE RESULT_VAR OUTPUT_QUIET) - if(NOT RESULT_VAR) -# message("Subdir ${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}") - set(source_dir "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}") - add_subdirectory( "${source_dir}" "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}") - endif() - endif() - endif() - else() - message(STATUS "${subdir}/${ENTRY_DIR_NAME} is in dont_submit") - endif() -endfunction() +include(${CMAKE_CURRENT_LIST_DIR}/CGALHelpers.cmake) diff --git a/Installation/cmake/modules/CGAL_SetupBoost.cmake b/Installation/cmake/modules/CGAL_SetupBoost.cmake index ee561027370..abd5fe9fc0c 100644 --- a/Installation/cmake/modules/CGAL_SetupBoost.cmake +++ b/Installation/cmake/modules/CGAL_SetupBoost.cmake @@ -10,16 +10,13 @@ # # and defines the function :command:`use_CGAL_Boost_support`. -if ( CGAL_Boost_Setup ) - return() -endif() -set ( CGAL_Boost_Setup TRUE ) - +include_guard(GLOBAL) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_TweakFindBoost.cmake) -find_package( Boost 1.72 REQUIRED ) +cmake_policy(VERSION 3.12...3.30) +find_package( Boost 1.74 REQUIRED ) -if(Boost_FOUND AND Boost_VERSION VERSION_LESS 1.72) +if(Boost_FOUND AND Boost_VERSION VERSION_LESS 1.74) if(DEFINED Boost_DIR AND NOT Boost_DIR) # Unset that cache variable that is set in the cache by FindBoost # (while it was searching for boost-cmake). diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 60e2bd25c4d..a73e12026d1 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -23,7 +23,7 @@ # If set, the `LEDA` library will be searched and used to provide # the exact number types used by CGAL kernels. # -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) if(CGAL_SetupCGALDependencies_included) return() endif() @@ -132,11 +132,19 @@ function(CGAL_setup_CGAL_flags target) $<$:/bigobj> # Use /bigobj by default ) elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") - message( STATUS "Using Intel Compiler. Adding -fp-model strict" ) - if(WIN32) - target_compile_options(${target} INTERFACE "/fp:strict") + # cuda knows how to deal with 'fp-model=strict' but not 'fp-model strict' + if(CMAKE_VERSION VERSION_LESS 3.3) + if(WIN32) + target_compile_options(${target} INTERFACE "/fp:strict") + else() + target_compile_options(${target} INTERFACE "-fp-model=strict") + endif() else() - target_compile_options(${target} INTERFACE "-fp-model" "strict") + if(WIN32) + target_compile_options(${target} INTERFACE "$<$:/fp:strict>") + else() + target_compile_options(${target} INTERFACE "$<$:-fp-model=strict>") + endif() endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES "SunPro") message( STATUS "Using SunPro compiler, using STLPort 4." ) diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake index 94d2d839375..710a5d7e579 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake @@ -48,7 +48,7 @@ set_property(GLOBAL PROPERTY CGAL_Core_FOUND TRUE) # function(CGAL_setup_CGAL_Core_dependencies target) - find_package( Boost 1.72 REQUIRED ) + find_package( Boost 1.74 REQUIRED ) if (NOT CGAL_DISABLE_GMP AND GMP_FOUND) use_CGAL_GMP_support(CGAL_Core INTERFACE) endif() diff --git a/Installation/cmake/modules/CGAL_SetupLEDA.cmake b/Installation/cmake/modules/CGAL_SetupLEDA.cmake index 171f6f39e9d..4037c21f5b1 100644 --- a/Installation/cmake/modules/CGAL_SetupLEDA.cmake +++ b/Installation/cmake/modules/CGAL_SetupLEDA.cmake @@ -9,7 +9,7 @@ # find_package(LEDA) # # and defines the function :command:`use_CGAL_LEDA_support`. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) if(CGAL_SetupLEDA_included) return() endif() diff --git a/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake b/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake index 4559bf506d1..43d17a055f8 100644 --- a/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake +++ b/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake @@ -6,7 +6,7 @@ # the configuration. # # See https://stackoverflow.com/a/43300621/1728537 for the starting point. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) if(CGAL_SKIP_CMAKE_HOOKS) return() diff --git a/Installation/demo/CMakeLists.txt b/Installation/demo/CMakeLists.txt index 96c284fa9d8..92606a5b9d2 100644 --- a/Installation/demo/CMakeLists.txt +++ b/Installation/demo/CMakeLists.txt @@ -1,39 +1,7 @@ -cmake_minimum_required(VERSION 3.12...3.29) -project(CGAL_DEMOS) - -if(CGAL_BRANCH_BUILD) - - foreach(package ${CGAL_CONFIGURED_PACKAGES}) - #message (STATUS "Current package: ${package}") - file(GLOB listtmp "${package}/demo/*") - list(APPEND list ${listtmp}) - endforeach() - -else() - - file(GLOB list "*") +cmake_minimum_required(VERSION 3.12...3.31) +if(NOT CGAL_MODULES_DIR) + find_package(CGAL REQUIRED) endif() - -list(SORT list) - -find_package(CGAL REQUIRED) -include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) - -message("== Generating build files for demos ==") -foreach(entry ${list}) - - if(NOT ${entry} MATCHES ".*\\.svn\$" AND IS_DIRECTORY ${entry}) - - file(GLOB files "${entry}/*.cpp") - - # If there is no .cpp files, ignore the sub-directory - if(files) - process_cgal_subdirectory("${entry}" demo demo) - # Note: process_CGAL_subdirectory is defined in cmake/modules/CGAL_Macros.cmake - endif() - - endif() - -endforeach() -message("== Generating build files for demos (DONE) ==\n") +include(${CGAL_MODULES_DIR}/CGALHelpers.cmake) +CGAL_handle_subdirectories(demo demos) diff --git a/Installation/examples/CMakeLists.txt b/Installation/examples/CMakeLists.txt index e62d49c187d..e0034b4727f 100644 --- a/Installation/examples/CMakeLists.txt +++ b/Installation/examples/CMakeLists.txt @@ -1,39 +1,6 @@ -cmake_minimum_required(VERSION 3.12...3.29) -project(CGAL_EXAMPLES) - -if(CGAL_BRANCH_BUILD) - - foreach(package ${CGAL_CONFIGURED_PACKAGES}) - #message (STATUS "Current package: ${package}") - file(GLOB listtmp "${package}/examples/*") - list(APPEND list ${listtmp}) - endforeach() - -else() - - file(GLOB list "*") - +cmake_minimum_required(VERSION 3.12...3.31) +if(NOT CGAL_MODULES_DIR) + find_package(CGAL REQUIRED) endif() - -list(SORT list) - -find_package(CGAL REQUIRED) -include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) - -message("== Generating build files for examples ==") -foreach(entry ${list}) - - if(NOT ${entry} MATCHES ".*\\.svn\$" AND IS_DIRECTORY ${entry}) - - file(GLOB files "${entry}/*.cpp") - - # If there is no .cpp files, ignore the sub-directory - if(files) - process_cgal_subdirectory("${entry}" examples example) - # Note: process_CGAL_subdirectory is defined in cmake/modules/CGAL_Macros.cmake - endif() - - endif() - -endforeach() -message("== Generating build files for examples (DONE) ==\n") +include(${CGAL_MODULES_DIR}/CGALHelpers.cmake) +CGAL_handle_subdirectories(examples examples) diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index a154b5caad8..a9e215f26e2 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -461,6 +461,11 @@ namespace CGAL { using cpp11::copy_n; } // end of the temporary compatibility with CGAL-4.14 #endif // CGAL_NO_DEPRECATED_CODE + +#if __has_include() +# include +#endif + namespace CGAL { // Typedef for the type of nullptr. @@ -501,7 +506,7 @@ namespace cpp11{ # define CGAL_FALLTHROUGH while(false){} #endif -#if __cpp_lib_format >= 201907L || (__has_include() && (__cplusplus >= 202000L || _MSVC_LANG >= 202000L)) +#if __cpp_lib_format >= 201907L # define CGAL_CAN_USE_CXX20_FORMAT 1 #endif diff --git a/Installation/test/CMakeLists.txt b/Installation/test/CMakeLists.txt index e0163f201ab..64d616edd57 100644 --- a/Installation/test/CMakeLists.txt +++ b/Installation/test/CMakeLists.txt @@ -1,39 +1,8 @@ -cmake_minimum_required(VERSION 3.12...3.29) -project(CGAL_TESTS) +cmake_minimum_required(VERSION 3.12...3.31) -if(CGAL_BRANCH_BUILD) - - foreach(package ${CGAL_CONFIGURED_PACKAGES}) - #message (STATUS "Current package: ${package}") - file(GLOB listtmp "${package}/test/*") - list(APPEND list ${listtmp}) - endforeach() - -else() - - file(GLOB list "*") +if(NOT CGAL_MODULES_DIR) + find_package(CGAL REQUIRED) endif() - -list(SORT list) - -find_package(CGAL REQUIRED) -include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) - -message("== Generating build files for tests ==") -foreach(entry ${list}) - - if(NOT ${entry} MATCHES ".*\\.svn\$" AND IS_DIRECTORY ${entry}) - - file(GLOB files "${entry}/*.cpp") - - # If there is no .cpp files, ignore the sub-directory - if(files) - process_cgal_subdirectory("${entry}" test test) - # Note: process_CGAL_subdirectory is defined in cmake/modules/CGAL_Macros.cmake - endif() - - endif() - -endforeach() -message("== Generating build files for tests (DONE) ==\n") +include(${CGAL_MODULES_DIR}/CGALHelpers.cmake) +CGAL_handle_subdirectories(test tests) diff --git a/Installation/test/Installation/CMakeLists.txt b/Installation/test/Installation/CMakeLists.txt index 5fb67b8eae2..183337517e3 100644 --- a/Installation/test/Installation/CMakeLists.txt +++ b/Installation/test/Installation/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project( Installation_Tests ) diff --git a/Installation/test/Installation/cgal_test_with_cmake b/Installation/test/Installation/cgal_test_with_cmake deleted file mode 100755 index afafb02d7d7..00000000000 --- a/Installation/test/Installation/cgal_test_with_cmake +++ /dev/null @@ -1,53 +0,0 @@ -#! /bin/sh - -# This is a script for the CGAL test suite. Such a script must obey -# the following rules: -# -# - the name of the script is cgal_test_with_cmake -# - for every target two one line messages are written to the file 'error.txt' -# the first one indicates if the compilation was successful -# the second one indicates if the execution was successful -# if one of the two was not successful, the line should start with 'ERROR:' -# - running the script should not require any user interaction -# - the script should clean up object files and executables - - ERRORFILE=error.txt - -#---------------------------------------------------------------------# -# remove the previous error file -#---------------------------------------------------------------------# - -rm -f ../$ERRORFILE -touch ../$ERRORFILE - -#---------------------------------------------------------------------# -# compile_and_run -#---------------------------------------------------------------------# -echo "Configuring... " -mkdir build_dir -cd build_dir -if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} -DRUNNING_CGAL_AUTO_TEST=TRUE \ - -DCGAL_DIR="$CGAL_RELEASE_DIR" -DCGAL_ENABLE_TESTING=ON -DWITH_tests=ON \ - ..' ; then - - echo " successful configuration" >> ../$ERRORFILE -else - echo " ERROR: configuration" >> ../$ERRORFILE -fi -cd .. - -#---------------------------------------------------------------------# -# configure, compile and run the tests -#---------------------------------------------------------------------# - -cd build_dir -ctest -L Installation_Tests -VV |tee res.txt -SUCCES="y" -FAILED=$(cat res.txt|grep "\*\*\*Failed") -if [ -z "$FAILED" ]; then - echo " successful run of Installation tests" >> ../$ERRORFILE -else - echo " ERROR: run of Installation tests" >> ../$ERRORFILE - SUCCES="" -fi -cat ../$ERRORFILE diff --git a/Installation/test/Installation/test_configuration.cmake.in b/Installation/test/Installation/test_configuration.cmake.in index fa820a795a5..e300407f0c8 100644 --- a/Installation/test/Installation/test_configuration.cmake.in +++ b/Installation/test/Installation/test_configuration.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(test_configuration) find_package(CGAL) add_definitions(-DQT_NO_KEYWORDS) diff --git a/Installation/test/Installation/test_configuration_qt.cmake.in b/Installation/test/Installation/test_configuration_qt.cmake.in index 5dda5a91bc2..3e2e50894f4 100644 --- a/Installation/test/Installation/test_configuration_qt.cmake.in +++ b/Installation/test/Installation/test_configuration_qt.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(test_configuration) find_package(CGAL COMPONENTS Qt6) add_definitions(-DCGAL_USE_BASIC_VIEWER -DQT_NO_KEYWORDS) diff --git a/Installation/test/Installation/test_find_package.cmake.in b/Installation/test/Installation/test_find_package.cmake.in index cf759c73b85..eab8e03ed2e 100644 --- a/Installation/test/Installation/test_find_package.cmake.in +++ b/Installation/test/Installation/test_find_package.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project( test_find_package_${mode} ) find_package(CGAL ${VERSION} ${EXACT}REQUIRED PATHS ${CGAL_DIR} diff --git a/Interpolation/examples/Interpolation/CMakeLists.txt b/Interpolation/examples/Interpolation/CMakeLists.txt index 0277e9aaf30..7d49ebcd9ae 100644 --- a/Interpolation/examples/Interpolation/CMakeLists.txt +++ b/Interpolation/examples/Interpolation/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Interpolation_Examples) find_package(CGAL REQUIRED) diff --git a/Interpolation/test/Interpolation/CMakeLists.txt b/Interpolation/test/Interpolation/CMakeLists.txt index cbfc358658e..f0b23d66367 100644 --- a/Interpolation/test/Interpolation/CMakeLists.txt +++ b/Interpolation/test/Interpolation/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Interpolation_Tests) find_package(CGAL REQUIRED) diff --git a/Intersections_2/test/Intersections_2/CMakeLists.txt b/Intersections_2/test/Intersections_2/CMakeLists.txt index 5fc9f53991f..773045a2af5 100644 --- a/Intersections_2/test/Intersections_2/CMakeLists.txt +++ b/Intersections_2/test/Intersections_2/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Intersections_2_Tests) find_package(CGAL REQUIRED) diff --git a/Intersections_3/test/Intersections_3/CMakeLists.txt b/Intersections_3/test/Intersections_3/CMakeLists.txt index 9b9ae08edee..8d34a143d23 100644 --- a/Intersections_3/test/Intersections_3/CMakeLists.txt +++ b/Intersections_3/test/Intersections_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Intersections_3_Tests) find_package(CGAL REQUIRED) diff --git a/Interval_skip_list/examples/Interval_skip_list/CMakeLists.txt b/Interval_skip_list/examples/Interval_skip_list/CMakeLists.txt index 458b71b043f..e0750e6dada 100644 --- a/Interval_skip_list/examples/Interval_skip_list/CMakeLists.txt +++ b/Interval_skip_list/examples/Interval_skip_list/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Interval_skip_list_Examples) find_package(CGAL REQUIRED) diff --git a/Interval_skip_list/test/Interval_skip_list/CMakeLists.txt b/Interval_skip_list/test/Interval_skip_list/CMakeLists.txt index 690a918f787..12315e15177 100644 --- a/Interval_skip_list/test/Interval_skip_list/CMakeLists.txt +++ b/Interval_skip_list/test/Interval_skip_list/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Interval_skip_list_Tests) find_package(CGAL REQUIRED) diff --git a/Interval_support/test/Interval_support/CMakeLists.txt b/Interval_support/test/Interval_support/CMakeLists.txt index fd3788e50e9..d586b8c075f 100644 --- a/Interval_support/test/Interval_support/CMakeLists.txt +++ b/Interval_support/test/Interval_support/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Interval_support_Tests) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt index a8bcc29b90c..abb85906be2 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Jet_fitting_3_Examples) find_package(CGAL REQUIRED) diff --git a/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt index 114067d5247..62b395e1d4b 100644 --- a/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Jet_fitting_3_Tests) find_package(CGAL REQUIRED) diff --git a/Kernel_23/benchmark/Kernel_23/CMakeLists.txt b/Kernel_23/benchmark/Kernel_23/CMakeLists.txt index 3d2109157eb..2a5152a9e61 100644 --- a/Kernel_23/benchmark/Kernel_23/CMakeLists.txt +++ b/Kernel_23/benchmark/Kernel_23/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Kernel_23_benchmark) find_package(CGAL QUIET OPTIONAL_COMPONENTS Core) diff --git a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h index 7057cf95ccd..f367f26df4c 100644 --- a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h +++ b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h @@ -8124,6 +8124,12 @@ public: bool operator()(const Kernel::Iso_cuboid_3&c, const Kernel::Point_3&p); + /*! + returns true iff `p` lies on the bounded side of `c`. + */ + bool operator()(const Kernel::Circle_3& c, + const Kernel::Point_3& p); + /*! returns true iff the line segment `ab` is inside the union of the bounded sides of `s1` and `s2`. @@ -8386,6 +8392,11 @@ public: bool operator()(const Kernel::Iso_cuboid_3&c, const Kernel::Point_3&p); + /*! + returns true iff `p` lies on the unbounded side of `c`. + */ + bool operator()(const Kernel::Circle_3&c, + const Kernel::Point_3&p); /// @} diff --git a/Kernel_23/doc/Kernel_23/Concepts/GeomObjects.h b/Kernel_23/doc/Kernel_23/Concepts/GeomObjects.h index 57ad06016b8..e85d5b723bc 100644 --- a/Kernel_23/doc/Kernel_23/Concepts/GeomObjects.h +++ b/Kernel_23/doc/Kernel_23/Concepts/GeomObjects.h @@ -56,6 +56,8 @@ public: \sa `Kernel::ConstructPlane_3` \sa `Kernel::Equal_3` \sa `Kernel::HasOn_3` + \sa `Kernel::HasOnBoundedSide_3` + \sa `Kernel::HasOnUnboundedSide_3` \sa `Kernel::IsDegenerate_3` */ @@ -81,6 +83,7 @@ public: \sa `Kernel::ConstructDirection_2` \sa `Kernel::ConstructOppositeDirection_2` \sa `Kernel::ConstructPerpendicularDirection_2` + \sa `Kernel::ConstructRay_2` \sa `Kernel::CounterclockwiseInBetween_2` \sa `Kernel::Equal_2` @@ -101,9 +104,12 @@ public: \cgalHasModels{CGAL::Direction_3} \cgalHasModelsEnd + \sa `Kernel::ConstructCircle_3` \sa `Kernel::ConstructDirection_3` \sa `Kernel::ConstructOppositeDirection_3` - \sa `Kernel::Equal_2` + \sa `Kernel::ConstructPlane_3` + \sa `Kernel::ConstructRay_3` + \sa `Kernel::Equal_3` */ class Direction_3 { @@ -125,9 +131,17 @@ A type representing isocuboids in three dimensions. \sa `Kernel::BoundedSide_3` \sa `Kernel::ComputeVolume_3` +\sa `Kernel::ComputeXmax_3` +\sa `Kernel::ComputeXmin_3` +\sa `Kernel::ComputeYmax_3` +\sa `Kernel::ComputeYmin_3` +\sa `Kernel::ComputeZmax_3` +\sa `Kernel::ComputeZmin_3` \sa `Kernel::ConstructIsoCuboid_3` +\sa `Kernel::ConstructMaxVertex_3` +\sa `Kernel::ConstructMinVertex_3` \sa `Kernel::ConstructVertex_3` -\sa `Kernel::Equal_2` +\sa `Kernel::Equal_3` \sa `Kernel::HasOnBoundary_3` \sa `Kernel::HasOnBoundedSide_3` \sa `Kernel::HasOnUnboundedSide_3` @@ -151,13 +165,15 @@ public: \cgalHasModelsEnd \sa `Kernel::ConstructIsoRectangle_2` - \sa `Kernel::ComputeXmin_2` \sa `Kernel::ComputeXmax_2` - \sa `Kernel::ComputeYmin_2` + \sa `Kernel::ComputeXmin_2` \sa `Kernel::ComputeYmax_2` + \sa `Kernel::ComputeYmin_2` \sa `Kernel::BoundedSide_2` \sa `Kernel::ComputeArea_2` \sa `Kernel::ConstructIsoRectangle_2` + \sa `Kernel::ConstructMaxVertex_2` + \sa `Kernel::ConstructMinVertex_2` \sa `Kernel::ConstructVertex_2` \sa `Kernel::DoIntersect_2` \sa `Kernel::Equal_2` @@ -185,8 +201,11 @@ public: \cgalHasModelsEnd \sa `Kernel::CompareXAtY_2` - \sa `Kernel::ComputeSquaredDistance_2` \sa `Kernel::CompareYAtX_2` + \sa `Kernel::ComputeA_2` + \sa `Kernel::ComputeB_2` + \sa `Kernel::ComputeC_2` + \sa `Kernel::ComputeSquaredDistance_2` \sa `Kernel::ConstructBisector_2` \sa `Kernel::ConstructDirection_2` \sa `Kernel::ConstructLine_2` @@ -194,6 +213,7 @@ public: \sa `Kernel::ConstructPerpendicularLine_2` \sa `Kernel::ConstructPointOn_2` \sa `Kernel::ConstructProjectedPoint_2` + \sa `Kernel::ConstructRay_2` \sa `Kernel::DoIntersect_2` \sa `Kernel::Equal_2` \sa `Kernel::HasOnNegativeSide_2` @@ -222,6 +242,7 @@ public: \cgalHasModels{CGAL::Line_3} \cgalHasModelsEnd + \sa `Kernel::AreParallel_3` \sa `Kernel::ComputeSquaredDistance_3` \sa `Kernel::ConstructDirection_3` \sa `Kernel::ConstructLine_3` @@ -230,6 +251,7 @@ public: \sa `Kernel::ConstructPlane_3` \sa `Kernel::ConstructPointOn_3` \sa `Kernel::ConstructProjectedPoint_3` + \sa `Kernel::ConstructRay_3` \sa `Kernel::DoIntersect_3` \sa `Kernel::Equal_3` \sa `Kernel::HasOn_3` @@ -299,18 +321,23 @@ public: \cgalHasModels{CGAL::Plane_3} \cgalHasModelsEnd + \sa `Kernel::AreParallel_3` \sa `Kernel::ComputeSquaredDistance_3` \sa `Kernel::ConstructBaseVector_3` \sa `Kernel::ConstructBisector_3` + \sa `Kernel::ConstructCircle_3` \sa `Kernel::ConstructLiftedPoint_3` \sa `Kernel::ConstructOppositePlane_3` \sa `Kernel::ConstructOrthogonalVector_3` + \sa `Kernel::ConstructProjectedXYPoint_2` \sa `Kernel::ConstructPerpendicularLine_3` \sa `Kernel::ConstructPerpendicularPlane_3` \sa `Kernel::ConstructPlane_3` \sa `Kernel::ConstructPointOn_3` \sa `Kernel::ConstructProjectedPoint_3` \sa `Kernel::ConstructProjectedXYPoint_2` + \sa `Kernel::ConstructRadicalPlane_3` + \sa `Kernel::ConstructSupportingPlane_3` \sa `Kernel::DoIntersect_3` \sa `Kernel::Equal_3` \sa `Kernel::HasOnNegativeSide_3` @@ -365,6 +392,7 @@ public: \sa `Kernel::ConstructPoint_2` \sa `Kernel::ConstructProjectedPoint_2` \sa `Kernel::ConstructProjectedXYPoint_2` + \sa `Kernel::ConstructRay_2` \sa `Kernel::ConstructTranslatedPoint_2` \sa `Kernel::DoIntersect_2` \sa `Kernel::Equal_2` @@ -425,6 +453,7 @@ public: \sa `Kernel::ConstructPointOn_3` \sa `Kernel::ConstructPoint_3` \sa `Kernel::ConstructProjectedPoint_3` + \sa `Kernel::ConstructRay_3` \sa `Kernel::ConstructTranslatedPoint_3` \sa `Kernel::CoplanarOrientation_3` \sa `Kernel::CoplanarSideOfBoundedCircle_3` @@ -496,6 +525,7 @@ public: \cgalHasModels{CGAL::Ray_3} \cgalHasModelsEnd + \sa `Kernel::AreParallel_3` \sa `Kernel::ComputeSquaredDistance_3` \sa `Kernel::ConstructDirection_3` \sa `Kernel::ConstructLine_3` @@ -562,6 +592,7 @@ public: \cgalHasModels{CGAL::Segment_3} \cgalHasModelsEnd + \sa `Kernel::AreParallel_3` \sa `Kernel::ComputeSquaredDistance_3` \sa `Kernel::ComputeSquaredLength_3` \sa `Kernel::ConstructDirection_3` @@ -600,7 +631,7 @@ public: \sa `Kernel::ConstructOppositeSphere_3` \sa `Kernel::ConstructRadicalPlane_3` \sa `Kernel::ConstructSphere_3` - \sa `Kernel::Equal_2` + \sa `Kernel::Equal_3` \sa `Kernel::HasOnBoundary_3` \sa `Kernel::HasOnBoundedSide_3` \sa `Kernel::HasOnNegativeSide_3` @@ -631,7 +662,7 @@ public: \sa `Kernel::ConstructCentroid_3` \sa `Kernel::ConstructTetrahedron_3` \sa `Kernel::ConstructVertex_3` - \sa `Kernel::Equal_2` + \sa `Kernel::Equal_3` \sa `Kernel::HasOnBoundary_3` \sa `Kernel::HasOnBoundedSide_3` \sa `Kernel::HasOnNegativeSide_3` @@ -735,6 +766,7 @@ public: \sa `Kernel::ConstructDividedVector_2` \sa `Kernel::ConstructSumOfVectors_2` \sa `Kernel::ConstructDifferenceOfVectors_2` + \sa `Kernel::ConstructRay_2` \sa `Kernel::ConstructVector_2` \sa `Kernel::Equal_2` \sa `Kernel::Orientation_2` @@ -764,13 +796,14 @@ A type representing vectors in three dimensions. \sa `Kernel::ComputeY_3` \sa `Kernel::ComputeZ_3` \sa `Kernel::ConstructCrossProductVector_3` +\sa `Kernel::ConstructDifferenceOfVectors_3` \sa `Kernel::ConstructDirection_3` +\sa `Kernel::ConstructDividedVector_3` \sa `Kernel::ConstructOppositeVector_3` \sa `Kernel::ConstructOrthogonalVector_3` +\sa `Kernel::ConstructRay_3` \sa `Kernel::ConstructScaledVector_3` -\sa `Kernel::ConstructDividedVector_3` \sa `Kernel::ConstructSumOfVectors_3` -\sa `Kernel::ConstructDifferenceOfVectors_3` \sa `Kernel::ConstructVector_3` \sa `Kernel::Equal_3` \sa `Kernel::Orientation_3` diff --git a/Kernel_23/examples/Kernel_23/CMakeLists.txt b/Kernel_23/examples/Kernel_23/CMakeLists.txt index f1a8ba7716f..a9f8d9090b5 100644 --- a/Kernel_23/examples/Kernel_23/CMakeLists.txt +++ b/Kernel_23/examples/Kernel_23/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Kernel_23_Examples) find_package(CGAL REQUIRED) diff --git a/Kernel_23/test/Kernel_23/CMakeLists.txt b/Kernel_23/test/Kernel_23/CMakeLists.txt index 106eced3810..ce9af1c75bc 100644 --- a/Kernel_23/test/Kernel_23/CMakeLists.txt +++ b/Kernel_23/test/Kernel_23/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Kernel_23_Tests) find_package(CGAL REQUIRED COMPONENTS Core) diff --git a/Kernel_d/test/Kernel_d/CMakeLists.txt b/Kernel_d/test/Kernel_d/CMakeLists.txt index 6798d13a087..221d83e5d9c 100644 --- a/Kernel_d/test/Kernel_d/CMakeLists.txt +++ b/Kernel_d/test/Kernel_d/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Kernel_d_Tests) find_package(CGAL REQUIRED) diff --git a/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt b/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt index 0ae368020c1..5541e7b43ee 100644 --- a/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt +++ b/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists. # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Kinetic_space_partition_Examples) diff --git a/Kinetic_space_partition/include/CGAL/KSP/debug.h b/Kinetic_space_partition/include/CGAL/KSP/debug.h index 7dced297352..eae47856078 100644 --- a/Kinetic_space_partition/include/CGAL/KSP/debug.h +++ b/Kinetic_space_partition/include/CGAL/KSP/debug.h @@ -50,6 +50,11 @@ get_idx_color(std::size_t idx) { static_cast(rand.get_int(32, 192))); } +CGAL::IO::Color get_color(std::size_t idx) { + CGAL::Random rand(static_cast(idx)); + return CGAL::IO::Color(rand.get_int(32, 192), rand.get_int(32, 192), rand.get_int(32, 192)); +} + template void dump_intersection_edges(const DS& data, const std::string tag = std::string()) { @@ -110,12 +115,12 @@ void dump_2d_surface_mesh( using Mesh = CGAL::Surface_mesh; using Face_index = typename Mesh::Face_index; using Vertex_index = typename Mesh::Vertex_index; - using Int_map = typename Mesh::template Property_map; + using Int_map = typename Mesh::template Property_map; Mesh mesh; - Int_map red = mesh.template add_property_map("red", 0).first; - Int_map green = mesh.template add_property_map("green", 0).first; - Int_map blue = mesh.template add_property_map("blue", 0).first; + Int_map red = mesh.template add_property_map("red", 0).first; + Int_map green = mesh.template add_property_map("green", 0).first; + Int_map blue = mesh.template add_property_map("blue", 0).first; std::vector vertices; std::vector map_vertices; @@ -332,7 +337,7 @@ public: { } void initialize(std::stringstream& stream) const { - stream.precision(20); + stream.precision(17); } void export_points_2( @@ -495,7 +500,8 @@ public: stream << polygon.size() << " "; for (std::size_t j = 0; j < polygon.size(); ++j) stream << i++ << " "; - stream << get_idx_color(polygon_id) << std::endl; + auto col = get_idx_color(polygon_id); + stream << int(col.r()) << " " << int(col.g()) << " " << int(col.b()) << std::endl; ++polygon_id; } save(stream, file_name + ".ply"); @@ -528,7 +534,8 @@ public: stream << polygon.size() << " "; for (std::size_t j = 0; j < polygon.size(); ++j) stream << i++ << " "; - stream << get_idx_color(region_id) << std::endl; + auto col = get_idx_color(region_id); + stream << int(col.r()) << " " << int(col.g()) << " " << int(col.b()) << std::endl; } ++region_id; } @@ -700,17 +707,16 @@ private: const std::size_t size) const { stream << - "ply" + std::string(_NL_) + "" << - "format ascii 1.0" + std::string(_NL_) + "" << - "element vertex " << size << "" + std::string(_NL_) + "" << - "property double x" + std::string(_NL_) + "" << - "property double y" + std::string(_NL_) + "" << - "property double z" + std::string(_NL_) + "" << - "property uchar red" + std::string(_NL_) + "" << - "property uchar green" + std::string(_NL_) + "" << - "property uchar blue" + std::string(_NL_) + "" << - "property uchar alpha" + std::string(_NL_) + "" << - "end_header" + std::string(_NL_) + ""; + "ply" << std::endl << + "format ascii 1.0" << std::endl << + "element vertex " << size << std::endl << + "property double x" << std::endl << + "property double y" << std::endl << + "property double z" << std::endl << + "property uchar red" << std::endl << + "property uchar green" << std::endl << + "property uchar blue" << std::endl << + "end_header" << std::endl; } void add_ply_header_normals( @@ -718,16 +724,16 @@ private: const std::size_t size) const { stream << - "ply" + std::string(_NL_) + "" << - "format ascii 1.0" + std::string(_NL_) + "" << - "element vertex " << size << "" + std::string(_NL_) + "" << - "property double x" + std::string(_NL_) + "" << - "property double y" + std::string(_NL_) + "" << - "property double z" + std::string(_NL_) + "" << - "property double nx" + std::string(_NL_) + "" << - "property double ny" + std::string(_NL_) + "" << - "property double nz" + std::string(_NL_) + "" << - "end_header" + std::string(_NL_) + ""; + "ply" << std::endl << + "format ascii 1.0" << std::endl << + "element vertex " << size << std::endl << + "property double x" << std::endl << + "property double y" << std::endl << + "property double z" << std::endl << + "property double nx" << std::endl << + "property double ny" << std::endl << + "property double nz" << std::endl << + "end_header" << std::endl; } void add_ply_header_normals_colors( @@ -735,20 +741,19 @@ private: const std::size_t size) const { stream << - "ply" + std::string(_NL_) + "" << - "format ascii 1.0" + std::string(_NL_) + "" << - "element vertex " << size << "" + std::string(_NL_) + "" << - "property double x" + std::string(_NL_) + "" << - "property double y" + std::string(_NL_) + "" << - "property double z" + std::string(_NL_) + "" << - "property double nx" + std::string(_NL_) + "" << - "property double ny" + std::string(_NL_) + "" << - "property double nz" + std::string(_NL_) + "" << - "property uchar red" + std::string(_NL_) + "" << - "property uchar green" + std::string(_NL_) + "" << - "property uchar blue" + std::string(_NL_) + "" << - "property uchar alpha" + std::string(_NL_) + "" << - "end_header" + std::string(_NL_) + ""; + "ply" << std::endl << + "format ascii 1.0" << std::endl << + "element vertex " << size << std::endl << + "property double x" << std::endl << + "property double y" << std::endl << + "property double z" << std::endl << + "property double nx" << std::endl << + "property double ny" << std::endl << + "property double nz" << std::endl << + "property uchar red" << std::endl << + "property uchar green" << std::endl << + "property uchar blue" << std::endl << + "end_header" << std::endl; } void add_ply_header_regions( @@ -775,19 +780,19 @@ private: const std::size_t num_faces) const { stream << - "ply" + std::string(_NL_) + "" << - "format ascii 1.0" + std::string(_NL_) + "" << - "element vertex " << num_vertices << "" + std::string(_NL_) + "" << - "property double x" + std::string(_NL_) + "" << - "property double y" + std::string(_NL_) + "" << - "property double z" + std::string(_NL_) + "" << - "element face " << num_faces << "" + std::string(_NL_) + "" << - "property list uchar int vertex_indices" + std::string(_NL_) + "" << - "property uchar red" + std::string(_NL_) + "" << - "property uchar green" + std::string(_NL_) + "" << - "property uchar blue" + std::string(_NL_) + "" << - "property uchar alpha" + std::string(_NL_) + "" << - "end_header" + std::string(_NL_) + ""; + "ply" << std::endl << + "format ascii 1.0" << std::endl << + "element vertex " << num_vertices << std::endl << + "property double x" << std::endl << + "property double y" << std::endl << + "property double z" << std::endl << + "element face " << num_faces << std::endl << + "property list uchar int vertex_indices" << std::endl << + "property uchar red" << std::endl << + "property uchar green" << std::endl << + "property uchar blue" << std::endl << + "property uchar alpha" << std::endl << + "end_header" << std::endl; } void add_ply_header_mesh_no_color( @@ -796,15 +801,15 @@ private: const std::size_t num_faces) const { stream << - "ply" + std::string(_NL_) + "" << - "format ascii 1.0" + std::string(_NL_) + "" << - "element vertex " << num_vertices << "" + std::string(_NL_) + "" << - "property double x" + std::string(_NL_) + "" << - "property double y" + std::string(_NL_) + "" << - "property double z" + std::string(_NL_) + "" << - "element face " << num_faces << "" + std::string(_NL_) + "" << - "property list ushort int vertex_indices" + std::string(_NL_) + "" << - "end_header" + std::string(_NL_) + ""; + "ply" << std::endl << + "format ascii 1.0" << std::endl << + "element vertex " << num_vertices << std::endl << + "property double x" << std::endl << + "property double y" << std::endl << + "property double z" << std::endl << + "element face " << num_faces << std::endl << + "property list ushort int vertex_indices" << std::endl << + "end_header" << std::endl; } }; @@ -1015,14 +1020,22 @@ void dump_points(const std::vector& pts, const std::vector template void dump_ifaces(const DS& data, const std::string tag = std::string()) { + + using From_exact = CGAL::Cartesian_converter; + From_exact from_exact; // write all polygons into a separate ply with support plane index and iface index - for (std::size_t sp_idx = data.number_of_support_planes(); sp_idx++;) { + for (std::size_t sp_idx = 0; sp_idx < data.number_of_support_planes(); sp_idx++) { for (typename DS::IFace f : data.support_plane(sp_idx).ifaces()) { - Saver saver; std::vector > pts(1); - for (auto v : data.igraph().face(f).vertices) - pts.back().push_back(data.igraph().point_3(v)); - saver.export_polygon_soup_3(pts, tag + "-" + std::to_string(sp_idx) + "-" + std::to_string(f)); + std::vector cols; + cols.push_back(get_color(std::size_t(f))); + Saver saver; + for (auto v : data.igraph().face(f).vertices) { + typename DS::IkPoint_3 ip = data.igraph().point_3(v); + Point_3 p = from_exact(ip); + pts.back().push_back(p); + } + saver.export_polygon_soup_3(pts, cols, tag + "-" + std::to_string(sp_idx) + "-" + std::to_string(f)); } } } diff --git a/Kinetic_space_partition/include/CGAL/KSP_3/Data_structure.h b/Kinetic_space_partition/include/CGAL/KSP_3/Data_structure.h index 7ba219c5fa6..85c93daeb05 100644 --- a/Kinetic_space_partition/include/CGAL/KSP_3/Data_structure.h +++ b/Kinetic_space_partition/include/CGAL/KSP_3/Data_structure.h @@ -409,11 +409,11 @@ public: else event.face = faces.first; - for (std::size_t i = 0; i < sp.data().original_directions.size(); i++) { - if (source_idx == uninitialized && sp.data().original_directions[i] > to_source) + for (std::size_t i = 0; i < sp.data().exact_directions.size(); i++) { + if (source_idx == uninitialized && sp.data().exact_directions[i] > to_source2) source_idx = i; - if (target_idx == uninitialized && sp.data().original_directions[i] > to_target) + if (target_idx == uninitialized && sp.data().exact_directions[i] > to_target2) target_idx = i; } @@ -452,7 +452,7 @@ public: // Shooting rays to find intersection with line of IEdge typename Intersection_kernel::Line_3 l3 = m_intersection_graph.line_3(edge); - const typename Intersection_kernel::Line_2 l = sp.to_2d(l3); + const typename Intersection_kernel::Line_2 l = typename Intersection_kernel::Line_2(s2, t2); for (std::size_t i = 0; i < num; i++) { std::size_t idx = (i + source_idx) % sp.data().original_directions.size(); const auto result = CGAL::intersection(l, sp.data().original_rays[idx]); @@ -465,8 +465,6 @@ public: if (CGAL::assign(p, result)) { IkFT l = CGAL::approximate_sqrt(sp.data().original_vectors[idx].squared_length()); - IkFT l2 = from_exact(CGAL::approximate_sqrt((p - sp.data().original_rays[idx].point(0)).squared_length())); - IkFT l3 = (p - sp.data().original_rays[idx].point(0)) * sp.data().original_rays[idx].to_vector(); time[i] = l3; CGAL_assertion(0 <= time[i]); @@ -483,39 +481,39 @@ public: // Source edge time std::size_t adjacent = (source_idx + sp.data().original_vertices.size() - 1) % sp.data().original_vertices.size(); - Vector_2 dir = sp.data().original_vertices[source_idx] - sp.data().original_vertices[adjacent]; + IkVector_2 dir = sp.data().exact_vertices[source_idx] - sp.data().exact_vertices[adjacent]; dir = dir / CGAL::approximate_sqrt(dir * dir); // Orthogonal direction matching the direction of the adjacent vertices - dir = Vector_2(dir.y(), -dir.x()); + dir = IkVector_2(dir.y(), -dir.x()); // Moving speed matches the speed of adjacent vertices - FT speed = (dir * sp.data().original_vectors[source_idx]); + IkFT speed = (dir * sp.data().original_rays[source_idx].to_vector()); if (speed < 0) speed = -speed; // Distance from edge to endpoint of iedge - FT dist = (s - sp.data().original_vertices[source_idx]) * dir; + IkFT dist = (s2 - sp.data().exact_vertices[source_idx]) * dir; edge_time[0] = dist / speed; // Target edge time - adjacent = (target_idx + sp.data().original_vertices.size() - 1) % sp.data().original_vertices.size(); - dir = sp.data().original_vertices[target_idx] - sp.data().original_vertices[adjacent]; + adjacent = (target_idx + sp.data().exact_vertices.size() - 1) % sp.data().exact_vertices.size(); + dir = sp.data().exact_vertices[target_idx] - sp.data().exact_vertices[adjacent]; dir = dir / CGAL::approximate_sqrt(dir * dir); // Orthogonal direction matching the direction of the adjacent vertices - dir = Vector_2(dir.y(), -dir.x()); + dir = IkVector_2(dir.y(), -dir.x()); // Moving speed matches the speed of adjacent vertices - speed = (dir * sp.data().original_vectors[target_idx]); + speed = (dir * sp.data().original_rays[target_idx].to_vector()); if (speed < 0) speed = -speed; // Distance from edge to endpoint of iedge - dist = (t - sp.data().original_vertices[target_idx]) * dir; + dist = (t2 - sp.data().exact_vertices[target_idx]) * dir; edge_time[1] = dist / speed; @@ -565,6 +563,7 @@ public: for (IEdge edge : border) { Face_event fe; IkFT t = calculate_edge_intersection_time(sp_idx, edge, fe); + if (t > 0) { queue.push(fe); } @@ -912,8 +911,8 @@ public: } } - void add_input_polygon( const std::size_t support_plane_idx, const std::vector& input_indices, const std::vector& polygon) { - std::vector< std::pair > points; + void add_input_polygon( const std::size_t support_plane_idx, const std::vector& input_indices, const std::vector& polygon) { + std::vector< std::pair > points; points.reserve(polygon.size()); for (const auto& point : polygon) { points.push_back(std::make_pair(point, true)); @@ -921,9 +920,10 @@ public: CGAL_assertion(points.size() == polygon.size()); preprocess(points); + sort_points_by_direction(points); support_plane(support_plane_idx). - add_input_polygon(points, input_indices); + add_input_polygon(points, input_indices); for (const std::size_t input_index : input_indices) { m_input_polygon_map[input_index] = support_plane_idx; m_sp2input_polygon[support_plane_idx].insert(input_index); @@ -976,14 +976,17 @@ public: const auto& q = points[i].first; const auto& r = points[ip].first; - Vector_2 vec1(q, r); - Vector_2 vec2(q, p); + using Vector = typename CGAL::Kernel_traits::type::Vector_2; + using Direction = typename CGAL::Kernel_traits::type::Direction_2; + + Vector vec1(q, r); + Vector vec2(q, p); vec1 = KSP::internal::normalize(vec1); vec2 = KSP::internal::normalize(vec2); - const Direction_2 dir1(vec1); - const Direction_2 dir2(vec2); - const FT angle = KSP::internal::angle_2(dir1, dir2); + const Direction dir1(vec1); + const Direction dir2(vec2); + const auto angle = KSP::internal::angle_2(dir1, dir2); if (angle > min_angle) polygon.push_back(points[i]); } @@ -993,9 +996,10 @@ public: template void sort_points_by_direction(std::vector& points) const { + From_exact from_exact; FT x = FT(0), y = FT(0); FT num = 0; for (const auto& pair : points) { - const auto& point = pair.first; + const auto& point = from_exact(pair.first); x += point.x(); y += point.y(); num += 1; @@ -1006,8 +1010,8 @@ public: std::sort(points.begin(), points.end(), [&](const Pair& a, const Pair& b) -> bool { - const Segment_2 sega(mid, a.first); - const Segment_2 segb(mid, b.first); + const Segment_2 sega(mid, from_exact(a.first)); + const Segment_2 segb(mid, from_exact(b.first)); return ( Direction_2(sega) < Direction_2(segb) ); }); } @@ -1395,10 +1399,9 @@ public: return support_plane(support_plane_idx).to_2d(point_3); } -/* IkPoint_2 to_2d(const std::size_t support_plane_idx, const IkPoint_3& point_3) const { return support_plane(support_plane_idx).to_2d(point_3); - }*/ + } Point_2 point_2(const PVertex& pvertex) const { return support_plane(pvertex).point_2(pvertex.second); diff --git a/Kinetic_space_partition/include/CGAL/KSP_3/Finalizer.h b/Kinetic_space_partition/include/CGAL/KSP_3/Finalizer.h index 8b1c033e8b4..caa0b566ba8 100644 --- a/Kinetic_space_partition/include/CGAL/KSP_3/Finalizer.h +++ b/Kinetic_space_partition/include/CGAL/KSP_3/Finalizer.h @@ -117,6 +117,13 @@ public: merge_facets_connected_components(); +/* + if (m_parameters.debug) { + for (std::size_t sp = 0; sp < m_data.number_of_support_planes(); sp++) { + dump_2d_surface_mesh(m_data, sp, m_data.prefix() + "after-merge-sp" + std::to_string(sp)); + } + }*/ + create_volumes(); if (m_parameters.debug) { @@ -336,13 +343,10 @@ private: } // Propagate both queues if volumes on either side of the pface are not segmented. - for (std::size_t i = 0; i < 2; i++) { - if (volume_indices[i] != uninitialized) { - while (!queue[i].empty()) { + for (std::size_t i = 0; i < 2; i++) + if (volume_indices[i] != uninitialized) + while (!queue[i].empty()) propagate_volume(queue[i], volume_indices[i], volumes, map_volumes); - } - } - } } void propagate_volume(std::queue >& queue, std::size_t volume_index, std::vector& volumes, std::map >& map_volumes) { diff --git a/Kinetic_space_partition/include/CGAL/KSP_3/Initializer.h b/Kinetic_space_partition/include/CGAL/KSP_3/Initializer.h index 205b569ecec..f3e5550a4d9 100644 --- a/Kinetic_space_partition/include/CGAL/KSP_3/Initializer.h +++ b/Kinetic_space_partition/include/CGAL/KSP_3/Initializer.h @@ -402,7 +402,6 @@ private: typename Intersection_kernel::Point_2 a(sp.to_2d(m_data.point_3(m_data.source(pair.second[0])))); typename Intersection_kernel::Point_2 b(sp.to_2d(m_data.point_3(m_data.target(pair.second[0])))); typename Intersection_kernel::Line_2 exact_line(a, b); - Line_2 l = from_exact(exact_line); typename Intersection_kernel::Vector_2 ldir = exact_line.to_vector(); ldir = (typename Intersection_kernel::FT(1.0) / CGAL::approximate_sqrt(ldir * ldir)) * ldir; @@ -413,43 +412,38 @@ private: typename Intersection_kernel::FT emin = (std::numeric_limits::max)(); typename Intersection_kernel::FT emax = -(std::numeric_limits::max)(); FT min_speed = (std::numeric_limits::max)(), max_speed = -(std::numeric_limits::max)(); - - CGAL::Oriented_side last_side = l.oriented_side(sp.data().original_vertices.back()); + CGAL::Oriented_side last_side = exact_line.oriented_side(sp.data().exact_vertices.back()); Point_2 minp, maxp; typename Intersection_kernel::Point_2 eminp, emaxp; // Map polygon to line and get min&max projection for (std::size_t v = 0; v < sp.data().original_vertices.size(); v++) { - const Point_2& p = sp.data().original_vertices[v]; - - CGAL::Oriented_side s = l.oriented_side(p); + CGAL::Oriented_side s = exact_line.oriented_side(sp.data().exact_vertices[v]); if (last_side != s) { // Fetch former point to add segment. - const Point_2& prev = sp.data().original_vertices[(v + sp.data().original_vertices.size() - 1) % sp.data().original_vertices.size()]; + auto eprev = sp.data().exact_vertices[(v + sp.data().exact_vertices.size() - 1) % sp.data().exact_vertices.size()]; const Vector_2 edge_dir = sp.original_edge_direction((v + sp.data().original_vertices.size() - 1) % sp.data().original_vertices.size(), v); - typename Intersection_kernel::Segment_2 seg(to_exact(prev), to_exact(p)); + + typename Intersection_kernel::Segment_2 seg(eprev, sp.data().exact_vertices[v]); const auto result = CGAL::intersection(seg, exact_line); + typename Intersection_kernel::Point_2 intersection; if (result && CGAL::assign(intersection, result)) { typename Intersection_kernel::FT eproj = (intersection - exact_line.point()) * ldir; - //FT proj = to_inexact(eproj); + if (eproj < emin) { eminp = intersection; emin = eproj; minp = from_exact(intersection); - //min = proj; - typename Intersection_kernel::FT p = dir * edge_dir; - CGAL_assertion(p != 0); - min_speed = CGAL::approximate_sqrt(edge_dir * edge_dir) / from_exact(p); + FT p = dir * edge_dir; + min_speed = CGAL::approximate_sqrt(edge_dir * edge_dir) / p; } if (emax < eproj) { emaxp = intersection; emax = eproj; maxp = from_exact(intersection); - //max = proj; typename Intersection_kernel::FT p = dir * edge_dir; - CGAL_assertion(p != 0); max_speed = CGAL::approximate_sqrt(edge_dir * edge_dir) / from_exact(p); } } @@ -499,7 +493,7 @@ private: typename Intersection_graph::Kinetic_interval& kinetic_interval = m_data.igraph().kinetic_interval(e, sp_idx); crossing_iedges.push_back(e); - if (emin > s) { + if (emin > s || std::isinf(min_speed)) { typename Intersection_kernel::FT bary_edge_exact = (emin - s) / (t - s); FT bary_edge = from_exact((emin - s) / (t - s)); CGAL_assertion(bary_edge_exact >= 0); @@ -511,7 +505,7 @@ private: kinetic_interval.push_back(std::pair(0, 0)); } - if (t > emax) { + if (t > emax || std::isinf(max_speed)) { typename Intersection_kernel::FT bary_edge_exact = (emax - s) / (t - s); FT bary_edge = from_exact((emax - s) / (t - s)); CGAL_assertion(0 <= bary_edge_exact && bary_edge_exact <= 1); @@ -665,7 +659,7 @@ private: } void add_input_polygons() { - using Polygon_2 = std::vector; + using Polygon_2 = std::vector; using Indices = std::vector; std::map< std::size_t, std::pair > polygons; @@ -689,20 +683,19 @@ private: } template - void convert_polygon(const std::size_t support_plane_idx, const PointRange& polygon_3, std::vector& polygon_2) { + void convert_polygon(const std::size_t support_plane_idx, const PointRange& polygon_3, std::vector& polygon_2) { polygon_2.clear(); polygon_2.reserve(polygon_3.size()); + To_exact to_exact; for (const auto& point : polygon_3) { - const Point_3 converted(static_cast(point.x()), static_cast(point.y()), static_cast(point.z())); - - polygon_2.push_back(m_data.support_plane(support_plane_idx).to_2d(converted)); + polygon_2.push_back(m_data.support_plane(support_plane_idx).to_2d(to_exact(point))); } CGAL_assertion(polygon_2.size() == polygon_3.size()); } - void preprocess_polygons(std::map< std::size_t, std::pair, std::vector > >& polygons) { + void preprocess_polygons(std::map< std::size_t, std::pair, std::vector > >& polygons) { std::size_t input_index = 0; - std::vector polygon_2; + std::vector polygon_2; std::vector input_indices; for (std::size_t i = 0; i < m_input_polygons.size(); i++) { bool is_added = true; @@ -729,8 +722,8 @@ private: } } - void merge_polygons(const std::size_t support_plane_idx, const std::vector& polygon_a, std::vector& polygon_b) { - const bool is_debug = false; + void merge_polygons(const std::size_t support_plane_idx, const std::vector& polygon_a, std::vector& polygon_b) { + const bool is_debug = true; CGAL_assertion(support_plane_idx >= 6); if (is_debug) { std::cout << std::endl << "support plane idx: " << support_plane_idx << std::endl; @@ -743,18 +736,19 @@ private: } // Create the merged polygon. - std::vector merged; + std::vector merged; create_merged_polygon(points, merged); if (is_debug) { std::cout << "merged polygon: " << std::endl; + From_exact from_exact; for (std::size_t i = 0; i < merged.size(); ++i) { const std::size_t ip = (i + 1) % merged.size(); const auto& p = merged[i]; const auto& q = merged[ip]; std::cout << "2 " << - m_data.to_3d(support_plane_idx, p) << " " << - m_data.to_3d(support_plane_idx, q) << std::endl; + m_data.to_3d(support_plane_idx, from_exact(p)) << " " << + m_data.to_3d(support_plane_idx, from_exact(q)) << std::endl; } } @@ -762,7 +756,7 @@ private: polygon_b = merged; } - void create_merged_polygon(const std::vector& points, std::vector& merged) const { + void create_merged_polygon(const std::vector& points, std::vector& merged) const { merged.clear(); CGAL::convex_hull_2(points.begin(), points.end(), std::back_inserter(merged)); diff --git a/Kinetic_space_partition/include/CGAL/KSP_3/Support_plane.h b/Kinetic_space_partition/include/CGAL/KSP_3/Support_plane.h index 10ef59f9cfc..b85e37ea14d 100644 --- a/Kinetic_space_partition/include/CGAL/KSP_3/Support_plane.h +++ b/Kinetic_space_partition/include/CGAL/KSP_3/Support_plane.h @@ -119,8 +119,10 @@ public: std::vector iedges; std::vector original_vertices; + std::vector exact_vertices; std::vector original_vectors; std::vector original_directions; + std::vector exact_directions; std::vector original_rays; FT distance_tolerance; @@ -345,11 +347,12 @@ public: CGAL_assertion(is_valid_polygon(points)); To_exact to_exact; + From_exact from_exact; CGAL_assertion(points.size() >= 3); std::vector tris(points.size() - 2); for (std::size_t i = 2; i < points.size(); i++) - tris[i - 2] = Triangle_2(points[0].first, points[i - 1].first, points[i].first); + tris[i - 2] = Triangle_2(from_exact(points[0].first), from_exact(points[i - 1].first), from_exact(points[i].first)); m_data->centroid = CGAL::centroid(tris.begin(), tris.end(), CGAL::Dimension_tag<2>()); @@ -358,22 +361,23 @@ public: CGAL_assertion(n >= 3); vertices.reserve(n); m_data->original_vertices.resize(n); + m_data->exact_vertices.resize(n); m_data->original_vectors.resize(n); m_data->original_directions.resize(n); + m_data->exact_directions.resize(n); m_data->original_rays.resize(n); FT sum_length = FT(0); - std::vector directions; + std::vector directions; directions.reserve(n); - std::vector > dir_vec; + std::vector > dir_vec; FT num = 0; for (const auto& pair : points) { const auto& point = pair.first; - directions.push_back(Vector_2(m_data->centroid, point)); - const FT length = static_cast( - CGAL::approximate_sqrt(CGAL::abs(directions.back() * directions.back()))); + directions.push_back(typename Intersection_kernel::Vector_2(to_exact(m_data->centroid), point)); + const FT length = CGAL::sqrt(CGAL::abs(from_exact(directions.back() * directions.back()))); sum_length += length; num += 1; } @@ -382,21 +386,23 @@ public: dir_vec.reserve(n); for (std::size_t i = 0; i < n; i++) - dir_vec.push_back(std::pair(i, directions[i])); + dir_vec.push_back(std::pair(i, directions[i])); std::sort(dir_vec.begin(), dir_vec.end(), - [&](const std::pair& a, - const std::pair& b) -> bool { + [&](const std::pair& a, + const std::pair& b) -> bool { return a.second < b.second; }); for (std::size_t i = 0; i < n; ++i) { const auto& point = points[dir_vec[i].first].first; - const auto vi = m_data->mesh.add_vertex(point); - m_data->original_vertices[i] = point; - m_data->original_vectors[i] = directions[dir_vec[i].first] / sum_length; - m_data->original_directions[i] = Direction_2(directions[dir_vec[i].first]); - m_data->original_rays[i] = typename Intersection_kernel::Ray_2(to_exact(point), to_exact(m_data->original_vectors[i])); + const auto vi = m_data->mesh.add_vertex(from_exact(point)); + m_data->original_vertices[i] = from_exact(point); + m_data->exact_vertices[i] = point; + m_data->original_vectors[i] = from_exact(directions[dir_vec[i].first]) / sum_length; + m_data->original_directions[i] = Direction_2(from_exact(directions[dir_vec[i].first])); + m_data->exact_directions[i] = dir_vec[i].second; + m_data->original_rays[i] = typename Intersection_kernel::Ray_2(point, directions[dir_vec[i].first] / sum_length); m_data->v_original_map[vi] = true; vertices.push_back(vi); } @@ -448,20 +454,22 @@ public: template bool is_simple_polygon(const std::vector& points) const { + From_exact from_exact; std::vector polygon; polygon.reserve(points.size()); for (const auto& pair : points) - polygon.push_back(pair.first); + polygon.push_back(from_exact(pair.first)); CGAL_assertion(polygon.size() == points.size()); return CGAL::is_simple_2(polygon.begin(), polygon.end()); } template bool is_convex_polygon(const std::vector& points) const { + From_exact from_exact; std::vector polygon; polygon.reserve(points.size()); for (const auto& pair : points) - polygon.push_back(pair.first); + polygon.push_back(from_exact(pair.first)); CGAL_assertion(polygon.size() == points.size()); return CGAL::is_convex_2(polygon.begin(), polygon.end()); } diff --git a/Kinetic_space_partition/include/CGAL/Kinetic_space_partition_3.h b/Kinetic_space_partition/include/CGAL/Kinetic_space_partition_3.h index 5796f13d34c..a11a1f9dc71 100644 --- a/Kinetic_space_partition/include/CGAL/Kinetic_space_partition_3.h +++ b/Kinetic_space_partition/include/CGAL/Kinetic_space_partition_3.h @@ -432,7 +432,7 @@ public: m_input2regularized.push_back(m_input_planes.size()); m_regularized2input.push_back(std::vector()); m_regularized2input.back().push_back(p); - m_input_planes.push_back(to_exact(pl)); + m_input_planes.push_back(exact_pl); m_input_centroids.push_back(c); m_input_polygons.push_back(std::vector(ch.size())); @@ -491,7 +491,7 @@ public: m_parameters.max_octree_node_size = parameters::choose_parameter( parameters::get_parameter(np, internal_np::max_octree_node_size), 40); - std::cout.precision(20); + std::cout.precision(17); if (m_input_polygons.size() == 0) { std::cout << "Warning: Your input is empty!"; return; @@ -581,12 +581,6 @@ public: finalization_time = 0; conformal_time = 0; - /* - if (m_parameters.debug) - if (boost::filesystem::is_directory("volumes/")) - for (boost::filesystem::directory_iterator end_dir_it, it("volumes/"); it != end_dir_it; ++it) - boost::filesystem::remove_all(it->path());*/ - for (std::size_t idx : m_partitions) { Sub_partition& partition = m_partition_nodes[idx]; timer.reset(); @@ -612,13 +606,12 @@ public: // Propagation. Propagation propagation(*partition.m_data, m_parameters); - std::size_t m_num_events = propagation.propagate(k); + propagation.propagate(k); partition_time += timer.time(); if (m_parameters.verbose) { std::cout << "* propagation finished" << std::endl; - std::cout << "* number of events handled: " << m_num_events << std::endl; } if (m_parameters.verbose) { @@ -1274,12 +1267,12 @@ private: if (pos && neg) { std::cout << "face is not convex" << std::endl; - exit(1); + CGAL_assertion(false); } if (!pos && !neg) { std::cout << "face is degenerated" << std::endl; - exit(1); + CGAL_assertion(false); } if (neg) { diff --git a/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt b/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt index e8ce84945ce..81789f3965f 100644 --- a/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt +++ b/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists. # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Kinetic_space_partition_Tests) @@ -19,7 +19,7 @@ if(Boost_FOUND) message(STATUS "Found Eigen") include(CGAL_Eigen3_support) - set(targets kinetic_3d_test_all) + set(targets kinetic_3d_test_all issue_8624) set(project_linked_libraries) set(project_compilation_definitions) diff --git a/Kinetic_space_partition/test/Kinetic_space_partition/data/issue_8624.off b/Kinetic_space_partition/test/Kinetic_space_partition/data/issue_8624.off new file mode 100644 index 00000000000..67cd2a1b0d0 --- /dev/null +++ b/Kinetic_space_partition/test/Kinetic_space_partition/data/issue_8624.off @@ -0,0 +1,777 @@ +OFF +620 155 0 +868.585 442.974 10 +871.72 445.821 10 +871.72 445.821 -10 +868.585 442.974 -10 +871.138 444.964 10 +879.142 451.345 10 +879.142 451.345 -10 +871.138 444.964 -10 +878.286 450.795 10 +881.048 454.343 10 +881.048 454.343 -10 +878.286 450.795 -10 +880.519 454.396 10 +882.228 450.947 10 +882.228 450.947 -10 +880.519 454.396 -10 +886.03 449.396 10 +890.121 458.086 10 +890.121 458.086 -10 +886.03 449.396 -10 +887.322 458.699 10 +881.556 460.73 10 +881.556 460.73 -10 +887.322 458.699 -10 +882.339 460.955 10 +878.71 456.409 10 +878.71 456.409 -10 +882.339 460.955 -10 +879.495 456.639 10 +873.633 458.623 10 +873.633 458.623 -10 +879.495 456.639 -10 +872.369 457.733 10 +873.136 456.477 10 +873.136 456.477 -10 +872.369 457.733 -10 +873.329 457.114 10 +869.874 455.517 10 +869.874 455.517 -10 +873.329 457.114 -10 +867.498 452.88 10 +864.051 451.791 10 +864.051 451.791 -10 +867.498 452.88 -10 +864.938 452.277 10 +861.298 450.817 10 +861.298 450.817 -10 +864.938 452.277 -10 +852.179 454.854 10 +851.232 458.959 10 +851.232 458.959 -10 +852.179 454.854 -10 +851.176 463.954 10 +841.842 461.31 10 +841.842 461.31 -10 +851.176 463.954 -10 +842.736 456.409 10 +844.684 455.598 10 +844.684 455.598 -10 +842.736 456.409 -10 +844.552 456.166 10 +841.806 453.036 10 +841.806 453.036 -10 +844.552 456.166 -10 +840.485 445.346 10 +842.819 442.364 10 +842.819 442.364 -10 +840.485 445.346 -10 +846.529 445.694 10 +847.927 447.809 10 +847.927 447.809 -10 +846.529 445.694 -10 +847.187 447.578 10 +861.395 441.911 10 +861.395 441.911 -10 +847.187 447.578 -10 +861.718 435.388 10 +862.046 431.559 10 +862.046 431.559 -10 +861.718 435.388 -10 +861.51 431.979 10 +872.554 433.721 10 +872.554 433.721 -10 +861.51 431.979 -10 +872.226 433.171 10 +870.515 438.04 10 +870.515 438.04 -10 +872.226 433.171 -10 +871.166 437.689 10 +869.365 437.241 10 +869.365 437.241 -10 +871.166 437.689 -10 +869.925 436.867 10 +868.881 443.805 10 +868.881 443.805 -10 +869.925 436.867 -10 +897.095 457.032 10 +897.879 452.662 10 +897.879 452.662 -10 +897.095 457.032 -10 +897.997 453.609 10 +897.26 451.982 10 +897.26 451.982 -10 +897.997 453.609 -10 +897.829 452.782 10 +893.076 448.257 10 +893.076 448.257 -10 +897.829 452.782 -10 +893.505 449.097 10 +892.824 444.106 10 +892.824 444.106 -10 +893.505 449.097 -10 +892.549 444.966 10 +893.782 443.654 10 +893.782 443.654 -10 +892.549 444.966 -10 +893.088 443.663 10 +896.956 447.574 10 +896.956 447.574 -10 +893.088 443.663 -10 +896.113 447.126 10 +898.564 447.591 10 +898.564 447.591 -10 +896.113 447.126 -10 +897.956 447.984 10 +898.281 446.621 10 +898.281 446.621 -10 +897.956 447.984 -10 +897.685 446.969 10 +901.213 447.988 10 +901.213 447.988 -10 +897.685 446.969 -10 +900.108 448.061 10 +904.091 450.431 10 +904.091 450.431 -10 +900.108 448.061 -10 +874.111 467.179 10 +873.942 457.959 10 +873.942 457.959 -10 +874.111 467.179 -10 +873.484 458.637 10 +880.013 456.15 10 +880.013 456.15 -10 +873.484 458.637 -10 +879.279 455.905 10 +882.992 461.795 10 +882.992 461.795 -10 +879.279 455.905 -10 +882.783 460.876 10 +881.895 468.477 10 +881.895 468.477 -10 +882.783 460.876 -10 +882.446 468.062 10 +873.609 466.597 10 +873.609 466.597 -10 +882.446 468.062 -10 +902.925 438.952 10 +901.118 449.001 10 +901.118 449.001 -10 +902.925 438.952 -10 +901.699 448.6 10 +892.423 446.892 10 +892.423 446.892 -10 +901.699 448.6 -10 +894.032 443.388 10 +892.896 443.195 10 +892.896 443.195 -10 +894.032 443.388 -10 +893.305 443.772 10 +894.364 437.533 10 +894.364 437.533 -10 +893.305 443.772 -10 +887.964 452.307 10 +886.501 450.39 10 +886.501 450.39 -10 +887.964 452.307 -10 +886.372 451.038 10 +889.325 449.332 10 +889.325 449.332 -10 +886.372 451.038 -10 +888.416 449.736 10 +893.486 448.093 10 +893.486 448.093 -10 +888.416 449.736 -10 +892.565 448.021 10 +895.803 449.666 10 +895.803 449.666 -10 +892.565 448.021 -10 +895.528 448.97 10 +895.012 450.389 10 +895.012 450.389 -10 +895.528 448.97 -10 +894.696 449.806 10 +898.725 450.742 10 +898.725 450.742 -10 +894.696 449.806 -10 +898.318 450.135 10 +897.114 457.602 10 +897.114 457.602 -10 +898.318 450.135 -10 +897.676 457.242 10 +893.714 456.145 10 +893.714 456.145 -10 +897.676 457.242 -10 +889.625 458.651 10 +887.521 451.429 10 +887.521 451.429 -10 +889.625 458.651 -10 +842.941 456.869 10 +840.675 453.689 10 +840.675 453.689 -10 +842.941 456.869 -10 +840.505 454.293 10 +848.102 451.048 10 +848.102 451.048 -10 +840.505 454.293 -10 +847.483 450.77 10 +848.797 454.684 10 +848.797 454.684 -10 +847.483 450.77 -10 +849.106 454.034 10 +842.183 456.638 10 +842.183 456.638 -10 +849.106 454.034 -10 +880.808 468.873 10 +882.269 462.532 10 +882.269 462.532 -10 +880.808 468.873 -10 +891.45 449.017 10 +886.364 450.967 10 +886.364 450.967 -10 +891.45 449.017 -10 +845.731 452.492 10 +846.332 455.986 10 +846.332 455.986 -10 +845.731 452.492 -10 +846.745 455.535 10 +843.652 455.275 10 +843.652 455.275 -10 +846.745 455.535 -10 +844.311 455.79 10 +843.256 452.688 10 +843.256 452.688 -10 +844.311 455.79 -10 +842.919 453.198 10 +846.314 452.948 10 +846.314 452.948 -10 +842.919 453.198 -10 +901.523 459.934 10 +906.476 453.647 10 +906.476 453.647 -10 +901.523 459.934 -10 +869.438 440.281 10 +870.133 435.658 10 +870.133 435.658 -10 +869.438 440.281 -10 +870.133 435.658 10 +871.019 435.806 10 +871.019 435.806 -10 +870.133 435.658 -10 +871.019 435.806 10 +871.265 433.517 10 +871.265 433.517 -10 +871.019 435.806 -10 +871.265 433.517 10 +862.057 432.051 10 +862.057 432.051 -10 +871.265 433.517 -10 +862.057 432.051 10 +861.741 434.244 10 +861.741 434.244 -10 +862.057 432.051 -10 +861.741 434.244 10 +862.598 434.384 10 +862.598 434.384 -10 +861.741 434.244 -10 +862.598 434.384 10 +861.231 443.29 10 +861.231 443.29 -10 +862.598 434.384 -10 +861.231 443.29 10 +858.98 444.392 10 +858.98 444.392 -10 +861.231 443.29 -10 +858.98 444.392 10 +858.507 443.132 10 +858.507 443.132 -10 +858.98 444.392 -10 +858.507 443.132 10 +854.315 444.757 10 +854.315 444.757 -10 +858.507 443.132 -10 +854.315 444.757 10 +854.713 445.837 10 +854.713 445.837 -10 +854.315 444.757 -10 +854.713 445.837 10 +854.289 446.01 10 +854.289 446.01 -10 +854.713 445.837 -10 +854.289 446.01 10 +853.889 444.922 10 +853.889 444.922 -10 +854.289 446.01 -10 +853.889 444.922 10 +849.736 446.532 10 +849.736 446.532 -10 +853.889 444.922 -10 +849.736 446.532 10 +850.139 447.714 10 +850.139 447.714 -10 +849.736 446.532 -10 +850.139 447.714 10 +847.908 448.63 10 +847.908 448.63 -10 +850.139 447.714 -10 +847.908 448.63 10 +845.946 447.151 10 +845.946 447.151 -10 +847.908 448.63 -10 +845.946 447.151 10 +846.766 446.064 10 +846.766 446.064 -10 +845.946 447.151 -10 +846.766 446.064 10 +842.506 442.73 10 +842.506 442.73 -10 +846.766 446.064 -10 +842.506 442.73 10 +841.171 444.471 10 +841.171 444.471 -10 +842.506 442.73 -10 +841.171 444.471 10 +841.864 444.992 10 +841.864 444.992 -10 +841.171 444.471 -10 +841.864 444.992 10 +837.66 450.279 10 +837.66 450.279 -10 +841.864 444.992 -10 +837.66 450.279 10 +841.787 453.697 10 +841.787 453.697 -10 +837.66 450.279 -10 +841.787 453.697 10 +842.252 455.222 10 +842.252 455.222 -10 +841.787 453.697 -10 +842.252 455.222 10 +842.038 455.287 10 +842.038 455.287 -10 +842.252 455.222 -10 +842.038 455.287 10 +842.378 456.299 10 +842.378 456.299 -10 +842.038 455.287 -10 +842.378 456.299 10 +842.853 456.136 10 +842.853 456.136 -10 +842.378 456.299 -10 +842.853 456.136 10 +842.071 461.494 10 +842.071 461.494 -10 +842.853 456.136 -10 +842.071 461.494 10 +848.285 462.661 10 +848.285 462.661 -10 +842.071 461.494 -10 +848.285 462.661 10 +848.196 463.135 10 +848.196 463.135 -10 +848.285 462.661 -10 +848.196 463.135 10 +850.743 463.613 10 +850.743 463.613 -10 +848.196 463.135 -10 +850.743 463.613 10 +851.562 458.36 10 +851.562 458.36 -10 +850.743 463.613 -10 +851.562 458.36 10 +850.212 458.143 10 +850.212 458.143 -10 +851.562 458.36 -10 +850.212 458.143 10 +850.628 455.916 10 +850.628 455.916 -10 +850.212 458.143 -10 +850.628 455.916 10 +862.426 451.139 10 +862.426 451.139 -10 +850.628 455.916 -10 +862.426 451.139 10 +862.436 451.286 10 +862.436 451.286 -10 +862.426 451.139 -10 +862.436 451.286 10 +864.092 451.433 10 +864.092 451.433 -10 +862.436 451.286 -10 +864.092 451.433 10 +864.001 452.143 10 +864.001 452.143 -10 +864.092 451.433 -10 +864.001 452.143 10 +865.049 452.275 10 +865.049 452.275 -10 +864.001 452.143 -10 +865.049 452.275 10 +865.148 451.49 10 +865.148 451.49 -10 +865.049 452.275 -10 +865.148 451.49 10 +871.873 457.056 10 +871.873 457.056 -10 +865.148 451.49 -10 +871.873 457.056 10 +873.835 458.548 10 +873.835 458.548 -10 +871.873 457.056 -10 +873.835 458.548 10 +874.247 460.088 10 +874.247 460.088 -10 +873.835 458.548 -10 +874.247 460.088 10 +873.75 460.267 10 +873.75 460.267 -10 +874.247 460.088 -10 +873.75 460.267 10 +874.083 461.293 10 +874.083 461.293 -10 +873.75 460.267 -10 +874.083 461.293 10 +874.475 461.16 10 +874.475 461.16 -10 +874.083 461.293 -10 +874.475 461.16 10 +874.191 466.565 10 +874.191 466.565 -10 +874.475 461.16 -10 +874.191 466.565 10 +880.947 467.519 10 +880.947 467.519 -10 +874.191 466.565 -10 +880.947 467.519 10 +880.801 468.386 10 +880.801 468.386 -10 +880.947 467.519 -10 +880.801 468.386 10 +882.894 468.654 10 +882.894 468.654 -10 +880.801 468.386 -10 +882.894 468.654 10 +883.766 463.197 10 +883.766 463.197 -10 +882.894 468.654 -10 +883.766 463.197 10 +882.319 462.953 10 +882.319 462.953 -10 +883.766 463.197 -10 +882.319 462.953 10 +882.725 460.694 10 +882.725 460.694 -10 +882.319 462.953 -10 +882.725 460.694 10 +894.534 456.209 10 +894.534 456.209 -10 +882.725 460.694 -10 +894.534 456.209 10 +894.525 456.384 10 +894.525 456.384 -10 +894.534 456.209 -10 +894.525 456.384 10 +896.128 456.578 10 +896.128 456.578 -10 +894.525 456.384 -10 +896.128 456.578 10 +896.091 456.885 10 +896.091 456.885 -10 +896.128 456.578 -10 +896.091 456.885 10 +897.169 457.035 10 +897.169 457.035 -10 +896.091 456.885 -10 +897.169 457.035 10 +897.241 456.619 10 +897.241 456.619 -10 +897.169 457.035 -10 +897.241 456.619 10 +901.566 459.979 10 +901.566 459.979 -10 +897.241 456.619 -10 +901.566 459.979 10 +905.82 454.744 10 +905.82 454.744 -10 +901.566 459.979 -10 +905.82 454.744 10 +906.374 455.235 10 +906.374 455.235 -10 +905.82 454.744 -10 +906.374 455.235 10 +907.888 453.524 10 +907.888 453.524 -10 +906.374 455.235 -10 +907.888 453.524 10 +903.631 450.089 10 +903.631 450.089 -10 +907.888 453.524 -10 +903.631 450.089 10 +902.81 451.122 10 +902.81 451.122 -10 +903.631 450.089 -10 +902.81 451.122 10 +900.909 449.502 10 +900.909 449.502 -10 +902.81 451.122 -10 +900.909 449.502 10 +902.231 440.596 10 +902.231 440.596 -10 +900.909 449.502 -10 +902.231 440.596 10 +903.107 440.726 10 +903.107 440.726 -10 +902.231 440.596 -10 +903.107 440.726 10 +903.439 438.561 10 +903.439 438.561 -10 +903.107 440.726 -10 +903.439 438.561 10 +894.229 437.091 10 +894.229 437.091 -10 +903.439 438.561 -10 +894.229 437.091 10 +893.897 439.256 10 +893.897 439.256 -10 +894.229 437.091 -10 +893.897 439.256 10 +894.766 439.395 10 +894.766 439.395 -10 +893.897 439.256 -10 +894.766 439.395 10 +893.095 448.477 10 +893.095 448.477 -10 +894.766 439.395 -10 +893.095 448.477 10 +891.024 449.302 10 +891.024 449.302 -10 +893.095 448.477 -10 +891.024 449.302 10 +890.547 448.022 10 +890.547 448.022 -10 +891.024 449.302 -10 +890.547 448.022 10 +886.357 449.641 10 +886.357 449.641 -10 +890.547 448.022 -10 +886.357 449.641 10 +886.919 451.003 10 +886.919 451.003 -10 +886.357 449.641 -10 +886.919 451.003 10 +886.529 451.164 10 +886.529 451.164 -10 +886.919 451.003 -10 +886.529 451.164 10 +886.017 449.926 10 +886.017 449.926 -10 +886.529 451.164 -10 +886.017 449.926 10 +881.895 451.431 10 +881.895 451.431 -10 +886.017 449.926 -10 +881.895 451.431 10 +882.338 452.688 10 +882.338 452.688 -10 +881.895 451.431 -10 +882.338 452.688 10 +879.892 453.549 10 +879.892 453.549 -10 +882.338 452.688 -10 +879.892 453.549 10 +877.953 452.092 10 +877.953 452.092 -10 +879.892 453.549 -10 +877.953 452.092 10 +878.727 451.063 10 +878.727 451.063 -10 +877.953 452.092 -10 +878.727 451.063 10 +875.334 448.269 10 +875.334 448.269 -10 +878.727 451.063 -10 +875.334 448.269 10 +874.474 449.339 10 +874.474 449.339 -10 +875.334 448.269 -10 +874.474 449.339 10 +874.085 449.038 10 +874.085 449.038 -10 +874.474 449.339 -10 +874.085 449.038 10 +874.945 447.968 10 +874.945 447.968 -10 +874.085 449.038 -10 +874.945 447.968 10 +871.482 445.258 10 +871.482 445.258 -10 +874.945 447.968 -10 +871.482 445.258 10 +870.634 446.255 10 +870.634 446.255 -10 +871.482 445.258 -10 +870.634 446.255 10 +868.777 444.675 10 +868.777 444.675 -10 +870.634 446.255 -10 +868.777 444.675 10 +869.438 440.281 10 +869.438 440.281 -10 +868.777 444.675 -10 +4 0 1 2 3 +4 4 5 6 7 +4 8 9 10 11 +4 12 13 14 15 +4 16 17 18 19 +4 20 21 22 23 +4 24 25 26 27 +4 28 29 30 31 +4 32 33 34 35 +4 36 37 38 39 +4 40 41 42 43 +4 44 45 46 47 +4 48 49 50 51 +4 52 53 54 55 +4 56 57 58 59 +4 60 61 62 63 +4 64 65 66 67 +4 68 69 70 71 +4 72 73 74 75 +4 76 77 78 79 +4 80 81 82 83 +4 84 85 86 87 +4 88 89 90 91 +4 92 93 94 95 +4 96 97 98 99 +4 100 101 102 103 +4 104 105 106 107 +4 108 109 110 111 +4 112 113 114 115 +4 116 117 118 119 +4 120 121 122 123 +4 124 125 126 127 +4 128 129 130 131 +4 132 133 134 135 +4 136 137 138 139 +4 140 141 142 143 +4 144 145 146 147 +4 148 149 150 151 +4 152 153 154 155 +4 156 157 158 159 +4 160 161 162 163 +4 164 165 166 167 +4 168 169 170 171 +4 172 173 174 175 +4 176 177 178 179 +4 180 181 182 183 +4 184 185 186 187 +4 188 189 190 191 +4 192 193 194 195 +4 196 197 198 199 +4 200 201 202 203 +4 204 205 206 207 +4 208 209 210 211 +4 212 213 214 215 +4 216 217 218 219 +4 220 221 222 223 +4 224 225 226 227 +4 228 229 230 231 +4 232 233 234 235 +4 236 237 238 239 +4 240 241 242 243 +4 244 245 246 247 +4 248 249 250 251 +4 252 253 254 255 +4 256 257 258 259 +4 260 261 262 263 +4 264 265 266 267 +4 268 269 270 271 +4 272 273 274 275 +4 276 277 278 279 +4 280 281 282 283 +4 284 285 286 287 +4 288 289 290 291 +4 292 293 294 295 +4 296 297 298 299 +4 300 301 302 303 +4 304 305 306 307 +4 308 309 310 311 +4 312 313 314 315 +4 316 317 318 319 +4 320 321 322 323 +4 324 325 326 327 +4 328 329 330 331 +4 332 333 334 335 +4 336 337 338 339 +4 340 341 342 343 +4 344 345 346 347 +4 348 349 350 351 +4 352 353 354 355 +4 356 357 358 359 +4 360 361 362 363 +4 364 365 366 367 +4 368 369 370 371 +4 372 373 374 375 +4 376 377 378 379 +4 380 381 382 383 +4 384 385 386 387 +4 388 389 390 391 +4 392 393 394 395 +4 396 397 398 399 +4 400 401 402 403 +4 404 405 406 407 +4 408 409 410 411 +4 412 413 414 415 +4 416 417 418 419 +4 420 421 422 423 +4 424 425 426 427 +4 428 429 430 431 +4 432 433 434 435 +4 436 437 438 439 +4 440 441 442 443 +4 444 445 446 447 +4 448 449 450 451 +4 452 453 454 455 +4 456 457 458 459 +4 460 461 462 463 +4 464 465 466 467 +4 468 469 470 471 +4 472 473 474 475 +4 476 477 478 479 +4 480 481 482 483 +4 484 485 486 487 +4 488 489 490 491 +4 492 493 494 495 +4 496 497 498 499 +4 500 501 502 503 +4 504 505 506 507 +4 508 509 510 511 +4 512 513 514 515 +4 516 517 518 519 +4 520 521 522 523 +4 524 525 526 527 +4 528 529 530 531 +4 532 533 534 535 +4 536 537 538 539 +4 540 541 542 543 +4 544 545 546 547 +4 548 549 550 551 +4 552 553 554 555 +4 556 557 558 559 +4 560 561 562 563 +4 564 565 566 567 +4 568 569 570 571 +4 572 573 574 575 +4 576 577 578 579 +4 580 581 582 583 +4 584 585 586 587 +4 588 589 590 591 +4 592 593 594 595 +4 596 597 598 599 +4 600 601 602 603 +4 604 605 606 607 +4 608 609 610 611 +4 612 613 614 615 +4 616 617 618 619 \ No newline at end of file diff --git a/Kinetic_space_partition/test/Kinetic_space_partition/issue_8624.cpp b/Kinetic_space_partition/test/Kinetic_space_partition/issue_8624.cpp new file mode 100644 index 00000000000..1a3ddb7fc1e --- /dev/null +++ b/Kinetic_space_partition/test/Kinetic_space_partition/issue_8624.cpp @@ -0,0 +1,80 @@ +#include +#include +#include +#include +#include + +using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; +using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; + +using Kernel = EPICK; +using FT = typename Kernel::FT; +using Point_3 = typename Kernel::Point_3; + +using Surface_mesh = CGAL::Surface_mesh; +using KSP = CGAL::Kinetic_space_partition_3; +using Timer = CGAL::Real_timer; + +int main(int argc, char** argv) +{ + // Reading polygons from file + std::string input_filename = (argc > 1 ? argv[1] : "data/issue_8624.off"); + std::ifstream input_file(input_filename); + + std::vector input_vertices; + std::vector > input_faces; + + if (CGAL::IO::read_polygon_soup(input_filename, input_vertices, input_faces)) { + std::cout << "* reading the file: " << input_filename << "!" << std::endl; + input_file.close(); + } else { + std::cerr << "ERROR: can't read the file " << input_filename << "!" << std::endl; + return EXIT_FAILURE; + } + + std::cout << "--- INPUT STATS: \n* number of polygons: " << input_faces.size() << std::endl; + + // Parameters. + const unsigned int k = (argc > 2 ? std::atoi(argv[2]) : 1); + + // Initialization of Kinetic_space_partition_3 object. + // 'debug' set to true exports intermediate results into files in the working directory. + // The resulting volumes are exported into a volumes folder, if the folder already exists. + KSP ksp(CGAL::parameters::verbose(true).debug(false)); + + // Providing input polygons. + ksp.insert(input_vertices, input_faces); + + Timer timer; + timer.start(); + + // 'initialize' creates the intersection graph that is used for the partition. + ksp.initialize(CGAL::parameters::bbox_dilation_ratio(1.1).reorient_bbox(false)); + + // Creating the partition with allowing up to 'k' intersections for each kinetic polygon. + ksp.partition(k); + + timer.stop(); + const FT time = static_cast(timer.time()); + + // Access the kinetic partition via linear cell complex. + typedef CGAL::Linear_cell_complex_traits<3, EPECK> LCC_Traits; + CGAL::Linear_cell_complex_for_combinatorial_map<3, 3, LCC_Traits, typename KSP::Linear_cell_complex_min_items> lcc; + ksp.get_linear_cell_complex(lcc); + + std::vector cells = { 0, 2, 3 }, count; + count = lcc.count_cells(cells); + + assert(count[0] != 0); + assert(count[2] != 0); + assert(count[3] != 0); + + if (count[0] == 0 || count[2] == 0 || count[3] == 0) + return EXIT_FAILURE; + + std::cout << "For k = " << k << ":\n" << " vertices: " << count[0] << "\n faces: " << count[2] << "\n volumes: " << count[3] << std::endl; + + std::cout << "\n3D kinetic partition created in " << time << " seconds!" << std::endl; + + return EXIT_SUCCESS; +} diff --git a/Kinetic_surface_reconstruction/doc/Kinetic_surface_reconstruction/Kinetic_surface_reconstruction.txt b/Kinetic_surface_reconstruction/doc/Kinetic_surface_reconstruction/Kinetic_surface_reconstruction.txt index 99ee3553995..22f858a8846 100644 --- a/Kinetic_surface_reconstruction/doc/Kinetic_surface_reconstruction/Kinetic_surface_reconstruction.txt +++ b/Kinetic_surface_reconstruction/doc/Kinetic_surface_reconstruction/Kinetic_surface_reconstruction.txt @@ -20,7 +20,7 @@ The reconstruction is posed as an energy minimization labeling the convex volume
    -\f$\DeclareMathOperator*{\argmin}{arg\,min} \argmin\limits_{l \in {\{0, 1\}}^n} E(l) = (1 - \lambda) D(l) + \lambda U(l)\f$ +\f$\operatorname*{arg\,min}\limits_{l \in {\{0, 1\}}^n} E(l) = (1 - \lambda) D(l) + \lambda U(l)\f$ \f$D(l) = \sum\limits_{i \in C}\sum\limits_{p \in I_i}d_i(p, l_i)\f$ @@ -156,11 +156,11 @@ Foam_box 444 -6,5 +6.4 -3,3 +3.4 -9,8 +9.9
    @@ -172,17 +172,17 @@ Lans 169 -3.334 +3.338 330 1.175 -26,3 +27,2 -9,4 +11,1 -35,7 +38,4
    @@ -194,17 +194,17 @@ Meeting Room 777 -29.605 +29.737 -2.867 +2.876 -11.819 +11.839 -37,1 +41,4 -93,4 +100,7 -131,1 +142,1
    @@ -216,17 +216,17 @@ Full Thing 1.790 -21.804 +21.845 -2.655 +2.656 -12.984 +12.980 -8,6 +9,9 -238,8 +279,8 -248,2 +289,7
    @@ -246,9 +246,9 @@ Hilbert cube 0,6 -10,5 +10,2 -11,1 +10,9
    @@ -262,15 +262,15 @@ Asian Dragon 101.651 -10.209 +11.158 -34.237 +35.776 -31,2 +31,7 -757,5 +869,9 -790,7 +903,5
    @@ -282,17 +282,17 @@ Building_C 172 -3.432 +3.468 -369 +370 -1.457 +1.468 -40,1 +41,9 -12,3 +14,5 -52,4 +56,5

    diff --git a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt index 5445891abb0..9ec2ba71fb9 100644 --- a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt +++ b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists. # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Kinetic_surface_reconstruction_Examples) diff --git a/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt b/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt index bf6b5fc9d13..b4a355e2b65 100644 --- a/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt +++ b/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_CMakeLists. # This is the CMake script for compiling a set of CGAL applications. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Kinetic_surface_reconstruction_Tests) diff --git a/Lab/demo/Lab/CMakeLists.txt b/Lab/demo/Lab/CMakeLists.txt index 1185efec166..2c3bb417346 100644 --- a/Lab/demo/Lab/CMakeLists.txt +++ b/Lab/demo/Lab/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Lab_Demo) include(FeatureSummary) diff --git a/Lab/demo/Lab/MainWindow.cpp b/Lab/demo/Lab/MainWindow.cpp index 668fc422c6b..87a80b6303c 100644 --- a/Lab/demo/Lab/MainWindow.cpp +++ b/Lab/demo/Lab/MainWindow.cpp @@ -2401,8 +2401,12 @@ void MainWindow::viewerShowObject() } if(item) { const Scene::Bbox bbox = item->bbox(); - CGAL::qglviewer::Vec min(static_cast(bbox.xmin())+viewer->offset().x, static_cast(bbox.ymin())+viewer->offset().y, static_cast(bbox.zmin())+viewer->offset().z), - max(static_cast(bbox.xmax())+viewer->offset().x, static_cast(bbox.ymax())+viewer->offset().y, static_cast(bbox.zmax())+viewer->offset().z); + CGAL::qglviewer::Vec min{static_cast(bbox.xmin()) + viewer->offset().x, + static_cast(bbox.ymin()) + viewer->offset().y, + static_cast(bbox.zmin()) + viewer->offset().z}; + CGAL::qglviewer::Vec max{static_cast(bbox.xmax()) + viewer->offset().x, + static_cast(bbox.ymax()) + viewer->offset().y, + static_cast(bbox.zmax()) + viewer->offset().z}; viewer->setSceneBoundingBox(min, max); viewerShow(static_cast(min.x), static_cast(min.y), static_cast(min.z), static_cast(max.x), static_cast(max.y), static_cast(max.z)); diff --git a/Lab/demo/Lab/Plugins/Mesh_3/Mesh_3_plugin.cpp b/Lab/demo/Lab/Plugins/Mesh_3/Mesh_3_plugin.cpp index 2aadc761957..f2c255a10fc 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/Mesh_3_plugin.cpp +++ b/Lab/demo/Lab/Plugins/Mesh_3/Mesh_3_plugin.cpp @@ -592,7 +592,7 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type, ui.protect->setChecked(features_protection_available); ui.facegraphCheckBox->setVisible(mesh_type == Mesh_type::SURFACE_ONLY); - ui.initializationGroup->setVisible(input_is_labeled_img); + ui.initializationGroup->setVisible(input_is_labeled_img || input_is_gray_img); ui.grayImgGroup->setVisible(input_is_gray_img); if(input_is_gray_img) diff --git a/Lab/demo/Lab/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp b/Lab/demo/Lab/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp index e46ecd6c4de..d1e560c5aa7 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp +++ b/Lab/demo/Lab/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp @@ -20,19 +20,6 @@ using namespace CGAL::Three; typedef Tr::Bare_point Bare_point; -struct Compare_to_isovalue { - double iso_value; - bool less; - typedef bool result_type; - - Compare_to_isovalue(double iso_value, bool less) - : iso_value(iso_value), less(less) {} - - bool operator()(double x) const { - return (x < iso_value) == less; - } -}; - Meshing_thread* cgal_code_mesh_3(QList pMeshes, const Polylines_container& polylines, const SMesh* pBoundingMesh, @@ -355,6 +342,8 @@ Meshing_thread* cgal_code_mesh_3(const Image* pImage, param.protect_features = protect_features || protect_borders || !polylines.empty(); param.detect_connected_components = detect_connected_components; + param.iso_value = iso_value; + param.inside_is_less = inside_is_less; param.facet_angle = facet_angle; param.facet_sizing = facet_sizing; param.facet_min_sizing = facet_min_sizing; diff --git a/Lab/demo/Lab/Plugins/Mesh_3/Mesh_function.h b/Lab/demo/Lab/Plugins/Mesh_3/Mesh_function.h index ec38a369ea0..433d6cfc549 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/Mesh_function.h +++ b/Lab/demo/Lab/Plugins/Mesh_3/Mesh_function.h @@ -27,7 +27,8 @@ #include #include #include -#include +#include +#include #include "C3t3_type.h" #include "Meshing_thread.h" @@ -40,6 +41,19 @@ namespace CGAL { class Image_3; } +struct Compare_to_isovalue { + double iso_value; + bool less; + typedef bool result_type; + + Compare_to_isovalue(double iso_value, bool less) + : iso_value(iso_value), less(less) {} + + bool operator()(double x) const { + return (x < iso_value) == less; + } +}; + struct Mesh_parameters { double facet_angle; @@ -55,6 +69,8 @@ struct Mesh_parameters double edge_distance; bool protect_features; bool detect_connected_components; + float iso_value; + bool inside_is_less; int manifold; const CGAL::Image_3* image_3_ptr; const CGAL::Image_3* weights_ptr; @@ -111,6 +127,7 @@ private: void initialize(const Mesh_criteria& criteria, Mesh_fnt::Domain_tag); void initialize(const Mesh_criteria& criteria, Mesh_fnt::Labeled_image_domain_tag); + void initialize(const Mesh_criteria& criteria, Mesh_fnt::Gray_image_domain_tag); Edge_criteria edge_criteria(double b, double minb, double d, Mesh_fnt::Domain_tag); Edge_criteria edge_criteria(double b, double minb, double d, Mesh_fnt::Polyhedral_domain_tag); @@ -139,28 +156,30 @@ QStringList Mesh_parameters:: log() const { + auto is_valid = [](const double d)->bool { return d > 0. && d != DBL_MAX; }; + QStringList res("Mesh criteria"); // doubles - if(edge_sizing > 0) + if(is_valid(edge_sizing)) res << QString("edge max size: %1").arg(edge_sizing); - if(edge_min_sizing > 0) + if(is_valid(edge_min_sizing)) res << QString("edge min size: %1").arg(edge_min_sizing); - if(edge_distance > 0) + if(is_valid(edge_distance)) res << QString("edge max distance: %1").arg(edge_distance); - if(facet_angle > 0) + if(is_valid(facet_angle)) res << QString("facet min angle: %1").arg(facet_angle); - if(facet_sizing > 0) + if(is_valid(facet_sizing)) res << QString("facet max size: %1").arg(facet_sizing); - if(facet_min_sizing > 0) + if(is_valid(facet_min_sizing)) res << QString("facet min size: %1").arg(facet_min_sizing); - if(facet_approx > 0) + if(is_valid(facet_approx)) res << QString("facet approx error: %1").arg(facet_approx); - if(tet_shape > 0) + if(is_valid(tet_shape)) res << QString("tet shape (radius-edge): %1").arg(tet_shape); - if(tet_sizing > 0) + if(is_valid(tet_sizing)) res << QString("tet max size: %1").arg(tet_sizing); - if(tet_min_sizing > 0) + if(is_valid(tet_min_sizing)) res << QString("tet min size: %1").arg(tet_min_sizing); // booleans @@ -229,16 +248,61 @@ Mesh_function:: initialize(const Mesh_criteria& criteria, Mesh_fnt::Labeled_image_domain_tag) // for a labeled image { - if(p_.detect_connected_components) { - CGAL_IMAGE_IO_CASE(p_.image_3_ptr->image(), - initialize_triangulation_from_labeled_image(c3t3_ - , *domain_ - , *p_.image_3_ptr - , criteria - , Word() - , p_.protect_features); - ); - } else { + namespace p = CGAL::parameters; + // Initialization of the labeled image, either with the protection of sharp + // features, or with the initial points (or both). + if (p_.detect_connected_components) + { + CGAL::Mesh_3::internal::C3t3_initializer< + C3t3, + Domain, + Mesh_criteria, + CGAL::internal::has_Has_features::value >() + (c3t3_, + *domain_, + criteria, + p_.protect_features, + p::mesh_3_options(p::pointer_to_stop_atomic_boolean = &stop_, + p::nonlinear_growth_of_balls = true).v, + CGAL::Construct_initial_points_labeled_image(*p_.image_3_ptr, *domain_)); + } + else + { + initialize(criteria, Mesh_fnt::Domain_tag()); + } +} + +template < typename D_, typename Tag > +void +Mesh_function:: +initialize(const Mesh_criteria& criteria, Mesh_fnt::Gray_image_domain_tag) +// for a gray image +{ + namespace p = CGAL::parameters; + // Initialization of the gray image, either with the protection of sharp + // features, or with the initial points (or both). + if (p_.detect_connected_components) + { + CGAL::Construct_initial_points_gray_image generator + (*p_.image_3_ptr, + *domain_, + p_.iso_value, + Compare_to_isovalue(p_.iso_value, p_.inside_is_less)); + CGAL::Mesh_3::internal::C3t3_initializer< + C3t3, + Domain, + Mesh_criteria, + CGAL::internal::has_Has_features::value >() + (c3t3_, + *domain_, + criteria, + p_.protect_features, + p::mesh_3_options(p::pointer_to_stop_atomic_boolean = &stop_, + p::nonlinear_growth_of_balls = true).v, + generator); + } + else + { initialize(criteria, Mesh_fnt::Domain_tag()); } } @@ -252,8 +316,7 @@ initialize(const Mesh_criteria& criteria, Mesh_fnt::Domain_tag) namespace p = CGAL::parameters; // Initialization of the mesh, either with the protection of sharp // features, or with the initial points (or both). - // If `detect_connected_components==true`, the initialization is - // already done. + CGAL::Mesh_3::internal::C3t3_initializer< C3t3, Domain, diff --git a/Lab/demo/Lab/Plugins/PMP/Interpolated_corrected_principal_curvatures_plugin.cpp b/Lab/demo/Lab/Plugins/PMP/Interpolated_corrected_principal_curvatures_plugin.cpp index dbe630ad09f..489b5baca5f 100644 --- a/Lab/demo/Lab/Plugins/PMP/Interpolated_corrected_principal_curvatures_plugin.cpp +++ b/Lab/demo/Lab/Plugins/PMP/Interpolated_corrected_principal_curvatures_plugin.cpp @@ -84,7 +84,8 @@ void compute(SMesh* sMesh, for (Vertex_descriptor v : vertices(*sMesh)) { const PMP::Principal_curvatures_and_directions pc = principal_curvatures_and_directions_map[v]; - max_curvature_magnitude_on_mesh = std::max(max_curvature_magnitude_on_mesh, std::max(abs(pc.min_curvature), abs(pc.max_curvature))); + max_curvature_magnitude_on_mesh = + (std::max)(max_curvature_magnitude_on_mesh, (std::max)(abs(pc.min_curvature), abs(pc.max_curvature))); } for(Vertex_descriptor v : vertices(*sMesh)) diff --git a/Lab/demo/Lab/Plugins/PMP/Repair_polyhedron_plugin.cpp b/Lab/demo/Lab/Plugins/PMP/Repair_polyhedron_plugin.cpp index 51c4bc611a3..9a10ebcfba6 100644 --- a/Lab/demo/Lab/Plugins/PMP/Repair_polyhedron_plugin.cpp +++ b/Lab/demo/Lab/Plugins/PMP/Repair_polyhedron_plugin.cpp @@ -87,6 +87,7 @@ public: actionAutorefine->setProperty("subMenuName", "Polygon Mesh Processing/Repair/Experimental"); actionNewAutorefine->setProperty("subMenuName", "Polygon Mesh Processing/Repair"); actionAutorefineAndRMSelfIntersections->setProperty("subMenuName", "Polygon Mesh Processing/Repair/Experimental"); + actionRemoveNeedlesAndCaps->setProperty("subMenuName", "Polygon Mesh Processing/Repair"); actionSnapBorders->setProperty("subMenuName", "Polygon Mesh Processing/Repair/Experimental"); actionAddBbox->setProperty("subMenuName", "Polygon Mesh Processing"); diff --git a/Lab/demo/Lab/Plugins/Point_set/Kinetic_surface_reconstruction_plugin.cpp b/Lab/demo/Lab/Plugins/Point_set/Kinetic_surface_reconstruction_plugin.cpp index f3d9561abda..9ef3b7a5f0c 100644 --- a/Lab/demo/Lab/Plugins/Point_set/Kinetic_surface_reconstruction_plugin.cpp +++ b/Lab/demo/Lab/Plugins/Point_set/Kinetic_surface_reconstruction_plugin.cpp @@ -363,7 +363,7 @@ private Q_SLOTS: void onVisibilityChanged(bool) { if (!dock_widget->isVisible()) return; - std::cout << "in visibility changed" << std::endl; + onItemIndexSelected(scene->mainSelectionIndex()); } private: diff --git a/Lab/demo/Lab/Plugins/Three_examples/CMakeLists.txt b/Lab/demo/Lab/Plugins/Three_examples/CMakeLists.txt index 71dab011d58..ffa00e9b08d 100644 --- a/Lab/demo/Lab/Plugins/Three_examples/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Three_examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Three_examples) if(NOT POLICY CMP0070 AND POLICY CMP0053) diff --git a/Lab/demo/Lab/cgal_test_with_cmake b/Lab/demo/Lab/cgal_test_with_cmake deleted file mode 100755 index c7774ce26ee..00000000000 --- a/Lab/demo/Lab/cgal_test_with_cmake +++ /dev/null @@ -1,236 +0,0 @@ -#! /bin/sh - -# This is a script for the CGAL test suite. Such a script must obey -# the following rules: -# -# - the name of the script is cgal_test_with_cmake -# - for every target two one line messages are written to the file 'error.txt' -# the first one indicates if the compilation was successful -# the second one indicates if the execution was successful -# if one of the two was not successful, the line should start with 'ERROR:' -# - running the script should not require any user interaction -# - the script should clean up object files and executables - - ERRORFILE=error.txt - DO_RUN= - if [ -z "${MAKE_CMD}" ]; then - MAKE_CMD=make - fi - NEED_CLEAN= - -#---------------------------------------------------------------------# -# configure -#---------------------------------------------------------------------# - -configure() -{ - echo "Configuring... " - - if eval 'cmake --no-warn-unused-cli ${INIT_FILE:+"-C${INIT_FILE}"} -DRUNNING_CGAL_AUTO_TEST=TRUE \ - -DCGAL_DIR="$CGAL_DIR" \ - .' ; then - - echo " successful configuration" >> $ERRORFILE - else - echo " ERROR: configuration" >> $ERRORFILE - fi -} - -#---------------------------------------------------------------------# -# compile_and_run -#---------------------------------------------------------------------# - -compile_and_run() -{ - echo "Compiling $1 ... " - SUCCES="y" - - if eval '${MAKE_CMD} VERBOSE=ON -fMakefile $1' ; then - echo " successful compilation of $1" >> $ERRORFILE - else - echo " ERROR: compilation of $1" >> $ERRORFILE - SUCCES="" - fi - - if [ -n "$DO_RUN" ] ; then - if [ -n "${SUCCES}" ] ; then - OUTPUTFILE=ProgramOutput.$1.$PLATFORM - rm -f $OUTPUTFILE - COMMAND="./$1" - if [ -f $1.cmd ] ; then - COMMAND="$COMMAND `cat $1.cmd`" - fi - if [ -f $1.cin ] ; then - COMMAND="cat $1.cin | $COMMAND" - fi - echo "Executing $1 ... " - echo - ulimit -t 3600 2> /dev/null - if eval $COMMAND > $OUTPUTFILE 2>&1 ; then - echo " successful execution of $1" >> $ERRORFILE - else - echo " ERROR: execution of $1" >> $ERRORFILE - fi - else - echo " ERROR: not executed $1" >> $ERRORFILE - fi - fi -} - -#---------------------------------------------------------------------# -# remove the previous error file -#---------------------------------------------------------------------# - -rm -f $ERRORFILE -touch $ERRORFILE - -#---------------------------------------------------------------------# -# configure, compile and run the tests -#---------------------------------------------------------------------# - -configure - -if [ $# -ne 0 ] ; then - for file in $* ; do - compile_and_run $file - done -else - echo "Run all tests." - - for target in \ -demo_framework \ -gl_splat \ -point_dialog \ -CGALlab \ -cgal_lab \ -scene_basic_objects \ -scene_color_ramp \ -scene_c2t3_item \ -scene_c3t3_item \ -scene_combinatorial_map_item \ -scene_edit_polyhedron_item \ -scene_image_item \ -scene_implicit_function_item \ -scene_nef_polyhedron_item \ -scene_points_with_normal_item \ -scene_polygon_soup_item \ -scene_polyhedron_item \ -scene_polyhedron_item_decorator \ -scene_polyhedron_and_sm_item_k_ring_selection \ -scene_poly_item_k_ring_selection \ -scene_sm_item_k_ring_selection \ -scene_polyhedron_selection_item \ -scene_polyhedron_shortest_path_item \ -scene_polyhedron_transform_item \ -scene_polylines_item \ -scene_surface_mesh_item \ -scene_textured_polyhedron_item \ -basic_generator_plugin \ -c3t3_io_plugin \ -camera_positions_plugin \ -classification_plugin \ -clip_cgal_lab_plugin \ -convex_hull_plugin \ -corefinement_plugin \ -create_bbox_mesh_plugin \ -cut_plugin \ -detect_sharp_edges_plugin \ -detect_sharp_edges_sm_plugin \ -distance_plugin \ -distance_sm_plugin \ -edit_cgal_lab_plugin \ -edit_sm_plugin \ -extrude_poly_plugin \ -extrude_sm_plugin \ -fairing_plugin \ -features_detection_plugin \ -gocad_plugin \ -hole_filling_plugin \ -hole_filling_sm_plugin \ -hole_filling_polyline_plugin \ -inside_out_plugin \ -interpolated_corrected_principal_curvatures_plugin\ -surface_intersection_plugin \ -surface_intersection_sm_plugin \ -io_image_plugin \ -io_implicit_function_plugin \ -isotropic_remeshing_plugin \ -jet_fitting_plugin \ -join_and_split_polyhedra_plugin \ -kernel_plugin \ -mean_curvature_flow_skeleton_plugin \ -mean_curvature_flow_skeleton_sm_plugin \ -merge_point_sets_plugin \ -mesh_2_plugin \ -mesh_3_optimization_plugin \ -mesh_3_plugin \ -mesh_segmentation_plugin \ -mesh_segmentation_sm_plugin \ -mesh_simplification_plugin \ -nef_io_plugin \ -nef_plugin \ -off_plugin \ -off_to_nef_plugin \ -offset_meshing_plugin \ -alpha_wrap_3_plugin \ -orient_soup_plugin \ -parameterization_plugin \ -pca_plugin \ -p_klein_function_plugin \ -ply_to_xyz_plugin \ -point_inside_cgal_lab_plugin \ -point_set_average_spacing_plugin \ -point_set_bilateral_smoothing_plugin \ -point_set_from_vertices_plugin \ -point_set_interference_plugin \ -point_set_normal_estimation_plugin \ -point_set_outliers_removal_plugin \ -point_set_selection_plugin \ -point_set_shape_detection_plugin \ -point_set_simplification_plugin \ -point_set_smoothing_plugin \ -point_set_upsampling_plugin \ -point_set_wlop_plugin \ -polyhedron_slicer_plugin \ -polyhedron_stitching_plugin \ -polylines_io_plugin \ -p_sphere_function_plugin \ -p_tanglecube_function_plugin \ -random_perturbation_plugin \ -repair_cgal_lab_plugin \ -selection_io_plugin \ -selection_sm_io_plugin \ -selection_plugin \ -selection_sm_plugin \ -self_intersection_plugin \ -shortest_path_plugin \ -surface_mesh_approximation_plugin \ -stl_plugin \ -subdivision_methods_plugin \ -surface_mesh_io_plugin \ -surface_reconstruction_plugin \ -surf_to_sm_io_plugin \ -transform_cgal_lab_plugin \ -triangulate_facets_plugin \ -trivial_plugin \ -vtk_plugin \ -xyz_plugin \ -smoothing_plugin \ - all - do - if ${MAKE_CMD} -f Makefile help | grep "$target" > /dev/null; then - compile_and_run "$target" - NEED_CLEAN=y - fi - done -fi - -# -# The clean target generated by CMake under cygwin -# always fails for some reason -# -if [ -n "${NEED_CLEAN}" ]; then - if ! ( uname | grep -q "CYGWIN" ) ; then - ${MAKE_CMD} -fMakefile clean || true - fi -fi diff --git a/Lab/demo/Lab/implicit_functions/CMakeLists.txt b/Lab/demo/Lab/implicit_functions/CMakeLists.txt index 5b42135b28f..8a3b34484c5 100644 --- a/Lab/demo/Lab/implicit_functions/CMakeLists.txt +++ b/Lab/demo/Lab/implicit_functions/CMakeLists.txt @@ -1,6 +1,6 @@ # This is the CMake script for compiling the CGAL Mesh_3 demo implicit functions. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) include(CGALlab_macros) diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt b/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt index 23999e2d847..78c8cb770db 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(LCC_performance_2) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/) @@ -16,7 +16,7 @@ include_directories(BEFORE "/usr/include/libxml2/") #add_compile_definitions("-pg") #SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") # add_compile_definitions("-g") - +return() # OpenMesh find_package(OpenMesh REQUIRED) include(CGAL_OpenMesh_support) @@ -35,7 +35,7 @@ target_link_libraries(lcc_performance_2 CGAL::CGAL) add_executable( surface_mesh_performance performance_2.h surface_mesh_performance.h surface_mesh_performance.cpp) -target_link_libraries(surface_mesh_performance surface_mesh) +target_link_libraries(surface_mesh_performance lcc_surface_mesh_lib) # Open_mesh add_executable(openmesh_performance performance_2.h openmesh_performance.h @@ -79,7 +79,7 @@ add_executable( target_link_libraries( performance_2 CGAL::CGAL - surface_mesh + lcc_surface_mesh_lib algo assimp container diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/CMakeLists.txt b/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/CMakeLists.txt index 9c7a8ad46a4..b80ccb6d124 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/CMakeLists.txt +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/CMakeLists.txt @@ -4,7 +4,7 @@ file(GLOB_RECURSE SRCS ./*.cpp) file(GLOB_RECURSE HDRS ./*.h) if(UNIX) - add_library(surface_mesh SHARED ${SRCS} ${HDRS}) + add_library(lcc_surface_mesh_lib SHARED ${SRCS} ${HDRS}) elseif(WIN32) - add_library(surface_mesh STATIC ${SRCS} ${HDRS}) + add_library(lcc_surface_mesh_lib STATIC ${SRCS} ${HDRS}) endif() diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt b/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt index 5166eee35ab..1a65d867deb 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt @@ -1,6 +1,8 @@ -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(LCC_performance_3) +return() + if(NOT POLICY CMP0070 AND POLICY CMP0053) # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) diff --git a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt index 16b346a7564..b71bfe57fe0 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt @@ -2,7 +2,7 @@ # This is the CMake script for compiling a CGAL application. # cmake ../ -DCMAKE_BUILD_TYPE=Debug -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Linear_cell_complex_Demo) # Find includes in corresponding build directories diff --git a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt index 22760ad87b6..e9604793e4b 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Linear_cell_complex_Examples) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) diff --git a/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h b/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h index 2689f86253c..842ff86f7cd 100644 --- a/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h +++ b/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h @@ -443,11 +443,11 @@ template , \ TAG >::const_type \ -get(TAG, const Linear_cell_complex_for_combinatorial_map&) \ +get(TAG, const Linear_cell_complex_for_combinatorial_map&, const T& default_value = T()) \ { \ typedef Linear_cell_complex_for_combinatorial_map LCC;\ typedef typename boost::graph_traits::DESC DESC; \ - return internal::Dynamic_property_map();\ + return internal::Dynamic_property_map(default_value);\ } \ \ template , \ TAG >::type \ -get(TAG, Linear_cell_complex_for_combinatorial_map&) \ +get(TAG, Linear_cell_complex_for_combinatorial_map&, const T& default_value = T()) \ { \ typedef Linear_cell_complex_for_combinatorial_map LCC;\ typedef typename boost::graph_traits::DESC DESC; \ - return internal::Dynamic_property_map();\ + return internal::Dynamic_property_map(default_value);\ } \ } diff --git a/Linear_cell_complex/test/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/test/Linear_cell_complex/CMakeLists.txt index 3f12de77cee..d19fc827d59 100644 --- a/Linear_cell_complex/test/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/test/Linear_cell_complex/CMakeLists.txt @@ -1,7 +1,7 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.12...3.29) +cmake_minimum_required(VERSION 3.12...3.31) project(Linear_cell_complex_Tests) find_package(CGAL REQUIRED) diff --git a/Maintenance/test_handling/Summary_Script.js b/Maintenance/test_handling/Summary_Script.js index 10b5156f97a..bde8e5d2adb 100644 --- a/Maintenance/test_handling/Summary_Script.js +++ b/Maintenance/test_handling/Summary_Script.js @@ -171,7 +171,7 @@ function platformContainer(platforms) { platforms.forEach(platform => { const $container = $('
    ', { class: 'platform ' + platform.name }).appendTo($platformContainer); $container.html(`

    Results of ${platform.name}

    `); - const tplArray = platform.tpl; + const tplArray = platform.third_party_libs; const $toggleButton = $('