mirror of https://github.com/CGAL/cgal
after git merge remotes/origin/hot-fixes-for-Git
This commit is contained in:
commit
625f9f6cd7
|
|
@ -809,8 +809,10 @@ Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/fig/unb_dcel.fig -text
|
|||
Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/fig/unb_dcel.gif -text svneol=unset#image/gif
|
||||
Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/fig/unb_dcel.pdf -text svneol=unset#application/pdf
|
||||
Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_algebraic_segment_traits.tex -text
|
||||
Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_face_index_map.tex -text
|
||||
Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_halfedge_direction.tex -text
|
||||
Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_rational_function_traits.tex -text
|
||||
Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_vertex_index_map.tex -text
|
||||
Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/arr_do_intersect.tex -text
|
||||
Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/arr_zone.tex -text
|
||||
Arrangement_on_surface_2/doc_tex/Sweep_line_2/fig/Curve_intersections_2.png -text
|
||||
|
|
@ -2532,6 +2534,12 @@ Generator/doc_tex/Generator/generators_prog1.png -text svneol=unset#image/png
|
|||
Generator/doc_tex/Generator/generators_prog2.png -text svneol=unset#image/png
|
||||
Generator/doc_tex/Generator/hypergrid.gif -text svneol=unset#image/gif
|
||||
Generator/doc_tex/Generator/hypergrid.pdf -text svneol=unset#application/pdf
|
||||
Generator/doc_tex/Generator_ref/CombinationElement.tex -text
|
||||
Generator/doc_tex/Generator_ref/Combination_enumerator.tex -text
|
||||
Generator/examples/Generator/combination_enumerator.cpp -text
|
||||
Generator/examples/Generator/name_pairs.cpp -text
|
||||
Generator/include/CGAL/Combination_enumerator.h -text
|
||||
Generator/test/Generator/test_combination_enumerator.cpp -text
|
||||
Geomview/demo/Geomview/CMakeLists.txt -text
|
||||
Geomview/doc/Geomview/CGAL/IO/Geomview_stream.h -text
|
||||
Geomview/doc/Geomview/Geomview.txt -text
|
||||
|
|
@ -2777,6 +2785,7 @@ Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgramQt4.cmake -text
|
|||
Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake -text
|
||||
Installation/cmake/modules/CGAL_Locate_CGAL_TAUCS.cmake -text
|
||||
Installation/cmake/modules/CGAL_Macros.cmake -text
|
||||
Installation/cmake/modules/CGAL_SCM.cmake -text
|
||||
Installation/cmake/modules/CGAL_SetupBoost.cmake -text
|
||||
Installation/cmake/modules/CGAL_SetupDependencies.cmake -text
|
||||
Installation/cmake/modules/CGAL_SetupFlags.cmake -text
|
||||
|
|
@ -3565,6 +3574,7 @@ Maintenance/public_release/announcement/CGAL-4.0 -text
|
|||
Maintenance/public_release/announcement/CGAL-4.0-beta1 -text
|
||||
Maintenance/public_release/announcement/CGAL-4.0.1 -text
|
||||
Maintenance/public_release/announcement/CGAL-4.0.2 -text
|
||||
Maintenance/public_release/announcement/CGAL-4.1 -text
|
||||
Maintenance/public_release/announcement/CGAL-4.1-beta1 -text
|
||||
Maintenance/public_release/scripts/precompiled_demos_zips -text
|
||||
Maintenance/public_release/scripts/prepare_release -text
|
||||
|
|
@ -4842,6 +4852,7 @@ Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.ui -t
|
|||
Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_smoothing_plugin.cpp -text
|
||||
Polyhedron/demo/Polyhedron/Polyhedron_demo_poisson_plugin.ui -text
|
||||
Polyhedron/demo/Polyhedron/Polyhedron_demo_transform_polyhedron_plugin.cpp -text
|
||||
Polyhedron/demo/Polyhedron/Preferences.ui -text
|
||||
Polyhedron/demo/Polyhedron/Remeshing_dialog.ui -text
|
||||
Polyhedron/demo/Polyhedron/Scene_combinatorial_map_item.cpp -text
|
||||
Polyhedron/demo/Polyhedron/Scene_combinatorial_map_item.h -text
|
||||
|
|
@ -5114,11 +5125,12 @@ Polynomial/include/CGAL/Polynomial/sturm_habicht_sequence.h -text
|
|||
Polynomial/include/CGAL/Polynomial/subresultants.h -text
|
||||
Polynomial/include/CGAL/Polynomial_type_generator.h -text
|
||||
Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h -text
|
||||
Polynomial/test/Polynomial/Coercion_traits.cpp -text
|
||||
Polynomial/test/Polynomial/Get_arithmetic_kernel.cpp -text
|
||||
Polynomial/test/Polynomial/Polynomial_type_generator.cpp -text
|
||||
Polynomial/test/Polynomial/polynomial_utils.cpp -text
|
||||
Polynomial/test/Polynomial/sturm_habicht_sequence.cpp -text
|
||||
Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp -text
|
||||
Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp -text
|
||||
Polynomial/test/Polynomial/test_subresultants.cpp -text
|
||||
Polynomial/test/Polynomial/subresultants.cpp -text
|
||||
Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d.h -text
|
||||
Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d_traits_2.h -text
|
||||
|
|
@ -5192,6 +5204,15 @@ Principal_component_analysis/include/CGAL/linear_least_squares_fitting_tetrahedr
|
|||
Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_2.h -text
|
||||
Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_3.h -text
|
||||
Principal_component_analysis/test/Principal_component_analysis/Principal_component_analysis.sln eol=crlf
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_circles_2.cpp -text
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_cuboids_3.cpp -text
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_rectangles_2.cpp -text
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_2.cpp -text
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_3.cpp -text
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_spheres_3.cpp -text
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_tetrahedra_3.cpp -text
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_2.cpp -text
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_3.cpp -text
|
||||
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_circles_2.cpp -text
|
||||
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_cuboids_3.cpp -text
|
||||
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_rectangles_2.cpp -text
|
||||
|
|
@ -5222,6 +5243,7 @@ QP_solver/doc/QP_solver/fig/first_nonnegative_qp.png -text svneol=unset#image/pn
|
|||
QP_solver/doc/QP_solver/fig/first_qp.pdf -text svneol=unset#application/pdf
|
||||
QP_solver/doc/QP_solver/fig/first_qp.png -text svneol=unset#image/png
|
||||
QP_solver/doc/QP_solver/fig/qp.png -text svneol=unset#image/png
|
||||
|
||||
QP_solver/doc_tex/QP_solver/PkgDescription.tex -text
|
||||
QP_solver/doc_tex/QP_solver/closest_point.fig -text svneol=unset#application/octet-stream
|
||||
QP_solver/doc_tex/QP_solver/closest_point.gif -text svneol=unset#image/gif
|
||||
|
|
@ -5405,7 +5427,7 @@ Scripts/developer_scripts/autotest_cgal_with_cmake -text
|
|||
Scripts/developer_scripts/cgal_build -text
|
||||
Scripts/developer_scripts/cgal_generate_cmake_script -text
|
||||
Scripts/developer_scripts/cgal_generate_cmake_script.cmake -text
|
||||
Scripts/developer_scripts/cgal_git_svn_clone -text
|
||||
Scripts/developer_scripts/cgal_git_update_hooks_for_client -text
|
||||
Scripts/developer_scripts/cgal_header_clean_up.py -text
|
||||
Scripts/developer_scripts/cgal_test_with_cmake eol=lf
|
||||
Scripts/developer_scripts/check_library_uses_no_gpl_files -text
|
||||
|
|
@ -6009,6 +6031,7 @@ Straight_skeleton_2/test/Straight_skeleton_2/data/wheel_16_spokes.poly -text
|
|||
Straight_skeleton_2/test/Straight_skeleton_2/data/wheel_16_spokes_b.poly -text
|
||||
Straight_skeleton_2/test/Straight_skeleton_2/data/wiggly_03_cgal.poly -text
|
||||
Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_types.h -text
|
||||
Straight_skeleton_2/test/Straight_skeleton_2/offset_bug.cpp -text
|
||||
Straight_skeleton_2/test/Straight_skeleton_2/selected.rsp -text
|
||||
Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cmd -text
|
||||
Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp -text
|
||||
|
|
|
|||
|
|
@ -29,6 +29,16 @@ 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/aabb_projection_triangle_test.vcproj
|
||||
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/CMakeLists.txt
|
||||
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/*.exe
|
||||
|
|
@ -62,8 +72,61 @@ Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel
|
|||
Arithmetic_kernel/test/Arithmetic_kernel/LEDA_arithmetic_kernel
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/Bezier_curves
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/CMakeLists.txt
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/aggregated_insertion
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_curves
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_segments
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_ex_dcel_io.dat
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_ex_io.dat
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_ex_io_hist.dat
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_ex_io_unbounded.dat
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/batched_point_location
|
||||
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
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/conic_multiplicities
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/conics
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/consolidated_curve_data
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/curve_history
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension_io
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dual_lines
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dual_with_data
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/edge_insertion
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/edge_manipulation
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/edge_manipulation_curve_history
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension_overlay
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/generic_curve_data
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/global_insertion
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/global_removal
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/incremental_insertion
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/io
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/io_curve_history
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/io_unbounded
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/isolated_vertices
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/observer
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location_example
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polylines
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/rational_functions
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/rational_functions_rational_coefficients
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/special_edge_insertion
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/spherical_insert
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/sweep_line
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/tracing_counting
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unb_planar_vertical_decomposition
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unbounded_non_intersecting
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unbounded_rational_functions
|
||||
Arrangement_on_surface_2/examples/Arrangement_on_surface_2/vertical_ray_shooting
|
||||
Arrangement_on_surface_2/test/Arrangement_on_surface_2/CMakeLists.txt
|
||||
Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_point_location.cpp
|
||||
BGL/examples/BGL_arrangement_2/CMakeLists.txt
|
||||
BGL/examples/BGL_arrangement_2/Makefile
|
||||
BGL/examples/BGL_arrangement_2/cgal_test_with_cmake
|
||||
|
|
@ -76,6 +139,13 @@ Boolean_set_operations_2/demo/Boolean_set_operations_2/*.sln
|
|||
Boolean_set_operations_2/demo/Boolean_set_operations_2/*.vcproj
|
||||
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/CMakeLists.txt
|
||||
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/cmake_install.cmake
|
||||
|
|
@ -122,9 +192,11 @@ Generator/examples/Generator/random_segments1
|
|||
Generator/examples/Generator/random_segments2
|
||||
Generator/examples/Generator/sphere_d
|
||||
Generator/test/Generator/CMakeLists.txt
|
||||
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
|
||||
Generator/test/Generator/test_generators
|
||||
GraphicsView/TAGS
|
||||
GraphicsView/demo/Circular_kernel_2/*.exe
|
||||
|
|
@ -242,6 +314,7 @@ Kinetic_data_structures/test/Kinetic_data_structures/random_kds
|
|||
Kinetic_data_structures/test/Kinetic_data_structures/regular_triangulation_3
|
||||
Kinetic_data_structures/test/Kinetic_data_structures/simulator
|
||||
Kinetic_data_structures/test/Kinetic_data_structures/solvers
|
||||
Kinetic_data_structures/test/Kinetic_data_structures/test_KDS_Delaunay_triangulation_2
|
||||
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
|
||||
|
|
@ -652,6 +725,7 @@ Mesh_3/test/Mesh_3/.*.deps
|
|||
Mesh_3/test/Mesh_3/CTestTestfile.cmake
|
||||
Mesh_3/test/Mesh_3/Makefile
|
||||
Mesh_3/test/Mesh_3/ProgramOutput.*
|
||||
Mesh_3/test/Mesh_3/a.lua
|
||||
Mesh_3/test/Mesh_3/applications
|
||||
Mesh_3/test/Mesh_3/cgal_test_with_cmake
|
||||
Mesh_3/test/Mesh_3/cgal_to_medit
|
||||
|
|
@ -670,6 +744,9 @@ Mesh_3/test/Mesh_3/off_to_ghs
|
|||
Mesh_3/test/Mesh_3/read_mesh
|
||||
Mesh_3/test/Mesh_3/slivers_exuder
|
||||
Mesh_3/test/Mesh_3/stat_mesh
|
||||
Mesh_3/test/Mesh_3/test-tetgen.elem
|
||||
Mesh_3/test/Mesh_3/test-tetgen.face
|
||||
Mesh_3/test/Mesh_3/test-tetgen.node
|
||||
Mesh_3/test/Mesh_3/test_backward_compatibility_MeshFoobarCriteria_3
|
||||
Mesh_3/test/Mesh_3/test_boost_has_xxx
|
||||
Mesh_3/test/Mesh_3/test_c3t3
|
||||
|
|
@ -694,6 +771,12 @@ Modular_arithmetic/doc_tex/Modular_arithmetic/*.aux
|
|||
Modular_arithmetic/doc_tex/Modular_arithmetic/*.hax
|
||||
Modular_arithmetic/doc_tex/Modular_arithmetic_ref/main.aux
|
||||
Modular_arithmetic/doc_tex/Modular_arithmetic_ref/main.hax
|
||||
Nef_2/test/Nef_2/CMakeLists.txt
|
||||
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
|
||||
Nef_3/examples/Nef_3/comparison
|
||||
|
|
@ -754,6 +837,7 @@ 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
|
||||
Number_types/test/Number_types/eigen
|
||||
Number_types/test/Number_types/float
|
||||
Number_types/test/Number_types/floattst
|
||||
Number_types/test/Number_types/int
|
||||
|
|
@ -773,7 +857,9 @@ Number_types/test/Number_types/quotient_io
|
|||
Number_types/test/Number_types/root_of_2
|
||||
Number_types/test/Number_types/rounding_modes
|
||||
Number_types/test/Number_types/simplest_rational
|
||||
Number_types/test/Number_types/test_nt_Coercion_traits
|
||||
Number_types/test/Number_types/to_interval_test
|
||||
Number_types/test/Number_types/unsigned
|
||||
Number_types/test/Number_types/utilities
|
||||
Optimisation_basic/*.aux
|
||||
Optimisation_basic/*.bbl
|
||||
|
|
@ -792,22 +878,6 @@ Optimisation_basic/Makefile
|
|||
Optimisation_basic/bin
|
||||
Optimisation_basic/doc_ps
|
||||
Optimisation_basic/src/Optimisation
|
||||
Optimisation_doc/*.aux
|
||||
Optimisation_doc/*.bbl
|
||||
Optimisation_doc/*.blg
|
||||
Optimisation_doc/*.dvi
|
||||
Optimisation_doc/*.idx
|
||||
Optimisation_doc/*.ilg
|
||||
Optimisation_doc/*.ind
|
||||
Optimisation_doc/*.log
|
||||
Optimisation_doc/*.mxp
|
||||
Optimisation_doc/*.toc
|
||||
Optimisation_doc/.dep
|
||||
Optimisation_doc/.obj
|
||||
Optimisation_doc/.tmp
|
||||
Optimisation_doc/Makefile
|
||||
Optimisation_doc/bin
|
||||
Optimisation_doc/doc_ps
|
||||
Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/*.exe
|
||||
Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/*.sln
|
||||
Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/*.vcproj
|
||||
|
|
@ -830,6 +900,13 @@ 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/CMakeLists.txt
|
||||
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
|
||||
Point_set_2/test/Point_set_2/rs_check_empty
|
||||
Point_set_2/test/Point_set_2/test_range_search
|
||||
Point_set_processing_3/doc_doxygen
|
||||
Point_set_processing_3/doc_html
|
||||
Point_set_processing_3/doc_pdf
|
||||
|
|
@ -912,6 +989,28 @@ Polynomial/doc_tex/Polynomial/main.aux
|
|||
Polynomial/doc_tex/Polynomial/main.hax
|
||||
Polynomial/doc_tex/Polynomial_ref/main.aux
|
||||
Polynomial/doc_tex/Polynomial_ref/main.hax
|
||||
Polynomial/test/Polynomial/CMakeLists.txt
|
||||
Polynomial/test/Polynomial/Exponent_vector
|
||||
Polynomial/test/Polynomial/Interpolator
|
||||
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
|
||||
Polynomial/test/Polynomial/modular_gcd_utcf_with_wang
|
||||
Polynomial/test/Polynomial/modular_gcd_utils
|
||||
Polynomial/test/Polynomial/polynomial_functions
|
||||
Polynomial/test/Polynomial/polynomial_gcd
|
||||
Polynomial/test/Polynomial/polynomial_utils
|
||||
Polynomial/test/Polynomial/resultant
|
||||
Polynomial/test/Polynomial/sturm_habicht_sequence
|
||||
Polynomial/test/Polynomial/subresultants
|
||||
Polynomial/test/Polynomial/test_polynomial_Coercion_traits
|
||||
Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel
|
||||
Polynomial/test/Polynomial/test_subresultants
|
||||
Polytope_distance_d/*.aux
|
||||
Polytope_distance_d/*.bbl
|
||||
Polytope_distance_d/*.blg
|
||||
|
|
@ -931,6 +1030,33 @@ Polytope_distance_d/doc_ps
|
|||
Polytope_distance_d/test/Polytope_distance_d/CMakeLists.txt
|
||||
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/CMakeLists.txt
|
||||
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
|
||||
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_points_3
|
||||
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_rectangles_2
|
||||
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_segments_2
|
||||
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_segments_3
|
||||
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_spheres_3
|
||||
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_tetrahedra_3
|
||||
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_triangles_2
|
||||
Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_triangles_3
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_barycenter
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_bounding_box
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_circles_2
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_cuboids_3
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_2
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_3
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_rectangles_2
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_2
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_3
|
||||
Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_spheres_3
|
||||
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
|
||||
QP_solver/documentation/Degeneracies.aux
|
||||
QP_solver/documentation/Degeneracies.log
|
||||
QP_solver/documentation/Degeneracies.pdf
|
||||
|
|
@ -986,10 +1112,14 @@ STL_Extension/test/STL_Extension/test_is_iterator
|
|||
STL_Extension/test/STL_Extension/test_is_streamable
|
||||
STL_Extension/test/STL_Extension/test_lexcompare_outputrange
|
||||
STL_Extension/test/STL_Extension/test_multiset
|
||||
STL_Extension/test/STL_Extension/test_namespaces
|
||||
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/CMakeLists.txt
|
||||
SearchStructures/test/RangeSegmentTrees/cgal_test_with_cmake
|
||||
SearchStructures/test/RangeSegmentTrees/test_segment_tree_set_2
|
||||
Skin_surface_3/.cdtproject
|
||||
Skin_surface_3/.project
|
||||
Skin_surface_3/.settings
|
||||
|
|
@ -1286,10 +1416,96 @@ Triangulation_3/test/Triangulation_3/test_delaunay_hierarchy_3_old
|
|||
Triangulation_3/test/Triangulation_3/test_dt_deterministic_3
|
||||
Triangulation_3/test/Triangulation_3/test_regular_3
|
||||
Triangulation_3/test/Triangulation_3/test_regular_as_delaunay_3
|
||||
Triangulation_3/test/Triangulation_3/test_regular_insert_range_with_info
|
||||
Triangulation_3/test/Triangulation_3/test_regular_remove_3
|
||||
Triangulation_3/test/Triangulation_3/test_regular_traits_3
|
||||
Triangulation_3/test/Triangulation_3/test_simplex_3
|
||||
Triangulation_3/test/Triangulation_3/test_static_filters
|
||||
Triangulation_3/test/Triangulation_3/test_triangulation_3
|
||||
Triangulation_3/test/Triangulation_3/test_triangulation_tds
|
||||
Triangulation_3/test/Triangulation_3/test_triangulation_tds_3
|
||||
/build*
|
||||
*.bak
|
||||
*.bk?
|
||||
*.old
|
||||
.DS_Store
|
||||
*.a
|
||||
*.o
|
||||
*.lib
|
||||
*.dll
|
||||
*.exe
|
||||
*.so
|
||||
*.so.*
|
||||
debug
|
||||
release
|
||||
Debug
|
||||
Release
|
||||
x64
|
||||
*.blg
|
||||
*.cgallog
|
||||
*.aux
|
||||
*.maf
|
||||
*.hax
|
||||
*.hlg
|
||||
*.ilg
|
||||
*.pdflg
|
||||
*.log
|
||||
|
||||
*.toc
|
||||
*.cgallog.tmp*
|
||||
*.inc
|
||||
*.dvi
|
||||
*.mtc*
|
||||
*.idx
|
||||
ProgramOutput*
|
||||
ErrorOutput*
|
||||
CompilerOutput*
|
||||
error.txt
|
||||
*.ncb
|
||||
*.suo
|
||||
contents.obv
|
||||
.xvpics
|
||||
semantic.cache
|
||||
doc_ps
|
||||
doc_html
|
||||
doc_pdf
|
||||
*.moc
|
||||
.*~
|
||||
*~
|
||||
.#*
|
||||
*.user
|
||||
*.aps
|
||||
doc_doxygen
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
cmake_install.cmake
|
||||
Doxyfile
|
||||
*.dir
|
||||
ALL_BUILD.vcproj
|
||||
ZERO_CHECK.vcproj
|
||||
gmon.*
|
||||
.qglviewer.xml
|
||||
*.moc_parameters
|
||||
*.cpp_parameters
|
||||
*_moc.cpp
|
||||
ui_*.h
|
||||
qrc_*.cxx
|
||||
*.sbr
|
||||
.dir-locals.el
|
||||
*.tmp
|
||||
*.ilk
|
||||
*.pdb
|
||||
*.exe.*
|
||||
Makefile
|
||||
*.cpp.noheader
|
||||
*.h.noheader
|
||||
*.h.filename
|
||||
*.cpp.filename
|
||||
.scm-urls
|
||||
*.exp
|
||||
*.resource.txt
|
||||
*.manifest
|
||||
*.manifest.res
|
||||
*.vcproj
|
||||
*.sln
|
||||
*.depends
|
||||
|
|
|
|||
|
|
@ -96,8 +96,6 @@ public:
|
|||
/// Default constructor.
|
||||
AABB_traits() { };
|
||||
|
||||
// Non-virtual Destructor
|
||||
~AABB_traits() { };
|
||||
|
||||
typedef typename GeomTraits::Compute_squared_distance_3 Squared_distance;
|
||||
Squared_distance squared_distance_object() const { return GeomTraits().compute_squared_distance_3_object(); }
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ Moreover, \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >} is a model of
|
|||
\ccc{AlgebraicStructureTraits} providing:\\
|
||||
|
||||
- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Algebraic_type} derived from \ccc{Unique_factorization_domain_tag} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Mod} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Div} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Div_mod}\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Mod} a model of \ccc{AlgebraicStructureTraits::Mod}\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Div} a model of \ccc{AlgebraicStructureTraits::Div}\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Div_mod} a model of \ccc{AlgebraicStructureTraits::DivMod}\\
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ operators / and /=.
|
|||
Moreover, \ccc{CGAL::Algebraic_structure_traits< Field >} is a model of
|
||||
\ccc{AlgebraicStructureTraits} providing:\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< Field >::Algebraic_type} derived from \ccc{Field_tag} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >::Inverse}\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >::Inverse} a model of \ccc{AlgebraicStructureTraits::Inverse}\\
|
||||
|
||||
|
||||
\ccRefines
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ A model of \ccc{FieldWithKthRoot} is a \ccc{FieldWithSqrt} that has operations t
|
|||
|
||||
Moreover, \ccc{CGAL::Algebraic_structure_traits< FieldWithKthRoot >} is a model of \ccc{AlgebraicStructureTraits} providing:\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< FieldWithKthRoot >::Algebraic_type} derived from \ccc{Field_with_kth_root_tag} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< FieldWithKthRoot >::Kth_root}\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< FieldWithKthRoot >::Kth_root} a model of \ccc{AlgebraicStructureTraits::KthRoot}\\
|
||||
|
||||
\ccRefines
|
||||
\ccc{FieldWithSqrt}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ construct it as the root of a univariate polynomial.
|
|||
|
||||
Moreover, \ccc{CGAL::Algebraic_structure_traits< FieldWithRootOf >} is a model of \ccc{AlgebraicStructureTraits} providing:\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< FieldWithRootOf >::Algebraic_type} derived from \ccc{Field_with_kth_root_tag} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< FieldWithRootOf >::Root_of}\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< FieldWithRootOf >::Root_of} model of \ccc{AlgebraicStructureTraits::RootOf}\\
|
||||
|
||||
\ccRefines
|
||||
\ccc{FieldWithKthRoot}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ A model of \ccc{FieldWithSqrt} is a \ccc{Field} that has operations to take squa
|
|||
|
||||
Moreover, \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >} is a model of \ccc{AlgebraicStructureTraits} providing:\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >::Algebraic_type} derived from \ccc{Field_with_sqrt_tag} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >::Sqrt}\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >::Sqrt} a model of \ccc{AlgebraicStructureTraits::Sqrt} \\
|
||||
|
||||
\ccRefines
|
||||
\ccc{Field}
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ Moreover, \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >} is a model of
|
|||
\ccc{AlgebraicStructureTraits} providing:\\
|
||||
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >::Algebraic_type} derived from \ccc{Integral_domain_tag} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >::Integral_division}\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >::Divides}\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >::Integral_division} a model of \ccc{AlgebraicStructureTraits::IntegralDivision}\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >::Divides} a model of \ccc{AlgebraicStructureTraits::Divides}\\
|
||||
|
||||
\ccRefines
|
||||
\ccc{IntegralDomainWithoutDivision}
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ implement the respective ring operations.
|
|||
Moreover, \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >} is a model of
|
||||
\ccc{AlgebraicStructureTraits} providing:\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Algebraic_type} derived from \ccc{Integral_domain_without_division_tag} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Is_zero} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Is_one} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Square} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Simplify} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Unit_part} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Is_zero} a model of \ccc{AlgebraicStructureTraits::IsZero}\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Is_one} a model of \ccc{AlgebraicStructureTraits::IsOne} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Square} a model of \ccc{AlgebraicStructureTraits::Square} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Simplify} a model of \ccc{AlgebraicStructureTraits::Simplify} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Unit_part} a model of \ccc{AlgebraicStructureTraits::UnitPart} \\
|
||||
|
||||
|
||||
%{ \em \small FROM \exacus: \\
|
||||
|
|
|
|||
|
|
@ -11,14 +11,14 @@ Moreover, \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >} is a model of
|
|||
with:\\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Is_real_embeddable} set to \ccc{Tag_true} \\
|
||||
and functors :\\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Is_zero} \\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Abs} \\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Sgn} \\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Is_positive} \\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Is_negative} \\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Compare} \\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::To_double} \\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::To_interval} \\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Is_zero} a model of \ccc{AlgebraicStructureTraits::IsZero} \\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Abs} a model of \ccc{AlgebraicStructureTraits::Abs}\\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Sgn} a model of \ccc{AlgebraicStructureTraits::Sgn}\\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Is_positive} a model of \ccc{AlgebraicStructureTraits::IsPositive}\\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Is_negative} a model of \ccc{AlgebraicStructureTraits::IsNegative}\\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Compare} a model of \ccc{AlgebraicStructureTraits::Compare} \\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::To_double} a model of \ccc{AlgebraicStructureTraits::ToDouble} \\
|
||||
- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::To_interval} a model of \ccc{AlgebraicStructureTraits::ToInterval} \\
|
||||
|
||||
Remark:\\
|
||||
If a number type is a model of both \ccc{IntegralDomainWithoutDivision} and
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ Moreover, \ccc{CGAL::Algebraic_structure_traits< UniqueFactorizationDomain >}
|
|||
is a model of \ccc{AlgebraicStructureTraits} providing:\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< UniqueFactorizationDomain >::Algebraic_type}
|
||||
derived from \ccc{Unique_factorization_domain_tag} \\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< UniqueFactorizationDomain >::Gcd}\\
|
||||
- \ccc{CGAL::Algebraic_structure_traits< UniqueFactorizationDomain >::Gcd} a model of \ccc{AlgebraicStructureTraits::Gcd}\\
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@
|
|||
#define CGAL_ALGEBRAIC_NUMBER_TRAITS_H 1
|
||||
|
||||
#include <numeric> // for std::accumulate
|
||||
#include <functional> // for std::unary_function
|
||||
#include <CGAL/tags.h>
|
||||
#include <CGAL/Algebraic_structure_traits.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,11 @@
|
|||
#ifndef CGAL_ALGEBRAIC_STRUCTURE_TRAITS_H
|
||||
#define CGAL_ALGEBRAIC_STRUCTURE_TRAITS_H
|
||||
|
||||
#include <CGAL/number_type_basic.h>
|
||||
#include <functional>
|
||||
#include <CGAL/tags.h>
|
||||
#include <CGAL/type_traits.h>
|
||||
#include <CGAL/Coercion_traits.h>
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -30,13 +30,13 @@
|
|||
#ifndef CGAL_COERCION_TRAITS_H
|
||||
#define CGAL_COERCION_TRAITS_H 1
|
||||
|
||||
#include <CGAL/number_type_basic.h>
|
||||
|
||||
#include <iterator>
|
||||
|
||||
#include <boost/iterator/transform_iterator.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <CGAL/tags.h>
|
||||
|
||||
// Makro to define an additional operator for binary functors which takes
|
||||
// two number types as parameters that are interoperable with the
|
||||
// number type
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#ifndef CGAL_FRACTION_TRAITS_H
|
||||
#define CGAL_FRACTION_TRAITS_H
|
||||
|
||||
#include <CGAL/number_type_basic.h>
|
||||
#include <CGAL/tags.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef CGAL_REAL_EMBEDDABLE_TRAITS_H
|
||||
#define CGAL_REAL_EMBEDDABLE_TRAITS_H
|
||||
|
||||
#include <CGAL/number_type_basic.h>
|
||||
#include <CGAL/Algebraic_structure_traits.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@
|
|||
*/
|
||||
|
||||
#include <cassert>
|
||||
#include <CGAL/tags.h>
|
||||
#include <CGAL/number_type_config.h>
|
||||
#include <CGAL/number_utils.h>
|
||||
#include <CGAL/Algebraic_structure_traits.h>
|
||||
|
||||
// These are test functions for the Coercion_traits
|
||||
namespace CGAL {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
#ifndef CGAL_IPOWER_H
|
||||
#define CGAL_IPOWER_H
|
||||
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template <typename NT>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@
|
|||
#ifndef CGAL_NUMBER_UTILS_H
|
||||
#define CGAL_NUMBER_UTILS_H
|
||||
|
||||
#include <CGAL/number_type_basic.h>
|
||||
#include <CGAL/number_type_config.h>
|
||||
#include <CGAL/Algebraic_structure_traits.h>
|
||||
#include <CGAL/Real_embeddable_traits.h>
|
||||
|
||||
namespace CGAL {
|
||||
CGAL_NTS_BEGIN_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@
|
|||
#ifndef CGAL_NUMBER_UTILS_CLASSES_H
|
||||
#define CGAL_NUMBER_UTILS_CLASSES_H 1
|
||||
|
||||
#include <CGAL/number_type_basic.h>
|
||||
#include <CGAL/Real_embeddable_traits.h>
|
||||
#include <CGAL/Algebraic_structure_traits.h>
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
||||
Michael Hemmer <Michael.Hemmer@cgal.org>
|
||||
|
|
@ -29,6 +29,19 @@ namespace RS3{
|
|||
|
||||
inline void refine_1(const CGAL::Algebraic_1 &a,unsigned int s=10000){
|
||||
CGAL_precondition(a.inf()<=a.sup());
|
||||
// If the algebraic endpoints have room for a refinement bigger
|
||||
// than desired, refine as much is possible. This would ensure that
|
||||
// small refinements are never made. Other possibility to avoid
|
||||
// small refinements is to refine the number just after it was
|
||||
// isolated (this early refinement would also have the advantage
|
||||
// that one can choose to refine until reaching a certain criterion
|
||||
// and assume it is true for later refinements, but this can slow
|
||||
// down the Solve_1 functor). And a last option would be to
|
||||
// determine a lower bound on the precisions RS likes to refine.
|
||||
if(s<mpfr_get_prec(&((mpfi_ptr)(a.mpfi()))->left)-2)
|
||||
s=mpfr_get_prec(&((mpfi_ptr)(a.mpfi()))->left)-2;
|
||||
if(s<mpfr_get_prec(&((mpfi_ptr)(a.mpfi()))->right)-2)
|
||||
s=mpfr_get_prec(&((mpfi_ptr)(a.mpfi()))->right)-2;
|
||||
// If the precision of the endpoints is not enough for the desired
|
||||
// refinement, allocate a new mpfi and swap later the result.
|
||||
if(mpfr_get_prec(&((mpfi_ptr)(a.mpfi()))->left)<s+2||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
Univariate algebraic kernel: Michael Hemmer.
|
||||
Univariate algebraic kernel: Michael Hemmer <Michael.Hemmer@cgal.org>.
|
||||
Univariate algebraic kernel based on RS: Luis Peñaranda.
|
||||
Bivariate algebraic kernel: Michael Kerber.
|
||||
|
|
|
|||
|
|
@ -290,63 +290,120 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
|
|||
assert(compare_1(bound,Algebraic_real_1(1)) == LARGER );
|
||||
assert(compare_1(bound,Algebraic_real_1(2)) == SMALLER );
|
||||
}
|
||||
{ // Approximate_absolute_1
|
||||
{
|
||||
std::list<Algebraic_real_1> roots;
|
||||
solve_1((x*x-2),true,std::back_inserter(roots));
|
||||
Algebraic_real_1 root = (CGAL::max)(roots.front(),roots.back());
|
||||
BInterval bi = approximate_absolute_1(root,5);
|
||||
assert(compare_1(bi.first ,root) != LARGER );
|
||||
assert(compare_1(Algebraic_real_1(bi.second),root) != SMALLER);
|
||||
assert(CGAL::sign(bi.second - bi.first) != NEGATIVE);
|
||||
assert((bi.second - bi.first) * ipower(Bound(2),5) <= Bound(1) );
|
||||
}{
|
||||
std::list<Algebraic_real_1> roots;
|
||||
solve_1((x*x-3),true,std::back_inserter(roots));
|
||||
Algebraic_real_1 root = (CGAL::min)(roots.front(),roots.back());
|
||||
BInterval bi = approximate_absolute_1(root,-5);
|
||||
assert(compare_1(bi.first ,root) != LARGER );
|
||||
assert(compare_1(bi.second,root) != SMALLER);
|
||||
assert(CGAL::sign(bi.second - bi.first) != NEGATIVE);
|
||||
assert((bi.second - bi.first) <= ipower(Bound(2),5) );
|
||||
}
|
||||
}
|
||||
|
||||
{ // Approximate_relative_1
|
||||
{
|
||||
std::list<Algebraic_real_1> roots;
|
||||
solve_1((x*x-2),true,std::back_inserter(roots));
|
||||
Algebraic_real_1 root = (CGAL::max)(roots.front(),roots.back());
|
||||
BInterval bi = approximate_relative_1(root,5);
|
||||
assert(compare_1(bi.first ,root) != LARGER );
|
||||
assert(compare_1(bi.second,root) != SMALLER);
|
||||
assert(CGAL::sign(bi.second - bi.first) != NEGATIVE);
|
||||
assert((bi.second - bi.first * ipower(Bound(2),5))
|
||||
<= (CGAL::max)(abs(bi.first),abs(bi.second)));
|
||||
}{
|
||||
std::list<Algebraic_real_1> roots;
|
||||
solve_1((x*x-30),true,std::back_inserter(roots));
|
||||
Algebraic_real_1 root = (CGAL::min)(roots.front(),roots.back());
|
||||
BInterval bi = approximate_relative_1(root,-5);
|
||||
assert(compare_1(bi.first ,root) != LARGER );
|
||||
assert(compare_1(bi.second,root) != SMALLER);
|
||||
assert(CGAL::sign(bi.second - bi.first) != NEGATIVE);
|
||||
assert((bi.second - bi.first)
|
||||
<= (CGAL::max)(abs(bi.first),abs(bi.second)) * ipower(Bound(2),5));
|
||||
}
|
||||
{
|
||||
std::list<Algebraic_real_1> roots;
|
||||
solve_1((300*x*x-2),true,std::back_inserter(roots));
|
||||
Algebraic_real_1 root = (CGAL::min)(roots.front(),roots.back());
|
||||
BInterval bi = approximate_relative_1(root,5);
|
||||
assert(compare_1(bi.first ,root) != LARGER );
|
||||
assert(compare_1(bi.second,root) != SMALLER);
|
||||
assert(CGAL::sign(bi.second - bi.first) != NEGATIVE);
|
||||
assert((bi.second - bi.first) * ipower(Bound(2),5)
|
||||
<= (CGAL::max)(abs(bi.first),abs(bi.second)) );
|
||||
}
|
||||
}
|
||||
CGAL::set_pretty_mode(std::cerr);
|
||||
|
||||
// Approximations
|
||||
bool all_right = true;
|
||||
std::cout << "start test_approximation (takes a while) " << std::flush;
|
||||
Coefficient c = CGAL::ipower(Coefficient(2), 2500) + 1;
|
||||
// we choose coefficients: small, large, (close to) power of two
|
||||
std::vector< int > coeffs;
|
||||
coeffs.push_back(1);
|
||||
coeffs.push_back(13);
|
||||
//coeffs.push_back(255);
|
||||
//coeffs.push_back(499);
|
||||
//coeffs.push_back(512);
|
||||
//coeffs.push_back(10000);
|
||||
//coeffs.push_back(3);
|
||||
//coeffs.push_back(7);
|
||||
//coeffs.push_back(64);
|
||||
//coeffs.push_back(100);
|
||||
coeffs.push_back(1023);
|
||||
//coeffs.push_back(4096);
|
||||
std::vector< int > precs;
|
||||
//precs.push_back(0);
|
||||
//precs.push_back(1);
|
||||
//precs.push_back(2);
|
||||
//precs.push_back(4);
|
||||
precs.push_back(8);
|
||||
//precs.push_back(13);
|
||||
// precs.push_back(1023);
|
||||
// precs.push_back(2048);
|
||||
//precs.push_back(53);
|
||||
//precs.push_back(3);
|
||||
//precs.push_back(64);
|
||||
//precs.push_back(106);
|
||||
//precs.push_back(424);
|
||||
for (typename std::vector< int >::const_iterator c0i = coeffs.begin();
|
||||
c0i != coeffs.end(); c0i++) {
|
||||
for (typename std::vector< int >::const_iterator c2i = coeffs.begin();
|
||||
c2i != coeffs.end(); c2i++) {
|
||||
// we basically test a quadratic polynomial (with choosen small and large
|
||||
// quadratic and constant coefficient, which is disturbed by a root close to zero).
|
||||
//Polynomial_1 poly((*c2i*x*x - *c0i) * (c*x-1));
|
||||
Polynomial_1 poly((*c2i*x*x - *c0i) * (c*x-1));
|
||||
std::list<Algebraic_real_1> roots;
|
||||
solve_1(poly,true,std::back_inserter(roots));
|
||||
for (typename std::vector< int >::const_iterator pi = precs.begin();
|
||||
pi != precs.end(); pi++) {
|
||||
// all three roots are approximated with various precisions
|
||||
long p = *pi;
|
||||
{ // Approximate_absolute_1 with positive p
|
||||
for (typename std::list< Algebraic_real_1 >::const_iterator rit = roots.begin();
|
||||
rit != roots.end(); rit++) {
|
||||
BInterval bi = approximate_absolute_1(*rit,p);
|
||||
assert(compare_1(bi.first ,*rit) != LARGER );
|
||||
assert(compare_1(bi.second,*rit) != SMALLER);
|
||||
assert(CGAL::sign(bi.second - bi.first) != NEGATIVE);
|
||||
if (!((bi.second - bi.first) * (p == 0 ? Bound(1) : ipower(Bound(2),p-1))
|
||||
<= (p == 0 ? Bound(2) : Bound(1)) )) {
|
||||
all_right = false;
|
||||
std::cerr << "ERROR: Approximate_absolute_1 fails for prec = " << p
|
||||
<< " of this root: " << *rit << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
{ // Approximate_absolute_1 with negative p
|
||||
for (typename std::list< Algebraic_real_1 >::const_iterator rit = roots.begin();
|
||||
rit != roots.end(); rit++) {
|
||||
BInterval bi = approximate_absolute_1(*rit,-p);
|
||||
assert(compare_1(bi.first ,*rit) != LARGER );
|
||||
assert(compare_1(bi.second,*rit) != SMALLER);
|
||||
assert(CGAL::sign(bi.second - bi.first) != NEGATIVE);
|
||||
if (!((bi.second - bi.first) <= ipower(Bound(2),1-(-p)) )) {
|
||||
all_right = false;
|
||||
std::cerr << "ERROR: Approximate_absolute_1 fails for prec = " << -p
|
||||
<< " of this root: " << *rit << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
{ // Approximate_relative_1 with positive p
|
||||
for (typename std::list< Algebraic_real_1 >::const_iterator rit = roots.begin();
|
||||
rit != roots.end(); rit++) {
|
||||
BInterval bi = approximate_relative_1(*rit,p);
|
||||
assert(compare_1(bi.first ,*rit) != LARGER );
|
||||
assert(compare_1(bi.second,*rit) != SMALLER);
|
||||
assert(CGAL::sign(bi.second - bi.first) != NEGATIVE);
|
||||
if (!((bi.second - bi.first) * (p == 0 ? Bound(1) : ipower(Bound(2),p-1))
|
||||
<= (p == 0 ? Bound(2) : Bound(1)) * (CGAL::max)(abs(bi.first),abs(bi.second)))) {
|
||||
all_right = false;
|
||||
std::cerr << "ERROR: Approximate_relative_1 fails for prec = " << p
|
||||
<< " of this root: " << *rit << std::endl;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
{ // Approximate_relative_1 with negative p
|
||||
for (typename std::list< Algebraic_real_1 >::const_iterator rit = roots.begin();
|
||||
rit != roots.end(); rit++) {
|
||||
BInterval bi = approximate_relative_1(*rit,-p);
|
||||
assert(compare_1(bi.first ,*rit) != LARGER );
|
||||
assert(compare_1(bi.second,*rit) != SMALLER);
|
||||
assert(CGAL::sign(bi.second - bi.first) != NEGATIVE);
|
||||
if (!((bi.second - bi.first) <=
|
||||
ipower(Bound(2),1-(-p)) * (CGAL::max)(abs(bi.first),abs(bi.second)))) {
|
||||
all_right = false;
|
||||
std::cerr << "ERROR: Approximate_relative_1 fails for prec = " << -p
|
||||
<< " of this root: " << *rit << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
assert(all_right); // some approximation was not good enough
|
||||
std::cout << " ok" << std::endl;
|
||||
{
|
||||
|
||||
#define CGAL_TEST_ALGEBRAIC_REAL_IO(_f) \
|
||||
|
|
|
|||
|
|
@ -591,7 +591,7 @@ public:
|
|||
// Classifies a point `p' with respect to `A'.
|
||||
Locate_type type;
|
||||
int i;
|
||||
Face_handle pFace = locate(p, type, i);
|
||||
Face_handle pFace = this->locate(p, type, i);
|
||||
switch (type)
|
||||
{
|
||||
case VERTEX : return classify(pFace->vertex(i), alpha);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Michael Hemmer
|
||||
Michael Hemmer <Michael.Hemmer@cgal.org>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ faces.
|
|||
%-------------------------------------------------
|
||||
|
||||
Arrangement instances are adapted to \boost\ graphs by specializing the
|
||||
\ccc{boost:graph_traits} template for \ccc{Arrangement_2} instances. The
|
||||
\ccc{boost::graph_traits} template for \ccc{Arrangement_2} instances. The
|
||||
graph-traits states the graph concepts that the arrangement class models
|
||||
(see below) and defines the types required by these concepts.
|
||||
|
||||
|
|
@ -67,10 +67,12 @@ For example, when we compute the shortest paths from a given source vertex
|
|||
$s$ to all other vertices we can obtain a map of distances and a map of
|
||||
predecessors --- namely for each $v$ vertex we have its distance from $s$
|
||||
and a descriptor of the vertex that precedes $v$ in the shortest path from $s$.
|
||||
If the vertex descriptors are simply indices, one can use vectors to
|
||||
efficiently represent the property maps. As this is not the case with the
|
||||
arrangement graph, we offer the \ccc{Arr_vertex_property_map<Arrangement,Type>}
|
||||
template allows for an efficient mapping of \ccc{Vertex_handle} objects to
|
||||
If the vertex descriptors are simply indices, boost supplies tools to
|
||||
easily represent property maps using vectors.
|
||||
\ccc{Arr_vertex_index_map<Arrangement>} class allows create such
|
||||
indices, and together with \ccc{boost::vector_property_map<Type,
|
||||
IndexMap>} allows for
|
||||
an efficient mapping of \ccc{Vertex_handle} objects to
|
||||
properties of type \ccc{Type}. Note however that unlike the
|
||||
\ccc{Arr_vertex_index_map} class, the vertex property-map class is not
|
||||
kept synchronized with the number of vertices in the arrangement, so it
|
||||
|
|
@ -100,8 +102,9 @@ as shown in Figure~\ref{arr_fig:ex_bgl},
|
|||
then use Dijkstra's shortest-paths algorithm from the \bgl\ to compute
|
||||
the graph distance of all vertices from the leftmost vertex in the
|
||||
arrangement $v_0$. Note the usage of the \ccc{Arr_vertex_index_map} and
|
||||
the \ccc{Arr_vertex_property_map} classes. The latter one, instantiated by
|
||||
the type \ccc{double} is used to map vertices to their distances from $v_0$.
|
||||
the \ccc{boost::vector_property_map<Type, IndexMap>} classes. The
|
||||
latter one, instantiated by the type \ccc{double} is used to map
|
||||
vertices to their distances from $v_0$.
|
||||
|
||||
\ccIncludeExampleCode{Arrangement_on_surface_2/bgl_primal_adapter.cpp}
|
||||
|
||||
|
|
@ -112,7 +115,7 @@ It is possible to give a dual graph representation for an arrangement instance,
|
|||
such that each arrangement face corresponds to a graph vertex and two vertices
|
||||
are adjacent iff the corresponding faces share a common edge on their
|
||||
boundaries. This is done by specializing the
|
||||
\ccc{boost:graph_traits} template for \ccc{Dual<Arrangement_2>} instances,
|
||||
\ccc{boost::graph_traits} template for \ccc{Dual<Arrangement_2>} instances,
|
||||
where \ccc{Dual<Arrangement_2>} is a template specialization that gives a
|
||||
dual interpretation to an arrangement instance.
|
||||
|
||||
|
|
@ -129,16 +132,16 @@ arrangement graph is also a model of the concepts \ccc{VertexListGraph},
|
|||
|
||||
Since we use \ccc{Face_handle} objects as the vertex descriptors, we define
|
||||
the \ccc{Arr_face_index_map<Arrangement>} class-template, which maintains an
|
||||
efficient mapping of face handles to indices. We also provide the template
|
||||
\ccc{Arr_face_property_map<Arrangement,Type>} for associating arbitrary
|
||||
data with the arrangement faces.
|
||||
efficient mapping of face handles to indices.
|
||||
Like vertices, \ccc{boost::vector_property_map<Type, IndexMap>} can be
|
||||
used for associating arbitrary data with the arrangement faces.
|
||||
|
||||
In the following example we construct the same arrangement as in
|
||||
example \ccc{bgl_primal_adapter.cpp} (see Figure~\ref{arr_fig:ex_bgl}),
|
||||
and perform breadth-first search on the graph faces, starting from the
|
||||
unbounded face. We extend the \dcel\ faces
|
||||
with an unsigned integer, marking the discover time of the face and use a
|
||||
breadth-first-search visitor to obtain these times and update the faces
|
||||
accordingly:
|
||||
with an unsigned integer, marking the discover time of the face
|
||||
using \boost\ visitors and a property-map class that directly accesses
|
||||
the extended data of the faces:
|
||||
|
||||
\ccIncludeExampleCode{Arrangement_on_surface_2/bgl_dual_adapter.cpp}
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ can be found in \ccc{point_location_utils.h}).
|
|||
It then employs the naive and the landmark strategies to issue
|
||||
several point-location queries on this arrangement:
|
||||
|
||||
\ccIncludeExampleCode{Arrangement_on_surface_2/point_location.cpp}
|
||||
\ccIncludeExampleCode{Arrangement_on_surface_2/point_location_example.cpp}
|
||||
|
||||
Note that the program uses the auxiliary
|
||||
\ccc{point_location_query()} function template to nicely print the
|
||||
|
|
@ -316,7 +316,7 @@ void vertical_ray_shooting_query
|
|||
The following program uses the auxiliary function listed above to
|
||||
perform vertical ray-shooting queries on an arrangement.
|
||||
The arrangement and the query points are exactly the same as in
|
||||
\ccc{point_location.cpp} (see Figure~\ref{arr_fig:ex_5}):
|
||||
\ccc{point_location_example.cpp} (see Figure~\ref{arr_fig:ex_5}):
|
||||
|
||||
\ccIncludeExampleCode{Arrangement_on_surface_2/vertical_ray_shooting.cpp}
|
||||
|
||||
|
|
@ -360,6 +360,6 @@ additional data structures.
|
|||
|
||||
The following program issues a batched point-location query, which
|
||||
is essentially equivalent to the six separate queries performed in
|
||||
\ccc{point_location.cpp} (see Section~\ref{arr_ssec:pl}):
|
||||
\ccc{point_location_example.cpp} (see Section~\ref{arr_ssec:pl}):
|
||||
|
||||
\ccIncludeExampleCode{Arrangement_on_surface_2/batched_point_location.cpp}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Arr_face_index_map.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: Arrangement_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
\begin{ccRefClass}{Arr_face_index_map<Arrangement>}
|
||||
\label{arr_ref:arr_face_index_map}
|
||||
|
||||
\ccDefinition
|
||||
%============
|
||||
|
||||
\ccClassTemplateName{} maintains a mapping of face handles of an
|
||||
attached arrangement object to indices (of type \ccc{unsigned int}).
|
||||
This class template is a model of the \boost{} concept
|
||||
\ccc{ReadablePropertyMap}. A mapping between face handles and indices
|
||||
enables convenient usage of property-map classes supplied by \boost{}.
|
||||
For example, the property-map class templates
|
||||
\ccc{boost::vector_property_map}, which is based on \ccc{std::vector},
|
||||
and \ccc{boost::iterator_property_map}, which can be used to implement
|
||||
a property map based on a native C\hbox{\tt ++} array, require the
|
||||
user to supply a mapping such as \ccClassTemplateName{}.
|
||||
|
||||
As new faces might be inserted into the attached arrangement, and
|
||||
existing faces might be removed, the notification mechanism is used
|
||||
to dynamically maintain the mapping of face handles to indices.
|
||||
|
||||
\ccRefines{DefaultConstructible, CopyConstructible, Assignable}
|
||||
|
||||
\ccIsModel
|
||||
\ccc{boost::ReadablePropertyMap}
|
||||
|
||||
\ccInheritsFrom\ccc{Arr_observer<Arrangement>}
|
||||
|
||||
\ccInclude{CGAL/Arr_face_index_map.h}
|
||||
|
||||
\ccTypes
|
||||
%=======
|
||||
|
||||
\ccNestedType{Arrangement_2}{the type of the attached arrangement.}
|
||||
|
||||
\ccNestedType{category}{\ccc{boost::readable_property_map_tag}}
|
||||
\ccGlue
|
||||
\ccNestedType{value_type}{\ccc{unsigned int}}
|
||||
\ccGlue
|
||||
\ccNestedType{reference}{u\ccc{nsigned int}}
|
||||
\ccGlue
|
||||
\ccNestedType{key_type}{\ccc{Face_handle}}
|
||||
|
||||
\ccTypedef{typedef typename Arrangement_2::Face_handle Face_handle;}
|
||||
{The face handle type.}
|
||||
|
||||
\ccTypedef{typedef Unique_hash_map<Face_handle, value_type> Index_map;}
|
||||
{The type of mapping of faces to indices.}
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{face_index_map}
|
||||
%===================================
|
||||
|
||||
\ccConstructor{Arr_face_index_map();}
|
||||
{constructs a map that is unattached to any arrangement instance.}
|
||||
|
||||
\ccConstructor{Arr_face_index_map(Arrangement_2& arr);}
|
||||
{constructs a map and attaches it to the given arrangement \ccc{arr}.}
|
||||
|
||||
\ccSeeAlso
|
||||
%=========
|
||||
\ccc{Arr_observer<Arrangement>}\lcTex{
|
||||
(\ccRefPage{Arr_observer<Arrangement>})}\\
|
||||
\ccc{Arr_vertex_index_map<Arrangement>}\lcTex{
|
||||
(\ccRefPage{Arr_vertex_index_map<Arrangement>})}
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
\ccRefPageEnd
|
||||
|
|
@ -13,15 +13,17 @@
|
|||
\ccDefinition
|
||||
%============
|
||||
|
||||
The traits class \ccRefName\ is a model of the \ccc{ArrangementTraits_2}
|
||||
concept that allows for the construction and maintenance of arrangements of
|
||||
linear objects which may be bounded (line segments) or unbounded (rays
|
||||
and lines). The traits class is parameterized with a \cgal-kernel model;
|
||||
see the reference page of \ccc{Arr_segment_traits_2<Kernel>}
|
||||
The traits class \ccRefName{} is a model of the \ccc{ArrangementTraits_2}
|
||||
concept, which enables the construction and maintenance of arrangements of
|
||||
linear objects. The linear objects may be bounded (line segments) or
|
||||
unbounded (rays and lines). Thus, it is also a model of the concept
|
||||
\ccc{ArrangementOpenBoundaryTraits_2}. The traits class is parameterized
|
||||
with a \cgal-kernel model; see the reference page of
|
||||
\ccc{Arr_segment_traits_2<Kernel>}
|
||||
(\ccRefPage{CGAL::Arr_segment_traits_2<Kernel>}) for further explanations
|
||||
and recommendations on choosing a kernel.
|
||||
|
||||
\ccRefName\ defines \ccc{Kernel::Point_2} as its point type. The nested
|
||||
\ccRefName{} defines \ccc{Kernel::Point_2} as its point type. The nested
|
||||
\ccc{X_monotone_curve_2} and \ccc{Curve_2} types defined by the traits class
|
||||
(as is the case with the various segment-traits classes, both types
|
||||
refer to the same class, as {\sl every} linear object is (weakly) $x$-monotone),
|
||||
|
|
@ -35,7 +37,8 @@ it to the respective kernel object (say, to a \ccc{Kernel::Ray_2}).
|
|||
|
||||
\ccIsModel
|
||||
\ccc{ArrangementTraits_2} \\
|
||||
\ccc{ArrangementLandmarkTraits_2}
|
||||
\ccc{ArrangementLandmarkTraits_2} \\
|
||||
\ccc{ArrangementOpenBoundaryTraits_2}
|
||||
|
||||
\subsection*{Class
|
||||
Arr\_linear\_traits\_2$<$Kernel$>$::Curve\_2}
|
||||
|
|
|
|||
|
|
@ -14,10 +14,12 @@
|
|||
%============
|
||||
|
||||
The traits class \ccRefName{} is a model of the \ccc{ArrangementTraits_2}
|
||||
concept. It handles bounded and unbounded arcs of rational functions,
|
||||
referred to as {\sl rational arcs} (in particular, such an arc may
|
||||
correspond to the entire graph of a rational function), and enables the
|
||||
construction and maintenance of arrangements of such arcs.
|
||||
concept. It handles arcs of rational functions, referred to as
|
||||
{\sl 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
|
||||
\ccc{ArrangementOpenBoundaryTraits_2}. The traits class enables
|
||||
the construction and maintenance of arrangements of such arcs.
|
||||
%Rational functions, and polynomial functions in particular, are not only
|
||||
%interesting in their own right, they are also very useful for approximating or
|
||||
%interpolating more complex curves.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Arr_vertex_index_map.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: Arrangement_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
\begin{ccRefClass}{Arr_vertex_index_map<Arrangement>}
|
||||
\label{arr_ref:arr_vertex_index_map}
|
||||
|
||||
\ccDefinition
|
||||
%============
|
||||
|
||||
\ccClassTemplateName{} maintains a mapping of vertex handles of an
|
||||
attached arrangement object to indices (of type \ccc{unsigned int}).
|
||||
This class template is a model of the \boost{} concept
|
||||
\ccc{ReadablePropertyMap}. A mapping between vertex handles and indices
|
||||
enables convenient usage of property-map classes supplied by \boost{}.
|
||||
For example, the property-map class templates
|
||||
\ccc{boost::vector_property_map}, which is based on \ccc{std::vector},
|
||||
and \ccc{boost::iterator_property_map}, which can be used to implement
|
||||
a property map based on a native C\hbox{\tt ++} array, require the
|
||||
user to supply a mapping such as \ccClassTemplateName{}.
|
||||
|
||||
As new vertices might be inserted into the attached arrangement, and
|
||||
existing vertices might be removed, the notification mechanism is used
|
||||
to dynamically maintain the mapping of vertex handles to indices.
|
||||
|
||||
\ccRefines{DefaultConstructible, CopyConstructible, Assignable}
|
||||
|
||||
\ccIsModel
|
||||
\ccc{boost::ReadablePropertyMap}
|
||||
|
||||
\ccInheritsFrom\ccc{Arr_observer<Arrangement>}
|
||||
|
||||
\ccInclude{CGAL/Arr_vertex_index_map.h}
|
||||
|
||||
\ccTypes
|
||||
%=======
|
||||
|
||||
\ccNestedType{Arrangement_2}{the type of the attached arrangement.}
|
||||
|
||||
\ccNestedType{category}{\ccc{boost::readable_property_map_tag}}
|
||||
\ccGlue
|
||||
\ccNestedType{value_type}{\ccc{unsigned int}}
|
||||
\ccGlue
|
||||
\ccNestedType{reference}{\ccc{unsigned int}}
|
||||
\ccGlue
|
||||
\ccNestedType{key_type}{V\ccc{ertex_handle}}
|
||||
|
||||
\ccTypedef{typedef typename Arrangement_2::Vertex_handle Vertex_handle;}
|
||||
{The vertex handle type.}
|
||||
|
||||
\ccTypedef{typedef Unique_hash_map<Vertex_handle, value_type> Index_map;}
|
||||
{The type of mapping of vertices to indices.}
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{vertex_index_map}
|
||||
%===================================
|
||||
|
||||
\ccConstructor{Arr_vertex_index_map();}
|
||||
{constructs a map that is unattached to any arrangement instance.}
|
||||
|
||||
\ccConstructor{Arr_vertex_index_map(Arrangement_2& arr);}
|
||||
{constructs a map and attaches it to the given arrangement \ccc{arr}.}
|
||||
|
||||
\ccSeeAlso
|
||||
%=========
|
||||
\ccc{Arr_observer<Arrangement>}\lcTex{
|
||||
(\ccRefPage{Arr_observer<Arrangement>})}\\
|
||||
\ccc{Arr_face_index_map<Arrangement>}\lcTex{
|
||||
(\ccRefPage{Arr_face_index_map<Arrangement>})}
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
\ccRefPageEnd
|
||||
|
|
@ -130,7 +130,10 @@ implemented as peripheral classes or as free (global) functions.
|
|||
\ccRefIdfierPage{CGAL::Arr_naive_point_location<Arrangement>}\\
|
||||
\ccRefIdfierPage{CGAL::Arr_walk_along_line_point_location<Arrangement>}\\
|
||||
\ccRefIdfierPage{CGAL::Arr_trapezoid_ric_point_location<Arrangement>}\\
|
||||
\ccRefIdfierPage{CGAL::Arr_landmarks_point_location<Arrangement,Generator>}
|
||||
\ccRefIdfierPage{CGAL::Arr_landmarks_point_location<Arrangement,Generator>}\\
|
||||
~\\
|
||||
\ccRefIdfierPage{CGAL::Arr_vertex_index_map<Arrangement>}\\
|
||||
\ccRefIdfierPage{CGAL::Arr_face_index_map<Arrangement>}
|
||||
|
||||
\subsection*{Tags}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,4 +85,6 @@
|
|||
\input{Arrangement_on_surface_2_ref/Arr_with_hist_text_formatter.tex}
|
||||
\input{Arrangement_on_surface_2_ref/Arr_oblivious_side_tag.tex}
|
||||
\input{Arrangement_on_surface_2_ref/Arr_open_side_tag.tex}
|
||||
\input{Arrangement_on_surface_2_ref/Arr_vertex_index_map.tex}
|
||||
\input{Arrangement_on_surface_2_ref/Arr_face_index_map.tex}
|
||||
\endgroup
|
||||
|
|
|
|||
|
|
@ -6,89 +6,79 @@
|
|||
#include <CGAL/Arr_segment_traits_2.h>
|
||||
#include <CGAL/Arr_extended_dcel.h>
|
||||
#include <CGAL/Arrangement_2.h>
|
||||
|
||||
#include <climits>
|
||||
#include <boost/graph/dijkstra_shortest_paths.hpp>
|
||||
|
||||
#include <CGAL/graph_traits_Dual_Arrangement_2.h>
|
||||
#include <CGAL/Arr_face_index_map.h>
|
||||
|
||||
#include <climits>
|
||||
#include <boost/graph/breadth_first_search.hpp>
|
||||
#include <boost/graph/visitors.hpp>
|
||||
|
||||
#include "arr_print.h"
|
||||
|
||||
// A property map that reads/writes the information to/from the extended
|
||||
// face.
|
||||
template <typename Arrangement, class Type> class Extended_face_property_map {
|
||||
public:
|
||||
typedef typename Arrangement::Face_handle Face_handle;
|
||||
|
||||
// Boost property type definitions.
|
||||
typedef boost::read_write_property_map_tag category;
|
||||
typedef Type value_type;
|
||||
typedef value_type& reference;
|
||||
typedef Face_handle key_type;
|
||||
|
||||
// The get function is required by the property map concept.
|
||||
friend reference get(const Extended_face_property_map& map, key_type key)
|
||||
{ return key->data(); }
|
||||
|
||||
// The put function is required by the property map concept.
|
||||
friend void put(const Extended_face_property_map& map,
|
||||
key_type key, value_type val)
|
||||
{ key->set_data(val); }
|
||||
};
|
||||
|
||||
typedef CGAL::Cartesian<Number_type> Kernel;
|
||||
typedef CGAL::Arr_segment_traits_2<Kernel> Traits_2;
|
||||
typedef Traits_2::Point_2 Point_2;
|
||||
typedef Traits_2::X_monotone_curve_2 Segment_2;
|
||||
typedef CGAL::Arr_face_extended_dcel<Traits_2,
|
||||
unsigned int> Dcel;
|
||||
typedef CGAL::Arrangement_2<Traits_2, Dcel> Arrangement_2;
|
||||
typedef CGAL::Dual<Arrangement_2> Dual_arrangement_2;
|
||||
|
||||
// A BFS visitor class that associates each vertex with its discover time.
|
||||
// In our case graph vertices represent arrangement faces.
|
||||
template <class IndexMap>
|
||||
class Discover_time_bfs_visitor : public boost::default_bfs_visitor
|
||||
{
|
||||
private:
|
||||
|
||||
const IndexMap *index_map; // Mapping vertices to indices.
|
||||
unsigned int time; // The current time stamp.
|
||||
|
||||
public:
|
||||
|
||||
// Constructor.
|
||||
Discover_time_bfs_visitor (const IndexMap& imap) :
|
||||
index_map (&imap),
|
||||
time (0)
|
||||
{}
|
||||
|
||||
// Write the discover time for a given vertex.
|
||||
template <typename Vertex, typename Graph>
|
||||
void discover_vertex(Vertex u, const Graph& /* g */)
|
||||
{
|
||||
u->set_data (time);
|
||||
time++;
|
||||
}
|
||||
};
|
||||
typedef CGAL::Arr_face_extended_dcel<Traits_2, unsigned int> Dcel;
|
||||
typedef CGAL::Arrangement_2<Traits_2, Dcel> Ex_arrangement;
|
||||
typedef CGAL::Dual<Ex_arrangement> Dual_arrangement;
|
||||
typedef CGAL::Arr_face_index_map<Ex_arrangement> Face_index_map;
|
||||
typedef Extended_face_property_map<Ex_arrangement,unsigned int>
|
||||
Face_property_map;
|
||||
typedef Kernel::Point_2 Point_2;
|
||||
typedef Kernel::Segment_2 Segment_2;
|
||||
|
||||
int main()
|
||||
{
|
||||
Arrangement_2 arr;
|
||||
|
||||
// Construct an arrangement of seven intersecting line segments.
|
||||
insert (arr, Segment_2 (Point_2 (1, 1), Point_2 (7, 1)));
|
||||
insert (arr, Segment_2 (Point_2 (1, 1), Point_2 (3, 7)));
|
||||
insert (arr, Segment_2 (Point_2 (1, 4), Point_2 (7, 1)));
|
||||
insert (arr, Segment_2 (Point_2 (2, 2), Point_2 (9, 3)));
|
||||
insert (arr, Segment_2 (Point_2 (2, 2), Point_2 (4, 4)));
|
||||
insert (arr, Segment_2 (Point_2 (7, 1), Point_2 (9, 3)));
|
||||
insert (arr, Segment_2 (Point_2 (3, 7), Point_2 (9, 3)));
|
||||
Point_2 p1(1, 1), p2(1, 4), p3(2, 2), p4(3, 7), p5(4, 4), p6(7, 1), p7(9, 3);
|
||||
Ex_arrangement arr;
|
||||
insert(arr, Segment_2(p1, p6));
|
||||
insert(arr, Segment_2(p1, p4)); insert(arr, Segment_2(p2, p6));
|
||||
insert(arr, Segment_2(p3, p7)); insert(arr, Segment_2(p3, p5));
|
||||
insert(arr, Segment_2(p6, p7)); insert(arr, Segment_2(p4, p7));
|
||||
|
||||
// Create a mapping of the arrangement faces to indices.
|
||||
CGAL::Arr_face_index_map<Arrangement_2> index_map (arr);
|
||||
Face_index_map index_map(arr);
|
||||
|
||||
// Perform breadth-first search from the unbounded face, and use the BFS
|
||||
// Perform breadth-first search from the unbounded face, using the event
|
||||
// visitor to associate each arrangement face with its discover time.
|
||||
Discover_time_bfs_visitor<CGAL::Arr_face_index_map<Arrangement_2> >
|
||||
bfs_visitor (index_map);
|
||||
Arrangement_2::Face_handle uf = arr.unbounded_face();
|
||||
|
||||
boost::breadth_first_search (Dual_arrangement_2 (arr), uf,
|
||||
boost::vertex_index_map (index_map).
|
||||
visitor (bfs_visitor));
|
||||
|
||||
// Print the results:
|
||||
Arrangement_2::Face_iterator fit;
|
||||
unsigned int time = 0;
|
||||
boost::breadth_first_search(Dual_arrangement(arr), arr.unbounded_face(),
|
||||
boost::vertex_index_map(index_map).visitor
|
||||
(boost::make_bfs_visitor
|
||||
(stamp_times(Face_property_map(), time,
|
||||
boost::on_discover_vertex()))));
|
||||
|
||||
// Print the discover time of each arrangement face.
|
||||
Ex_arrangement::Face_iterator fit;
|
||||
for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) {
|
||||
std::cout << "Discover time " << fit->data() << " for ";
|
||||
if (fit != uf) {
|
||||
if (fit != arr.unbounded_face()) {
|
||||
std::cout << "face ";
|
||||
print_ccb<Arrangement_2> (fit->outer_ccb());
|
||||
print_ccb<Ex_arrangement>(fit->outer_ccb());
|
||||
}
|
||||
else
|
||||
std::cout << "the unbounded face." << std::endl;
|
||||
else std::cout << "the unbounded face." << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@
|
|||
#include <climits>
|
||||
#include <boost/graph/dijkstra_shortest_paths.hpp>
|
||||
|
||||
#if BOOST_VERSION > 104000
|
||||
#include <boost/property_map/vector_property_map.hpp>
|
||||
#else
|
||||
#include <boost/vector_property_map.hpp>
|
||||
#endif
|
||||
|
||||
typedef CGAL::Cartesian<Number_type> Kernel;
|
||||
typedef CGAL::Arr_segment_traits_2<Kernel> Traits_2;
|
||||
typedef Traits_2::Point_2 Point_2;
|
||||
|
|
@ -123,7 +129,8 @@ int main()
|
|||
|
||||
// Perform Dijkstra's algorithm from the vertex v0.
|
||||
Edge_length_func edge_length;
|
||||
CGAL::Arr_vertex_property_map<Arrangement_2, double> dist_map(index_map);
|
||||
|
||||
boost::vector_property_map<double, boost::Arr_vertex_index_map_boost<Arrangement_2> > dist_map(arr.number_of_vertices(), index_map);
|
||||
boost::dijkstra_shortest_paths(arr, v0,
|
||||
boost::vertex_index_map(index_map).
|
||||
weight_map(edge_length).
|
||||
|
|
|
|||
|
|
@ -275,107 +275,6 @@ unsigned int get (const CGAL::Arr_face_index_map<Arrangement>& index_map,
|
|||
return (index_map[f]);
|
||||
}
|
||||
|
||||
/*! \class
|
||||
* An auxiliary class that automatically maintains a mapping of the
|
||||
* arrangement faces to some property of a given type.
|
||||
*/
|
||||
template <class Arrangement_, class Type_>
|
||||
class Arr_face_property_map
|
||||
{
|
||||
public:
|
||||
|
||||
typedef Arrangement_ Arrangement_2;
|
||||
typedef typename Arrangement_2::Face_handle Face_handle;
|
||||
typedef Arr_face_index_map<Arrangement_2> Index_map;
|
||||
|
||||
// Boost property type definitions:
|
||||
typedef boost::read_write_property_map_tag category;
|
||||
typedef Type_ value_type;
|
||||
typedef value_type& reference;
|
||||
typedef Face_handle key_type;
|
||||
|
||||
private:
|
||||
|
||||
typedef Arr_face_property_map<Arrangement_2, value_type> Self;
|
||||
|
||||
// Data members:
|
||||
const Index_map *ind_map; // The index map.
|
||||
value_type *props; // The properties vector.
|
||||
bool owner; // Should the vector be freed.
|
||||
|
||||
/*! Assignment operator - not supported. */
|
||||
Self& operator= (const Self& );
|
||||
|
||||
public:
|
||||
|
||||
/*! Constructor. */
|
||||
Arr_face_property_map (const Index_map& index_map) :
|
||||
ind_map (&index_map),
|
||||
owner (true)
|
||||
{
|
||||
props = new value_type [index_map.arrangement()->number_of_faces()];
|
||||
}
|
||||
|
||||
/*! Copy constructor - performs shallow copy. */
|
||||
Arr_face_property_map (const Self& map) :
|
||||
ind_map (map.ind_map),
|
||||
props (map.props),
|
||||
owner (false)
|
||||
{}
|
||||
|
||||
/*! Destructor. */
|
||||
~Arr_face_property_map ()
|
||||
{
|
||||
if (owner)
|
||||
delete[] props;
|
||||
}
|
||||
|
||||
/*! Get the property associated with a face (const version). */
|
||||
const value_type& operator[] (Face_handle f) const
|
||||
{
|
||||
return (props [(*ind_map)[f]]);
|
||||
}
|
||||
|
||||
/*! Get the property associated with a face (non-const version). */
|
||||
value_type& operator[] (Face_handle f)
|
||||
{
|
||||
return (props [(*ind_map)[f]]);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/*!
|
||||
* Get the index property-map function. Provided so that boost is able to
|
||||
* access the Arr_face_property_map above.
|
||||
* \param prop_map The property map.
|
||||
* \param f A face handle.
|
||||
* \return The face propery.
|
||||
*/
|
||||
template<class Arrangement, class Type>
|
||||
const typename CGAL::Arr_face_property_map<Arrangement, Type>::value_type&
|
||||
get (const CGAL::Arr_face_property_map<Arrangement, Type>& prop_map,
|
||||
typename Arrangement::Face_handle f)
|
||||
{
|
||||
return (prop_map[f]);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Put the index property-map function. Provided so that boost is able to
|
||||
* update the Arr_face_property_map above.
|
||||
* \param prop_map The property map.
|
||||
* \param f A face handle.
|
||||
* \param t The face propery.
|
||||
*/
|
||||
template<class Arrangement, class Type>
|
||||
void put (CGAL::Arr_face_property_map<Arrangement, Type>& prop_map,
|
||||
typename Arrangement::Face_handle f,
|
||||
typename CGAL::Arr_face_property_map<Arrangement, Type>::
|
||||
value_type t)
|
||||
{
|
||||
prop_map[f] = t;
|
||||
return;
|
||||
}
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -280,106 +280,6 @@ unsigned int get (const CGAL::Arr_vertex_index_map<Arrangement>& index_map,
|
|||
return index_map[v];
|
||||
}
|
||||
|
||||
/*! \class
|
||||
* An auxiliary class that automatically maintains a mapping of the
|
||||
* arrangement vertices to some property of a given type.
|
||||
*/
|
||||
template <class Arrangement_, class Type_>
|
||||
class Arr_vertex_property_map
|
||||
{
|
||||
public:
|
||||
|
||||
typedef Arrangement_ Arrangement_2;
|
||||
typedef typename Arrangement_2::Vertex_handle Vertex_handle;
|
||||
typedef Arr_vertex_index_map<Arrangement_2> Index_map;
|
||||
|
||||
// Boost property type definitions:
|
||||
typedef boost::read_write_property_map_tag category;
|
||||
typedef Type_ value_type;
|
||||
typedef value_type& reference;
|
||||
typedef Vertex_handle key_type;
|
||||
|
||||
private:
|
||||
|
||||
typedef Arr_vertex_property_map<Arrangement_2, value_type> Self;
|
||||
|
||||
// Data members:
|
||||
const Index_map *ind_map; // The index map.
|
||||
value_type *props; // The properties vector.
|
||||
bool owner; // Should the vector be freed.
|
||||
|
||||
/*! Assignment operator - not supported. */
|
||||
Self& operator= (const Self& );
|
||||
|
||||
public:
|
||||
|
||||
/*! Constructor. */
|
||||
Arr_vertex_property_map (const Index_map& index_map) :
|
||||
ind_map (&index_map),
|
||||
owner (true)
|
||||
{
|
||||
props = new value_type [index_map.arrangement()->number_of_vertices()];
|
||||
}
|
||||
|
||||
/*! Copy constructor - performs shallow copy. */
|
||||
Arr_vertex_property_map (const Self& map) :
|
||||
ind_map (map.ind_map),
|
||||
props (map.props),
|
||||
owner (false)
|
||||
{}
|
||||
|
||||
/*! Destructor. */
|
||||
~Arr_vertex_property_map ()
|
||||
{
|
||||
if (owner)
|
||||
delete[] props;
|
||||
}
|
||||
|
||||
/*! Get the property associated with a vertex (const version). */
|
||||
const value_type& operator[] (Vertex_handle v) const
|
||||
{
|
||||
return props[(*ind_map)[v]];
|
||||
}
|
||||
|
||||
/*! Get the property associated with a vertex (non-const version). */
|
||||
value_type& operator[] (Vertex_handle v)
|
||||
{
|
||||
return props[(*ind_map)[v]];
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/*!
|
||||
* Get the index property-map function. Provided so that boost is able to
|
||||
* access the Arr_vertex_property_map above.
|
||||
* \param prop_map The property map.
|
||||
* \param v A vertex handle.
|
||||
* \return The vertex propery.
|
||||
*/
|
||||
template<class Arrangement, class Type>
|
||||
const typename CGAL::Arr_vertex_property_map<Arrangement, Type>::value_type&
|
||||
get (const CGAL::Arr_vertex_property_map<Arrangement, Type>& prop_map,
|
||||
typename Arrangement::Vertex_handle v)
|
||||
{
|
||||
return prop_map[v];
|
||||
}
|
||||
|
||||
/*!
|
||||
* Put the index property-map function. Provided so that boost is able to
|
||||
* update the Arr_vertex_property_map above.
|
||||
* \param prop_map The property map.
|
||||
* \param v A vertex handle.
|
||||
* \param t The vertex propery.
|
||||
*/
|
||||
template<class Arrangement, class Type>
|
||||
void put (CGAL::Arr_vertex_property_map<Arrangement, Type>& prop_map,
|
||||
typename Arrangement::Vertex_handle v,
|
||||
typename CGAL::Arr_vertex_property_map<Arrangement, Type>::
|
||||
value_type t)
|
||||
{
|
||||
prop_map[v] = t;
|
||||
}
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//! \file examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp
|
||||
// Adapting the dual of an arrangement to a BGL graph.
|
||||
|
||||
#include "arr_rational_nt.h"
|
||||
|
|
@ -5,91 +6,79 @@
|
|||
#include <CGAL/Arr_segment_traits_2.h>
|
||||
#include <CGAL/Arr_extended_dcel.h>
|
||||
#include <CGAL/Arrangement_2.h>
|
||||
|
||||
#include <climits>
|
||||
#include <boost/graph/dijkstra_shortest_paths.hpp>
|
||||
|
||||
#include <CGAL/graph_traits_Dual_Arrangement_2.h>
|
||||
#include <CGAL/Arr_face_index_map.h>
|
||||
|
||||
#include <climits>
|
||||
#include <boost/graph/breadth_first_search.hpp>
|
||||
#include <boost/graph/visitors.hpp>
|
||||
|
||||
#include "arr_print.h"
|
||||
|
||||
// A property map that reads/writes the information to/from the extended
|
||||
// face.
|
||||
template <typename Arrangement, class Type> class Extended_face_property_map {
|
||||
public:
|
||||
typedef typename Arrangement::Face_handle Face_handle;
|
||||
|
||||
// Boost property type definitions.
|
||||
typedef boost::read_write_property_map_tag category;
|
||||
typedef Type value_type;
|
||||
typedef value_type& reference;
|
||||
typedef Face_handle key_type;
|
||||
|
||||
// The get function is required by the property map concept.
|
||||
friend reference get(const Extended_face_property_map& map, key_type key)
|
||||
{ return key->data(); }
|
||||
|
||||
// The put function is required by the property map concept.
|
||||
friend void put(const Extended_face_property_map& map,
|
||||
key_type key, value_type val)
|
||||
{ key->set_data(val); }
|
||||
};
|
||||
|
||||
typedef CGAL::Cartesian<Number_type> Kernel;
|
||||
typedef CGAL::Arr_segment_traits_2<Kernel> Traits_2;
|
||||
typedef Traits_2::Point_2 Point_2;
|
||||
typedef Traits_2::X_monotone_curve_2 Segment_2;
|
||||
typedef CGAL::Arr_face_extended_dcel<Traits_2,
|
||||
unsigned int> Dcel;
|
||||
typedef CGAL::Arrangement_2<Traits_2, Dcel> Arrangement_2;
|
||||
typedef CGAL::Dual<Arrangement_2> Dual_arrangement_2;
|
||||
|
||||
// A BFS visitor class that associates each vertex with its discover time.
|
||||
// In our case graph vertices represent arrangement faces.
|
||||
template <class IndexMap>
|
||||
class Discover_time_bfs_visitor : public boost::default_bfs_visitor
|
||||
{
|
||||
private:
|
||||
|
||||
const IndexMap *index_map; // Mapping vertices to indices.
|
||||
unsigned int time; // The current time stamp.
|
||||
|
||||
public:
|
||||
|
||||
// Constructor.
|
||||
Discover_time_bfs_visitor (const IndexMap& imap) :
|
||||
index_map (&imap),
|
||||
time (0)
|
||||
{}
|
||||
|
||||
// Write the discover time for a given vertex.
|
||||
template <typename Vertex, typename Graph>
|
||||
void discover_vertex (Vertex u, const Graph& )
|
||||
{
|
||||
u->set_data (time);
|
||||
time++;
|
||||
}
|
||||
};
|
||||
typedef CGAL::Arr_face_extended_dcel<Traits_2, unsigned int> Dcel;
|
||||
typedef CGAL::Arrangement_2<Traits_2, Dcel> Ex_arrangement;
|
||||
typedef CGAL::Dual<Ex_arrangement> Dual_arrangement;
|
||||
typedef CGAL::Arr_face_index_map<Ex_arrangement> Face_index_map;
|
||||
typedef Extended_face_property_map<Ex_arrangement,unsigned int>
|
||||
Face_property_map;
|
||||
typedef Kernel::Point_2 Point_2;
|
||||
typedef Kernel::Segment_2 Segment_2;
|
||||
|
||||
int main()
|
||||
{
|
||||
Arrangement_2 arr;
|
||||
|
||||
// Construct an arrangement of seven intersecting line segments.
|
||||
insert (arr, Segment_2 (Point_2 (1, 1), Point_2 (7, 1)));
|
||||
insert (arr, Segment_2 (Point_2 (1, 1), Point_2 (3, 7)));
|
||||
insert (arr, Segment_2 (Point_2 (1, 4), Point_2 (7, 1)));
|
||||
insert (arr, Segment_2 (Point_2 (2, 2), Point_2 (9, 3)));
|
||||
insert (arr, Segment_2 (Point_2 (2, 2), Point_2 (4, 4)));
|
||||
insert (arr, Segment_2 (Point_2 (7, 1), Point_2 (9, 3)));
|
||||
insert (arr, Segment_2 (Point_2 (3, 7), Point_2 (9, 3)));
|
||||
Point_2 p1(1, 1), p2(1, 4), p3(2, 2), p4(3, 7), p5(4, 4), p6(7, 1), p7(9, 3);
|
||||
Ex_arrangement arr;
|
||||
insert(arr, Segment_2(p1, p6));
|
||||
insert(arr, Segment_2(p1, p4)); insert(arr, Segment_2(p2, p6));
|
||||
insert(arr, Segment_2(p3, p7)); insert(arr, Segment_2(p3, p5));
|
||||
insert(arr, Segment_2(p6, p7)); insert(arr, Segment_2(p4, p7));
|
||||
|
||||
// Create a mapping of the arrangement faces to indices.
|
||||
CGAL::Arr_face_index_map<Arrangement_2> index_map (arr);
|
||||
Face_index_map index_map(arr);
|
||||
|
||||
// Perform breadth-first search from the unbounded face, and use the BFS
|
||||
// Perform breadth-first search from the unbounded face, using the event
|
||||
// visitor to associate each arrangement face with its discover time.
|
||||
Discover_time_bfs_visitor<CGAL::Arr_face_index_map<Arrangement_2> >
|
||||
bfs_visitor (index_map);
|
||||
Arrangement_2::Face_handle uf = arr.unbounded_face();
|
||||
unsigned int time = 0;
|
||||
boost::breadth_first_search(Dual_arrangement(arr), arr.unbounded_face(),
|
||||
boost::vertex_index_map(index_map).visitor
|
||||
(boost::make_bfs_visitor
|
||||
(stamp_times(Face_property_map(), time,
|
||||
boost::on_discover_vertex()))));
|
||||
|
||||
boost::breadth_first_search (Dual_arrangement_2 (arr), uf,
|
||||
boost::vertex_index_map (index_map).
|
||||
visitor (bfs_visitor));
|
||||
|
||||
// Print the results:
|
||||
Arrangement_2::Face_iterator fit;
|
||||
|
||||
for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit)
|
||||
{
|
||||
// Print the discover time of each arrangement face.
|
||||
Ex_arrangement::Face_iterator fit;
|
||||
for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) {
|
||||
std::cout << "Discover time " << fit->data() << " for ";
|
||||
if (fit != uf)
|
||||
{
|
||||
if (fit != arr.unbounded_face()) {
|
||||
std::cout << "face ";
|
||||
print_ccb<Arrangement_2> (fit->outer_ccb());
|
||||
print_ccb<Ex_arrangement>(fit->outer_ccb());
|
||||
}
|
||||
else
|
||||
std::cout << "the unbounded face." << std::endl;
|
||||
else std::cout << "the unbounded face." << std::endl;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,21 @@
|
|||
//! \file examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp
|
||||
// Adapting an arrangement to a BGL graph.
|
||||
|
||||
#include "arr_rational_nt.h"
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Arr_segment_traits_2.h>
|
||||
#include <CGAL/Arrangement_2.h>
|
||||
#include <CGAL/graph_traits_Arrangement_2.h>
|
||||
#include <CGAL/Arr_vertex_index_map.h>
|
||||
|
||||
#include <climits>
|
||||
#include <boost/graph/dijkstra_shortest_paths.hpp>
|
||||
|
||||
#include <CGAL/graph_traits_Arrangement_2.h>
|
||||
#include <CGAL/Arr_vertex_index_map.h>
|
||||
#if BOOST_VERSION > 104000
|
||||
#include <boost/property_map/vector_property_map.hpp>
|
||||
#else
|
||||
#include <boost/vector_property_map.hpp>
|
||||
#endif
|
||||
|
||||
typedef CGAL::Cartesian<Number_type> Kernel;
|
||||
typedef CGAL::Arr_segment_traits_2<Kernel> Traits_2;
|
||||
|
|
@ -37,13 +43,13 @@ public:
|
|||
const double diff_x = x2 - x1;
|
||||
const double diff_y = y2 - y1;
|
||||
|
||||
return (std::sqrt (diff_x*diff_x + diff_y*diff_y));
|
||||
return std::sqrt(diff_x*diff_x + diff_y*diff_y);
|
||||
}
|
||||
};
|
||||
|
||||
double get(Edge_length_func edge_length, Arrangement_2::Halfedge_handle e)
|
||||
{
|
||||
return (edge_length (e));
|
||||
return edge_length(e);
|
||||
}
|
||||
|
||||
/* The folowing is a workaround for a bug in the BGL upto and including version
|
||||
|
|
@ -63,6 +69,7 @@ double get (Edge_length_func edge_length, Arrangement_2::Halfedge_handle e)
|
|||
* boost namespace, and is a simple derivation of the 1st parameter of the
|
||||
* CGAL::get() function.
|
||||
*/
|
||||
|
||||
namespace boost {
|
||||
|
||||
template <typename Arrangement_2>
|
||||
|
|
@ -122,9 +129,8 @@ int main ()
|
|||
|
||||
// Perform Dijkstra's algorithm from the vertex v0.
|
||||
Edge_length_func edge_length;
|
||||
CGAL::Arr_vertex_property_map<Arrangement_2,
|
||||
double> dist_map (index_map);
|
||||
|
||||
boost::vector_property_map<double, boost::Arr_vertex_index_map_boost<Arrangement_2> > dist_map(arr.number_of_vertices(), index_map);
|
||||
boost::dijkstra_shortest_paths(arr, v0,
|
||||
boost::vertex_index_map(index_map).
|
||||
weight_map(edge_length).
|
||||
|
|
@ -136,10 +142,8 @@ int main ()
|
|||
std::cout << "The distances of the arrangement vertices from ("
|
||||
<< v0->point() << ") :" << std::endl;
|
||||
for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit)
|
||||
{
|
||||
std::cout << "(" << vit->point() << ") at distance "
|
||||
<< dist_map[vit] << std::endl;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -337,6 +337,15 @@ namespace boost {
|
|||
typedef typename map_gen::const_type const_type;
|
||||
};
|
||||
|
||||
// see struct property_map in Polyehdron for an explanation
|
||||
template <class Gt, class Tds, class Tag>
|
||||
struct property_map<const CGAL::Delaunay_triangulation_2<Gt,Tds>, Tag> {
|
||||
typedef typename
|
||||
DT2_property_map<Tag>::template bind_<Gt,Tds> map_gen;
|
||||
typedef typename map_gen::type type;
|
||||
typedef typename map_gen::const_type const_type;
|
||||
};
|
||||
|
||||
template <class Gt, class Tds, class PropertyTag, class Key>
|
||||
inline
|
||||
typename boost::property_traits<
|
||||
|
|
|
|||
|
|
@ -488,6 +488,15 @@ namespace boost {
|
|||
typedef typename map_gen::const_type const_type;
|
||||
};
|
||||
|
||||
// see struct property_map in Polyehdron for an explanation
|
||||
template <class Gt, class Tds, class Tag>
|
||||
struct property_map<const CGAL::Triangulation_2<Gt,Tds>, Tag> {
|
||||
typedef typename
|
||||
T2_property_map<Tag>::template bind_<Gt,Tds> map_gen;
|
||||
typedef typename map_gen::type type;
|
||||
typedef typename map_gen::const_type const_type;
|
||||
};
|
||||
|
||||
template <class Gt, class Tds, class PropertyTag, class Key>
|
||||
inline
|
||||
typename boost::property_traits<
|
||||
|
|
|
|||
|
|
@ -50,7 +50,16 @@
|
|||
#include <CGAL/basic.h>
|
||||
#include <boost/graph/properties.hpp>
|
||||
#include <boost/graph/named_function_params.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
// An explanation about the version hackery below: There is no real
|
||||
// API to introduce custom properties to the Graph API and the
|
||||
// internals have changed with Boost Version 1.51 and changes aren't
|
||||
// backward compatible. To work around that we carry around two
|
||||
// versions of cgal_bgl_named_params. One imitates the pre 1.51
|
||||
// bgl_named_params, the newer one hooks into the API through
|
||||
// inheritance and addition of the some partial specializations.
|
||||
namespace CGAL {
|
||||
|
||||
enum vertex_is_fixed_t { vertex_is_fixed } ;
|
||||
|
|
@ -60,6 +69,105 @@ namespace CGAL {
|
|||
enum get_placement_policy_t { get_placement_policy } ;
|
||||
enum get_placement_policy_params_t { get_placement_policy_params } ;
|
||||
|
||||
#if BOOST_VERSION >= 105100
|
||||
template <typename T, typename Tag, typename Base = boost::no_property>
|
||||
struct cgal_bgl_named_params : boost::bgl_named_params<T, Tag, Base>
|
||||
{
|
||||
typedef boost::bgl_named_params<T, Tag, Base> base;
|
||||
typedef cgal_bgl_named_params self;
|
||||
|
||||
cgal_bgl_named_params(T v = T()) : base(v) {}
|
||||
cgal_bgl_named_params(T v, const Base& b) : base(v, b) {}
|
||||
|
||||
template <typename IndexMap>
|
||||
cgal_bgl_named_params<IndexMap, boost::vertex_index_t, self>
|
||||
vertex_index_map(const IndexMap& p) const
|
||||
{
|
||||
typedef cgal_bgl_named_params<IndexMap, boost::vertex_index_t, self> Params;
|
||||
return Params(p, *this);
|
||||
}
|
||||
|
||||
template <typename PointMap>
|
||||
cgal_bgl_named_params<PointMap, vertex_point_t, self>
|
||||
vertex_point_map(const PointMap& p) const
|
||||
{
|
||||
typedef cgal_bgl_named_params<PointMap, vertex_point_t, self> Params;
|
||||
return Params(p, *this);
|
||||
}
|
||||
|
||||
template <typename IsFixedMap>
|
||||
cgal_bgl_named_params<IsFixedMap, vertex_is_fixed_t, self>
|
||||
vertex_is_fixed_map(const IsFixedMap& p) const
|
||||
{
|
||||
typedef cgal_bgl_named_params<IsFixedMap, vertex_is_fixed_t, self> Params;
|
||||
return Params(p, *this);
|
||||
}
|
||||
|
||||
template <typename IndexMap>
|
||||
cgal_bgl_named_params<IndexMap, boost::edge_index_t, self>
|
||||
edge_index_map(const IndexMap& p) const
|
||||
{
|
||||
typedef cgal_bgl_named_params<IndexMap, boost::edge_index_t, self> Params;
|
||||
return Params(p, *this);
|
||||
}
|
||||
|
||||
template <typename IsBorderMap>
|
||||
cgal_bgl_named_params<IsBorderMap, edge_is_border_t, self>
|
||||
edge_is_border_map(const IsBorderMap& p) const
|
||||
{
|
||||
typedef cgal_bgl_named_params<IsBorderMap, edge_is_border_t, self> Params;
|
||||
return Params(p, *this);
|
||||
}
|
||||
|
||||
template <typename Visitor>
|
||||
cgal_bgl_named_params<Visitor, boost::graph_visitor_t, self>
|
||||
visitor(const Visitor& p) const
|
||||
{
|
||||
typedef cgal_bgl_named_params<Visitor, boost::graph_visitor_t, self> Params;
|
||||
return Params(p, *this);
|
||||
}
|
||||
|
||||
template <typename SetCache>
|
||||
cgal_bgl_named_params<SetCache, set_cache_policy_t, self>
|
||||
set_cache(const SetCache& p) const
|
||||
{
|
||||
typedef cgal_bgl_named_params<SetCache, set_cache_policy_t, self> Params;
|
||||
return Params(p, *this);
|
||||
}
|
||||
|
||||
template <typename GetCost>
|
||||
cgal_bgl_named_params<GetCost, get_cost_policy_t, self>
|
||||
get_cost(const GetCost& p) const
|
||||
{
|
||||
typedef cgal_bgl_named_params<GetCost, get_cost_policy_t, self> Params;
|
||||
return Params(p, *this);
|
||||
}
|
||||
|
||||
template <typename GetCostParams>
|
||||
cgal_bgl_named_params<GetCostParams, get_cost_policy_params_t, self>
|
||||
get_cost_params(const GetCostParams& p) const
|
||||
{
|
||||
typedef cgal_bgl_named_params<GetCostParams, get_cost_policy_params_t, self> Params;
|
||||
return Params(p, *this);
|
||||
}
|
||||
|
||||
template <typename GetPlacement>
|
||||
cgal_bgl_named_params<GetPlacement, get_placement_policy_t, self>
|
||||
get_placement(const GetPlacement& p) const
|
||||
{
|
||||
typedef cgal_bgl_named_params<GetPlacement, get_placement_policy_t, self> Params;
|
||||
return Params(p, *this);
|
||||
}
|
||||
|
||||
template <typename GetPlacementParams>
|
||||
cgal_bgl_named_params<GetPlacementParams, get_placement_policy_params_t, self>
|
||||
get_placement_params(const GetPlacementParams& p) const
|
||||
{
|
||||
typedef cgal_bgl_named_params<GetPlacementParams, get_placement_policy_params_t, self> Params;
|
||||
return Params(p, *this);
|
||||
}
|
||||
};
|
||||
#else
|
||||
template <typename T, typename Tag, typename Base = boost::no_property>
|
||||
struct cgal_bgl_named_params : public Base
|
||||
{
|
||||
|
|
@ -164,6 +272,20 @@ namespace CGAL {
|
|||
}
|
||||
};
|
||||
|
||||
template <class Tag1, class Tag2, class T1, class Base>
|
||||
inline
|
||||
typename boost::property_value< cgal_bgl_named_params<T1,Tag1,Base>, Tag2>::type
|
||||
get_param(const cgal_bgl_named_params<T1,Tag1,Base>& p, Tag2 tag2)
|
||||
{
|
||||
enum { match = boost::detail::same_property<Tag1,Tag2>::value };
|
||||
typedef typename
|
||||
boost::property_value< cgal_bgl_named_params<T1,Tag1,Base>, Tag2>::type T2;
|
||||
T2* t2 = 0;
|
||||
typedef boost::detail::property_value_dispatch<match> Dispatcher;
|
||||
return Dispatcher::const_get_value(p, t2, tag2);
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename IndexMap>
|
||||
cgal_bgl_named_params<IndexMap, boost::vertex_index_t>
|
||||
vertex_index_map(IndexMap const& p)
|
||||
|
|
@ -251,21 +373,28 @@ namespace CGAL {
|
|||
typedef cgal_bgl_named_params<GetPlacementParams, get_placement_policy_params_t> Params;
|
||||
return Params(p);
|
||||
}
|
||||
|
||||
|
||||
template <class Tag1, class Tag2, class T1, class Base>
|
||||
inline
|
||||
typename boost::property_value< cgal_bgl_named_params<T1,Tag1,Base>, Tag2>::type
|
||||
get_param(const cgal_bgl_named_params<T1,Tag1,Base>& p, Tag2 tag2)
|
||||
{
|
||||
enum { match = boost::detail::same_property<Tag1,Tag2>::value };
|
||||
typedef typename
|
||||
boost::property_value< cgal_bgl_named_params<T1,Tag1,Base>, Tag2>::type T2;
|
||||
T2* t2 = 0;
|
||||
typedef boost::detail::property_value_dispatch<match> Dispatcher;
|
||||
return Dispatcher::const_get_value(p, t2, tag2);
|
||||
}
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
#if BOOST_VERSION >= 105100
|
||||
// partial specializations hate inheritance and we need to repeat
|
||||
// those here. this is rather fragile.
|
||||
namespace boost {
|
||||
template <typename T, typename Tag, typename Base, typename Def>
|
||||
struct lookup_named_param_def<Tag, CGAL::cgal_bgl_named_params<T, Tag, Base>, Def> {
|
||||
typedef T type;
|
||||
static const type& get(const bgl_named_params<T, Tag, Base>& p, const Def&) {
|
||||
return p.m_value;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Tag1, typename T, typename Tag, typename Base, typename Def>
|
||||
struct lookup_named_param_def<Tag1, CGAL::cgal_bgl_named_params<T, Tag, Base>, Def> {
|
||||
typedef typename lookup_named_param_def<Tag1, Base, Def>::type type;
|
||||
static const type& get(const bgl_named_params<T, Tag, Base>& p, const Def& def) {
|
||||
return lookup_named_param_def<Tag1, Base, Def>::get(p.m_base, def);
|
||||
}
|
||||
};
|
||||
} // boost
|
||||
#endif
|
||||
|
||||
#endif // CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_HPP
|
||||
|
|
|
|||
|
|
@ -377,6 +377,16 @@ struct property_map<CGAL::Polyhedron_3<Gt,I,HDS,A>, Tag>
|
|||
typedef typename map_gen::const_type const_type;
|
||||
};
|
||||
|
||||
// This partial specialization shouldn't be needed but is due to a bug in Boost 1.51.
|
||||
template<class Gt, class I, CGAL_HDS_PARAM_, class A, class Tag>
|
||||
struct property_map<const CGAL::Polyhedron_3<Gt,I,HDS,A>, Tag>
|
||||
{
|
||||
typedef typename CGAL::Polyhedron_property_map<Tag>::
|
||||
template bind_<Gt,I,HDS,A> map_gen;
|
||||
typedef typename map_gen::type type;
|
||||
typedef typename map_gen::const_type const_type;
|
||||
};
|
||||
|
||||
template<class Gt, class I, CGAL_HDS_PARAM_, class A, class PropertyTag, class Key>
|
||||
inline
|
||||
typename property_traits<typename property_map<CGAL::Polyhedron_3<Gt,I,HDS,A>,PropertyTag>::type>::reference
|
||||
|
|
|
|||
|
|
@ -21,7 +21,11 @@ if ( CGAL_FOUND )
|
|||
|
||||
include( CGAL_CreateSingleSourceCGALProgram )
|
||||
|
||||
if (WITH_CGAL_ImageIO)
|
||||
create_single_source_cgal_program( "test_trilinear_interpolation.cpp" )
|
||||
else()
|
||||
message(STATUS "NOTICE: Some tests require the CGAL_ImageIO library, and will not be compiled.")
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,8 @@ namespace CGAL{
|
|||
typedef ipe::Curve IpeSegmentSubPath;//ipe6 compatibility
|
||||
typedef ipe::Matrix IpeMatrix;//ipe6 compatibility
|
||||
typedef ipe::Path IpePath;//ipe6 compatibility
|
||||
|
||||
//indicates if the selection should be primary or secondary. Exactly one primary selection should exist
|
||||
ipe::TSelect get_selection_type() const { return get_IpePage()->primarySelection()==-1 ? ipe::EPrimarySelected : ipe::ESecondarySelected;}
|
||||
//ipe6 compatibility
|
||||
void transform_selected_objects_(const IpeMatrix& tfm) const {
|
||||
for (int i=0;i<get_IpePage()->count();++i)
|
||||
|
|
@ -82,7 +83,7 @@ namespace CGAL{
|
|||
//~ grp->push_back( get_IpePage()->object(i-1) );
|
||||
get_IpePage()->remove(i-1);
|
||||
}
|
||||
get_IpePage()->append(ipe::ESecondarySelected,CURRENTLAYER,grp);
|
||||
get_IpePage()->append(get_selection_type(),CURRENTLAYER,grp);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -318,7 +319,7 @@ public:
|
|||
shape.appendSubPath(*it);
|
||||
if (delete_underlying_polygons)
|
||||
delete_selected_objects_();
|
||||
get_IpePage()->append(ipe::ESecondarySelected,CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
|
||||
get_IpePage()->append(get_selection_type(),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -372,7 +373,7 @@ public:
|
|||
obj_ipe->setPathMode(ipe::EStrokedAndFilled);
|
||||
obj_ipe->setFill(ipe::Attribute::BLACK());
|
||||
}
|
||||
get_IpePage()->append( (deselect_all?ipe::ENotSelected:ipe::ESecondarySelected),CURRENTLAYER,obj_ipe);
|
||||
get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,obj_ipe);
|
||||
return obj_ipe;
|
||||
}
|
||||
return NULL;
|
||||
|
|
@ -386,14 +387,14 @@ public:
|
|||
);
|
||||
ipe::Shape shape;
|
||||
shape.appendSubPath(ellipse);
|
||||
get_IpePage()->append( (deselect_all?ipe::ENotSelected:ipe::EPrimarySelected),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
|
||||
get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
|
||||
}
|
||||
|
||||
void
|
||||
draw_in_ipe(const Point_2& P,bool deselect_all=false) const
|
||||
{
|
||||
ipe::Reference *mark = new ipe::Reference(CURRENTATTRIBUTES,CURRENTATTRIBUTES.iMarkShape, ipe::Vector(CGAL::to_double(P.x()),CGAL::to_double(P.y())));
|
||||
get_IpePage()->append( (deselect_all?ipe::ENotSelected:ipe::ESecondarySelected),CURRENTLAYER,mark);
|
||||
get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,mark);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -402,7 +403,7 @@ public:
|
|||
ipe::Segment seg_ipe;
|
||||
seg_ipe.iP = ipe::Vector(CGAL::to_double(S.point(0).x()),CGAL::to_double(S.point(0).y()));
|
||||
seg_ipe.iQ = ipe::Vector(CGAL::to_double(S.point(1).x()),CGAL::to_double(S.point(1).y()));
|
||||
get_IpePage()->append( (deselect_all?ipe::ENotSelected:ipe::ESecondarySelected),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,ipe::Shape(seg_ipe)));
|
||||
get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,ipe::Shape(seg_ipe)));
|
||||
}
|
||||
|
||||
template<class Container>
|
||||
|
|
@ -431,7 +432,7 @@ public:
|
|||
ipeS,ipeT);
|
||||
ipe::Shape shape;
|
||||
shape.appendSubPath(SSP_ipe);
|
||||
get_IpePage()->append( (deselect_all?ipe::ENotSelected:ipe::ESecondarySelected),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
|
||||
get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -448,7 +449,7 @@ public:
|
|||
SSP_ipe->setClosed(true);
|
||||
ipe::Shape shape;
|
||||
shape.appendSubPath(SSP_ipe);
|
||||
get_IpePage()->append( (deselect_all?ipe::ENotSelected:ipe::ESecondarySelected),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
|
||||
get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -466,7 +467,7 @@ public:
|
|||
SSP_ipe->setClosed(true);
|
||||
ipe::Shape shape;
|
||||
shape.appendSubPath(SSP_ipe);
|
||||
get_IpePage()->append( (deselect_all?ipe::ENotSelected:ipe::ESecondarySelected),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
|
||||
get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,83 +14,7 @@ endif()
|
|||
option( CGAL_BRANCH_BUILD "Create CGAL from branch" ON)
|
||||
mark_as_advanced( CGAL_BRANCH_BUILD )
|
||||
|
||||
# search for some SCM
|
||||
|
||||
# TODO
|
||||
|
||||
if ( EXISTS ${CMAKE_SOURCE_DIR}/.svn )
|
||||
set ( CGAL_SCM_NAME "svn" )
|
||||
else ()
|
||||
if ( NOT EXISTS ${CMAKE_SOURCE_DIR}/.git )
|
||||
message( ERROR "Neither 'svn' nor 'git' as SCM found" )
|
||||
endif()
|
||||
set ( CGAL_SCM_NAME "git" )
|
||||
endif()
|
||||
|
||||
if ( ${CGAL_SCM_NAME} STREQUAL "svn" )
|
||||
|
||||
find_program(SVN_EXECUTABLE svn DOC "subversion command line client")
|
||||
|
||||
function(Subversion_GET_INFO dir variable)
|
||||
# use svnversion
|
||||
execute_process(COMMAND "${SVN_EXECUTABLE}" info --xml
|
||||
WORKING_DIRECTORY "${dir}"
|
||||
OUTPUT_VARIABLE ${variable}
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
RESULT_VARIABLE svn_error)
|
||||
if(svn_error)
|
||||
message("Warning: `svn info --xml \"${dir}\"` returned an error!")
|
||||
set(${variable} "")
|
||||
endif()
|
||||
set(${variable} ${${variable}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(Subversion_GET_REVISION dir variable)
|
||||
Subversion_GET_INFO("${dir}" ${variable})
|
||||
string(REGEX REPLACE "^(.*\n)? revision=\"([^\n]+)\".*url.*" "\\2" ${variable} "${${variable}}")
|
||||
if(NOT variable)
|
||||
message("Warning: can not get the Subversion revision of directory ${dir}")
|
||||
endif()
|
||||
set(${variable} ${${variable}} PARENT_SCOPE)
|
||||
endfunction(Subversion_GET_REVISION)
|
||||
|
||||
function(Subversion_GET_URL dir variable)
|
||||
Subversion_GET_INFO("${dir}" ${variable})
|
||||
string(REGEX REPLACE ".*<url>([^<]+)</url>.*" "\\1" ${variable} "${${variable}}")
|
||||
if(NOT variable)
|
||||
message("Warning: can not get the Subversion URL of directory ${dir}")
|
||||
endif()
|
||||
set(${variable} ${${variable}} PARENT_SCOPE)
|
||||
endfunction(Subversion_GET_URL)
|
||||
|
||||
Subversion_GET_URL("${CMAKE_CURRENT_SOURCE_DIR}" CGAL_TMP_SVN_BRANCH_NAME)
|
||||
# Remove the prefix of the URL "https://scm.gforge.inria.fr/".
|
||||
string(REGEX REPLACE "[a-z+]+://[a-z0-9.]+" "" CGAL_TMP_SVN_BRANCH_NAME "${CGAL_TMP_SVN_BRANCH_NAME}")
|
||||
|
||||
set ( CGAL_SCM_BRANCH_NAME "${CGAL_TMP_SVN_BRANCH_NAME}" )
|
||||
endif()
|
||||
|
||||
if ( ${CGAL_SCM_NAME} STREQUAL "git" )
|
||||
|
||||
find_program(GIT_EXECUTABLE git DOC "git command line client")
|
||||
|
||||
# EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} --git-dir=${CMAKE_SOURCE_DIR}/.git branch
|
||||
# OUTPUT_VARIABLE CGAL_GIT_BRANCH_OUT
|
||||
# OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# #foreach (line IN ${CGAL_GIT_BRANCH_OUT})
|
||||
# # message (STATUS "Line: ${line}")
|
||||
# if ( STRING( REGEX MATCH "* " CGAL_GIT_BRANCH_LINE
|
||||
# ${CGAL_GIT_BRANCH_OUT} ) )
|
||||
# string ( REGEX REPLACE "# On branch " "" CGAL_GIT_BRANCH ${CGAL_GIT_BRANCH_LINE})
|
||||
# endif()
|
||||
# #endforeach()
|
||||
|
||||
message( STATUS "Git branch ${CGAL_GIT_BRANCH}")
|
||||
|
||||
# TODO detect name
|
||||
set ( CGAL_SCM_BRANCH_NAME "n/a" )
|
||||
|
||||
endif()
|
||||
include(${CMAKE_SOURCE_DIR}/Installation/cmake/modules/CGAL_SCM.cmake)
|
||||
|
||||
# add option for duplicate file detection
|
||||
option( CGAL_REPORT_DUPLICATE_FILES "Switch on to start (naive) detection of duplicate source- and headerfiles in packages" OFF)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
#define CGAL_CARTESIAN_AFF_TRANSFORMATION_REP_2_H
|
||||
|
||||
#include <CGAL/determinant.h>
|
||||
#include <CGAL/Handle_for_virtual.h>
|
||||
#include <CGAL/Cartesian/Aff_transformation_2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#ifndef CGAL_CARTESIAN_AFF_TRANSFORMATION_REP_3_H
|
||||
#define CGAL_CARTESIAN_AFF_TRANSFORMATION_REP_3_H
|
||||
|
||||
#include <ostream>
|
||||
#include <CGAL/determinant.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <CGAL/Handle_for.h>
|
||||
#include <CGAL/Interval_nt.h>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <CGAL/Kernel/global_functions_3.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include <CGAL/array.h>
|
||||
#include <CGAL/Handle_for.h>
|
||||
#include <CGAL/enum.h>
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
#ifndef CGAL_CARTESIAN_TRANSLATION_REP_2_H
|
||||
#define CGAL_CARTESIAN_TRANSLATION_REP_2_H
|
||||
|
||||
#include <CGAL/Cartesian/Aff_transformation_rep_2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template < class R >
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@
|
|||
#include <CGAL/Cartesian/Point_2.h>
|
||||
#include <CGAL/Cartesian/Line_2.h>
|
||||
|
||||
#include <CGAL/Cartesian/Direction_2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template < class K >
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#define CGAL_CARTESIAN_PLANE_CONSTRUCTIONS_3_H
|
||||
|
||||
#include <CGAL/Cartesian/Point_3.h>
|
||||
#include <CGAL/Cartesian/Direction_3.h>
|
||||
#include <CGAL/constructions/kernel_ftC3.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#define CGAL_CARTESIAN_POINT_CONSTRUCTIONS_2_H
|
||||
|
||||
#include <CGAL/Cartesian/Point_2.h>
|
||||
#include <CGAL/Cartesian/Line_2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#define CGAL_CARTESIAN_PREDICATES_ON_POINTS_3_H
|
||||
|
||||
#include <CGAL/predicates/kernel_ftC3.h>
|
||||
#include <CGAL/Cartesian/Point_3.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#define CGAL_CONSTRUCTIONS_KERNEL_FTC2_H
|
||||
|
||||
#include <CGAL/determinant.h>
|
||||
#include <CGAL/number_utils.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#define CGAL_CONSTRUCTIONS_KERNEL_FTC3_H
|
||||
|
||||
#include <CGAL/determinant.h>
|
||||
#include <CGAL/number_utils.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ editorial board for approval. The process is described in the
|
|||
and review rules}.
|
||||
|
||||
% This can be done by sending mail to
|
||||
% the \ccAnchor{mailto:cgal-editorial-board@lists-sop.inria.fr}{board}
|
||||
% \lcTex{(\texttt{cgal-editorial-board@lists-sop.inria.fr})} indicating
|
||||
% the \ccAnchor{mailto:cgal-editorial-board@inria.fr}{board}
|
||||
% \lcTex{(\texttt{cgal-editorial-board@inria.fr})} indicating
|
||||
% where the (PDF) documentation and code can be found. After
|
||||
% some reasonable amount of time, you should receive feedback from
|
||||
% the board about the specification and what, if anything, needs to
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include <CGAL/enum.h>
|
||||
#include <CGAL/wmult.h>
|
||||
#include <CGAL/squared_distance_utils.h>
|
||||
#include <CGAL/Kernel/global_functions_2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -91,6 +91,11 @@ The function \ccc{random_selection} chooses $n$ items at random from a random
|
|||
access iterator range which is useful to produce degenerate input data
|
||||
sets with multiple entries of identical items.
|
||||
|
||||
The class \ccc{Combination_enumerator<CombinationElement>} is used to enumerate
|
||||
all fixed-size combinations (subsets) of a range of elements. It is useful
|
||||
in the context of high-dimensional triangulations, e.g., for enumerating the
|
||||
faces of a simplex.
|
||||
|
||||
\section{Example Generating Degenerate Point Sets}
|
||||
|
||||
We want to generate a test set of 1000 points, where 60\% are chosen
|
||||
|
|
@ -313,6 +318,33 @@ Generating 20 grid points in 4D
|
|||
\end{ccTexOnly}
|
||||
|
||||
|
||||
\section{Example Generating Combinations}
|
||||
|
||||
\paragraph{From a Range of Integers}
|
||||
|
||||
The following example enumerates and outputs all subsets of 3 elements from the
|
||||
range $[10, 15]$. Accordingly, it outputs $\displaystyle\frac{6!}{3! 3!}=20$
|
||||
triples.
|
||||
|
||||
\smallskip
|
||||
\ccIncludeExampleCode{Generator/combination_enumerator.cpp}
|
||||
|
||||
The output of this example is:
|
||||
\begin{verbatim}
|
||||
Taking 3 distinct integers in the range [10, 15]: {10 11 12} {10 11 13} {10 11 14}
|
||||
{10 11 15} {10 12 13} {10 12 14} {10 12 15} {10 13 14} {10 13 15} {10 14 15}
|
||||
{11 12 13} {11 12 14} {11 12 15} {11 13 14} {11 13 15} {11 14 15} {12 13 14}
|
||||
{12 13 15} {12 14 15} {13 14 15}
|
||||
Enumerated 20 combinations.
|
||||
\end{verbatim}
|
||||
|
||||
\paragraph{From an Array of Strings}
|
||||
The following example generates all pairs of names from a set of names stored
|
||||
in an array of strings.
|
||||
|
||||
\smallskip
|
||||
\ccIncludeExampleCode{Generator/name_pairs.cpp}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\section{Design and Implementation History}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
\begin{ccRefConcept}{CombinationElement}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
A \ccRefName\ can be used as template parameter for the class
|
||||
\ccc{Combination_enumerator<CombinationElement>}.
|
||||
|
||||
\ccCreationVariable{e}
|
||||
|
||||
\ccCreation
|
||||
|
||||
\ccConstructor{CombinationElement(const CombinationElement & e2)}{Copy
|
||||
constructor.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
\ccMethod{void operator++();}{Incrementation of \ccVar.}
|
||||
|
||||
\ccMethod{void operator--();}{Decrementation of \ccVar.}
|
||||
|
||||
\ccMethod{bool operator<(const CombinationElement & e2);}{Total order comparison.}
|
||||
|
||||
\ccMethod{bool operator==(const CombinationElement & e2);}{Equality test.}
|
||||
|
||||
\ccMethod{CombinationElement operator+(int i);}{%
|
||||
Equivalent to calling \ccc{++}\ccVar\ ~\ccc{i} times if \ccc{i} is positive.
|
||||
Equivalent to calling \ccc{--}\ccVar\ ~\ccc{(-i)} times if \ccc{i} is negative.}
|
||||
|
||||
\ccMethod{int operator-(const CombinationElement & e2);}{Compute the difference
|
||||
\ccc{d} between \ccc{e2} and \ccVar\ so that \ccc{e2+d==e}.}
|
||||
|
||||
\ccHasModels
|
||||
|
||||
Any integer type (\ccc{char}, \ccc{short}, \ccc{int}, \ccc{long}, etc.)
|
||||
|
||||
Pointers
|
||||
|
||||
Random access iterators
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccc{Combination_enumerator<CombinationElement>}
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
|
||||
\begin{ccRefClass}{Combination_enumerator<CombinationElement>}
|
||||
|
||||
\ccDefinition
|
||||
The class \ccRefName\ is used to enumerate all fixed-size combinations
|
||||
(subsets) of a \emph{source range} of elements. For example, it can
|
||||
enumerate all the combinations of 2 elements from the source range $[3,7)$
|
||||
($7$ excluded) which gives the enumeration \{3,4\}, \{3,5\}, \{3,6\}, \{4,5\},
|
||||
\{4,6\}, \{5,6\}. The source range consists of elements of type
|
||||
\ccc{CombinationElement} and is specified by its first element and the element
|
||||
just beyond its last one.
|
||||
|
||||
The template parameter should be a model of the concept \ccc{CombinationElement}.
|
||||
|
||||
Each combination is uniquely represented as an increasing sequence of elements.
|
||||
Thus, the combinations can be lexicographically ordered. They are enumerated in
|
||||
that order, so that we can talk about the first or last combination.
|
||||
|
||||
%\ccIsModel
|
||||
%\ccRefConceptPage{ConceptName}
|
||||
|
||||
\ccInclude{CGAL/Combination_enumerator.h}
|
||||
|
||||
\ccCreation
|
||||
|
||||
\ccCreationVariable{c}
|
||||
\ccConstructor{Combination_enumerator(int k, const CombinationElement & first,
|
||||
const CombinationElement & beyond);}{This constructor initializes \ccVar\ to
|
||||
enumerate the combinations of \ccc{k} elements from the source range
|
||||
\ccc{[first, beyond)}. The current combination is set to the first combination
|
||||
of the enumeration. \ccPrecond{\ccc{1 <= k <= beyond - first}}}
|
||||
|
||||
\ccConstructor{Combination_enumerator(const Combination_enumerator & combi);}%
|
||||
{The copy constructor.}
|
||||
|
||||
\ccHeading{Access to the current combination}
|
||||
|
||||
\ccMethod{const CombinationElement & operator[](int i);}{Returns the \ccc{i}-th
|
||||
element of the current combination. \ccPrecond{\ccc{0 <= i < }
|
||||
\ccVar.\ccc{number_of_elements()}}}
|
||||
|
||||
\ccHeading{Access to the enumeration}
|
||||
|
||||
\ccMethod{int number_of_elements();}{Returns the size of the enumerated
|
||||
combinations (the parameter \ccc{k} from the class' constructor).}
|
||||
|
||||
\ccMethod{const CombinationElement & min_element();}{Returns the smallest
|
||||
element of the source range. (the parameter \ccc{first} of the class'
|
||||
constructor).}
|
||||
|
||||
\ccMethod{const CombinationElement & beyond_element();}{Returns the successor
|
||||
to the largest element of the source range (the parameter \ccc{beyond} of
|
||||
the class' constructor).}
|
||||
|
||||
\ccMethod{bool finished();}{Returns \ccc{true} if and only if all combinations
|
||||
have been enumerated.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
\ccMethod{void reset();}{Resets the enumerator. The current combination is set
|
||||
to the first one of the enumeration.}
|
||||
|
||||
\ccMethod{void operator++();}{Moves \ccVar\ to the next combination.}
|
||||
|
||||
\ccMethod{Combination_enumerator operator++(int);}{Post-incrementation. Same as
|
||||
the pre-incrementation above, but returns the original value of \ccVar.}
|
||||
|
||||
%\ccSeeAlso
|
||||
|
||||
\end{ccRefClass}
|
||||
|
|
@ -20,6 +20,7 @@ to achieve random permutations for otherwise regular generators (
|
|||
\ccRefConceptPage{PointGenerator} \\
|
||||
\ccRefConceptPage{RandomConvexSetTraits_2} \\
|
||||
\ccRefConceptPage{RandomPolygonTraits_2} \\
|
||||
\ccRefConceptPage{CombinationElement} \\
|
||||
|
||||
\subsection*{Functions}
|
||||
|
||||
|
|
@ -36,6 +37,7 @@ to achieve random permutations for otherwise regular generators (
|
|||
|
||||
\subsection*{Classes}
|
||||
|
||||
\ccRefIdfierPage{CGAL::Combination_enumerator<CombinationElement>} \\
|
||||
\ccRefIdfierPage{CGAL::Random} \\
|
||||
\ccRefIdfierPage{CGAL::Points_on_segment_2<Point_2>} \\
|
||||
\ccRefIdfierPage{CGAL::Random_points_in_ball_d<Point_d>} \\
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
\input{Generator_ref/random_convex_set.tex}
|
||||
\input{Generator_ref/random_polygon.tex}
|
||||
\input{Generator_ref/random_selection.tex}
|
||||
\input{Generator_ref/Combination_enumerator.tex}
|
||||
\input{Generator_ref/CombinationElement.tex}
|
||||
\input{Generator_ref/Random.tex}
|
||||
\input{Generator_ref/RandomConvexSetTraits_2.tex}
|
||||
\input{Generator_ref/RandomPolygonTraits_2.tex}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
#include "CGAL/Combination_enumerator.h"
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
unsigned int n(0);
|
||||
const int k(3), first(10), last(15);
|
||||
cout << "Taking " << k << " distinct integers in the range [" <<
|
||||
first << ", " << last << "]:";
|
||||
|
||||
CGAL::Combination_enumerator<int> combi(k, first, last + 1);
|
||||
while( ! combi.finished() ) {
|
||||
cout << " {";
|
||||
for(int i = 0; i < k; ++i) {
|
||||
cout << combi[i];
|
||||
if( i < k - 1 )
|
||||
cout << ' ';
|
||||
}
|
||||
cout << '}';
|
||||
++n;
|
||||
++combi;
|
||||
}
|
||||
cout << endl << "Enumerated " << n << " combinations." << endl;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#include "CGAL/Combination_enumerator.h"
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
vector<string> names;
|
||||
names.push_back("Sun"); names.push_back("Shannon");
|
||||
names.push_back("Hurley"); names.push_back("Sawyer");
|
||||
names.push_back("Kate"); names.push_back("Claire");
|
||||
names.push_back("John"); names.push_back("Jack");
|
||||
CGAL::Combination_enumerator<vector<string>::iterator>
|
||||
combi(2, names.begin(), names.end());
|
||||
while( ! combi.finished() ) {
|
||||
cout << " {" << *combi[0] << ' ' << *combi[1] << '}';
|
||||
++combi;
|
||||
}
|
||||
cout << endl;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
// Copyright (c) 2012
|
||||
// Inria Nancy - Grand Est
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Samuel Hornus
|
||||
|
||||
#ifndef CGAL_COMBINATION_ENUMERATOR_H
|
||||
#define CGAL_COMBINATION_ENUMERATOR_H
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <vector>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template< typename T >
|
||||
class Combination_enumerator
|
||||
{
|
||||
// types and member data
|
||||
typedef std::vector<T> Combination;
|
||||
Combination combi_;
|
||||
const int k_;
|
||||
const T first_;
|
||||
const T beyond_;
|
||||
const T max_at_pos_0_;
|
||||
|
||||
// protected methods
|
||||
const T & element(const int i) const
|
||||
{
|
||||
CGAL_assertion( 0 <= i && i < k_ );
|
||||
return combi_[i];
|
||||
}
|
||||
|
||||
T & element(const int i)
|
||||
{
|
||||
CGAL_assertion( 0 <= i && i < k_ );
|
||||
return combi_[i];
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// For generating all the combinations of |k| distinct elements in the
|
||||
// interval [first, beyond] (both included)
|
||||
Combination_enumerator(const int k, const T & first, const T & beyond)
|
||||
: combi_(k), k_(k), first_(first), beyond_(beyond), max_at_pos_0_(beyond - k)
|
||||
{
|
||||
CGAL_assertion_msg( (1 <= k) && (k <= beyond - first), "wrong value of k");
|
||||
reset();
|
||||
}
|
||||
|
||||
Combination_enumerator(const Combination_enumerator & c)
|
||||
: combi_(c.combi_), k_(c.k_), first_(c.first_), beyond_(c.beyond_), max_at_pos_0_(c.max_at_pos_0_)
|
||||
{}
|
||||
|
||||
int number_of_elements() const
|
||||
{
|
||||
return k_;
|
||||
}
|
||||
|
||||
const T & min_element() const
|
||||
{
|
||||
return first_;
|
||||
}
|
||||
|
||||
const T & beyond_element() const
|
||||
{
|
||||
return beyond_;
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
T elem(min_element());
|
||||
for( int i = 0; i < number_of_elements(); ++i )
|
||||
{
|
||||
element(i) = elem;
|
||||
++elem;
|
||||
}
|
||||
}
|
||||
|
||||
bool finished() const
|
||||
{
|
||||
return max_at_pos_0_ < element(0);
|
||||
}
|
||||
|
||||
const T & operator[](const int i) const
|
||||
{
|
||||
return element(i);
|
||||
}
|
||||
|
||||
void operator++()
|
||||
{
|
||||
int i(k_ - 1);
|
||||
T max_at_pos_i(beyond_-1);
|
||||
while( ( i >= 0 ) && ( ! (element(i) < max_at_pos_i) ) )
|
||||
{
|
||||
--i;
|
||||
--max_at_pos_i;
|
||||
}
|
||||
if( -1 == i )
|
||||
{
|
||||
if( element(0) == max_at_pos_0_ )
|
||||
++element(0); // mark then end of the enumeration with an impossible value.
|
||||
// Note than when we have arrived at the end of the enumeration, applying
|
||||
// operator++() again does not change anything, so it is safe to
|
||||
// apply it too many times.
|
||||
}
|
||||
else
|
||||
{
|
||||
++element(i);
|
||||
for( int j = i + 1; j < k_; ++j )
|
||||
element(j) = element(i) + (j - i);
|
||||
}
|
||||
}
|
||||
|
||||
Combination_enumerator operator++(int)
|
||||
{
|
||||
Combination_enumerator tmp(*this);
|
||||
++(*this);
|
||||
return tmp;
|
||||
}
|
||||
};
|
||||
|
||||
} // end of namespace CGAL
|
||||
|
||||
#endif // CGAL_COMBINATION_ENUMERATOR_H
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
#include "CGAL/Combination_enumerator.h"
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
|
||||
using namespace std;
|
||||
|
||||
long fac(long from, long to)
|
||||
{
|
||||
long result(1);
|
||||
while( from <= to )
|
||||
{
|
||||
result *= from;
|
||||
++from;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
void test(const int K, const T & first, const T & beyond)
|
||||
{
|
||||
long n(0);
|
||||
|
||||
CGAL::Combination_enumerator<T> combi(K, first, beyond);
|
||||
CGAL_assertion( first == combi.min_element() );
|
||||
CGAL_assertion( beyond == combi.beyond_element() );
|
||||
CGAL_assertion( K == combi.number_of_elements() );
|
||||
while( ! combi.finished() )
|
||||
{
|
||||
++n;
|
||||
++combi;
|
||||
}
|
||||
long nelem = beyond - first;
|
||||
long num = fac(nelem - K + 1, nelem) / fac(2, K);
|
||||
cout << endl << "Enumerated " << n << " combinations. Should be " << num;
|
||||
CGAL_assertion(n == num);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
srand(time(NULL));
|
||||
test(3, 10, 21); // triples in [10,20]
|
||||
test(1, -10, 21); // singletons in [-10,20]
|
||||
test(4, 3, 7); // the unique set {3,4,5,6}
|
||||
char name[] = {'s', 'a', 'm', 'u', 'e', 'l', 0};
|
||||
test(2, name+0, name+6);
|
||||
vector<int> l;
|
||||
for( int i = 0; i < 10; ++i )
|
||||
l.push_back(rand());
|
||||
test(3, l.begin(), l.end());
|
||||
cout << endl;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
|
||||
|
||||
\ccAnchor{http://qt.nokia.com/}{Qt} is a {\sc Gui} toolkit for
|
||||
\ccAnchor{http://qt.digia.com/}{Qt} is a {\sc Gui} toolkit for
|
||||
cross-platform application development.
|
||||
|
||||
% +-----------------------------------------------------+
|
||||
\section{Introduction}
|
||||
|
||||
This chapter describes classes that help to visualize two dimensional \cgal\ objects
|
||||
with the \ccAnchor{http://doc.qt.nokia.com/latest/graphicsview.html}{Qt Graphics View Framework}.
|
||||
with the \ccAnchor{http://doc.qt.digia.com/latest/graphicsview.html}{Qt Graphics View Framework}.
|
||||
|
||||
This framework uses the model view paradigm. \ccAnchor{http://doc.qt.nokia.com/latest/qgraphicsitem.html}{\ccc{QGraphicsItem}}s are stored in a
|
||||
\ccAnchor{http://doc.qt.nokia.com/latest/qgraphicsscene.html}{\ccc{QGraphicsScene}}
|
||||
and are displayed in a \ccAnchor{http://doc.qt.nokia.com/latest/qgraphicsview.html}{\ccc{QGraphicsView}}. The items
|
||||
This framework uses the model view paradigm. \ccAnchor{http://doc.qt.digia.com/latest/qgraphicsitem.html}{\ccc{QGraphicsItem}}s are stored in a
|
||||
\ccAnchor{http://doc.qt.digia.com/latest/qgraphicsscene.html}{\ccc{QGraphicsScene}}
|
||||
and are displayed in a \ccAnchor{http://doc.qt.digia.com/latest/qgraphicsview.html}{\ccc{QGraphicsView}}. The items
|
||||
have a paint method which is called when an item is in the visible area of a view.
|
||||
The framework is also responsible for dispatching events from the view
|
||||
via the scene to the items. The framework is extensible in the sense
|
||||
|
|
@ -46,14 +46,14 @@ brings them together we adopted the following, hybrid naming conventions.
|
|||
\section{Overall Design}
|
||||
|
||||
In Figure~\ref{graphicsview:uml} you see four classes depicted in grey,
|
||||
that come from the Qt Graphics View Framework. The \ccAnchor{http://doc.qt.nokia.com/latest/qgraphicsscene.html}{\ccc{QGraphicsScene}}
|
||||
contains \ccAnchor{http://doc.qt.nokia.com/latest/qgraphicsitem.html}{\ccc{QGraphicsItem}}s, which get displayed in any number
|
||||
of \ccAnchor{http://doc.qt.nokia.com/latest/qgraphicsview.html}{\ccc{QGraphicsView}}s. The views are widgets, that is they take screen space
|
||||
that come from the Qt Graphics View Framework. The \ccAnchor{http://doc.qt.digia.com/latest/qgraphicsscene.html}{\ccc{QGraphicsScene}}
|
||||
contains \ccAnchor{http://doc.qt.digia.com/latest/qgraphicsitem.html}{\ccc{QGraphicsItem}}s, which get displayed in any number
|
||||
of \ccAnchor{http://doc.qt.digia.com/latest/qgraphicsview.html}{\ccc{QGraphicsView}}s. The views are widgets, that is they take screen space
|
||||
in an application.
|
||||
|
||||
The fourth class is the \ccAnchor{http://doc.qt.nokia.com/latest/qobject.html}{\ccc{QObject}}. It plays an important role in Qt for
|
||||
event handling and memory management. First, it allows to add \ccAnchor{http://doc.qt.nokia.com/latest/signalsandslots.html}{signals and
|
||||
slots}, and to connect them. Second, it allows to install \ccAnchor{http://doc.qt.nokia.com/latest/eventsandfilters.html}{event filters}.
|
||||
The fourth class is the \ccAnchor{http://doc.qt.digia.com/latest/qobject.html}{\ccc{QObject}}. It plays an important role in Qt for
|
||||
event handling and memory management. First, it allows to add \ccAnchor{http://doc.qt.digia.com/latest/signalsandslots.html}{signals and
|
||||
slots}, and to connect them. Second, it allows to install \ccAnchor{http://doc.qt.digia.com/latest/eventsandfilters.html}{event filters}.
|
||||
|
||||
|
||||
\begin{figure}[t]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
\begin{ccPkgDescription}{CGAL and the Qt Graphics View Framework \label{Pkg:GraphicsView}}
|
||||
\ccPkgHowToCiteCgal{cgal:fr-cqgvf-12}
|
||||
\ccPkgSummary{This package provides classes for displaying \cgal\ objects
|
||||
and data structures in the \ccAnchor{http://doc.qt.nokia.com/latest/graphicsview.html}{Qt 4 Graphics View Framework}.}
|
||||
and data structures in the \ccAnchor{http://doc.qt.digia.com/latest/graphicsview.html}{Qt 4 Graphics View Framework}.}
|
||||
%
|
||||
\ccPkgDependsOn{Qt 4}
|
||||
\ccPkgIntroducedInCGAL{3.4}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
|
||||
This package provides some classes which allow to use \cgal\ classes in
|
||||
\qt\ applications which make use of the \ccAnchor{http://doc.qt.nokia.com/latest/graphicsview.html}{Qt Graphics View Framework}.
|
||||
\qt\ applications which make use of the \ccAnchor{http://doc.qt.digia.com/latest/graphicsview.html}{Qt Graphics View Framework}.
|
||||
|
||||
|
||||
\section{Classified Reference Pages}
|
||||
|
|
|
|||
|
|
@ -91,8 +91,10 @@ DemosMainWindow::dragEnterEvent(QDragEnterEvent *event)
|
|||
void
|
||||
DemosMainWindow::dropEvent(QDropEvent *event)
|
||||
{
|
||||
QString filename = event->mimeData()->urls().at(0).toLocalFile();
|
||||
Q_FOREACH(QUrl url, event->mimeData()->urls()) {
|
||||
QString filename = url.toLocalFile();
|
||||
this->open(filename);
|
||||
}
|
||||
event->acceptProposedAction();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include <CGAL/Handle_for_virtual.h>
|
||||
#include <CGAL/rational_rotation.h>
|
||||
#include <CGAL/Origin.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
#include <CGAL/Handle_for_virtual.h>
|
||||
#include <CGAL/determinant.h>
|
||||
#include <CGAL/aff_transformation_tags.h>
|
||||
#include <ostream>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
#include <CGAL/array.h>
|
||||
#include <CGAL/Handle_for.h>
|
||||
#include <CGAL/kernel_config.h>
|
||||
#include <CGAL/number_type_basic.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -25,9 +25,10 @@
|
|||
#ifndef CGAL_HOMOGENEOUS_DIRECTION_3_H
|
||||
#define CGAL_HOMOGENEOUS_DIRECTION_3_H
|
||||
|
||||
#include <CGAL/kernel_config.h>
|
||||
#include <CGAL/array.h>
|
||||
#include <CGAL/Handle_for.h>
|
||||
|
||||
#include <CGAL/number_utils.h>
|
||||
namespace CGAL {
|
||||
|
||||
template < class R_ >
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
#define CGAL_ISO_CUBOIDH3_H
|
||||
|
||||
#include <CGAL/array.h>
|
||||
#include <CGAL/enum.h>
|
||||
#include <CGAL/kernel_config.h>
|
||||
#include <CGAL/kernel_assertions.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#ifndef CGAL_LINEH2_H
|
||||
#define CGAL_LINEH2_H
|
||||
|
||||
#include <CGAL/kernel_config.h>
|
||||
#include <CGAL/array.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
#define CGAL_RAYH3_H
|
||||
|
||||
#include <utility>
|
||||
#include <CGAL/kernel_config.h>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/Origin.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <CGAL/Interval_nt.h>
|
||||
#include <CGAL/Homogeneous/predicates_on_pointsH3.h>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <CGAL/Kernel/global_functions_3.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@
|
|||
#ifndef CGAL_BASIC_CONSTRUCTIONSH3_H
|
||||
#define CGAL_BASIC_CONSTRUCTIONSH3_H
|
||||
|
||||
#include <CGAL/Cartesian/Point_3.h>
|
||||
#include <CGAL/Cartesian/Plane_3.h>
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template <class R>
|
||||
|
|
|
|||
|
|
@ -153,21 +153,15 @@ if ( CGAL_BRANCH_BUILD )
|
|||
set(CGAL_CREATED_VERSION_NR "1${CGAL_TMP_MAJOR}${CGAL_TMP_MINOR}${CGAL_BUGFIX_VERSION}${CGAL_TMP_BUILD}")
|
||||
message(STATUS "CGAL_VERSION_NR is ${CGAL_CREATED_VERSION_NR}")
|
||||
|
||||
if ( ${CGAL_SCM_NAME} STREQUAL "svn" )
|
||||
|
||||
# The function Subversion_GET_REVISION is defined in ../CMakeLists.txt
|
||||
Subversion_GET_REVISION("${CMAKE_SOURCE_DIR}" CGAL_TMP_REVISION)
|
||||
set(CGAL_CREATED_SVN_REVISION "${CGAL_TMP_REVISION}")
|
||||
message(STATUS "CGAL_SVN_REVISION is ${CGAL_TMP_REVISION}")
|
||||
|
||||
endif()
|
||||
|
||||
if ( ${CGAL_SCM_NAME} STREQUAL "git" )
|
||||
|
||||
### TODO EBEB GIT_NR?
|
||||
set(CGAL_GIT_HASH "n/a")
|
||||
set(CGAL_CREATED_SVN_REVISION "99999")
|
||||
|
||||
message(STATUS "CGAL_GIT_HASH is ${CGAL_GIT_HASH}")
|
||||
message(STATUS "CGAL_CREATED_SVN_REVISION is ${CGAL_CREATED_SVN_REVISION} (dummy)")
|
||||
|
||||
endif()
|
||||
|
||||
file(REMOVE ${CMAKE_BINARY_DIR}/include/CGAL/version.h)
|
||||
|
|
@ -948,3 +942,65 @@ if( WITH_CPACK AND EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake" )
|
|||
|
||||
endif()
|
||||
|
||||
|
||||
if ( CGAL_BRANCH_BUILD )
|
||||
option(CGAL_ENABLE_CHECK_HEADERS
|
||||
"Enable the special targets \"check_pkg_headers\", and \"check_pkg_<package>_headers\" for each package"
|
||||
FALSE)
|
||||
|
||||
if(CGAL_ENABLE_CHECK_HEADERS)
|
||||
|
||||
if(NOT DEFINED CGAL_CHECK_SYNTAX_ONLY)
|
||||
execute_process(COMMAND
|
||||
${CMAKE_CXX_COMPILER} -x c++ -fsyntax-only ${CMAKE_CURRENT_SOURCE_DIR}/config/support/test_syntaxonly.cpp
|
||||
ERROR_QUIET
|
||||
RESULT_VARIABLE ok)
|
||||
if(ok EQUAL 0)
|
||||
set(CGAL_CHECK_SYNTAX_ONLY ON CACHE INTERNAL "")
|
||||
else()
|
||||
set(CGAL_CHECK_SYNTAX_ONLY OFF CACHE INTERNAL "")
|
||||
endif()
|
||||
endif(NOT DEFINED CGAL_CHECK_SYNTAX_ONLY)
|
||||
|
||||
if(NOT CGAL_CHECK_SYNTAX_ONLY)
|
||||
message(FATAL_ERROR "Your compiler does not seem to support -fsyntax-only.
|
||||
You must disable CGAL_ENABLE_CHECK_HEADERS.")
|
||||
endif()
|
||||
|
||||
## Fill the variable include_options with all the -I and -isystem options
|
||||
set(include_options)
|
||||
foreach (incdir ${CGAL_INCLUDE_DIRS})
|
||||
list(APPEND include_options "-I${incdir}")
|
||||
endforeach()
|
||||
foreach (incdir ${CGAL_3RD_PARTY_INCLUDE_DIRS})
|
||||
list(APPEND include_options "-isystem${incdir}")
|
||||
endforeach()
|
||||
include_directories ( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} )
|
||||
|
||||
## Loop on package and headers
|
||||
set(check_pkg_target_list)
|
||||
foreach (package ${CGAL_CONFIGURED_PACKAGES_NAMES})
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include)
|
||||
set(depends "")
|
||||
file(GLOB ${package}_HEADERS
|
||||
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/CGAL/*.h")
|
||||
foreach(header ${${package}_HEADERS})
|
||||
string(REPLACE "/" "__" header2 "${header}")
|
||||
string(REPLACE "." "_" header2 "${header2}")
|
||||
add_custom_command(OUTPUT check_${header2}
|
||||
COMMAND ${CMAKE_CXX_COMPILER} ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_DEFINITIONS} ${include_options} -x c++ -fsyntax-only "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}"
|
||||
COMMAND ${CMAKE_COMMAND} -E touch check_${header2}
|
||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}"
|
||||
VERBATIM
|
||||
COMMENT "Check header ${header}"
|
||||
)
|
||||
list(APPEND depends check_${header2})
|
||||
endforeach() # look on headers
|
||||
add_custom_target(check_pkg_${package}_headers DEPENDS ${depends})
|
||||
list(APPEND check_pkg_target_list check_pkg_${package}_headers)
|
||||
endif() # if the package has an include directory
|
||||
endforeach() # loop on packages
|
||||
add_custom_target(check_headers DEPENDS ${check_pkg_target_list})
|
||||
endif()
|
||||
endif( CGAL_BRANCH_BUILD )
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.TH CGAL_CREATE_CMAKE_SCRIPT "1" "March 2012" "CGAL 4.0" "User Commands"
|
||||
.TH CGAL_CREATE_CMAKE_SCRIPT "1" "October 2012" "CGAL 4.1" "User Commands"
|
||||
.SH NAME
|
||||
cgal_create_cmake_script \- create a cmake script for applications using CGAL
|
||||
.SH SYNOPSIS
|
||||
|
|
@ -35,7 +35,7 @@ Create a cmake script that is suited for the testsuite used by the CGAL develope
|
|||
.SH AUTHOR
|
||||
The CGAL project (http://www.cgal.org/).
|
||||
.SH "REPORTING BUGS"
|
||||
Report bugs to <cgal-discuss@lists-sop.inria.fr> (see http://www.cgal.org/
|
||||
Report bugs to <cgal-discuss@inria.fr> (see http://www.cgal.org/
|
||||
for further instructions).
|
||||
.SH "SEE ALSO"
|
||||
The full documentation for CGAL is available at http://www.cgal.org/ in PDF and
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ Number of lines of code of CGAL<br>
|
|||
(using <a href="http://www.dwheeler.com/sloccount/">
|
||||
David A. Wheeler's 'SLOCCount'</a>, restricted to the <code>include/CGAL/</code> and <code>src/</code> directories).
|
||||
</caption>
|
||||
<tr><td><img src="images/release_history_sloccount_from_pdf.png" alt="Releases size graph">
|
||||
<tr><td><img src="images/release_history_sloccount.png" alt="Releases size graph">
|
||||
</table>
|
||||
<td width="10%">
|
||||
</table>
|
||||
|
|
@ -112,6 +112,12 @@ David A. Wheeler's 'SLOCCount'</a>, restricted to the <code>include/CGAL/</code>
|
|||
<li> Update requirements of the concepts <code>AABBTraits</code> and <code>AABBGeomTraits</code> to match the implementation of the package.
|
||||
</ul>
|
||||
|
||||
<h3>Generator</h3>
|
||||
<ul>
|
||||
<li> Addition of the <code>Combination_enumerator</code>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2 id="release4.1">Release 4.1 </h2>
|
||||
<div>
|
||||
<p> Release date: </p>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ set(CGAL_CORE_PACKAGE_DIR "@CGAL_CORE_PACKAGE_DIR@")
|
|||
set(CGAL_MAJOR_VERSION "@CGAL_MAJOR_VERSION@" )
|
||||
set(CGAL_MINOR_VERSION "@CGAL_MINOR_VERSION@" )
|
||||
set(CGAL_BUILD_VERSION "@CGAL_BUILD_VERSION@" )
|
||||
set(CGAL_SCM_BRANCH_NAME "@CGAL_SCM_BRANCH_NAME@")
|
||||
set(CGAL_GIT_SHA1 "@CGAL_GIT_SHA1@")
|
||||
|
||||
set(CGAL_BUILD_SHARED_LIBS "@CGAL_BUILD_SHARED_LIBS@" )
|
||||
set(CGAL_Boost_USE_STATIC_LIBS "@CGAL_Boost_USE_STATIC_LIBS@" )
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ set(CGAL_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
|
|||
set(CGAL_MAJOR_VERSION "@CGAL_MAJOR_VERSION@" )
|
||||
set(CGAL_MINOR_VERSION "@CGAL_MINOR_VERSION@" )
|
||||
set(CGAL_BUILD_VERSION "@CGAL_BUILD_VERSION@" )
|
||||
set(CGAL_SCM_BRANCH_NAME "@CGAL_SCM_BRANCH_NAME@")
|
||||
set(CGAL_GIT_SHA1 "@CGAL_GIT_SHA1@")
|
||||
|
||||
set(CGAL_BUILD_SHARED_LIBS "@CGAL_BUILD_SHARED_LIBS@" )
|
||||
set(CGAL_Boost_USE_STATIC_LIBS "@CGAL_Boost_USE_STATIC_LIBS@" )
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
|||
"${CGAL_INSTALLATION_PACKAGE_DIR}/config/support/print_${LIB}_version.cpp"
|
||||
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${${PKG}_INCLUDE_DIR};${${PKG}_DEPENDENCY_INCLUDE_DIR}"
|
||||
"-DLINK_LIBRARIES:STRING=${${PKG}_LIBRARIES};${${PKG}_DEPENDENCY_LIBRARIES}"
|
||||
"-DLINK_DIRECTORIES:STRING=${${PKG}_LIBRARY_DIR};${${PKG}_DEPENDENCY_LIBRARY_DIR}"
|
||||
"-DLINK_DIRECTORIES:STRING=${${PKG}_LIBRARIES_DIR};${${PKG}_DEPENDENCY_LIBRARIES_DIR}"
|
||||
OUTPUT_VARIABLE ${LIB}_OUTPUT
|
||||
)
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
|||
message( STATUS "WARNING: ${LIB} found but print_${LIB}_version.cpp exited with error condition: ${${LIB}_RUN_RES}" )
|
||||
message( STATUS "${PKG}_INCLUDE_DIR=${${PKG}_INCLUDE_DIR}" )
|
||||
message( STATUS "${PKG}_LIBRARIES=${${PKG}_LIBRARIES}" )
|
||||
message( STATUS "${PKG}_LIBRARY_DIR=${${PKG}_LIBRARY_DIR}" )
|
||||
message( STATUS "${PKG}_LIBRARIES_DIR=${${PKG}_LIBRARIES_DIR}" )
|
||||
message( STATUS "${${LIB}_OUTPUT}" )
|
||||
|
||||
endif()
|
||||
|
|
@ -193,7 +193,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
|||
message( STATUS "WARNING: ${LIB} found but could not compile print_${LIB}_version.cpp:")
|
||||
message( STATUS "${PKG}_INCLUDE_DIR=${${PKG}_INCLUDE_DIR}" )
|
||||
message( STATUS "${PKG}_LIBRARIES=${${PKG}_LIBRARIES}" )
|
||||
message( STATUS "${PKG}_LIBRARY_DIR=${${PKG}_LIBRARY_DIR}" )
|
||||
message( STATUS "${PKG}_LIBRARIES_DIR=${${PKG}_LIBRARIES_DIR}" )
|
||||
message( STATUS "${${LIB}_OUTPUT}" )
|
||||
|
||||
endif()
|
||||
|
|
@ -314,6 +314,10 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
|||
endif()
|
||||
|
||||
else()
|
||||
|
||||
list( FIND CGAL_CONFIGURED_LIBRARIES "CGAL_${component}" POSITION )
|
||||
if ( "${POSITION}" EQUAL "-1" ) # if component is not a CGAL_<lib>
|
||||
|
||||
if (NOT DEFINED CGAL_EXT_LIB_${component}_PREFIX)
|
||||
set(CGAL_EXT_LIB_${component}_PREFIX ${component})
|
||||
endif()
|
||||
|
|
@ -336,6 +340,13 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
|||
endif()
|
||||
|
||||
endif()
|
||||
else()
|
||||
|
||||
if (NOT WITH_CGAL_${component})
|
||||
message(STATUS "NOTICE: The CGAL_${component} library seems to be required but is not build. Thus, it is expected that some executables will not be compiled.")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
# Common settings for CGAL cmake scripts
|
||||
if( NOT CGAL_SCM_FILE_INCLUDED )
|
||||
set(CGAL_SCM_FILE_INCLUDED 1 )
|
||||
|
||||
#message ("-----CSD: ${CMAKE_SOURCE_DIR}")
|
||||
|
||||
set(GIT_PARENT_DIR "${CMAKE_SOURCE_DIR}")
|
||||
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
|
||||
#message ("-----GD: ${GIT_DIR}")
|
||||
if (EXISTS "${GIT_DIR}")
|
||||
set( CGAL_SCM_NAME "git" )
|
||||
else()
|
||||
while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories
|
||||
set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}")
|
||||
get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH)
|
||||
#message ("-----GPD1: ${GIT_PARENT_DIR}")
|
||||
#message ("-----PPD1: ${GIT_PREVIOUS_PARENT}")
|
||||
if( "${GIT_PARENT_DIR}" STREQUAL "${GIT_PREVIOUS_PARENT}" )
|
||||
# We have reached the root directory, we are not in git
|
||||
set(_refspecvar "GITDIR-NOTFOUND")
|
||||
set(_hashvar "GITDIR-NOTFOUND")
|
||||
set ( CGAL_SCM_NAME "" )
|
||||
break()
|
||||
else()
|
||||
set( GIT_DIR "${GIT_PARENT_DIR}/.git" )
|
||||
set( CGAL_SCM_NAME "git" )
|
||||
endif()
|
||||
endwhile()
|
||||
endif()
|
||||
|
||||
#message ("====GPD1: ${GIT_PARENT_DIR}")
|
||||
|
||||
if ( "${CGAL_SCM_NAME}" STREQUAL "git" )
|
||||
#message ("====GPD2: ${GIT_PARENT_DIR}")
|
||||
|
||||
find_program(GIT_EXECUTABLE git DOC "git command line client")
|
||||
EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} --git-dir=${GIT_PARENT_DIR}/.git symbolic-ref HEAD
|
||||
OUTPUT_VARIABLE CGAL_GIT_BRANCH_OUT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
string ( REGEX REPLACE "refs/heads/" "" CGAL_GIT_BRANCH ${CGAL_GIT_BRANCH_OUT})
|
||||
# message( STATUS "Git branch ${CGAL_GIT_BRANCH}")
|
||||
|
||||
set ( CGAL_SCM_BRANCH_NAME "${CGAL_GIT_BRANCH}" )
|
||||
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
|
@ -22,10 +22,21 @@ if ( LEDA_FOUND AND NOT LEDA_SETUP )
|
|||
link_libraries( ${LEDA_LIBRARIES} )
|
||||
endif()
|
||||
|
||||
if (LEDA_CGAL_FRIEND_INJECTION)
|
||||
message( STATUS "${LEDA_CGAL_FRIEND_INJECTION}" )
|
||||
endif()
|
||||
if (LEDA_CGAL_NO_STRICT_ALIASING)
|
||||
message( STATUS "${LEDA_CGAL_NO_STRICT_ALIASING}" )
|
||||
endif()
|
||||
if (LEDA_CGAL_LINK_X11)
|
||||
message( STATUS "${LEDA_CGAL_LINK_X11}" )
|
||||
endif()
|
||||
|
||||
uniquely_add_flags( CMAKE_CXX_FLAGS ${LEDA_CXX_FLAGS} )
|
||||
uniquely_add_flags( CMAKE_SHARED_LINKER_FLAGS ${LEDA_LINKER_FLAGS} )
|
||||
uniquely_add_flags( CMAKE_MODULE_LINKER_FLAGS ${LEDA_LINKER_FLAGS} )
|
||||
|
||||
# Setup is done
|
||||
set ( LEDA_SETUP TRUE )
|
||||
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -12,9 +12,11 @@ else()
|
|||
|
||||
find_path(ESBTL_INCLUDE_DIR
|
||||
NAMES ESBTL/default.h
|
||||
PATHS ENV ESBTL_INC_DIR
|
||||
HINTS ENV ESBTL_INC_DIR
|
||||
ENV ESBTL_DIR
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
PATH_SUFFIXES include
|
||||
DOC "The directory containing the ESBTL header files WITHOUT the ESBTL prefix"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -72,11 +72,10 @@ if (EIGEN3_INCLUDE_DIR)
|
|||
else (EIGEN3_INCLUDE_DIR)
|
||||
|
||||
find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
|
||||
HINTS
|
||||
$ENV{EIGEN3_INC_DIR}
|
||||
PATHS
|
||||
${KDE4_INCLUDE_DIR}
|
||||
PATH_SUFFIXES eigen3 eigen
|
||||
HINTS ENV EIGEN3_INC_DIR
|
||||
ENV EIGEN3_DIR
|
||||
PATHS ${KDE4_INCLUDE_DIR}
|
||||
PATH_SUFFIXES include eigen3 eigen
|
||||
)
|
||||
|
||||
if(EIGEN3_INCLUDE_DIR)
|
||||
|
|
|
|||
|
|
@ -29,8 +29,10 @@ else()
|
|||
|
||||
find_path(GMP_INCLUDE_DIR
|
||||
NAMES gmp.h
|
||||
PATHS ENV GMP_INC_DIR
|
||||
HINTS ENV GMP_INC_DIR
|
||||
ENV GMP_DIR
|
||||
${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/include
|
||||
PATH_SUFFIXES include
|
||||
DOC "The directory containing the GMP header files"
|
||||
)
|
||||
|
||||
|
|
@ -39,8 +41,10 @@ else()
|
|||
endif()
|
||||
|
||||
find_library(GMP_LIBRARIES NAMES gmp libgmp-10
|
||||
PATHS ENV GMP_LIB_DIR
|
||||
HINTS ENV GMP_LIB_DIR
|
||||
ENV GMP_DIR
|
||||
${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/lib
|
||||
PATH_SUFFIXES lib
|
||||
DOC "Path to the GMP library"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -18,12 +18,18 @@ if(WITH_GMP AND GMP_FOUND)
|
|||
endif()
|
||||
|
||||
find_path(GMPXX_INCLUDE_DIR NAMES gmpxx.h
|
||||
PATHS ${GMP_INCLUDE_DIR_SEARCH}
|
||||
HINTS ENV GMPXX_INC_DIR
|
||||
ENV GMPXX_DIR
|
||||
${GMP_INCLUDE_DIR_SEARCH}
|
||||
PATH_SUFFIXES include
|
||||
DOC "The directory containing the GMPXX include files"
|
||||
)
|
||||
|
||||
find_library(GMPXX_LIBRARIES NAMES gmpxx
|
||||
PATHS ${GMP_LIBRARIES_DIR_SEARCH}
|
||||
HINTS ENV GMPXX_LIB_DIR
|
||||
ENV GMPXX_DIR
|
||||
${GMP_LIBRARIES_DIR_SEARCH}
|
||||
PATH_SUFFIXES lib
|
||||
DOC "Path to the GMPXX library"
|
||||
)
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue