diff --git a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h index d6cbb4ade8b..6b90635b5e9 100644 --- a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h +++ b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h @@ -18,8 +18,8 @@ // // Author(s) : Kaspar Fischer -#include -#include + +#include #include @@ -150,34 +150,32 @@ namespace CGAL { { CGAL_APPEL_ASSERT(d==2); - typedef Simple_cartesian K; - typedef Vector_2 Vector_2; - // write matrix M' as [ a, b; b, c ]: - const double matrix[3] = { E->matrix(0, 0), // a - E->matrix(0, 1), // b - E->matrix(1, 1) }; // c - - std::pair eigenvectors; // Note: not neces. normalized. - std::pair eigenvalues; // Note: sorted descendent. - internal::eigen_symmetric_2(matrix, eigenvectors, eigenvalues); + const CGAL::cpp11::array matrix = {{ E->matrix(0, 0), // a + E->matrix(0, 1), // b + E->matrix(1, 1) }}; // c + CGAL::cpp11::array eigenvectors; // Note: not neces. normalized. + CGAL::cpp11::array eigenvalues; // Note: sorted ascendent. + + CGAL::Default_diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (matrix, eigenvalues, eigenvectors); // normalize eigenvectors: - double l1=1.0/std::sqrt(eigenvectors.first.x()*eigenvectors.first.x()+ - eigenvectors.first.y()*eigenvectors.first.y()); - double l2=1.0/std::sqrt(eigenvectors.second.x()*eigenvectors.second.x()+ - eigenvectors.second.y()*eigenvectors.second.y()); + double l1=1.0/std::sqrt(eigenvectors[2]*eigenvectors[2]+ + eigenvectors[3]*eigenvectors[3]); + double l2=1.0/std::sqrt(eigenvectors[0]*eigenvectors[0]+ + eigenvectors[1]*eigenvectors[1]); // store axes lengths: - lengths_.push_back(std::sqrt(factor/eigenvalues.first)); - lengths_.push_back(std::sqrt(factor/eigenvalues.second)); + lengths_.push_back(std::sqrt(factor/eigenvalues[1])); + lengths_.push_back(std::sqrt(factor/eigenvalues[0])); // store directions: directions_.resize(2); - directions_[0].push_back(eigenvectors.first.x()*l1); - directions_[0].push_back(eigenvectors.first.y()*l1); - directions_[1].push_back(eigenvectors.second.x()*l2); - directions_[1].push_back(eigenvectors.second.y()*l2); + directions_[0].push_back(eigenvectors[2]*l1); + directions_[0].push_back(eigenvectors[3]*l1); + directions_[1].push_back(eigenvectors[0]*l2); + directions_[1].push_back(eigenvectors[1]*l2); } template @@ -192,16 +190,18 @@ namespace CGAL { // M' = [ b d e ] // [ c e f ] // - const double matrix[6] = { E->matrix(0, 0), // a - E->matrix(0, 1), // b - E->matrix(1, 1), // d - E->matrix(0, 2), // c - E->matrix(1, 2), // e - E->matrix(2, 2) }; // f + const CGAL::cpp11::array matrix = {{ E->matrix(0, 0), // a + E->matrix(0, 1), // b + E->matrix(0, 2), // c + E->matrix(1, 1), // d + E->matrix(1, 2), // e + E->matrix(2, 2) }}; // f - double eigenvectors[3 * 3]; // Note: not necessarily normalized. - double eigenvalues[3]; // Note: sorted descendent. - internal::eigen_symmetric(matrix, 3, eigenvectors, eigenvalues); + CGAL::cpp11::array eigenvectors; // Note: not necessarily normalized. + CGAL::cpp11::array eigenvalues; // Note: sorted ascendent. + + CGAL::Default_diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (matrix, eigenvalues, eigenvectors); // normalize eigenvectors: double l1 = 1.0/std::sqrt(eigenvectors[0] * eigenvectors[0]+ // x^2 @@ -220,15 +220,15 @@ namespace CGAL { // store directions: directions_.resize(3); - directions_[0].push_back(eigenvectors[0]*l1); - directions_[0].push_back(eigenvectors[1]*l1); - directions_[0].push_back(eigenvectors[2]*l1); + directions_[0].push_back(eigenvectors[6]*l3); + directions_[0].push_back(eigenvectors[7]*l3); + directions_[0].push_back(eigenvectors[8]*l3); directions_[1].push_back(eigenvectors[3]*l2); directions_[1].push_back(eigenvectors[4]*l2); directions_[1].push_back(eigenvectors[5]*l2); - directions_[2].push_back(eigenvectors[6]*l3); - directions_[2].push_back(eigenvectors[7]*l3); - directions_[2].push_back(eigenvectors[8]*l3); + directions_[2].push_back(eigenvectors[0]*l1); + directions_[2].push_back(eigenvectors[1]*l1); + directions_[2].push_back(eigenvectors[2]*l1); } template diff --git a/Documentation/doc/Documentation/Doxyfile.in b/Documentation/doc/Documentation/Doxyfile.in index d0fab13cedd..f85f12b0dde 100644 --- a/Documentation/doc/Documentation/Doxyfile.in +++ b/Documentation/doc/Documentation/Doxyfile.in @@ -91,6 +91,7 @@ IMAGE_PATH = ${CMAKE_SOURCE_DIR}/Documentation/doc/Documentation/fig \ ${CMAKE_SOURCE_DIR}/STL_Extension/doc/STL_Extension/fig \ ${CMAKE_SOURCE_DIR}/Skin_surface_3/doc/Skin_surface_3/fig \ ${CMAKE_SOURCE_DIR}/Snap_rounding_2/doc/Snap_rounding_2/fig \ + ${CMAKE_SOURCE_DIR}/Solver_interface/doc/Solver_interface/fig \ ${CMAKE_SOURCE_DIR}/Arrangement_on_surface_2/doc/Sweep_line_2/fig \ ${CMAKE_SOURCE_DIR}/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig \ ${CMAKE_SOURCE_DIR}/Boolean_set_operations_2/doc/Boolean_set_operations_2/fig \ diff --git a/Documentation/doc/Documentation/Installation.txt b/Documentation/doc/Documentation/Installation.txt index f97e1a58731..3a5b6c1c980 100644 --- a/Documentation/doc/Documentation/Installation.txt +++ b/Documentation/doc/Documentation/Installation.txt @@ -509,6 +509,15 @@ and the \ref PkgRidges_3 packages. The \sc{Eigen} web site is `http://eigen.tuxfamily.org`. +\subsection thirdpartyLapack Lapack + +\sc{Lapack} is a `Fortran` library for linear algebra. + +In \cgal, \sc{Lapack} is an alternative to \sc{Eigen} for singular value decomposition for the \ref +PkgJet_fitting_3 and the \ref PkgRidges_3 packages. + +The \sc{Lapack} web site is `http://www.netlib.org/lapack/`. + \subsection thirdpartylibQGLViewer libQGLViewer libQGLViewer is a 3D widget based on \sc{Qt} 4's `QGLWidget`. In case of \sc{Qt}5 used, libQGLViewer needs to be recompiled with the proper \sc{Qt}5 version. diff --git a/Documentation/doc/Documentation/dependencies b/Documentation/doc/Documentation/dependencies index 279d79c3d12..4f09bcad7ac 100644 --- a/Documentation/doc/Documentation/dependencies +++ b/Documentation/doc/Documentation/dependencies @@ -23,6 +23,7 @@ Geomview GraphicsView HalfedgeDS BGL +Solver_interface Combinatorial_map Linear_cell_complex Interval_skip_list diff --git a/Documentation/doc/Documentation/packages.txt b/Documentation/doc/Documentation/packages.txt index 96a7f4eb2aa..d83ff21f1db 100644 --- a/Documentation/doc/Documentation/packages.txt +++ b/Documentation/doc/Documentation/packages.txt @@ -147,6 +147,7 @@ h1 { \package_listing{STL_Extension} \package_listing{BGL} +\package_listing{Solver_interface} \package_listing{Point_set_processing_3/Property_map} \package_listing{Circulator} \package_listing{Generator} diff --git a/Documentation/resources/how_to_cite_cgal.bib b/Documentation/resources/how_to_cite_cgal.bib new file mode 100755 index 00000000000..e269f5dfc03 --- /dev/null +++ b/Documentation/resources/how_to_cite_cgal.bib @@ -0,0 +1,921 @@ +% please dont't modify the "arobase" string commands +% they are used by the scripts to create the "How to cite CGAL" web page +% thanks - Monique + +@string{ author_create_page = 0 } +@string{ category_create_page = 0 } +@string{ reduced_year_create_page = 0 } +@string{ complete_year_create_page = 0 } + +@string{ index_file_title = "How to cite CGAL" } +@string{ index_page_title = "How to cite CGAL" } + +@string{ complete_biblio_file_title = "CGAL Publications sorted by year" } +@string{ complete_biblio_page_title = "CGAL Publications sorted by year" } +@string{ filename_complete_biblio = "how_to_cite_cgal" } + +@string{ head_tag.end = "layout.html" } +%@string{ header_of_contents = "header_of_contents" } + +@string{ keyword_build_initials_index = 0 } +@string{ keyword_put_initials_in_index = 0 } + +@string{ keyword_write_bibtex_abstract = 0 } +@string{ complete_biblio_write_bibtex_abstract = 0 } + +@string{ disclaimer_2 = ""} +@STRING{ default_header_of_body = "" } +@STRING{ default_footer_of_contents = ""} +@string{ index_write_author = 0 } +@string{ keyword_write_author = 0 } +@string{ complete_biblio_write_author = 0 } + +@string{ index_write_date = 0 } +@string{ keyword_write_date = 0 } +@string{ complete_biblio_write_date = 0 } + + + +@book{ cgal:eb-${CGAL_RELEASE_YEAR_ID} +, title = "{CGAL} User and Reference Manual" +, author = "{The CGAL Project}" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, year = ${CGAL_BUILD_YEAR4} +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html" +} + +%%% Arithmetic and Algebra %%% + +@incollection{cgal:h-af-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hemmer" +, title = "Algebraic Foundations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAlgebraicFoundationsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hhkps-nt-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hemmer and Susan Hert and Lutz Kettner and Sylvain Pion and Stefan Schirra" +, title = "Number Types" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgNumberTypesSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-ma-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hemmer" +, title = "Modular Arithmetic" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgModularArithmeticSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-p-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hemmer" +, title = "Polynomial" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPolynomialSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:bht-ak-${CGAL_RELEASE_YEAR_ID} +, author = "Eric Berberich and Michael Hemmer and Michael Kerber and Sylvain Lazard and Luis Pe{\~n}aranda and Monique Teillaud" +, title = "Algebraic Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAlgebraicKerneldSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Combinatorial Algorithms %%% + +@incollection{cgal:h-msms-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hoffmann" +, title = "Monotone and Sorted Matrix Search" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMatrixSearchSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fgsw-lqps-${CGAL_RELEASE_YEAR_ID} +, author = "Kaspar Fischer and Bernd G{\"a}rtner and Sven Sch{\"o}nherr and Frans Wessendorp" +, title = "Linear and Quadratic Programming Solver" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgQPSolverSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Geometry Kernels %%% + +@incollection{cgal:bfghhkps-lgk23-${CGAL_RELEASE_YEAR_ID} +, author = "Herv{\'e} Br{\"o}nnimann and Andreas Fabri and Geert-Jan Giezeman and Susan Hert and Michael Hoffmann and Lutz Kettner and Sylvain Pion and Stefan Schirra" +, title = "{2D} and {3D} Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgKernel23Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:s-gkd-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Seel" +, title = "{dD} Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgKernelDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:cpt-cgk2-${CGAL_RELEASE_YEAR_ID} +, author = "Pedro Machado Manh{\~a}es de Castro and Sylvain Pion and Monique Teillaud" +, title = "{2D} Circular Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgCircularKernel2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:cclt-sgk3-${CGAL_RELEASE_YEAR_ID} +, author = "Pedro Machado Manh{\~a}es de Castro and Fr{\'e}d{\'e}ric Cazals and S{\'e}bastien Loriot and Monique Teillaud" +, title = "{3D} Spherical Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSphericalKernel3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Convex Hull Algorithms %%% + +@incollection{cgal:hs-chep2-${CGAL_RELEASE_YEAR_ID} +, author = "Susan Hert and Stefan Schirra" +, title = "{2D} Convex Hulls and Extreme Points" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgConvexHull2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hs-ch3-${CGAL_RELEASE_YEAR_ID} +, author = "Susan Hert and Stefan Schirra" +, title = "{3D} Convex Hulls" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgConvexHull3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hs-chdt3-${CGAL_RELEASE_YEAR_ID} +, author = "Susan Hert and Michael Seel" +, title = "{dD} Convex Hulls and {Delaunay} Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgConvexHullDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Polygons %%% + +@incollection{cgal:gw-p2-${CGAL_RELEASE_YEAR_ID} +, author = "Geert-Jan Giezeman and Wieger Wesselink" +, title = "{2D} Polygons" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPolygon2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fwzh-rbso2-${CGAL_RELEASE_YEAR_ID} +, author = "Efi Fogel and Ron Wein and Baruch Zukerman and Dan Halperin" +, title = "{2D} Regularized {Boolean} Set-Operations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBooleanSetOperations2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:s-bonp2-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Seel" +, title = "{2D} {Boolean} Operations on {Nef} Polygons" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgNef2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hk-bonpes2-${CGAL_RELEASE_YEAR_ID} +, author = "Peter Hachenberger and Lutz Kettner" +, title = "{2D} {Boolean} Operations on {Nef} Polygons Embedded on the Sphere" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgNefS2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-pp2-${CGAL_RELEASE_YEAR_ID} +, author = "Susan Hert" +, title = "{2D} Polygon Partitioning" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPolygonPartitioning2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:c-sspo2-${CGAL_RELEASE_YEAR_ID} +, author = "Fernando Cacciola" +, title = "{2D} Straight Skeleton and Polygon Offsetting" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgStraightSkeleton2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:w-rms2-${CGAL_RELEASE_YEAR_ID} +, author = "Ron Wein" +, title = "{2D} {Minkowski} Sums" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMinkowskiSum2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Cell Complexes and Polyhedra %%% + +@incollection{cgal:k-ps-${CGAL_RELEASE_YEAR_ID} +, author = "Lutz Kettner" +, title = "{3D} Polyhedral Surfaces" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPolyhedronSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:k-hds-${CGAL_RELEASE_YEAR_ID} +, author = "Lutz Kettner" +, title = "Halfedge Data Structures" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgHDSSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:d-cm-${CGAL_RELEASE_YEAR_ID} +, author = "Guillaume Damiand" +, title = "Combinatorial Maps" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgCombinatorialMapsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:d-lcc-${CGAL_RELEASE_YEAR_ID} +, author = "Guillaume Damiand" +, title = "Linear Cell Complex" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgLinearCellComplexSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hk-bonp3-${CGAL_RELEASE_YEAR_ID} +, author = "Peter Hachenberger and Lutz Kettner" +, title = "{3D} {Boolean} Operations on {Nef} Polyhedra" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgNef3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-emspe-${CGAL_RELEASE_YEAR_ID} +, author = "Peter Hachenberger" +, title = "Convex Decomposition of Polyhedra" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgConvexDecomposition3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-msp3-${CGAL_RELEASE_YEAR_ID} +, author = "Peter Hachenberger" +, title = "{3D} {Minkowski} Sum of Polyhedra" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMinkowskiSum3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Arrangements %%% + +@incollection{cgal:wfzh-a2-${CGAL_RELEASE_YEAR_ID} +, author = "Ron Wein and Eric Berberich and Efi Fogel and Dan Halperin and Michael Hemmer and Oren Salzman and Baruch Zukerman" +, title = "{2D} Arrangements" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgArrangement2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:wfz-ic2-${CGAL_RELEASE_YEAR_ID} +, author = "Baruch Zukerman and Ron Wein and Efi Fogel" +, title = "{2D} Intersection of Curves" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgIntersectionOfCurves2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:p-sr2-${CGAL_RELEASE_YEAR_ID} +, author = "Eli Packer" +, title = "{2D} Snap Rounding" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSnapRounding2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:w-e2-${CGAL_RELEASE_YEAR_ID} +, author = "Ron Wein" +, title = "{2D} Envelopes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgEnvelope2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:mwz-e3-${CGAL_RELEASE_YEAR_ID} +, author = "Michal Meyerovitch and Ron Wein and Baruch Zukerman" +, title = "{3D} Envelopes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgEnvelope3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Triangulations and Delaunay Triangulations %%% + +@incollection{cgal:y-t2-${CGAL_RELEASE_YEAR_ID} +, author = "Mariette Yvinec" +, title = "{2D} Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTriangulation2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:py-tds2-${CGAL_RELEASE_YEAR_ID} +, author = "Sylvain Pion and Mariette Yvinec" +, title = "{2D} Triangulation Data Structure" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTDS2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:k-pt2-${CGAL_RELEASE_YEAR_ID} +, author = "Nico Kruithof" +, title = "{2D} Periodic Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPeriodic3Triangulation3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:pt-t3-${CGAL_RELEASE_YEAR_ID} +, author = "Sylvain Pion and Monique Teillaud" +, title = "{3D} Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTriangulation3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:pt-tds3-${CGAL_RELEASE_YEAR_ID} +, author = "Sylvain Pion and Monique Teillaud" +, title = "{3D} Triangulation Data Structure" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTDS3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ct-pt3-${CGAL_RELEASE_YEAR_ID} +, author = "Manuel Caroli and Monique Teillaud" +, title = "{3D} Periodic Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPeriodic3Triangulation3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hdj-t-${CGAL_RELEASE_YEAR_ID} +, author = "Samuel Hornus and Olivier Devillers and Clément Jamin" +, title = "Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTriangulationsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:d-as2-${CGAL_RELEASE_YEAR_ID} +, author = "Tran Kai Frank Da" +, title = "{2D} Alpha Shapes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAlphaShape2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:dy-as3-${CGAL_RELEASE_YEAR_ID} +, author = "Tran Kai Frank Da and Mariette Yvinec" +, title = "{3D} Alpha Shapes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAlphaShapes3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Voronoi Diagrams %%% + +@incollection{cgal:k-sdg2-${CGAL_RELEASE_YEAR_ID} +, author = "Menelaos Karavelas" +, title = "{2D} Segment {Delaunay} Graphs" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSegmentDelaunayGraph2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ky-ag2-${CGAL_RELEASE_YEAR_ID} +, author = "Menelaos Karavelas and Mariette Yvinec" +, title = "{2D} {Apollonius} Graphs ({Delaunay} Graphs of Disks)" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgApolloniusGraph2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:k-vda2-${CGAL_RELEASE_YEAR_ID} +, author = "Menelaos Karavelas" +, title = "{2D} {Voronoi} Diagram Adaptor" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgVoronoiDiagramAdaptor2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Mesh Generation %%% + +@incollection{cgal:r-ctm2-${CGAL_RELEASE_YEAR_ID} +, author = "Laurent Rineau" +, title = "{2D} Conforming Triangulations and Meshes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMesh2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ry-smg-${CGAL_RELEASE_YEAR_ID} +, author = "Laurent Rineau and Mariette Yvinec" +, title = "{3D} Surface Mesh Generation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceMesher3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:asg-srps-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and Laurent Saboret and Gael Guennebaud" +, title = "Surface Reconstruction from Point Sets" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceReconstructionFromPointSetsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:k-ssm3-${CGAL_RELEASE_YEAR_ID} +, author = "Nico Kruithof" +, title = "{3D} Skin Surface Meshing" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSkinSurface3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:rty-m3-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and Laurent Rineau and St\'ephane Tayeb and Jane Tournois and Mariette Yvinec" +, title = "{3D} Mesh Generation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMesh_3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Geometry Processing %%% + +@incollection{cgal:s-ssm2-${CGAL_RELEASE_YEAR_ID} +, author = "Le-Jeng Andy Shiue" +, title = "{3D} Surface Subdivision Methods" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceSubdivisionMethods3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:yl-tsms-${CGAL_RELEASE_YEAR_ID} +, author = "Ílker O. Yaz and S\'ebastien Loriot" +, title = "Triangulated Surface Mesh Segmentation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceSegmentationSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:c-tsms-${CGAL_RELEASE_YEAR_ID} +, author = "Fernando Cacciola" +, title = "Triangulated Surface Mesh Simplification" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceMeshSimplificationSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:lshxy-tsmd-${CGAL_RELEASE_YEAR_ID} +, author = "Sébastien Loriot, Olga Sorkine-Hornung, Yin Xu and Ilker %O. Yaz" +, title = "Triangulated Surface Mesh Deformation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceModelingSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:sal-pptsm2-${CGAL_RELEASE_YEAR_ID} +, author = "Laurent Saboret and Pierre Alliez and Bruno L\'evy" +, title = "Planar Parameterization of Triangulated Surface Meshes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceParameterizationSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:cp-arutsm-${CGAL_RELEASE_YEAR_ID} +, author = "Marc Pouget and Fr\'ed\'eric Cazals" +, title = "Approximation of Ridges and Umbilics on Triangulated Surface Meshes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgRidges_3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:pc-eldp-${CGAL_RELEASE_YEAR_ID} +, author = "Marc Pouget and Fr\'ed\'eric Cazals" +, title = "Estimation of Local Differential Properties of Point-Sampled Surfaces" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgJet_fitting_3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ass-psp-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and Laurent Saboret and Nader Salman" +, title = "Point Set Processing" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPointSetProcessingSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:m-ps-${CGAL_RELEASE_YEAR_ID} +, author = "Abdelkrim Mebarki" +, title = "{2D} Placement of Streamlines" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPlacementOfStreamlines2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Spatial Searching and Sorting %%% + +@incollection{cgal:b-ss2-${CGAL_RELEASE_YEAR_ID} +, author = "Matthias B{\"a}sken" +, title = "{2D} Range and Neighbor Search" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPointSet2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:f-isl-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri" +, title = "Interval Skip List" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgIntervalSkipListSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:tf-ssd-${CGAL_RELEASE_YEAR_ID} +, author = "Hans Tangelder and Andreas Fabri" +, title = "{dD} Spatial Searching" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSpatialSearchingDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:n-rstd-${CGAL_RELEASE_YEAR_ID} +, author = "Gabriele Neyer" +, title = "{dD} Range and Segment Trees" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgRangeSegmentTreesDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:kmz-isiobd-${CGAL_RELEASE_YEAR_ID} +, author = "Lutz Kettner and Andreas Meyer and Afra Zomorodian" +, title = "Intersecting Sequences of {dD} Iso-oriented Boxes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBoxIntersectionDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:atw-aabb-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and St\'ephane Tayeb and Camille Wormser" +, title = "{3D} Fast Intersection and Distance Computation (AABB Tree)" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAABB_treeSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:dd-ss-${CGAL_RELEASE_YEAR_ID} +, author = "Christophe Delage and Olivier Devillers" +, title = "Spatial Sorting" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSpatialSortingSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Geometric Optimization %%% + +@incollection{cgal:fghhs-bv-${CGAL_RELEASE_YEAR_ID} +, author = "Kaspar Fischer and Bernd G{\"a}rtner and Thomas Herrmann and Michael Hoffmann and Sven Sch{\"o}nherr" +, title = "Bounding Volumes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBoundingVolumesSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hp-ia-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hoffmann and Eli Packer" +, title = "Inscribed Areas" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgInscribedAreasSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fghhs-od-${CGAL_RELEASE_YEAR_ID} +, author = "Kaspar Fischer and Bernd G{\"a}rtner and Thomas Herrmann and Michael Hoffmann + and Sven Sch{\"o}nherr" +, title = "Optimal Distances" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgOptimalDistancesSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ap-pcad-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and Sylvain Pion and Ankit Gupta" +, title = "Principal Component Analysis" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPrincipalComponentAnalysisDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Interpolation %%% + +@incollection{cgal:f-i-${CGAL_RELEASE_YEAR_ID} +, author = "Julia Fl{\"o}totto" +, title = "{2D} and Surface Function Interpolation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgInterpolation2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:abha-gbc-${CGAL_RELEASE_YEAR_ID} +, author = "Dmitry Anisimov and David Bommes and Kai Hormann and Pierre Alliez" +, title = "2D Generalized Barycentric Coordinates" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBarycentric_coordinates_2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Kinetic Data Structures %%% + +@incollection{cgal:r-kds-${CGAL_RELEASE_YEAR_ID} +, author = "Daniel Russel" +, title = "Kinetic Data Structures" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgKdsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:r-kdsf-${CGAL_RELEASE_YEAR_ID} +, author = "Daniel Russel" +, title = "Kinetic Framework" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgKdsFrameworkSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Support Library %%% + +@incollection{cgal:hkpw-se-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hoffmann and Lutz Kettner and Sylvain Pion and Ron Wein" +, title = "STL Extensions for {CGAL}" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgStlExtensionSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:cfw-cbgl-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Fernando Cacciola and Ron Wein" +, title = "{CGAL} and the {Boost} Graph Library" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBGLSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fs-cbpm-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Laurent Saboret" +, title = "{CGAL} and {Boost} Property Maps" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgProperty_mapSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:dksy-hc-${CGAL_RELEASE_YEAR_ID} +, author = "Olivier Devillers and Lutz Kettner and Michael Seel and Mariette Yvinec" +, title = "Handles and Circulators" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgHandlesAndCirculatorsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:dhhk-gog-${CGAL_RELEASE_YEAR_ID} +, author = "Olivier Devillers and Susan Hert and Michael Hoffmann and Lutz Kettner and Sven Sch{\"o}nherr" +, title = "Geometric Object Generators" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgGeneratorsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:kps-pthum-${CGAL_RELEASE_YEAR_ID} +, author = "Lutz Kettner and Sylvain Pion and Michael Seel" +, title = "Profiling Tools Timers, Hash Map, Union-find, Modifiers" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgProfilingToolsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fgk-ios-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Geert-Jan Giezeman and Lutz Kettner" +, title = "IO Streams" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgIOstreamsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Visualization %%% + +@incollection{cgal:fp-gv-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Sylvain Pion" +, title = "Geomview" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgGeomviewSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fr-cqgvf-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Laurent Rineau" +, title = "{CGAL} and the Qt Graphics View Framework " +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgGraphicsViewSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:lp-gi-${CGAL_RELEASE_YEAR_ID} +, author = "S\'ebastien Loriot and Sylvain Pion" +, title = "{CGAL} Ipelets " +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgCGALIpeletsSummary" +, year = ${CGAL_BUILD_YEAR4} +} diff --git a/Documentation/resources/how_to_cite_cgal.bib.in.Polyline b/Documentation/resources/how_to_cite_cgal.bib.in.Polyline new file mode 100755 index 00000000000..cce13a4c3d0 --- /dev/null +++ b/Documentation/resources/how_to_cite_cgal.bib.in.Polyline @@ -0,0 +1,931 @@ +% please dont't modify the "arobase" string commands +% they are used by the scripts to create the "How to cite CGAL" web page +% thanks - Monique + +@string{ author_create_page = 0 } +@string{ category_create_page = 0 } +@string{ reduced_year_create_page = 0 } +@string{ complete_year_create_page = 0 } + +@string{ index_file_title = "How to cite CGAL" } +@string{ index_page_title = "How to cite CGAL" } + +@string{ complete_biblio_file_title = "CGAL Publications sorted by year" } +@string{ complete_biblio_page_title = "CGAL Publications sorted by year" } +@string{ filename_complete_biblio = "how_to_cite_cgal" } + +@string{ head_tag.end = "layout.html" } +%@string{ header_of_contents = "header_of_contents" } + +@string{ keyword_build_initials_index = 0 } +@string{ keyword_put_initials_in_index = 0 } + +@string{ keyword_write_bibtex_abstract = 0 } +@string{ complete_biblio_write_bibtex_abstract = 0 } + +@string{ disclaimer_2 = ""} +@STRING{ default_header_of_body = "" } +@STRING{ default_footer_of_contents = ""} +@string{ index_write_author = 0 } +@string{ keyword_write_author = 0 } +@string{ complete_biblio_write_author = 0 } + +@string{ index_write_date = 0 } +@string{ keyword_write_date = 0 } +@string{ complete_biblio_write_date = 0 } + + + +@book{ cgal:eb-${CGAL_RELEASE_YEAR_ID} +, title = "{CGAL} User and Reference Manual" +, author = "{The CGAL Project}" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, year = ${CGAL_BUILD_YEAR4} +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html" +} + +%%% Arithmetic and Algebra %%% + +@incollection{cgal:h-af-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hemmer" +, title = "Algebraic Foundations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAlgebraicFoundationsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hhkps-nt-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hemmer and Susan Hert and Lutz Kettner and Sylvain Pion and Stefan Schirra" +, title = "Number Types" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgNumberTypesSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-ma-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hemmer" +, title = "Modular Arithmetic" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgModularArithmeticSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-p-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hemmer" +, title = "Polynomial" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPolynomialSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:bht-ak-${CGAL_RELEASE_YEAR_ID} +, author = "Eric Berberich and Michael Hemmer and Michael Kerber and Sylvain Lazard and Luis Pe{\~n}aranda and Monique Teillaud" +, title = "Algebraic Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAlgebraicKerneldSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Combinatorial Algorithms %%% + +@incollection{cgal:h-msms-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hoffmann" +, title = "Monotone and Sorted Matrix Search" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMatrixSearchSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fgsw-lqps-${CGAL_RELEASE_YEAR_ID} +, author = "Kaspar Fischer and Bernd G{\"a}rtner and Sven Sch{\"o}nherr and Frans Wessendorp" +, title = "Linear and Quadratic Programming Solver" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgQPSolverSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Geometry Kernels %%% + +@incollection{cgal:bfghhkps-lgk23-${CGAL_RELEASE_YEAR_ID} +, author = "Herv{\'e} Br{\"o}nnimann and Andreas Fabri and Geert-Jan Giezeman and Susan Hert and Michael Hoffmann and Lutz Kettner and Sylvain Pion and Stefan Schirra" +, title = "{2D} and {3D} Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgKernel23Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:s-gkd-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Seel" +, title = "{dD} Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgKernelDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:cpt-cgk2-${CGAL_RELEASE_YEAR_ID} +, author = "Pedro Machado Manh{\~a}es de Castro and Sylvain Pion and Monique Teillaud" +, title = "{2D} Circular Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgCircularKernel2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:cclt-sgk3-${CGAL_RELEASE_YEAR_ID} +, author = "Pedro Machado Manh{\~a}es de Castro and Fr{\'e}d{\'e}ric Cazals and S{\'e}bastien Loriot and Monique Teillaud" +, title = "{3D} Spherical Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSphericalKernel3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Convex Hull Algorithms %%% + +@incollection{cgal:hs-chep2-${CGAL_RELEASE_YEAR_ID} +, author = "Susan Hert and Stefan Schirra" +, title = "{2D} Convex Hulls and Extreme Points" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgConvexHull2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hs-ch3-${CGAL_RELEASE_YEAR_ID} +, author = "Susan Hert and Stefan Schirra" +, title = "{3D} Convex Hulls" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgConvexHull3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hs-chdt3-${CGAL_RELEASE_YEAR_ID} +, author = "Susan Hert and Michael Seel" +, title = "{dD} Convex Hulls and {Delaunay} Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgConvexHullDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Polygons %%% + +@incollection{cgal:gw-p2-${CGAL_RELEASE_YEAR_ID} +, author = "Geert-Jan Giezeman and Wieger Wesselink" +, title = "{2D} Polygons" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPolygon2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fwzh-rbso2-${CGAL_RELEASE_YEAR_ID} +, author = "Efi Fogel and Ron Wein and Baruch Zukerman and Dan Halperin" +, title = "{2D} Regularized {Boolean} Set-Operations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBooleanSetOperations2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:s-bonp2-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Seel" +, title = "{2D} {Boolean} Operations on {Nef} Polygons" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgNef2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hk-bonpes2-${CGAL_RELEASE_YEAR_ID} +, author = "Peter Hachenberger and Lutz Kettner" +, title = "{2D} {Boolean} Operations on {Nef} Polygons Embedded on the Sphere" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgNefS2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-pp2-${CGAL_RELEASE_YEAR_ID} +, author = "Susan Hert" +, title = "{2D} Polygon Partitioning" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPolygonPartitioning2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:c-sspo2-${CGAL_RELEASE_YEAR_ID} +, author = "Fernando Cacciola" +, title = "{2D} Straight Skeleton and Polygon Offsetting" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgStraightSkeleton2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:w-rms2-${CGAL_RELEASE_YEAR_ID} +, author = "Ron Wein" +, title = "{2D} {Minkowski} Sums" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMinkowskiSum2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:f-ps2-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri" +, title = "{2D} Polyline Simplification" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPolylineSimplification2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Cell Complexes and Polyhedra %%% + +@incollection{cgal:k-ps-${CGAL_RELEASE_YEAR_ID} +, author = "Lutz Kettner" +, title = "{3D} Polyhedral Surfaces" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPolyhedronSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:k-hds-${CGAL_RELEASE_YEAR_ID} +, author = "Lutz Kettner" +, title = "Halfedge Data Structures" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgHDSSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:d-cm-${CGAL_RELEASE_YEAR_ID} +, author = "Guillaume Damiand" +, title = "Combinatorial Maps" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgCombinatorialMapsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:d-lcc-${CGAL_RELEASE_YEAR_ID} +, author = "Guillaume Damiand" +, title = "Linear Cell Complex" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgLinearCellComplexSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hk-bonp3-${CGAL_RELEASE_YEAR_ID} +, author = "Peter Hachenberger and Lutz Kettner" +, title = "{3D} {Boolean} Operations on {Nef} Polyhedra" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgNef3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-emspe-${CGAL_RELEASE_YEAR_ID} +, author = "Peter Hachenberger" +, title = "Convex Decomposition of Polyhedra" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgConvexDecomposition3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-msp3-${CGAL_RELEASE_YEAR_ID} +, author = "Peter Hachenberger" +, title = "{3D} {Minkowski} Sum of Polyhedra" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMinkowskiSum3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Arrangements %%% + +@incollection{cgal:wfzh-a2-${CGAL_RELEASE_YEAR_ID} +, author = "Ron Wein and Eric Berberich and Efi Fogel and Dan Halperin and Michael Hemmer and Oren Salzman and Baruch Zukerman" +, title = "{2D} Arrangements" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgArrangement2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:wfz-ic2-${CGAL_RELEASE_YEAR_ID} +, author = "Baruch Zukerman and Ron Wein and Efi Fogel" +, title = "{2D} Intersection of Curves" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgIntersectionOfCurves2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:p-sr2-${CGAL_RELEASE_YEAR_ID} +, author = "Eli Packer" +, title = "{2D} Snap Rounding" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSnapRounding2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:w-e2-${CGAL_RELEASE_YEAR_ID} +, author = "Ron Wein" +, title = "{2D} Envelopes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgEnvelope2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:mwz-e3-${CGAL_RELEASE_YEAR_ID} +, author = "Michal Meyerovitch and Ron Wein and Baruch Zukerman" +, title = "{3D} Envelopes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgEnvelope3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Triangulations and Delaunay Triangulations %%% + +@incollection{cgal:y-t2-${CGAL_RELEASE_YEAR_ID} +, author = "Mariette Yvinec" +, title = "{2D} Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTriangulation2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:py-tds2-${CGAL_RELEASE_YEAR_ID} +, author = "Sylvain Pion and Mariette Yvinec" +, title = "{2D} Triangulation Data Structure" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTDS2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:k-pt2-${CGAL_RELEASE_YEAR_ID} +, author = "Nico Kruithof" +, title = "{2D} Periodic Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPeriodic3Triangulation3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:pt-t3-${CGAL_RELEASE_YEAR_ID} +, author = "Sylvain Pion and Monique Teillaud" +, title = "{3D} Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTriangulation3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:pt-tds3-${CGAL_RELEASE_YEAR_ID} +, author = "Sylvain Pion and Monique Teillaud" +, title = "{3D} Triangulation Data Structure" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTDS3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ct-pt3-${CGAL_RELEASE_YEAR_ID} +, author = "Manuel Caroli and Monique Teillaud" +, title = "{3D} Periodic Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPeriodic3Triangulation3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hdj-t-${CGAL_RELEASE_YEAR_ID} +, author = "Samuel Hornus and Olivier Devillers and Clément Jamin" +, title = "Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTriangulationsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:d-as2-${CGAL_RELEASE_YEAR_ID} +, author = "Tran Kai Frank Da" +, title = "{2D} Alpha Shapes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAlphaShape2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:dy-as3-${CGAL_RELEASE_YEAR_ID} +, author = "Tran Kai Frank Da and Mariette Yvinec" +, title = "{3D} Alpha Shapes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAlphaShapes3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Voronoi Diagrams %%% + +@incollection{cgal:k-sdg2-${CGAL_RELEASE_YEAR_ID} +, author = "Menelaos Karavelas" +, title = "{2D} Segment {Delaunay} Graphs" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSegmentDelaunayGraph2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ky-ag2-${CGAL_RELEASE_YEAR_ID} +, author = "Menelaos Karavelas and Mariette Yvinec" +, title = "{2D} {Apollonius} Graphs ({Delaunay} Graphs of Disks)" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgApolloniusGraph2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:k-vda2-${CGAL_RELEASE_YEAR_ID} +, author = "Menelaos Karavelas" +, title = "{2D} {Voronoi} Diagram Adaptor" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgVoronoiDiagramAdaptor2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Mesh Generation %%% + +@incollection{cgal:r-ctm2-${CGAL_RELEASE_YEAR_ID} +, author = "Laurent Rineau" +, title = "{2D} Conforming Triangulations and Meshes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMesh2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ry-smg-${CGAL_RELEASE_YEAR_ID} +, author = "Laurent Rineau and Mariette Yvinec" +, title = "{3D} Surface Mesh Generation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceMesher3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:asg-srps-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and Laurent Saboret and Gael Guennebaud" +, title = "Surface Reconstruction from Point Sets" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceReconstructionFromPointSetsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:k-ssm3-${CGAL_RELEASE_YEAR_ID} +, author = "Nico Kruithof" +, title = "{3D} Skin Surface Meshing" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSkinSurface3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:rty-m3-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and Laurent Rineau and St\'ephane Tayeb and Jane Tournois and Mariette Yvinec" +, title = "{3D} Mesh Generation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMesh_3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Geometry Processing %%% + +@incollection{cgal:s-ssm2-${CGAL_RELEASE_YEAR_ID} +, author = "Le-Jeng Andy Shiue" +, title = "{3D} Surface Subdivision Methods" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceSubdivisionMethods3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:yl-tsms-${CGAL_RELEASE_YEAR_ID} +, author = "Ílker O. Yaz and S\'ebastien Loriot" +, title = "Triangulated Surface Mesh Segmentation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceSegmentationSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:c-tsms-${CGAL_RELEASE_YEAR_ID} +, author = "Fernando Cacciola" +, title = "Triangulated Surface Mesh Simplification" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceMeshSimplificationSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:lshxy-tsmd-${CGAL_RELEASE_YEAR_ID} +, author = "Sébastien Loriot, Olga Sorkine-Hornung, Yin Xu and Ilker %O. Yaz" +, title = "Triangulated Surface Mesh Deformation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceModelingSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:sal-pptsm2-${CGAL_RELEASE_YEAR_ID} +, author = "Laurent Saboret and Pierre Alliez and Bruno L\'evy" +, title = "Planar Parameterization of Triangulated Surface Meshes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceParameterizationSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:cp-arutsm-${CGAL_RELEASE_YEAR_ID} +, author = "Marc Pouget and Fr\'ed\'eric Cazals" +, title = "Approximation of Ridges and Umbilics on Triangulated Surface Meshes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgRidges_3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:pc-eldp-${CGAL_RELEASE_YEAR_ID} +, author = "Marc Pouget and Fr\'ed\'eric Cazals" +, title = "Estimation of Local Differential Properties of Point-Sampled Surfaces" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgJet_fitting_3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ass-psp-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and Laurent Saboret and Nader Salman" +, title = "Point Set Processing" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPointSetProcessingSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:m-ps-${CGAL_RELEASE_YEAR_ID} +, author = "Abdelkrim Mebarki" +, title = "{2D} Placement of Streamlines" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPlacementOfStreamlines2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Spatial Searching and Sorting %%% + +@incollection{cgal:b-ss2-${CGAL_RELEASE_YEAR_ID} +, author = "Matthias B{\"a}sken" +, title = "{2D} Range and Neighbor Search" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPointSet2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:f-isl-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri" +, title = "Interval Skip List" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgIntervalSkipListSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:tf-ssd-${CGAL_RELEASE_YEAR_ID} +, author = "Hans Tangelder and Andreas Fabri" +, title = "{dD} Spatial Searching" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSpatialSearchingDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:n-rstd-${CGAL_RELEASE_YEAR_ID} +, author = "Gabriele Neyer" +, title = "{dD} Range and Segment Trees" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgRangeSegmentTreesDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:kmz-isiobd-${CGAL_RELEASE_YEAR_ID} +, author = "Lutz Kettner and Andreas Meyer and Afra Zomorodian" +, title = "Intersecting Sequences of {dD} Iso-oriented Boxes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBoxIntersectionDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:atw-aabb-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and St\'ephane Tayeb and Camille Wormser" +, title = "{3D} Fast Intersection and Distance Computation (AABB Tree)" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAABB_treeSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:dd-ss-${CGAL_RELEASE_YEAR_ID} +, author = "Christophe Delage and Olivier Devillers" +, title = "Spatial Sorting" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSpatialSortingSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Geometric Optimization %%% + +@incollection{cgal:fghhs-bv-${CGAL_RELEASE_YEAR_ID} +, author = "Kaspar Fischer and Bernd G{\"a}rtner and Thomas Herrmann and Michael Hoffmann and Sven Sch{\"o}nherr" +, title = "Bounding Volumes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBoundingVolumesSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hp-ia-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hoffmann and Eli Packer" +, title = "Inscribed Areas" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgInscribedAreasSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fghhs-od-${CGAL_RELEASE_YEAR_ID} +, author = "Kaspar Fischer and Bernd G{\"a}rtner and Thomas Herrmann and Michael Hoffmann + and Sven Sch{\"o}nherr" +, title = "Optimal Distances" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgOptimalDistancesSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ap-pcad-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and Sylvain Pion and Ankit Gupta" +, title = "Principal Component Analysis" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPrincipalComponentAnalysisDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Interpolation %%% + +@incollection{cgal:f-i-${CGAL_RELEASE_YEAR_ID} +, author = "Julia Fl{\"o}totto" +, title = "{2D} and Surface Function Interpolation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgInterpolation2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:abha-gbc-${CGAL_RELEASE_YEAR_ID} +, author = "Dmitry Anisimov and David Bommes and Kai Hormann and Pierre Alliez" +, title = "2D Generalized Barycentric Coordinates" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBarycentric_coordinates_2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Kinetic Data Structures %%% + +@incollection{cgal:r-kds-${CGAL_RELEASE_YEAR_ID} +, author = "Daniel Russel" +, title = "Kinetic Data Structures" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgKdsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:r-kdsf-${CGAL_RELEASE_YEAR_ID} +, author = "Daniel Russel" +, title = "Kinetic Framework" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgKdsFrameworkSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Support Library %%% + +@incollection{cgal:hkpw-se-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hoffmann and Lutz Kettner and Sylvain Pion and Ron Wein" +, title = "STL Extensions for {CGAL}" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgStlExtensionSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:cfw-cbgl-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Fernando Cacciola and Ron Wein" +, title = "{CGAL} and the {Boost} Graph Library" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBGLSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fs-cbpm-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Laurent Saboret" +, title = "{CGAL} and {Boost} Property Maps" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgProperty_mapSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:dksy-hc-${CGAL_RELEASE_YEAR_ID} +, author = "Olivier Devillers and Lutz Kettner and Michael Seel and Mariette Yvinec" +, title = "Handles and Circulators" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgHandlesAndCirculatorsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:dhhk-gog-${CGAL_RELEASE_YEAR_ID} +, author = "Olivier Devillers and Susan Hert and Michael Hoffmann and Lutz Kettner and Sven Sch{\"o}nherr" +, title = "Geometric Object Generators" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgGeneratorsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:kps-pthum-${CGAL_RELEASE_YEAR_ID} +, author = "Lutz Kettner and Sylvain Pion and Michael Seel" +, title = "Profiling Tools Timers, Hash Map, Union-find, Modifiers" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgProfilingToolsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fgk-ios-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Geert-Jan Giezeman and Lutz Kettner" +, title = "IO Streams" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgIOstreamsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Visualization %%% + +@incollection{cgal:fp-gv-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Sylvain Pion" +, title = "Geomview" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgGeomviewSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fr-cqgvf-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Laurent Rineau" +, title = "{CGAL} and the Qt Graphics View Framework " +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgGraphicsViewSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:lp-gi-${CGAL_RELEASE_YEAR_ID} +, author = "S\'ebastien Loriot and Sylvain Pion" +, title = "{CGAL} Ipelets " +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgCGALIpeletsSummary" +, year = ${CGAL_BUILD_YEAR4} +} diff --git a/Documentation/resources/how_to_cite_cgal.bib.in.master b/Documentation/resources/how_to_cite_cgal.bib.in.master new file mode 100755 index 00000000000..a58465d4c90 --- /dev/null +++ b/Documentation/resources/how_to_cite_cgal.bib.in.master @@ -0,0 +1,932 @@ +% please dont't modify the "arobase" string commands +% they are used by the scripts to create the "How to cite CGAL" web page +% thanks - Monique + +@string{ author_create_page = 0 } +@string{ category_create_page = 0 } +@string{ reduced_year_create_page = 0 } +@string{ complete_year_create_page = 0 } + +@string{ index_file_title = "How to cite CGAL" } +@string{ index_page_title = "How to cite CGAL" } + +@string{ complete_biblio_file_title = "CGAL Publications sorted by year" } +@string{ complete_biblio_page_title = "CGAL Publications sorted by year" } +@string{ filename_complete_biblio = "how_to_cite_cgal" } + +@string{ head_tag.end = "layout.html" } +%@string{ header_of_contents = "header_of_contents" } + +@string{ keyword_build_initials_index = 0 } +@string{ keyword_put_initials_in_index = 0 } + +@string{ keyword_write_bibtex_abstract = 0 } +@string{ complete_biblio_write_bibtex_abstract = 0 } + +@string{ disclaimer_2 = ""} +@STRING{ default_header_of_body = "" } +@STRING{ default_footer_of_contents = ""} +@string{ index_write_author = 0 } +@string{ keyword_write_author = 0 } +@string{ complete_biblio_write_author = 0 } + +@string{ index_write_date = 0 } +@string{ keyword_write_date = 0 } +@string{ complete_biblio_write_date = 0 } + + + +@book{ cgal:eb-${CGAL_RELEASE_YEAR_ID} +, title = "{CGAL} User and Reference Manual" +, author = "{The CGAL Project}" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, year = ${CGAL_BUILD_YEAR4} +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html" +} + +%%% Arithmetic and Algebra %%% + +@incollection{cgal:h-af-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hemmer" +, title = "Algebraic Foundations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAlgebraicFoundationsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hhkps-nt-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hemmer and Susan Hert and Lutz Kettner and Sylvain Pion and Stefan Schirra" +, title = "Number Types" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgNumberTypesSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-ma-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hemmer" +, title = "Modular Arithmetic" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgModularArithmeticSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-p-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hemmer" +, title = "Polynomial" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPolynomialSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:bht-ak-${CGAL_RELEASE_YEAR_ID} +, author = "Eric Berberich and Michael Hemmer and Michael Kerber and Sylvain Lazard and Luis Pe{\~n}aranda and Monique Teillaud" +, title = "Algebraic Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAlgebraicKerneldSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Combinatorial Algorithms %%% + +@incollection{cgal:h-msms-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hoffmann" +, title = "Monotone and Sorted Matrix Search" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMatrixSearchSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fgsw-lqps-${CGAL_RELEASE_YEAR_ID} +, author = "Kaspar Fischer and Bernd G{\"a}rtner and Sven Sch{\"o}nherr and Frans Wessendorp" +, title = "Linear and Quadratic Programming Solver" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgQPSolverSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Geometry Kernels %%% + +@incollection{cgal:bfghhkps-lgk23-${CGAL_RELEASE_YEAR_ID} +, author = "Herv{\'e} Br{\"o}nnimann and Andreas Fabri and Geert-Jan Giezeman and Susan Hert and Michael Hoffmann and Lutz Kettner and Sylvain Pion and Stefan Schirra" +, title = "{2D} and {3D} Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgKernel23Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:s-gkd-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Seel" +, title = "{dD} Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgKernelDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:cpt-cgk2-${CGAL_RELEASE_YEAR_ID} +, author = "Pedro Machado Manh{\~a}es de Castro and Sylvain Pion and Monique Teillaud" +, title = "{2D} Circular Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgCircularKernel2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:cclt-sgk3-${CGAL_RELEASE_YEAR_ID} +, author = "Pedro Machado Manh{\~a}es de Castro and Fr{\'e}d{\'e}ric Cazals and S{\'e}bastien Loriot and Monique Teillaud" +, title = "{3D} Spherical Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSphericalKernel3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Convex Hull Algorithms %%% + +@incollection{cgal:hs-chep2-${CGAL_RELEASE_YEAR_ID} +, author = "Susan Hert and Stefan Schirra" +, title = "{2D} Convex Hulls and Extreme Points" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgConvexHull2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hs-ch3-${CGAL_RELEASE_YEAR_ID} +, author = "Susan Hert and Stefan Schirra" +, title = "{3D} Convex Hulls" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgConvexHull3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hs-chdt3-${CGAL_RELEASE_YEAR_ID} +, author = "Susan Hert and Michael Seel" +, title = "{dD} Convex Hulls and {Delaunay} Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgConvexHullDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Polygons %%% + +@incollection{cgal:gw-p2-${CGAL_RELEASE_YEAR_ID} +, author = "Geert-Jan Giezeman and Wieger Wesselink" +, title = "{2D} Polygons" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPolygon2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fwzh-rbso2-${CGAL_RELEASE_YEAR_ID} +, author = "Efi Fogel and Ron Wein and Baruch Zukerman and Dan Halperin" +, title = "{2D} Regularized {Boolean} Set-Operations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBooleanSetOperations2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:s-bonp2-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Seel" +, title = "{2D} {Boolean} Operations on {Nef} Polygons" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgNef2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hk-bonpes2-${CGAL_RELEASE_YEAR_ID} +, author = "Peter Hachenberger and Lutz Kettner" +, title = "{2D} {Boolean} Operations on {Nef} Polygons Embedded on the Sphere" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgNefS2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-pp2-${CGAL_RELEASE_YEAR_ID} +, author = "Susan Hert" +, title = "{2D} Polygon Partitioning" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPolygonPartitioning2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:c-sspo2-${CGAL_RELEASE_YEAR_ID} +, author = "Fernando Cacciola" +, title = "{2D} Straight Skeleton and Polygon Offsetting" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgStraightSkeleton2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:w-rms2-${CGAL_RELEASE_YEAR_ID} +, author = "Ron Wein" +, title = "{2D} {Minkowski} Sums" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMinkowskiSum2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Cell Complexes and Polyhedra %%% + +@incollection{cgal:k-ps-${CGAL_RELEASE_YEAR_ID} +, author = "Lutz Kettner" +, title = "{3D} Polyhedral Surfaces" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPolyhedronSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:k-hds-${CGAL_RELEASE_YEAR_ID} +, author = "Lutz Kettner" +, title = "Halfedge Data Structures" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgHDSSummary" +, year = ${CGAL_BUILD_YEAR4} +} + + +@incollection{cgal:bsmf-hds-${CGAL_RELEASE_YEAR_ID} +, author = "Mario Botsch and Daniel Sieger and Philipp Moeller and Andreas Fabri" +, title = "Surface Mesh" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceMeshSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:d-cm-${CGAL_RELEASE_YEAR_ID} +, author = "Guillaume Damiand" +, title = "Combinatorial Maps" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgCombinatorialMapsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:d-lcc-${CGAL_RELEASE_YEAR_ID} +, author = "Guillaume Damiand" +, title = "Linear Cell Complex" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgLinearCellComplexSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hk-bonp3-${CGAL_RELEASE_YEAR_ID} +, author = "Peter Hachenberger and Lutz Kettner" +, title = "{3D} {Boolean} Operations on {Nef} Polyhedra" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgNef3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-emspe-${CGAL_RELEASE_YEAR_ID} +, author = "Peter Hachenberger" +, title = "Convex Decomposition of Polyhedra" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgConvexDecomposition3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:h-msp3-${CGAL_RELEASE_YEAR_ID} +, author = "Peter Hachenberger" +, title = "{3D} {Minkowski} Sum of Polyhedra" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMinkowskiSum3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Arrangements %%% + +@incollection{cgal:wfzh-a2-${CGAL_RELEASE_YEAR_ID} +, author = "Ron Wein and Eric Berberich and Efi Fogel and Dan Halperin and Michael Hemmer and Oren Salzman and Baruch Zukerman" +, title = "{2D} Arrangements" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgArrangement2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:wfz-ic2-${CGAL_RELEASE_YEAR_ID} +, author = "Baruch Zukerman and Ron Wein and Efi Fogel" +, title = "{2D} Intersection of Curves" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgIntersectionOfCurves2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:p-sr2-${CGAL_RELEASE_YEAR_ID} +, author = "Eli Packer" +, title = "{2D} Snap Rounding" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSnapRounding2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:w-e2-${CGAL_RELEASE_YEAR_ID} +, author = "Ron Wein" +, title = "{2D} Envelopes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgEnvelope2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:mwz-e3-${CGAL_RELEASE_YEAR_ID} +, author = "Michal Meyerovitch and Ron Wein and Baruch Zukerman" +, title = "{3D} Envelopes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgEnvelope3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Triangulations and Delaunay Triangulations %%% + +@incollection{cgal:y-t2-${CGAL_RELEASE_YEAR_ID} +, author = "Mariette Yvinec" +, title = "{2D} Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTriangulation2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:py-tds2-${CGAL_RELEASE_YEAR_ID} +, author = "Sylvain Pion and Mariette Yvinec" +, title = "{2D} Triangulation Data Structure" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTDS2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:k-pt2-${CGAL_RELEASE_YEAR_ID} +, author = "Nico Kruithof" +, title = "{2D} Periodic Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPeriodic3Triangulation3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:pt-t3-${CGAL_RELEASE_YEAR_ID} +, author = "Sylvain Pion and Monique Teillaud" +, title = "{3D} Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTriangulation3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:pt-tds3-${CGAL_RELEASE_YEAR_ID} +, author = "Sylvain Pion and Monique Teillaud" +, title = "{3D} Triangulation Data Structure" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTDS3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ct-pt3-${CGAL_RELEASE_YEAR_ID} +, author = "Manuel Caroli and Monique Teillaud" +, title = "{3D} Periodic Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPeriodic3Triangulation3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hdj-t-${CGAL_RELEASE_YEAR_ID} +, author = "Samuel Hornus and Olivier Devillers and Clément Jamin" +, title = "Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgTriangulationsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:d-as2-${CGAL_RELEASE_YEAR_ID} +, author = "Tran Kai Frank Da" +, title = "{2D} Alpha Shapes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAlphaShape2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:dy-as3-${CGAL_RELEASE_YEAR_ID} +, author = "Tran Kai Frank Da and Mariette Yvinec" +, title = "{3D} Alpha Shapes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAlphaShapes3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Voronoi Diagrams %%% + +@incollection{cgal:k-sdg2-${CGAL_RELEASE_YEAR_ID} +, author = "Menelaos Karavelas" +, title = "{2D} Segment {Delaunay} Graphs" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSegmentDelaunayGraph2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ky-ag2-${CGAL_RELEASE_YEAR_ID} +, author = "Menelaos Karavelas and Mariette Yvinec" +, title = "{2D} {Apollonius} Graphs ({Delaunay} Graphs of Disks)" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgApolloniusGraph2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:k-vda2-${CGAL_RELEASE_YEAR_ID} +, author = "Menelaos Karavelas" +, title = "{2D} {Voronoi} Diagram Adaptor" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgVoronoiDiagramAdaptor2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Mesh Generation %%% + +@incollection{cgal:r-ctm2-${CGAL_RELEASE_YEAR_ID} +, author = "Laurent Rineau" +, title = "{2D} Conforming Triangulations and Meshes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMesh2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ry-smg-${CGAL_RELEASE_YEAR_ID} +, author = "Laurent Rineau and Mariette Yvinec" +, title = "{3D} Surface Mesh Generation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceMesher3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:asg-srps-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and Laurent Saboret and Gael Guennebaud" +, title = "Surface Reconstruction from Point Sets" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceReconstructionFromPointSetsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:k-ssm3-${CGAL_RELEASE_YEAR_ID} +, author = "Nico Kruithof" +, title = "{3D} Skin Surface Meshing" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSkinSurface3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:rty-m3-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and Laurent Rineau and St\'ephane Tayeb and Jane Tournois and Mariette Yvinec" +, title = "{3D} Mesh Generation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgMesh_3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Geometry Processing %%% + +@incollection{cgal:s-ssm2-${CGAL_RELEASE_YEAR_ID} +, author = "Le-Jeng Andy Shiue" +, title = "{3D} Surface Subdivision Methods" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceSubdivisionMethods3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:yl-tsms-${CGAL_RELEASE_YEAR_ID} +, author = "Ílker O. Yaz and S\'ebastien Loriot" +, title = "Triangulated Surface Mesh Segmentation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceSegmentationSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:c-tsms-${CGAL_RELEASE_YEAR_ID} +, author = "Fernando Cacciola" +, title = "Triangulated Surface Mesh Simplification" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceMeshSimplificationSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:lshxy-tsmd-${CGAL_RELEASE_YEAR_ID} +, author = "Sébastien Loriot, Olga Sorkine-Hornung, Yin Xu and Ilker %O. Yaz" +, title = "Triangulated Surface Mesh Deformation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceModelingSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:sal-pptsm2-${CGAL_RELEASE_YEAR_ID} +, author = "Laurent Saboret and Pierre Alliez and Bruno L\'evy" +, title = "Planar Parameterization of Triangulated Surface Meshes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSurfaceParameterizationSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:cp-arutsm-${CGAL_RELEASE_YEAR_ID} +, author = "Marc Pouget and Fr\'ed\'eric Cazals" +, title = "Approximation of Ridges and Umbilics on Triangulated Surface Meshes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgRidges_3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:pc-eldp-${CGAL_RELEASE_YEAR_ID} +, author = "Marc Pouget and Fr\'ed\'eric Cazals" +, title = "Estimation of Local Differential Properties of Point-Sampled Surfaces" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgJet_fitting_3Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ass-psp-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and Laurent Saboret and Nader Salman" +, title = "Point Set Processing" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPointSetProcessingSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:m-ps-${CGAL_RELEASE_YEAR_ID} +, author = "Abdelkrim Mebarki" +, title = "{2D} Placement of Streamlines" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPlacementOfStreamlines2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Spatial Searching and Sorting %%% + +@incollection{cgal:b-ss2-${CGAL_RELEASE_YEAR_ID} +, author = "Matthias B{\"a}sken" +, title = "{2D} Range and Neighbor Search" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPointSet2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:f-isl-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri" +, title = "Interval Skip List" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgIntervalSkipListSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:tf-ssd-${CGAL_RELEASE_YEAR_ID} +, author = "Hans Tangelder and Andreas Fabri" +, title = "{dD} Spatial Searching" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSpatialSearchingDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:n-rstd-${CGAL_RELEASE_YEAR_ID} +, author = "Gabriele Neyer" +, title = "{dD} Range and Segment Trees" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgRangeSegmentTreesDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:kmz-isiobd-${CGAL_RELEASE_YEAR_ID} +, author = "Lutz Kettner and Andreas Meyer and Afra Zomorodian" +, title = "Intersecting Sequences of {dD} Iso-oriented Boxes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBoxIntersectionDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:atw-aabb-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and St\'ephane Tayeb and Camille Wormser" +, title = "{3D} Fast Intersection and Distance Computation (AABB Tree)" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgAABB_treeSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:dd-ss-${CGAL_RELEASE_YEAR_ID} +, author = "Christophe Delage and Olivier Devillers" +, title = "Spatial Sorting" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgSpatialSortingSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Geometric Optimization %%% + +@incollection{cgal:fghhs-bv-${CGAL_RELEASE_YEAR_ID} +, author = "Kaspar Fischer and Bernd G{\"a}rtner and Thomas Herrmann and Michael Hoffmann and Sven Sch{\"o}nherr" +, title = "Bounding Volumes" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBoundingVolumesSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:hp-ia-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hoffmann and Eli Packer" +, title = "Inscribed Areas" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgInscribedAreasSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fghhs-od-${CGAL_RELEASE_YEAR_ID} +, author = "Kaspar Fischer and Bernd G{\"a}rtner and Thomas Herrmann and Michael Hoffmann + and Sven Sch{\"o}nherr" +, title = "Optimal Distances" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgOptimalDistancesSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:ap-pcad-${CGAL_RELEASE_YEAR_ID} +, author = "Pierre Alliez and Sylvain Pion and Ankit Gupta" +, title = "Principal Component Analysis" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgPrincipalComponentAnalysisDSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Interpolation %%% + +@incollection{cgal:f-i-${CGAL_RELEASE_YEAR_ID} +, author = "Julia Fl{\"o}totto" +, title = "{2D} and Surface Function Interpolation" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgInterpolation2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:abha-gbc-${CGAL_RELEASE_YEAR_ID} +, author = "Dmitry Anisimov and David Bommes and Kai Hormann and Pierre Alliez" +, title = "2D Generalized Barycentric Coordinates" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBarycentric_coordinates_2Summary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Kinetic Data Structures %%% + +@incollection{cgal:r-kds-${CGAL_RELEASE_YEAR_ID} +, author = "Daniel Russel" +, title = "Kinetic Data Structures" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgKdsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:r-kdsf-${CGAL_RELEASE_YEAR_ID} +, author = "Daniel Russel" +, title = "Kinetic Framework" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgKdsFrameworkSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Support Library %%% + +@incollection{cgal:hkpw-se-${CGAL_RELEASE_YEAR_ID} +, author = "Michael Hoffmann and Lutz Kettner and Sylvain Pion and Ron Wein" +, title = "STL Extensions for {CGAL}" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgStlExtensionSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:cfw-cbgl-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Fernando Cacciola and Ron Wein" +, title = "{CGAL} and the {Boost} Graph Library" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgBGLSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fs-cbpm-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Laurent Saboret" +, title = "{CGAL} and {Boost} Property Maps" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgProperty_mapSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:dksy-hc-${CGAL_RELEASE_YEAR_ID} +, author = "Olivier Devillers and Lutz Kettner and Michael Seel and Mariette Yvinec" +, title = "Handles and Circulators" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgHandlesAndCirculatorsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:dhhk-gog-${CGAL_RELEASE_YEAR_ID} +, author = "Olivier Devillers and Susan Hert and Michael Hoffmann and Lutz Kettner and Sven Sch{\"o}nherr" +, title = "Geometric Object Generators" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgGeneratorsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:kps-pthum-${CGAL_RELEASE_YEAR_ID} +, author = "Lutz Kettner and Sylvain Pion and Michael Seel" +, title = "Profiling Tools Timers, Hash Map, Union-find, Modifiers" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgProfilingToolsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fgk-ios-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Geert-Jan Giezeman and Lutz Kettner" +, title = "IO Streams" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgIOstreamsSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +%%% Visualization %%% + +@incollection{cgal:fp-gv-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Sylvain Pion" +, title = "Geomview" +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgGeomviewSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:fr-cqgvf-${CGAL_RELEASE_YEAR_ID} +, author = "Andreas Fabri and Laurent Rineau" +, title = "{CGAL} and the Qt Graphics View Framework " +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgGraphicsViewSummary" +, year = ${CGAL_BUILD_YEAR4} +} + +@incollection{cgal:lp-gi-${CGAL_RELEASE_YEAR_ID} +, author = "S\'ebastien Loriot and Sylvain Pion" +, title = "{CGAL} Ipelets " +, publisher = "{CGAL Editorial Board}" +, edition = "{${CGAL_CREATED_VERSION_NUM}}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://doc.cgal.org/${CGAL_CREATED_VERSION_NUM}/Manual/packages.html#PkgCGALIpeletsSummary" +, year = ${CGAL_BUILD_YEAR4} +} diff --git a/Jet_fitting_3/doc/Jet_fitting_3/CGAL/Monge_via_jet_fitting.h b/Jet_fitting_3/doc/Jet_fitting_3/CGAL/Monge_via_jet_fitting.h index 13c37b27dac..f9df0ee5b65 100644 --- a/Jet_fitting_3/doc/Jet_fitting_3/CGAL/Monge_via_jet_fitting.h +++ b/Jet_fitting_3/doc/Jet_fitting_3/CGAL/Monge_via_jet_fitting.h @@ -24,7 +24,7 @@ the geometric classes and tools required by local computations. \tparam SvdTraits features the linear -algebra algorithm required by the fitting method. +algebra algorithm required by the fitting method. The scalar type, `SvdTraits::FT`, must be the same as that of the `LocalKernel` concept : `LocalKernel::FT`. \sa `Eigen_svd` \sa `Monge_form` diff --git a/Jet_fitting_3/doc/Jet_fitting_3/PackageDescription.txt b/Jet_fitting_3/doc/Jet_fitting_3/PackageDescription.txt index 0fabcbfd18f..18ab3348455 100644 --- a/Jet_fitting_3/doc/Jet_fitting_3/PackageDescription.txt +++ b/Jet_fitting_3/doc/Jet_fitting_3/PackageDescription.txt @@ -13,7 +13,7 @@ \cgalPkgSummaryEnd \cgalPkgShortInfoBegin \cgalPkgSince{3.3} -\cgalPkgDependsOn{Solvers from \ref thirdpartyEigen.} +\cgalPkgDependsOn{\ref PkgSolverSummary} \cgalPkgBib{cgal:pc-eldp} \cgalPkgLicense{\ref licensesGPL "GPL"} \cgalPkgDemo{Operations on Polyhedra,polyhedron_3.zip} @@ -25,12 +25,12 @@ ## Concepts ## - `DataKernel` - `LocalKernel` -- `SvdTraits` + ## Classes ## - \link CGAL::Monge_via_jet_fitting::Monge_form `CGAL::Monge_via_jet_fitting< DataKernel, LocalKernel, SvdTraits>::Monge_form` \endlink - `CGAL::Monge_via_jet_fitting` -- `CGAL::Eigen_svd` + ## Global Functions ## The insert operator (operator<< ) is overloaded for the class \link CGAL::Monge_via_jet_fitting::Monge_form `Monge_form` \endlink. diff --git a/Jet_fitting_3/doc/Jet_fitting_3/dependencies b/Jet_fitting_3/doc/Jet_fitting_3/dependencies index 468e2683aad..f18ef3e0938 100644 --- a/Jet_fitting_3/doc/Jet_fitting_3/dependencies +++ b/Jet_fitting_3/doc/Jet_fitting_3/dependencies @@ -5,3 +5,4 @@ Algebraic_foundations Circulator Stream_support Number_types +Solver_interface diff --git a/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h b/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h index a743dc52964..1236ac6f688 100644 --- a/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h +++ b/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h @@ -22,8 +22,8 @@ #include #include #include -#include #include +#include #include #include #ifdef CGAL_EIGEN3_ENABLED @@ -362,27 +362,30 @@ compute_PCA(InputIterator begin, InputIterator end) // assemble covariance matrix as a // semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 - FT covariance[6] = {xx,xy,yy,xz,yz,zz}; - FT eigen_values[3]; - FT eigen_vectors[9]; + // 0 1 2 + // 3 4 + // 5 + CGAL::cpp11::array covariance = {{ xx,xy,xz,yy,yz,zz }}; + CGAL::cpp11::array eigen_values = {{ 0., 0., 0. }}; + CGAL::cpp11::array eigen_vectors = {{ 0., 0., 0. }}; // solve for eigenvalues and eigenvectors. - // eigen values are sorted in descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - CGAL::internal::eigen_symmetric(covariance,3,eigen_vectors,eigen_values); + CGAL::Default_diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (covariance, eigen_values, eigen_vectors); + //store in m_pca_basis for (int i=0; i<3; i++) { - m_pca_basis[i].first = eigen_values[i]; + m_pca_basis[i].first = eigen_values[2-i]; } - Vector_3 v1(eigen_vectors[0],eigen_vectors[1],eigen_vectors[2]); + + Vector_3 v1(eigen_vectors[6],eigen_vectors[7],eigen_vectors[8]); m_pca_basis[0].second = v1; Vector_3 v2(eigen_vectors[3],eigen_vectors[4],eigen_vectors[5]); m_pca_basis[1].second = v2; - Vector_3 v3(eigen_vectors[6],eigen_vectors[7],eigen_vectors[8]); + Vector_3 v3(eigen_vectors[0],eigen_vectors[1],eigen_vectors[2]); m_pca_basis[2].second = v3; switch_to_direct_orientation(m_pca_basis[0].second, m_pca_basis[1].second, @@ -524,15 +527,17 @@ compute_Monge_basis(const FT* A, Monge_form& monge_form) //in the new orthonormal basis (Y,Z) of the tangent plane : weingarten = inv *(1/det) * weingarten * change_XuXv2YZ; - //switch to eigen_symmetric algo for diagonalization of weingarten - FT W[3] = {weingarten(0,0), weingarten(1,0), weingarten(1,1)}; - FT eval[2]; - FT evec[4]; - //eval in decreasing order - CGAL::internal::eigen_symmetric(W,2,evec,eval); + // diagonalization of weingarten + CGAL::cpp11::array W = {{ weingarten(0,0), weingarten(1,0), weingarten(1,1) }}; + CGAL::cpp11::array eval = {{ 0., 0. }}; + CGAL::cpp11::array evec = {{ 0., 0., 0., 0. }}; - Vector_3 d_max = evec[0]*Y + evec[1]*Z, - d_min = evec[2]*Y + evec[3]*Z; + //eval in increasing order + CGAL::Default_diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (W, eval, evec); + + Vector_3 d_max = evec[2]*Y + evec[3]*Z, + d_min = evec[0]*Y + evec[1]*Z; switch_to_direct_orientation(d_max, d_min, normal); Aff_transformation change_basis (d_max[0], d_max[1], d_max[2], @@ -548,8 +553,8 @@ compute_Monge_basis(const FT* A, Monge_form& monge_form) monge_form.maximal_principal_direction() = L2D_converter(this->change_world2fitting.inverse()(d_max)); monge_form.minimal_principal_direction() = L2D_converter(this->change_world2fitting.inverse()(d_min)); monge_form.normal_direction() = L2D_converter(this->change_world2fitting.inverse()(normal)); - monge_form.coefficients()[0] = L2D_NTconverter()(eval[0]); - monge_form.coefficients()[1] = L2D_NTconverter()(eval[1]); + monge_form.coefficients()[0] = L2D_NTconverter()(eval[1]); + monge_form.coefficients()[1] = L2D_NTconverter()(eval[0]); } //end else } diff --git a/Point_set_processing_3/doc/Point_set_processing_3/Concepts/VCMTraits.h b/Point_set_processing_3/doc/Point_set_processing_3/Concepts/VCMTraits.h deleted file mode 100644 index 4c4b91b12a1..00000000000 --- a/Point_set_processing_3/doc/Point_set_processing_3/Concepts/VCMTraits.h +++ /dev/null @@ -1,34 +0,0 @@ -/*! -\ingroup PkgPointSetProcessingConcepts -\cgalConcept -Concept providing functions to extract eigenvectors and eigenvalue from -covariance matrices represented by an array `a` as follows: -
-\f$ \begin{bmatrix} - a[0] & a[1] & a[2] \\ - a[1] & a[3] & a[4] \\ - a[2] & a[4] & a[5] \\ - \end{bmatrix}\f$ -
-\cgalHasModel `CGAL::Eigen_vcm_traits` -*/ -class VCMTraits -{ -public: - /// fill `eigenvalues` with the eigenvalues of the covariance matrix represented by `cov`. - /// Eigenvalues are sorted by increasing order. - /// \return `true` if the operation was successful and `false` otherwise. - static bool - diagonalize_selfadjoint_covariance_matrix( - const cpp11::array& cov, - cpp11::array& eigenvalues); - - /// Extract the eigenvector associated to the largest eigenvalue - /// of the covariance matrix represented by `cov`. - /// \return `true` if the operation was successful and `false` otherwise. - static bool - extract_largest_eigenvector_of_covariance_matrix ( - const cpp11::array& cov, - cpp11::array &normal); -}; - diff --git a/Point_set_processing_3/doc/Point_set_processing_3/PackageDescription.txt b/Point_set_processing_3/doc/Point_set_processing_3/PackageDescription.txt index d5314b0615b..95815baa255 100644 --- a/Point_set_processing_3/doc/Point_set_processing_3/PackageDescription.txt +++ b/Point_set_processing_3/doc/Point_set_processing_3/PackageDescription.txt @@ -13,7 +13,7 @@ \cgalPkgSummaryEnd \cgalPkgShortInfoBegin \cgalPkgSince{3.5} -\cgalPkgDependsOn{\ref thirdpartyEigen "Eigen"} +\cgalPkgDependsOn{\ref PkgSolverSummary} \cgalPkgBib{cgal:ass-psp} \cgalPkgLicense{\ref licensesGPL "GPL"} \cgalPkgDemo{See Polyhedral Surface,polyhedron_3.zip} diff --git a/Point_set_processing_3/include/CGAL/Eigen_vcm_traits.h b/Point_set_processing_3/include/CGAL/Eigen_vcm_traits.h deleted file mode 100644 index 6a2aef110c3..00000000000 --- a/Point_set_processing_3/include/CGAL/Eigen_vcm_traits.h +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) 2014 INRIA Sophia-Antipolis (France). -// 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 -// 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) : Jocelyn Meyron and Quentin Mérigot -// - -#ifndef CGAL_EIGEN_VCM_TRAITS_H -#define CGAL_EIGEN_VCM_TRAITS_H - -#include -#include - -#include - -namespace CGAL { - -/// A model of the concept `VCMTraits` using \ref thirdpartyEigen. -/// \cgalModels `VCMTraits` -class Eigen_vcm_traits{ - // Construct the covariance matrix - static Eigen::Matrix3f - construct_covariance_matrix (const cpp11::array& cov) { - Eigen::Matrix3f m; - - m(0,0) = cov[0]; m(0,1) = cov[1]; m(0,2) = cov[2]; - m(1,1) = cov[3]; m(1,2) = cov[4]; - m(2,2) = cov[5]; - - m(1, 0) = m(0,1); m(2, 0) = m(0, 2); m(2, 1) = m(1, 2); - - return m; - } - - // Diagonalize a selfadjoint matrix - static bool - diagonalize_selfadjoint_matrix (Eigen::Matrix3f &m, - Eigen::Matrix3f &eigenvectors, - Eigen::Vector3f &eigenvalues) { - Eigen::SelfAdjointEigenSolver eigensolver(m); - - if (eigensolver.info() != Eigen::Success) { - return false; - } - - eigenvalues = eigensolver.eigenvalues(); - eigenvectors = eigensolver.eigenvectors(); - - return true; - } - -public: - static bool - diagonalize_selfadjoint_covariance_matrix( - const cpp11::array& cov, - cpp11::array& eigenvalues) - { - Eigen::Matrix3f m = construct_covariance_matrix(cov); - - // Diagonalizing the matrix - Eigen::Vector3f eigenvalues_; - Eigen::Matrix3f eigenvectors_; - bool res = diagonalize_selfadjoint_matrix(m, eigenvectors_, eigenvalues_); - - if (res) - { - eigenvalues[0]=eigenvalues_[0]; - eigenvalues[1]=eigenvalues_[1]; - eigenvalues[2]=eigenvalues_[2]; - } - - return res; - } - - // Extract the eigenvector associated to the largest eigenvalue - static bool - extract_largest_eigenvector_of_covariance_matrix ( - const cpp11::array& cov, - cpp11::array &normal) - { - // Construct covariance matrix - Eigen::Matrix3f m = construct_covariance_matrix(cov); - - // Diagonalizing the matrix - Eigen::Vector3f eigenvalues; - Eigen::Matrix3f eigenvectors; - if (! diagonalize_selfadjoint_matrix(m, eigenvectors, eigenvalues)) { - return false; - } - - // Eigenvalues are already sorted by increasing order - normal[0]=eigenvectors(0,0); - normal[1]=eigenvectors(1,0); - normal[2]=eigenvectors(2,0); - - return true; - } -}; - -} // namespace CGAL - -#endif // CGAL_EIGEN_VCM_TRAITS_H diff --git a/Point_set_processing_3/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_3.h b/Point_set_processing_3/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_3.h index f302e3c7e09..cf140b23841 100644 --- a/Point_set_processing_3/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_3.h +++ b/Point_set_processing_3/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_3.h @@ -79,8 +79,8 @@ namespace CGAL { template inline void operator () (const Point &a, - const Point &c, - const Point &b) + const Point &b, + const Point &c) { internal::covariance_matrix_tetrahedron (a[0], a[1], a[2], b[0], b[1], b[2], @@ -109,8 +109,8 @@ namespace CGAL { template inline void operator () (const Point &a, - const Point &c, - const Point &b) + const Point &b, + const Point &c) { const double vol = CGAL::volume(a, b, c, Point(CGAL::ORIGIN)); //std::cerr << "vol = " << vol << "\n"; @@ -168,12 +168,10 @@ namespace CGAL { typename Polyhedron::Halfedge_around_facet_circulator h0 = it->facet_begin(), hf = h0--, hs = cpp11::next(hf); - while(1) + while(hs != h0) { f (h0->vertex()->point(), hf->vertex()->point(), hs->vertex()->point()); - if (hs == h0) - break; ++hs; ++hf; } } diff --git a/Point_set_processing_3/include/CGAL/vcm_estimate_edges.h b/Point_set_processing_3/include/CGAL/vcm_estimate_edges.h index e9f5e30d51c..5a2185a6cfb 100644 --- a/Point_set_processing_3/include/CGAL/vcm_estimate_edges.h +++ b/Point_set_processing_3/include/CGAL/vcm_estimate_edges.h @@ -39,9 +39,12 @@ namespace CGAL { /// which however would result in selecting more points on sharper regions. /// More details are provided in \cgalCite{cgal:mog-vbcfe-11}. /// -/// \tparam VCM_traits is a model of `VCMTraits`. If Eigen 3 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined -/// then an overload using `Eigen_vcm_traits` is provided and this template parameter can be omitted. -/// \sa `CGAL::compute_vcm()` +/// \tparam VCM_traits is a model of `DiagonalizeTraits`. It can be +/// omitted: if Eigen 3 (or greater) is available and +/// `CGAL_EIGEN3_ENABLED` is defined then an overload using +/// `Eigen_diagonalize_traits` is provided. Otherwise, the internal +/// implementation `Internal_diagonalize_traits` is used. +/// \sa CGAL::compute_vcm()` /// template bool @@ -66,15 +69,15 @@ vcm_is_on_feature_edge (cpp11::array &cov, -#ifdef CGAL_EIGEN3_ENABLED template bool vcm_is_on_feature_edge (cpp11::array &cov, double threshold) { - return vcm_is_on_feature_edge(cov, threshold, Eigen_vcm_traits()); + return vcm_is_on_feature_edge(cov, threshold, + CGAL::Default_diagonalize_traits()); + } -#endif } // namespace CGAL diff --git a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h index 51c5f37b6b1..b86a15b6346 100644 --- a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h @@ -32,9 +32,7 @@ #include #include -#ifdef CGAL_EIGEN3_ENABLED -#include -#endif +#include #include #include @@ -368,9 +366,11 @@ vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input /// @tparam ForwardIterator iterator over input points. /// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = `Kernel::Point_3`. /// @tparam NormalPMap is a model of `WritablePropertyMap` with a value_type = `Kernel::Vector_3`. -/// \tparam VCM_traits is a model of `VCMTraits`. If Eigen 3 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined -/// then an overload using `Eigen_vcm_traits` is provided and this template parameter can be omitted. - +/// \tparam VCM_traits is a model of `DiagonalizeTraits`. It can be +/// omitted: if Eigen 3 (or greater) is available and +/// `CGAL_EIGEN3_ENABLED` is defined then an overload using +/// `Eigen_diagonalize_traits` is provided. Otherwise, the internal +/// implementation `Internal_diagonalize_traits` is used. // This variant deduces the kernel from the point property map // and uses a radius for the convolution. template < typename ForwardIterator, @@ -409,8 +409,11 @@ vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input /// @tparam ForwardIterator iterator over input points. /// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = `Kernel::Point_3`. /// @tparam NormalPMap is a model of `WritablePropertyMap` with a value_type = `Kernel::Vector_3`. -/// \tparam VCM_traits is a model of `VCMTraits`. If Eigen 3 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined -/// then an overload using `Eigen_vcm_traits` is provided and this template parameter can be omitted. +/// \tparam VCM_traits is a model of `DiagonalizeTraits`. It can be +/// omitted: if Eigen 3 (or greater) is available and +/// `CGAL_EIGEN3_ENABLED` is defined then an overload using +/// `Eigen_diagonalize_traits` is provided. Otherwise, the internal +/// implementation `Internal_diagonalize_traits` is used. // This variant deduces the kernel from the point property map // and uses a number of neighbors for the convolution. @@ -440,7 +443,6 @@ vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input } -#ifdef CGAL_EIGEN3_ENABLED template < typename ForwardIterator, typename PointPMap, typename NormalPMap @@ -453,7 +455,8 @@ vcm_estimate_normals (ForwardIterator first, double offset_radius, double convolution_radius) { - vcm_estimate_normals(first, beyond, point_pmap, normal_pmap, offset_radius, convolution_radius, Eigen_vcm_traits()); + vcm_estimate_normals(first, beyond, point_pmap, normal_pmap, offset_radius, convolution_radius, + CGAL::Default_diagonalize_traits()); } template < typename ForwardIterator, @@ -468,9 +471,11 @@ vcm_estimate_normals (ForwardIterator first, double offset_radius, unsigned int nb_neighbors_convolve) { - vcm_estimate_normals(first, beyond, point_pmap, normal_pmap, offset_radius, nb_neighbors_convolve, Eigen_vcm_traits()); + vcm_estimate_normals(first, beyond, point_pmap, normal_pmap, offset_radius, nb_neighbors_convolve, + CGAL::Default_diagonalize_traits()); + } -#endif + /// @cond SKIP_IN_MANUAL // This variant creates a default point property map = Identity_property_map diff --git a/Point_set_processing_3/test/Point_set_processing_3/vcm_plane_test.cpp b/Point_set_processing_3/test/Point_set_processing_3/vcm_plane_test.cpp index 8e22d105b37..a62a31b7979 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/vcm_plane_test.cpp +++ b/Point_set_processing_3/test/Point_set_processing_3/vcm_plane_test.cpp @@ -30,11 +30,11 @@ int main (void) { std::cout << "Normal is " << points[0].second << std::endl; - // The normal at the origin should be (0, 0, -1) + // The normal at the origin should be (0, 0, 1) double epsilon=2e-5; assert(points[0].second.x() < epsilon && points[0].second.x() > -epsilon); assert(points[0].second.y() < epsilon && points[0].second.y() > -epsilon); - assert(points[0].second.z() < -1+epsilon && points[0].second.z() > -1-epsilon); + assert(points[0].second.z() < 1+epsilon && points[0].second.z() > 1-epsilon); return 0; } diff --git a/Principal_component_analysis/doc/Principal_component_analysis/CGAL/linear_least_squares_fitting_2.h b/Principal_component_analysis/doc/Principal_component_analysis/CGAL/linear_least_squares_fitting_2.h index a7d779586db..304ca8581a9 100644 --- a/Principal_component_analysis/doc/Principal_component_analysis/CGAL/linear_least_squares_fitting_2.h +++ b/Principal_component_analysis/doc/Principal_component_analysis/CGAL/linear_least_squares_fitting_2.h @@ -13,6 +13,8 @@ The tag `tag` identifies the dimension to be considered from the objects. For po The class `K` is the kernel in which the value type of the `InputIterator` is defined. It can be omitted and deduced automatically from the value type. +The class `Diagonalize_traits` is a model of `DiagonalizeTraits`. It can be omitted: if Eigen 3 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined then an overload using `Eigen_diagonalize_traits` is provided. Otherwise, the internal implementation `Internal_diagonalize_traits` is used. + \cgalHeading{Requirements}
    @@ -28,14 +30,15 @@ omitted. \pre first != beyond. */ -template < typename InputIterator, typename K, typename Tag > +template < typename InputIterator, typename K, typename Tag, typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, typename K::Line_2 & line, typename K::Point_2 & centroid, const Tag & tag, -const K & k); +const K & k, +const Diagonalize_traits& diagonalize_traits); } /* namespace CGAL */ diff --git a/Principal_component_analysis/doc/Principal_component_analysis/CGAL/linear_least_squares_fitting_3.h b/Principal_component_analysis/doc/Principal_component_analysis/CGAL/linear_least_squares_fitting_3.h index f3bb5e1313a..8b47c02334b 100644 --- a/Principal_component_analysis/doc/Principal_component_analysis/CGAL/linear_least_squares_fitting_3.h +++ b/Principal_component_analysis/doc/Principal_component_analysis/CGAL/linear_least_squares_fitting_3.h @@ -64,6 +64,13 @@ The class `K` is the kernel in which the value type of `InputIterator` is defined. It can be omitted and deduced automatically from the value type. +The class `Diagonalize_traits` is a model of `DiagonalizeTraits`. It +can be omitted: if Eigen 3 (or greater) is available and +`CGAL_EIGEN3_ENABLED` is defined then an overload using +`Eigen_diagonalize_traits` is provided. Otherwise, the internal +implementation `Internal_diagonalize_traits` is used. + + \cgalHeading{Requirements}
      @@ -77,14 +84,15 @@ automatically from the value type. */ -template < typename InputIterator, typename K, typename Tag > +template < typename InputIterator, typename K, typename Tag, typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, typename K::Line_3& line, typename K::Point_3& centroid, const Tag& tag, -const K& k); +const K& k, +const Diagonalize_traits& diagonalize_traits); /*! \brief computes the best fitting 3D plane of a 3D object set in the @@ -100,6 +108,12 @@ of `InputIterator` is defined. It can be omitted and deduced automatically from the value type. The tag `tag` identifies the dimension to be considered from the objects (see above). +The class `Diagonalize_traits` is a model of `DiagonalizeTraits`. It +can be omitted: if Eigen 3 (or greater) is available and +`CGAL_EIGEN3_ENABLED` is defined then an overload using +`Eigen_diagonalize_traits` is provided. Otherwise, the internal +implementation `Internal_diagonalize_traits` is used. + \cgalHeading{Requirements}
        @@ -112,14 +126,15 @@ dimension to be considered from the objects (see above).
      */ -template < typename InputIterator, typename K, typename Tag > +template < typename InputIterator, typename K, typename Tag, typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, typename K::Plane_3& plane, typename K::Point_3& centroid, const Tag& tag, -const K& k); +const K& k, +const Diagonalize_traits& diagonalize_traits); /// @} diff --git a/Principal_component_analysis/doc/Principal_component_analysis/PackageDescription.txt b/Principal_component_analysis/doc/Principal_component_analysis/PackageDescription.txt index d97d63be268..f164582cac4 100644 --- a/Principal_component_analysis/doc/Principal_component_analysis/PackageDescription.txt +++ b/Principal_component_analysis/doc/Principal_component_analysis/PackageDescription.txt @@ -27,6 +27,7 @@ \cgalPkgSummaryEnd \cgalPkgShortInfoBegin \cgalPkgSince{3.2} +\cgalPkgDependsOn{\ref PkgSolverSummary} \cgalPkgBib{cgal:ap-pcad} \cgalPkgLicense{\ref licensesGPL "GPL"} \cgalPkgDemo{Principal Component Analysis,pca.zip,Operations on Polygons,polygon.zip,Operations on Polyhedra,polyhedron_3.zip} diff --git a/Principal_component_analysis/doc/Principal_component_analysis/dependencies b/Principal_component_analysis/doc/Principal_component_analysis/dependencies index a4d5f76715e..5b5101754b5 100644 --- a/Principal_component_analysis/doc/Principal_component_analysis/dependencies +++ b/Principal_component_analysis/doc/Principal_component_analysis/dependencies @@ -4,3 +4,4 @@ STL_Extension Algebraic_foundations Circulator Stream_support +Solver_interface diff --git a/Principal_component_analysis/include/CGAL/PCA_util.h b/Principal_component_analysis/include/CGAL/PCA_util.h index 5a4b3b5e0ee..bec34de0686 100644 --- a/Principal_component_analysis/include/CGAL/PCA_util.h +++ b/Principal_component_analysis/include/CGAL/PCA_util.h @@ -20,7 +20,6 @@ #ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_UTIL_H #define CGAL_LINEAR_LEAST_SQUARES_FITTING_UTIL_H -#include #include #include @@ -52,7 +51,7 @@ template < typename InputIterator, void assemble_covariance_matrix_3(InputIterator first, InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + CGAL::cpp11::array& covariance, // covariance matrix const typename K::Point_3& c, // centroid const K& , // kernel const typename K::Point_3*, // used for indirection @@ -63,9 +62,9 @@ assemble_covariance_matrix_3(InputIterator first, typedef typename K::Vector_3 Vector; // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 covariance[0] = covariance[1] = covariance[2] = covariance[3] = covariance[4] = covariance[5] = (FT)0.0; for(InputIterator it = first; @@ -76,8 +75,8 @@ assemble_covariance_matrix_3(InputIterator first, Vector d = p - c; covariance[0] += d.x() * d.x(); covariance[1] += d.x() * d.y(); - covariance[2] += d.y() * d.y(); - covariance[3] += d.x() * d.z(); + covariance[2] += d.x() * d.z(); + covariance[3] += d.y() * d.y(); covariance[4] += d.y() * d.z(); covariance[5] += d.z() * d.z(); } @@ -88,8 +87,8 @@ template < typename InputIterator, typename K > void assemble_covariance_matrix_3(InputIterator first, - InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + InputIterator beyond, + CGAL::cpp11::array& covariance, // covariance matrix const typename K::Point_3& c, // centroid const K&, // kernel const typename K::Triangle_3*,// used for indirection @@ -102,9 +101,9 @@ assemble_covariance_matrix_3(InputIterator first, // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 //Final combined covariance matrix for all triangles and their combined mass FT mass = 0.0; @@ -141,8 +140,8 @@ assemble_covariance_matrix_3(InputIterator first, // and add to covariance matrix covariance[0] += transformation[0][0]; covariance[1] += transformation[1][0]; - covariance[2] += transformation[1][1]; - covariance[3] += transformation[2][0]; + covariance[2] += transformation[2][0]; + covariance[3] += transformation[1][1]; covariance[4] += transformation[2][1]; covariance[5] += transformation[2][2]; @@ -153,8 +152,8 @@ assemble_covariance_matrix_3(InputIterator first, // the center of mass to get the covariance. covariance[0] += mass * (-1.0 * c.x() * c.x()); covariance[1] += mass * (-1.0 * c.x() * c.y()); - covariance[2] += mass * (-1.0 * c.y() * c.y()); - covariance[3] += mass * (-1.0 * c.z() * c.x()); + covariance[2] += mass * (-1.0 * c.z() * c.x()); + covariance[3] += mass * (-1.0 * c.y() * c.y()); covariance[4] += mass * (-1.0 * c.z() * c.y()); covariance[5] += mass * (-1.0 * c.z() * c.z()); @@ -165,8 +164,8 @@ template < typename InputIterator, typename K > void assemble_covariance_matrix_3(InputIterator first, - InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + InputIterator beyond, + CGAL::cpp11::array& covariance, // covariance matrix const typename K::Point_3& c, // centroid const K& , // kernel const typename K::Iso_cuboid_3*,// used for indirection @@ -179,9 +178,9 @@ assemble_covariance_matrix_3(InputIterator first, // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 // final combined covariance matrix for all cuboids and their combined mass FT mass = (FT)0.0; @@ -227,8 +226,8 @@ assemble_covariance_matrix_3(InputIterator first, // and add to covariance matrix covariance[0] += transformation[0][0] + volume * (2*x0*xav0 + x0*x0); covariance[1] += transformation[1][0] + volume * (xav0*y0 + yav0*x0 + x0*y0); - covariance[2] += transformation[1][1] + volume * (2*y0*yav0 + y0*y0); - covariance[3] += transformation[2][0] + volume * (x0*zav0 + xav0*z0 + x0*z0); + covariance[2] += transformation[2][0] + volume * (x0*zav0 + xav0*z0 + x0*z0); + covariance[3] += transformation[1][1] + volume * (2*y0*yav0 + y0*y0); covariance[4] += transformation[2][1] + volume * (yav0*z0 + y0*zav0 + z0*y0); covariance[5] += transformation[2][2] + volume * (2*zav0*z0 + z0*z0); @@ -239,8 +238,8 @@ assemble_covariance_matrix_3(InputIterator first, // the center of mass to get the covariance. covariance[0] += mass * (- c.x() * c.x()); covariance[1] += mass * (- c.x() * c.y()); - covariance[2] += mass * (- c.y() * c.y()); - covariance[3] += mass * (- c.z() * c.x()); + covariance[2] += mass * (- c.z() * c.x()); + covariance[3] += mass * (- c.y() * c.y()); covariance[4] += mass * (- c.z() * c.y()); covariance[5] += mass * (- c.z() * c.z()); } @@ -251,7 +250,7 @@ template < typename InputIterator, void assemble_covariance_matrix_3(InputIterator first, InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + CGAL::cpp11::array& covariance, // covariance matrix const typename K::Point_3& c, // centroid const K& , // kernel const typename K::Iso_cuboid_3*,// used for indirection @@ -264,9 +263,9 @@ assemble_covariance_matrix_3(InputIterator first, // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 //Final combined covariance matrix for all cuboids and their combined mass FT mass = (FT)0.0; @@ -319,8 +318,8 @@ assemble_covariance_matrix_3(InputIterator first, // and add to covariance matrix covariance[0] += transformation[0][0] + area * (2*x0*xav0 + x0*x0); covariance[1] += transformation[1][0] + area * (xav0*y0 + yav0*x0 + x0*y0); - covariance[2] += transformation[1][1] + area * (2*y0*yav0 + y0*y0); - covariance[3] += transformation[2][0] + area * (x0*zav0 + xav0*z0 + x0*z0); + covariance[2] += transformation[2][0] + area * (x0*zav0 + xav0*z0 + x0*z0); + covariance[3] += transformation[1][1] + area * (2*y0*yav0 + y0*y0); covariance[4] += transformation[2][1] + area * (yav0*z0 + y0*zav0 + z0*y0); covariance[5] += transformation[2][2] + area * (2*zav0*z0 + z0*z0); @@ -331,8 +330,8 @@ assemble_covariance_matrix_3(InputIterator first, // the center of mass to get the covariance. covariance[0] += mass * (-1.0 * c.x() * c.x()); covariance[1] += mass * (-1.0 * c.x() * c.y()); - covariance[2] += mass * (-1.0 * c.y() * c.y()); - covariance[3] += mass * (-1.0 * c.z() * c.x()); + covariance[2] += mass * (-1.0 * c.z() * c.x()); + covariance[3] += mass * (-1.0 * c.y() * c.y()); covariance[4] += mass * (-1.0 * c.z() * c.y()); covariance[5] += mass * (-1.0 * c.z() * c.z()); @@ -344,7 +343,7 @@ template < typename InputIterator, void assemble_covariance_matrix_3(InputIterator first, InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + CGAL::cpp11::array& covariance, // covariance matrix const typename K::Point_3& c, // centroid const K&, // kernel const typename K::Sphere_3*, // used for indirection @@ -357,9 +356,9 @@ assemble_covariance_matrix_3(InputIterator first, // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 //Final combined covariance matrix for all spheres and their combined mass FT mass = 0.0; @@ -402,8 +401,8 @@ assemble_covariance_matrix_3(InputIterator first, // and add to covariance matrix covariance[0] += transformation[0][0] + volume * x0*x0; covariance[1] += transformation[1][0] + volume * x0*y0; - covariance[2] += transformation[1][1] + volume * y0*y0; - covariance[3] += transformation[2][0] + volume * x0*z0; + covariance[2] += transformation[2][0] + volume * x0*z0; + covariance[3] += transformation[1][1] + volume * y0*y0; covariance[4] += transformation[2][1] + volume * z0*y0; covariance[5] += transformation[2][2] + volume * z0*z0; @@ -414,8 +413,8 @@ assemble_covariance_matrix_3(InputIterator first, // the center of mass to get the covariance. covariance[0] += mass * (-1.0 * c.x() * c.x()); covariance[1] += mass * (-1.0 * c.x() * c.y()); - covariance[2] += mass * (-1.0 * c.y() * c.y()); - covariance[3] += mass * (-1.0 * c.z() * c.x()); + covariance[2] += mass * (-1.0 * c.z() * c.x()); + covariance[3] += mass * (-1.0 * c.y() * c.y()); covariance[4] += mass * (-1.0 * c.z() * c.y()); covariance[5] += mass * (-1.0 * c.z() * c.z()); @@ -426,7 +425,7 @@ template < typename InputIterator, void assemble_covariance_matrix_3(InputIterator first, InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + CGAL::cpp11::array& covariance, // covariance matrix const typename K::Point_3& c, // centroid const K&, // kernel const typename K::Sphere_3*, // used for indirection @@ -439,9 +438,9 @@ assemble_covariance_matrix_3(InputIterator first, // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 //Final combined covariance matrix for all spheres and their combined mass FT mass = 0.0; @@ -485,8 +484,8 @@ assemble_covariance_matrix_3(InputIterator first, // and add to covariance matrix covariance[0] += transformation[0][0] + area * x0*x0; covariance[1] += transformation[1][0] + area * x0*y0; - covariance[2] += transformation[1][1] + area * y0*y0; - covariance[3] += transformation[2][0] + area * x0*z0; + covariance[2] += transformation[2][0] + area * x0*z0; + covariance[3] += transformation[1][1] + area * y0*y0; covariance[4] += transformation[2][1] + area * z0*y0; covariance[5] += transformation[2][2] + area * z0*z0; @@ -497,8 +496,8 @@ assemble_covariance_matrix_3(InputIterator first, // the center of mass to get the covariance. covariance[0] += mass * (-1.0 * c.x() * c.x()); covariance[1] += mass * (-1.0 * c.x() * c.y()); - covariance[2] += mass * (-1.0 * c.y() * c.y()); - covariance[3] += mass * (-1.0 * c.z() * c.x()); + covariance[2] += mass * (-1.0 * c.z() * c.x()); + covariance[3] += mass * (-1.0 * c.y() * c.y()); covariance[4] += mass * (-1.0 * c.z() * c.y()); covariance[5] += mass * (-1.0 * c.z() * c.z()); @@ -510,7 +509,7 @@ template < typename InputIterator, void assemble_covariance_matrix_3(InputIterator first, InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + CGAL::cpp11::array& covariance, // covariance matrix const typename K::Point_3& c, // centroid const K& , // kernel const typename K::Tetrahedron_3*,// used for indirection @@ -523,9 +522,9 @@ assemble_covariance_matrix_3(InputIterator first, // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 //Final combined covariance matrix for all tetrahedrons and their combined mass FT mass = 0.0; @@ -571,8 +570,8 @@ assemble_covariance_matrix_3(InputIterator first, // and add to covariance matrix covariance[0] += transformation[0][0] + volume * (2*x0*xav0 + x0*x0); covariance[1] += transformation[1][0] + volume * (xav0*y0 + yav0*x0 + x0*y0); - covariance[2] += transformation[1][1] + volume * (2*y0*yav0 + y0*y0); - covariance[3] += transformation[2][0] + volume * (x0*zav0 + xav0*z0 + x0*z0); + covariance[2] += transformation[2][0] + volume * (x0*zav0 + xav0*z0 + x0*z0); + covariance[3] += transformation[1][1] + volume * (2*y0*yav0 + y0*y0); covariance[4] += transformation[2][1] + volume * (yav0*z0 + y0*zav0 + z0*y0); covariance[5] += transformation[2][2] + volume * (2*zav0*z0 + z0*z0); @@ -583,8 +582,8 @@ assemble_covariance_matrix_3(InputIterator first, // the center of mass to get the covariance. covariance[0] += mass * (-1.0 * c.x() * c.x()); covariance[1] += mass * (-1.0 * c.x() * c.y()); - covariance[2] += mass * (-1.0 * c.y() * c.y()); - covariance[3] += mass * (-1.0 * c.z() * c.x()); + covariance[2] += mass * (-1.0 * c.z() * c.x()); + covariance[3] += mass * (-1.0 * c.y() * c.y()); covariance[4] += mass * (-1.0 * c.z() * c.y()); covariance[5] += mass * (-1.0 * c.z() * c.z()); } @@ -595,7 +594,7 @@ template < typename InputIterator, void assemble_covariance_matrix_3(InputIterator first, InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + CGAL::cpp11::array& covariance, // covariance matrix const typename K::Point_3& c, // centroid const K& , // kernel const typename K::Segment_3*,// used for indirection @@ -608,9 +607,9 @@ assemble_covariance_matrix_3(InputIterator first, // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 //Final combined covariance matrix for all segments and their combined mass FT mass = 0.0; @@ -648,8 +647,8 @@ assemble_covariance_matrix_3(InputIterator first, // and add to covariance matrix covariance[0] += transformation[0][0]; covariance[1] += transformation[1][0]; - covariance[2] += transformation[1][1]; - covariance[3] += transformation[2][0]; + covariance[2] += transformation[2][0]; + covariance[3] += transformation[1][1]; covariance[4] += transformation[2][1]; covariance[5] += transformation[2][2]; @@ -660,8 +659,8 @@ assemble_covariance_matrix_3(InputIterator first, // the center of mass to get the covariance. covariance[0] += mass * (-1.0 * c.x() * c.x()); covariance[1] += mass * (-1.0 * c.x() * c.y()); - covariance[2] += mass * (-1.0 * c.y() * c.y()); - covariance[3] += mass * (-1.0 * c.z() * c.x()); + covariance[2] += mass * (-1.0 * c.z() * c.x()); + covariance[3] += mass * (-1.0 * c.y() * c.y()); covariance[4] += mass * (-1.0 * c.z() * c.y()); covariance[5] += mass * (-1.0 * c.z() * c.z()); @@ -671,23 +670,27 @@ assemble_covariance_matrix_3(InputIterator first, // compute the eigen values and vectors of the covariance // matrix and deduces the best linear fitting plane. // returns fitting quality -template < typename K > +template < typename K, typename Diagonalize_traits > typename K::FT -fitting_plane_3(const typename K::FT covariance[6], // covariance matrix +fitting_plane_3(CGAL::cpp11::array& covariance, // covariance matrix const typename K::Point_3& c, // centroid typename K::Plane_3& plane, // best fit plane - const K& ) // kernel + const K&, // kernel + const Diagonalize_traits& ) // Diagonalize traits { typedef typename K::FT FT; typedef typename K::Plane_3 Plane; typedef typename K::Vector_3 Vector; // solve for eigenvalues and eigenvectors. - // eigen values are sorted in descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - FT eigen_values[3]; - FT eigen_vectors[9]; - eigen_symmetric(covariance,3,eigen_vectors,eigen_values); + CGAL::cpp11::array eigen_values = {{ 0. , 0., 0. }}; + CGAL::cpp11::array eigen_vectors = {{ 0., 0., 0., + 0., 0., 0., + 0., 0., 0. }}; + Diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (covariance, eigen_values, eigen_vectors); // degenerate case if(eigen_values[0] == eigen_values[1] && @@ -700,11 +703,11 @@ fitting_plane_3(const typename K::FT covariance[6], // covariance matrix } else // regular and line case { - Vector normal(eigen_vectors[6], - eigen_vectors[7], - eigen_vectors[8]); + Vector normal(eigen_vectors[0], + eigen_vectors[1], + eigen_vectors[2]); plane = Plane(c,normal); - return FT(1) - eigen_values[2] / eigen_values[1]; + return FT(1) - eigen_values[0] / eigen_values[1]; } // end regular case } @@ -712,23 +715,27 @@ fitting_plane_3(const typename K::FT covariance[6], // covariance matrix // matrix and deduces the best linear fitting line // (this is an internal function) // returns fitting quality -template < typename K > +template < typename K, typename Diagonalize_traits > typename K::FT -fitting_line_3(const typename K::FT covariance[6], // covariance matrix +fitting_line_3(CGAL::cpp11::array& covariance, // covariance matrix const typename K::Point_3& c, // centroid typename K::Line_3& line, // best fit line - const K&) // kernel + const K&, // kernel + const Diagonalize_traits& ) // Diagonalize traits { typedef typename K::FT FT; typedef typename K::Line_3 Line; typedef typename K::Vector_3 Vector; // solve for eigenvalues and eigenvectors. - // eigen values are sorted in descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - FT eigen_values[3]; - FT eigen_vectors[9]; - eigen_symmetric(covariance,3,eigen_vectors,eigen_values); + CGAL::cpp11::array eigen_values = {{ 0. , 0., 0. }}; + CGAL::cpp11::array eigen_vectors = {{ 0., 0., 0., + 0., 0., 0., + 0., 0., 0. }}; + Diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (covariance, eigen_values, eigen_vectors); // isotropic case (infinite number of directions) if(eigen_values[0] == eigen_values[1] && @@ -742,9 +749,9 @@ fitting_line_3(const typename K::FT covariance[6], // covariance matrix else { // regular case - Vector direction(eigen_vectors[0],eigen_vectors[1],eigen_vectors[2]); + Vector direction(eigen_vectors[6],eigen_vectors[7],eigen_vectors[8]); line = Line(c,direction); - return (FT)1.0 - eigen_values[1] / eigen_values[0]; + return (FT)1.0 - eigen_values[1] / eigen_values[2]; } } diff --git a/Principal_component_analysis/include/CGAL/eigen.h b/Principal_component_analysis/include/CGAL/eigen.h deleted file mode 100644 index 92064d2a17f..00000000000 --- a/Principal_component_analysis/include/CGAL/eigen.h +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) 2005 INRIA Sophia-Antipolis (France). -// 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) : Bruno Levy, Pierre Alliez - -#ifndef CGAL_EIGEN_H -#define CGAL_EIGEN_H - -#include -#include - -namespace CGAL { - -namespace internal { - -template -void eigen_symmetric(const FT *mat, - const int n, - FT *eigen_vectors, - FT *eigen_values, - const int MAX_ITER = 100) -{ - static const FT EPSILON = (FT)0.00001; - - // number of entries in mat - int nn = (n*(n+1))/2; - - // copy matrix - FT *a = new FT[nn]; - int ij; - for(ij=0; ij a_normEPS && nb_iter < MAX_ITER) - { - nb_iter++; - FT thr_nn = thr / nn; - - for(int l=1; l< n; l++) - { - for(int m=l+1; m<=n; m++) - { - // compute sinx and cosx - int lq = (l*l-l)/2; - int mq = (m*m-m)/2; - - int lm = l + mq; - FT a_lm = a[lm]; - FT a_lm_2 = a_lm * a_lm; - - if(a_lm_2 < thr_nn) - continue; - - int ll = l + lq; - int mm = m + mq; - FT a_ll = a[ll]; - FT a_mm = a[mm]; - - FT delta = a_ll - a_mm; - - FT x; - if(delta == 0.0) - x = (FT) - CGAL_PI / 4; - else - x = (FT)(- std::atan( (a_lm+a_lm) / delta ) / 2.0); - - FT sinx = std::sin(x); - FT cosx = std::cos(x); - FT sinx_2 = sinx * sinx; - FT cosx_2 = cosx * cosx; - FT sincos = sinx * cosx; - - // rotate L and M columns - int ilv = n*(l-1); - int imv = n*(m-1); - - int i; - for( i=1; i<=n;i++ ) - { - if( (i!=l) && (i!=m) ) - { - int iq = (i*i-i)/2; - - int im; - if( i -#include -#include - -namespace CGAL { - -namespace internal { - - // extract eigenvalues and eigenvectors from a 2x2 symmetric - // positive definite matrix. - // Note: computations involve a square root. - // Matrix numbering: - // a b - // b c - // Eigen values and vectors are sorted in descendent order. - template - void eigen_symmetric_2(const typename K::FT *matrix, // a b c - std::pair& eigen_vectors, - std::pair& eigen_values) - { - // types - typedef typename K::FT FT; - typedef typename K::Vector_2 Vector; - - // for better reading - FT a = matrix[0]; - FT b = matrix[1]; - FT c = matrix[2]; - FT p = c*c - 2*a*c + 4*b*b + a*a; - CGAL_assertion(a >= 0.0 && c >= 0.0); - - // degenerate or isotropic case - if(p == 0.0) - { - // unit eigen values by default - eigen_values.first = eigen_values.second = (FT)1.0; - - // any vector is eigen vector - // the 2D canonical frame is output by default - eigen_vectors.first = Vector((FT)1.0,(FT)0.0); - eigen_vectors.second = Vector((FT)0.0,(FT)1.0); - } - else - { - if(b == 0.0) - { - if(a>=c) - { - eigen_values.first = a; - eigen_values.second = c; - eigen_vectors.first = Vector((FT)1.0, (FT)0.0); - eigen_vectors.second = Vector((FT)0.0, (FT)1.0); - } - else - { - eigen_values.first = c; - eigen_values.second = a; - eigen_vectors.first = Vector((FT)0.0, (FT)1.0); - eigen_vectors.second = Vector((FT)1.0, (FT)0.0); - } - } - else // generic case - { - FT l1 = (FT)(0.5 * ( -1*CGAL::sqrt(p) + c + a)); - FT l2 = (FT)(0.5 * ( CGAL::sqrt(p) + c + a)); - - // all eigen values of a symmetric positive - // definite matrix must be real and positive - // we saturate the values if this is not the - // case for floating point computations. - l1 = (l1 < (FT)0.0) ? (FT)0.0 : l1; - l2 = (l2 < (FT)0.0) ? (FT)0.0 : l2; - - // sort eigen values and vectors in descendent order. - if(l1 >= l2) - { - eigen_values.first = l1; - eigen_values.second = l2; - eigen_vectors.first = Vector((FT)1.0, (FT)(-(CGAL::sqrt(p)-c+a) / (2*b))); - eigen_vectors.second = Vector((FT)1.0, (FT)( (CGAL::sqrt(p)+c-a) / (2*b))); - } - else - { - eigen_values.first = l2; - eigen_values.second = l1; - eigen_vectors.first = Vector((FT)1.0, (FT)( (CGAL::sqrt(p)+c-a) / (2*b))); - eigen_vectors.second = Vector((FT)1.0, (FT)(-(CGAL::sqrt(p)-c+a) / (2*b))); - } - } // end generic case - } // end non-degenerate case - } // end eigen_symmetric_2 -} // end namespace internal - -} //namespace CGAL - -#endif // CGAL_EIGEN_2_H diff --git a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_2.h b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_2.h index 3ef8b8ca794..a385da3e392 100644 --- a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_2.h +++ b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_2.h @@ -29,14 +29,15 @@ #include #include #include - +#include #include namespace CGAL { template < typename InputIterator, typename Kernel, - typename Tag> + typename Tag, + typename Diagonalize_traits> inline typename Kernel::FT linear_least_squares_fitting_2(InputIterator first, @@ -44,35 +45,39 @@ linear_least_squares_fitting_2(InputIterator first, typename Kernel::Line_2& line, typename Kernel::Point_2& centroid, const Tag& tag, - const Kernel& kernel) + const Kernel& kernel, + const Diagonalize_traits& diagonalize_traits) { typedef typename std::iterator_traits::value_type Value_type; return internal::linear_least_squares_fitting_2(first, beyond, line, - centroid,(Value_type*)NULL,kernel,tag); + centroid,(Value_type*)NULL,kernel,tag, + diagonalize_traits); } // deduces the kernel from the points in container. +// Use default Diagonalize_traits template < typename InputIterator, typename Line, typename Point, - typename Tag> + typename Tag> inline typename Kernel_traits::Kernel::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, Line& line, Point& centroid, - const Tag& tag) + const Tag& tag) { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return CGAL::linear_least_squares_fitting_2(first,beyond,line,centroid,tag,Kernel()); + return CGAL::linear_least_squares_fitting_2 + (first,beyond,line,centroid,tag,Kernel(), + Default_diagonalize_traits()); } - template < typename InputIterator, typename Line, - typename Tag > + typename Tag> inline typename Kernel_traits::Kernel::FT linear_least_squares_fitting_2(InputIterator first, @@ -83,7 +88,8 @@ linear_least_squares_fitting_2(InputIterator first, typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; typename Kernel::Point_2 centroid; // unused - return CGAL::linear_least_squares_fitting_2(first,beyond,line,centroid,tag,Kernel()); + return CGAL::linear_least_squares_fitting_2(first,beyond,line,centroid,tag,Kernel(), + Default_diagonalize_traits()); } diff --git a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_3.h b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_3.h index 553fb285900..d0e6189965b 100644 --- a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_3.h +++ b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_3.h @@ -21,8 +21,6 @@ #define CGAL_LINEAR_LEAST_SQUARES_FITTING_3_H #include -//#include -//#include #include #include @@ -31,6 +29,8 @@ #include #include +#include + #include #include @@ -42,7 +42,8 @@ namespace CGAL { template < typename InputIterator, typename Object, typename Kernel, - typename Tag > + typename Tag, + typename Diagonalize_traits > inline typename Kernel::FT linear_least_squares_fitting_3(InputIterator first, @@ -50,32 +51,38 @@ linear_least_squares_fitting_3(InputIterator first, Object& object, // plane or line typename Kernel::Point_3& centroid, const Tag& tag, // dimension tag, ranges from 0 to 3 - const Kernel& kernel) + const Kernel& kernel, + const Diagonalize_traits& diagonalize_traits) { typedef typename std::iterator_traits::value_type Value_type; return internal::linear_least_squares_fitting_3(first, beyond, object, - centroid, (Value_type*) NULL, kernel, tag); + centroid, (Value_type*) NULL, kernel, tag, + diagonalize_traits); } // deduces kernel from value type of input iterator +// use default Diagonalize_traits template < typename InputIterator, typename Object, - typename Point, - typename Tag> + typename Point, + typename Tag > inline typename Kernel_traits::Kernel::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, Object& object, // plane or line Point& centroid, - const Tag& tag) // dimension tag, ranges from 0 to 3 + const Tag& tag) // dimension tag, ranges from 0 to 3 { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return CGAL::linear_least_squares_fitting_3(first,beyond,object,centroid,tag,Kernel()); + return CGAL::linear_least_squares_fitting_3(first,beyond,object,centroid,tag,Kernel(), + Default_diagonalize_traits()); + } // deduces kernel and does not write centroid +// use default Diagonalize_traits template < typename InputIterator, typename Object, typename Tag> @@ -84,12 +91,14 @@ typename Kernel_traits::Kernel::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, Object& object, // plane or line - const Tag& tag) // dimension tag, ranges from 0 to 3 + const Tag& tag) // dimension tag, ranges from 0 to 3 { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; typename Kernel::Point_3 centroid; // not used by caller - return CGAL::linear_least_squares_fitting_3(first,beyond,object,centroid,tag); + return CGAL::linear_least_squares_fitting_3(first,beyond,object,centroid,tag,Kernel(), + Default_diagonalize_traits()); + } } //namespace CGAL diff --git a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_circles_2.h b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_circles_2.h index dd9bc675e70..1762d8139d9 100644 --- a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_circles_2.h +++ b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_circles_2.h @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include @@ -40,7 +38,7 @@ namespace internal { // 0 is worst (isotropic case, returns a line with horizontal // direction by default) -template < typename InputIterator, typename K > +template < typename InputIterator, typename K, typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -48,7 +46,8 @@ linear_least_squares_fitting_2(InputIterator first, typename K::Point_2& c, // centroid const typename K::Circle_2*,// used for indirection const K&, // kernel - const CGAL::Dimension_tag<2>& tag) + const CGAL::Dimension_tag<2>& tag, + const Diagonalize_traits&) { // types typedef typename K::FT FT; @@ -67,11 +66,11 @@ linear_least_squares_fitting_2(InputIterator first, // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 + // 0 1 + // 2 //Final combined covariance matrix for all circles and their combined mass FT mass = 0.0; - FT covariance[3] = {0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0. }}; // assemble 2nd order moment about the origin. FT temp[4] = {0.25, 0.0, @@ -120,22 +119,19 @@ linear_least_squares_fitting_2(InputIterator first, covariance[2] += mass * (-1.0 * c.y() * c.y()); // solve for eigenvalues and eigenvectors. - // eigen values are sorted in descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - std::pair eigen_values; - std::pair eigen_vectors; - // internal::eigen_symmetric_2(final_cov, eigen_vectors, eigen_values); - FT eigen_vectors1[4]; - FT eigen_values1[2]; - eigen_symmetric(covariance,2, eigen_vectors1, eigen_values1); - eigen_values = std::make_pair(eigen_values1[0],eigen_values1[1]); - eigen_vectors = std::make_pair(Vector(eigen_vectors1[0],eigen_vectors1[1]),Vector(eigen_vectors1[2],eigen_vectors1[3])); + CGAL::cpp11::array eigen_values = {{ 0. , 0. }}; + CGAL::cpp11::array eigen_vectors = {{ 0., 0., 0. }}; + Diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (covariance, eigen_values, eigen_vectors); + // check unicity and build fitting line accordingly - if(eigen_values.first != eigen_values.second) + if(eigen_values[0] != eigen_values[1]) { // regular case - line = Line(c, eigen_vectors.first); - return (FT)1.0 - eigen_values.second / eigen_values.first; + line = Line(c, Vector (eigen_vectors[2],eigen_vectors[3])); + return (FT)1.0 - eigen_values[0] / eigen_values[1]; } else { @@ -148,7 +144,7 @@ linear_least_squares_fitting_2(InputIterator first, } // end linear_least_squares_fitting_2 for circle set with 2D tag -template < typename InputIterator, typename K > +template < typename InputIterator, typename K, typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -156,7 +152,8 @@ linear_least_squares_fitting_2(InputIterator first, typename K::Point_2& c, // centroid const typename K::Circle_2*,// used for indirection const K&, // kernel - const CGAL::Dimension_tag<1>& tag) + const CGAL::Dimension_tag<1>& tag, + const Diagonalize_traits& ) { // types typedef typename K::FT FT; @@ -174,11 +171,11 @@ linear_least_squares_fitting_2(InputIterator first, // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 + // 0 1 + // 2 //Final combined covariance matrix for all circles and their combined mass FT mass = 0.0; - FT covariance[3] = {0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0. }}; // assemble 2nd order moment about the origin. FT temp[4] = {1.0, 0.0, @@ -226,22 +223,19 @@ linear_least_squares_fitting_2(InputIterator first, covariance[2] += mass * (-1.0 * c.y() * c.y()); // solve for eigenvalues and eigenvectors. - // eigen values are sorted in descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - std::pair eigen_values; - std::pair eigen_vectors; - // internal::eigen_symmetric_2(final_cov, eigen_vectors, eigen_values); - FT eigen_vectors1[4]; - FT eigen_values1[2]; - eigen_symmetric(covariance,2, eigen_vectors1, eigen_values1); - eigen_values = std::make_pair(eigen_values1[0],eigen_values1[1]); - eigen_vectors = std::make_pair(Vector(eigen_vectors1[0],eigen_vectors1[1]),Vector(eigen_vectors1[2],eigen_vectors1[3])); + CGAL::cpp11::array eigen_values = {{ 0. , 0. }}; + CGAL::cpp11::array eigen_vectors = {{ 0., 0., 0. }}; + Diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (covariance, eigen_values, eigen_vectors); + // check unicity and build fitting line accordingly - if(eigen_values.first != eigen_values.second) + if(eigen_values[1] != eigen_values[0]) { // regular case - line = Line(c, eigen_vectors.first); - return (FT)1.0 - eigen_values.second / eigen_values.first; + line = Line(c, Vector(eigen_vectors[2],eigen_vectors[3])); + return (FT)1.0 - eigen_values[0] / eigen_values[1]; } else { diff --git a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_cuboids_3.h b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_cuboids_3.h index 4bfcbdf601c..2a13fc63a7a 100644 --- a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_cuboids_3.h +++ b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_cuboids_3.h @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -36,7 +35,8 @@ namespace internal { // fits a plane to a 3D cuboid set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -44,7 +44,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Iso_cuboid_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<3>& tag) + const CGAL::Dimension_tag<3>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid; @@ -56,18 +57,19 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,k,tag); // assemble covariance matrix - FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Iso_cuboid*) NULL,tag); // compute fitting plane - return fitting_plane_3(covariance,c,plane,k); + return fitting_plane_3(covariance,c,plane,k,diagonalize_traits); } // end linear_least_squares_fitting_cuboids_3 // fits a plane to a 3D cuboid set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -75,7 +77,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Iso_cuboid_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<2>& tag) + const CGAL::Dimension_tag<2>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid; @@ -87,18 +90,19 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,k,tag); // assemble covariance matrix - FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Iso_cuboid*) NULL,tag); // compute fitting plane - return fitting_plane_3(covariance,c,plane,k); + return fitting_plane_3(covariance,c,plane,k,diagonalize_traits); } // end linear_least_squares_fitting_cuboids_3 // fits a plane to a 3D cuboid set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -106,7 +110,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Iso_cuboid_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<1>& tag) + const CGAL::Dimension_tag<1>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Segment_3 Segment; typedef typename K::Iso_cuboid_3 Iso_cuboid; @@ -135,13 +140,15 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting plane - return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag); + return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_cuboids_3 // fits a plane to a 3D cuboid set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -149,7 +156,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Iso_cuboid_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Point_3 Point; typedef typename K::Iso_cuboid_3 Iso_cuboid; @@ -174,13 +182,15 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting plane - return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag); + return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_cuboids_3 // fits a line to a 3D cuboid set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -188,7 +198,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Iso_cuboid_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<3>& tag) + const CGAL::Dimension_tag<3>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid; @@ -200,17 +211,18 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,k,tag); // assemble covariance matrix - FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Iso_cuboid*) NULL,tag); // compute fitting line - return fitting_line_3(covariance,c,line,k); + return fitting_line_3(covariance,c,line,k,diagonalize_traits); } // end linear_least_squares_fitting_cuboids_3 // fits a line to a 3D cuboid set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -218,7 +230,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Iso_cuboid_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<2>& tag) + const CGAL::Dimension_tag<2>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid; @@ -230,18 +243,19 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,k,tag); // assemble covariance matrix - FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Iso_cuboid*) NULL,tag); // compute fitting line - return fitting_line_3(covariance,c,line,k); + return fitting_line_3(covariance,c,line,k,diagonalize_traits); } // end linear_least_squares_fitting_cuboids_3 // fits a line to a 3D cuboid set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -249,7 +263,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Iso_cuboid_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<1>& tag) + const CGAL::Dimension_tag<1>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Segment_3 Segment; typedef typename K::Iso_cuboid_3 Iso_cuboid; @@ -278,13 +293,15 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting line - return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag); + return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_cuboids_3 // fits a line to a 3D cuboid set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -292,7 +309,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Iso_cuboid_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Point_3 Point; typedef typename K::Iso_cuboid_3 Iso_cuboid; @@ -317,7 +335,8 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting line - return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag); + return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_cuboids_3 diff --git a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_points_2.h b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_points_2.h index 7d1d6a9036e..e65a1321153 100644 --- a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_points_2.h +++ b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_points_2.h @@ -22,8 +22,6 @@ #include #include -#include - #include #include @@ -37,7 +35,8 @@ namespace internal { // 0 is worst (isotropic case, returns a line with horizontal // direction by default). template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits> typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -45,7 +44,8 @@ linear_least_squares_fitting_2(InputIterator first, typename K::Point_2& c, // centroid const typename K::Point_2*,// used for indirection const K&, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const Diagonalize_traits&) { // types typedef typename K::FT FT; @@ -63,9 +63,11 @@ linear_least_squares_fitting_2(InputIterator first, // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - FT covariance[3] = {0,0,0}; + // 0 1 + // 2 + + CGAL::cpp11::array covariance = {{ 0., 0., 0. }}; + for(InputIterator it = first; it != beyond; it++) @@ -78,18 +80,19 @@ linear_least_squares_fitting_2(InputIterator first, } // solve for eigenvalues and eigenvectors. - // eigen values are sorted in descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - std::pair eigen_values; - std::pair eigen_vectors; - internal::eigen_symmetric_2(covariance, eigen_vectors, eigen_values); + CGAL::cpp11::array eigen_values = {{ 0. , 0. }}; + CGAL::cpp11::array eigen_vectors = {{ 0., 0., 0. }}; + Diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (covariance, eigen_values, eigen_vectors); // check unicity and build fitting line accordingly - if(eigen_values.first != eigen_values.second) + if(eigen_values[0] != eigen_values[1]) { // regular case - line = Line(c, eigen_vectors.first); - return (FT)1.0 - eigen_values.second / eigen_values.first; + line = Line(c, Vector (eigen_vectors[2], eigen_vectors[3])); + return (FT)1.0 - eigen_values[0] / eigen_values[1]; } else { diff --git a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_points_3.h b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_points_3.h index 15355929e91..06e63cfbcb7 100644 --- a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_points_3.h +++ b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_points_3.h @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -35,7 +34,8 @@ namespace internal { // 1 is best (zero variance orthogonally to the fitting line) // 0 is worst (isotropic case, returns a plane with default direction) template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -43,7 +43,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Point_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Point_3 Point; @@ -55,11 +56,11 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,K(),tag); // assemble covariance matrix - FT covariance[6]; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Point*) NULL,tag); // compute fitting plane - return fitting_plane_3(covariance,c,plane,k); + return fitting_plane_3(covariance,c,plane,k,diagonalize_traits); } // end fit plane to point set // fits a line to a 3D point set @@ -67,7 +68,8 @@ linear_least_squares_fitting_3(InputIterator first, // 1 is best (zero variance orthogonally to the fitting line) // 0 is worst (isotropic case, returns a line along x axis) template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -75,7 +77,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Point_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Point_3 Point; @@ -87,11 +90,11 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,K(),tag); // assemble covariance matrix - FT covariance[6]; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Point*) NULL,tag); // compute fitting line - return fitting_line_3(covariance,c,line,k); + return fitting_line_3(covariance,c,line,k,diagonalize_traits); } // end fit line to point set } // end namespace internal diff --git a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_rectangles_2.h b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_rectangles_2.h index a1879152bf7..9683c9f90d7 100644 --- a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_rectangles_2.h +++ b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_rectangles_2.h @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include @@ -40,7 +38,7 @@ namespace internal { // 0 is worst (isotropic case, returns a line with horizontal // direction by default) -template < typename InputIterator, typename K > +template < typename InputIterator, typename K, typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -48,7 +46,8 @@ linear_least_squares_fitting_2(InputIterator first, typename K::Point_2& c, // centroid const typename K::Iso_rectangle_2*,// used for indirection const K&, // kernel - const CGAL::Dimension_tag<2>& tag) + const CGAL::Dimension_tag<2>& tag, + const Diagonalize_traits&) { // types typedef typename K::FT FT; @@ -70,7 +69,7 @@ linear_least_squares_fitting_2(InputIterator first, // 1 2 //Final combined covariance matrix for all rectangles and their combined mass FT mass = 0.0; - FT covariance[3] = {0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0. }}; // assemble 2nd order moment about the origin. FT temp[4] = {1/3.0, 0.25, @@ -123,22 +122,19 @@ linear_least_squares_fitting_2(InputIterator first, covariance[2] += mass * (-1.0 * c.y() * c.y()); // solve for eigenvalues and eigenvectors. - // eigen values are sorted in descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - std::pair eigen_values; - std::pair eigen_vectors; - FT eigen_vectors1[4]; - FT eigen_values1[2]; - eigen_symmetric(covariance,2, eigen_vectors1, eigen_values1); - eigen_values = std::make_pair(eigen_values1[0],eigen_values1[1]); - eigen_vectors = std::make_pair(Vector(eigen_vectors1[0],eigen_vectors1[1]),Vector(eigen_vectors1[2],eigen_vectors1[3])); + CGAL::cpp11::array eigen_values = {{ 0. , 0. }}; + CGAL::cpp11::array eigen_vectors = {{ 0., 0., 0. }}; + Diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (covariance, eigen_values, eigen_vectors); // check unicity and build fitting line accordingly - if(eigen_values.first != eigen_values.second) + if(eigen_values[0] != eigen_values[1]) { // regular case - line = Line(c, eigen_vectors.first); - return (FT)1.0 - eigen_values.second / eigen_values.first; + line = Line(c, Vector(eigen_vectors[2],eigen_vectors[3])); + return (FT)1.0 - eigen_values[0] / eigen_values[1]; } else { @@ -150,7 +146,7 @@ linear_least_squares_fitting_2(InputIterator first, } } // end linear_least_squares_fitting_2 for rectangle set with 2D tag -template < typename InputIterator, typename K > +template < typename InputIterator, typename K, typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -158,7 +154,8 @@ linear_least_squares_fitting_2(InputIterator first, typename K::Point_2& c, // centroid const typename K::Iso_rectangle_2*,// used for indirection const K&, // kernel - const CGAL::Dimension_tag<1>& tag) + const CGAL::Dimension_tag<1>& tag, + const Diagonalize_traits& diagonalize_traits) { // types typedef typename K::Iso_rectangle_2 Iso_rectangle; @@ -179,13 +176,15 @@ linear_least_squares_fitting_2(InputIterator first, segments.push_back(Segment_2(t[3],t[0])); } - return linear_least_squares_fitting_2(segments.begin(),segments.end(),line,c,K(),tag); + return linear_least_squares_fitting_2(segments.begin(),segments.end(),line,c,K(),tag, + diagonalize_traits); } // end linear_least_squares_fitting_2 for rectangle set with 1D tag template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -193,7 +192,8 @@ linear_least_squares_fitting_2(InputIterator first, typename K::Point_2& c, // centroid const typename K::Iso_rectangle_2*,// used for indirection const K&, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const Diagonalize_traits& diagonalize_traits) { // types typedef typename K::Iso_rectangle_2 Iso_rectangle; @@ -214,7 +214,8 @@ linear_least_squares_fitting_2(InputIterator first, points.push_back(Point_2(t[3])); } - return linear_least_squares_fitting_2(points.begin(),points.end(),line,c,K(),tag); + return linear_least_squares_fitting_2(points.begin(),points.end(),line,c,K(),tag, + diagonalize_traits); } // end linear_least_squares_fitting_2 for rectangle set with 0D tag diff --git a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_2.h b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_2.h index e2c3029b4df..5703ee35d10 100644 --- a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_2.h +++ b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_2.h @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include @@ -40,7 +38,7 @@ namespace internal { // 0 is worst (isotropic case, returns a line with horizontal // direction by default) -template < typename InputIterator, typename K > +template < typename InputIterator, typename K, typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -48,7 +46,8 @@ linear_least_squares_fitting_2(InputIterator first, typename K::Point_2& c, // centroid const typename K::Segment_2*,// used for indirection const K&, // kernel - const CGAL::Dimension_tag<1>& tag = CGAL::Dimension_tag<1>()) + const CGAL::Dimension_tag<1>& tag, + const Diagonalize_traits&) { // types typedef typename K::FT FT; @@ -69,7 +68,7 @@ linear_least_squares_fitting_2(InputIterator first, // 1 2 //Final combined covariance matrix for all segments and their combined mass FT mass = 0.0; - FT covariance[3] = {0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0. }}; // assemble 2nd order moment about the origin. FT temp[4] = {1.0, 0.5, 0.5, 1.0}; @@ -111,22 +110,19 @@ linear_least_squares_fitting_2(InputIterator first, covariance[2] += mass * (-1.0 * c.y() * c.y()); // solve for eigenvalues and eigenvectors. - // eigen values are sorted in descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - std::pair eigen_values; - std::pair eigen_vectors; - // internal::eigen_symmetric_2(covariance, eigen_vectors, eigen_values); - FT eigen_vectors1[4]; - FT eigen_values1[2]; - eigen_symmetric(covariance,2, eigen_vectors1, eigen_values1); - eigen_values = std::make_pair(eigen_values1[0],eigen_values1[1]); - eigen_vectors = std::make_pair(Vector(eigen_vectors1[0],eigen_vectors1[1]),Vector(eigen_vectors1[2],eigen_vectors1[3])); + CGAL::cpp11::array eigen_values = {{ 0. , 0. }}; + CGAL::cpp11::array eigen_vectors = {{ 0., 0., 0. }}; + Diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (covariance, eigen_values, eigen_vectors); + // check unicity and build fitting line accordingly - if(eigen_values.first != eigen_values.second) + if(eigen_values[0] != eigen_values[1]) { // regular case - line = Line(c, eigen_vectors.first); - return (FT)1.0 - eigen_values.second / eigen_values.first; + line = Line(c, Vector(eigen_vectors[2],eigen_vectors[3])); + return (FT)1.0 - eigen_values[0] / eigen_values[1]; } else { @@ -138,7 +134,7 @@ linear_least_squares_fitting_2(InputIterator first, } } // end linear_least_squares_fitting_2 for segment set with 1D tag -template < typename InputIterator, typename K > +template < typename InputIterator, typename K, typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -146,7 +142,8 @@ linear_least_squares_fitting_2(InputIterator first, typename K::Point_2& c, // centroid const typename K::Segment_2*,// used for indirection const K& k, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const Diagonalize_traits& diagonalize_traits) { // types typedef typename K::Point_2 Point; @@ -164,7 +161,8 @@ linear_least_squares_fitting_2(InputIterator first, points.push_back(s[0]); points.push_back(s[1]); } - return linear_least_squares_fitting_2(points.begin(),points.end(),line,c,k,(Point*)NULL,tag); + return linear_least_squares_fitting_2(points.begin(),points.end(),line,c,k,(Point*)NULL,tag, + diagonalize_traits); } // end linear_least_squares_fitting_2 for segment set with 1D tag diff --git a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_3.h b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_3.h index 1be447a36a9..0eb27f2503f 100644 --- a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_3.h +++ b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_3.h @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -35,7 +34,8 @@ namespace internal { // fits a plane to a 3D segment set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -43,7 +43,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Segment_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<1>& tag) + const CGAL::Dimension_tag<1>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Segment_3 Segment; @@ -55,17 +56,18 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,k,tag); // assemble covariance matrix - FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Segment*) NULL,tag); // compute fitting plane - return fitting_plane_3(covariance,c,plane,k); + return fitting_plane_3(covariance,c,plane,k,diagonalize_traits); } // end linear_least_squares_fitting_segments_3 // fits a plane to a 3D segment set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -73,7 +75,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Segment_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Segment_3 Segment; typedef typename K::Point_3 Point; @@ -92,13 +95,15 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting plane - return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag); + return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_segments_3 // fits a line to a 3D segment set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -106,7 +111,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Segment_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<1>& tag) + const CGAL::Dimension_tag<1>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Segment_3 Segment; @@ -118,17 +124,18 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,k,tag); // assemble covariance matrix - FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Segment*) NULL,tag); // compute fitting line - return fitting_line_3(covariance,c,line,k); + return fitting_line_3(covariance,c,line,k,diagonalize_traits); } // end linear_least_squares_fitting_segments_3 // fits a plane to a 3D segment set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -136,7 +143,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Segment_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Segment_3 Segment; typedef typename K::Point_3 Point; @@ -155,7 +163,8 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting plane - return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag); + return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_segments_3 diff --git a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_spheres_3.h b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_spheres_3.h index 1ae42e2957e..ad6c35fea34 100644 --- a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_spheres_3.h +++ b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_spheres_3.h @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -33,7 +32,8 @@ namespace internal { // fits a plane to a set of 3D balls (3D) template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -41,7 +41,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Sphere_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<3>& tag) + const CGAL::Dimension_tag<3>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Sphere_3 Sphere; @@ -53,17 +54,18 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,K(),tag); // assemble covariance matrix - FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Sphere*) NULL,tag); // compute fitting plane - return fitting_plane_3(covariance,c,plane,k); + return fitting_plane_3(covariance,c,plane,k,diagonalize_traits); } // end linear_least_squares_fitting_spheres_3 // fits a plane to a 3D sphere set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -71,7 +73,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Sphere_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<2>& tag) + const CGAL::Dimension_tag<2>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Sphere_3 Sphere; @@ -83,18 +86,19 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,K(),tag); // assemble covariance matrix - FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Sphere*) NULL,tag); // compute fitting plane - return fitting_plane_3(covariance,c,plane,k); + return fitting_plane_3(covariance,c,plane,k,diagonalize_traits); } // end linear_least_squares_fitting_spheres_3 // fits a line to a 3D ball set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -102,7 +106,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Sphere_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<3>& tag) + const CGAL::Dimension_tag<3>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Sphere_3 Sphere; @@ -114,18 +119,19 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,K(),tag); // assemble covariance matrix - FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Sphere*) NULL,tag); // compute fitting line - return fitting_line_3(covariance,c,line,k); + return fitting_line_3(covariance,c,line,k,diagonalize_traits); } // end linear_least_squares_fitting_spheres_3 // fits a line to a 3D sphere set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -133,7 +139,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Sphere_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<2>& tag) + const CGAL::Dimension_tag<2>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Sphere_3 Sphere; @@ -145,11 +152,11 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,K(),tag); // assemble covariance matrix - FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Sphere*) NULL,tag); // compute fitting line - return fitting_line_3(covariance,c,line,k); + return fitting_line_3(covariance,c,line,k,diagonalize_traits); } // end linear_least_squares_fitting_spheres_3 diff --git a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h index c87fcd3a470..bbb6a7b9c26 100644 --- a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h +++ b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -37,7 +36,8 @@ namespace internal { // fits a plane to a 3D tetrahedron set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -45,7 +45,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Tetrahedron_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<3>& tag) + const CGAL::Dimension_tag<3>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Tetrahedron_3 Tetrahedron; @@ -57,16 +58,17 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,K(),tag); // assemble covariance matrix - FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Tetrahedron*) NULL,tag); // compute fitting plane - return fitting_plane_3(covariance,c,plane,k); + return fitting_plane_3(covariance,c,plane,k,diagonalize_traits); } // end linear_least_squares_fitting_tetrahedrons_3 // fits a plane to a 3D tetrahedron set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -74,7 +76,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Tetrahedron_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<2>& tag) + const CGAL::Dimension_tag<2>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Tetrahedron_3 Tetrahedron; typedef typename K::Triangle_3 Triangle; @@ -95,13 +98,15 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting plane - return linear_least_squares_fitting_3(triangles.begin(),triangles.end(),plane,c,(Triangle*)NULL,k,tag); + return linear_least_squares_fitting_3(triangles.begin(),triangles.end(),plane,c,(Triangle*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_tetrahedrons_3 // fits a plane to a 3D tetrahedron set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -109,7 +114,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Tetrahedron_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<1>& tag) + const CGAL::Dimension_tag<1>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Tetrahedron_3 Tetrahedron; typedef typename K::Segment_3 Segment; @@ -133,13 +139,15 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting plane - return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag); + return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_tetrahedrons_3 // fits a plane to a 3D tetrahedron set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -147,7 +155,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Tetrahedron_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Tetrahedron_3 Tetrahedron; typedef typename K::Point_3 Point; @@ -168,13 +177,15 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting plane - return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag); + return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_tetrahedrons_3 // fits a line to a 3D tetrahedron set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -182,7 +193,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Tetrahedron_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<3>& tag) + const CGAL::Dimension_tag<3>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Tetrahedron_3 Tetrahedron; @@ -194,17 +206,18 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,K(),tag); // assemble covariance matrix - FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Tetrahedron*) NULL,tag); // compute fitting line - return fitting_line_3(covariance,c,line,k); + return fitting_line_3(covariance,c,line,k,diagonalize_traits); } // end linear_least_squares_fitting_tetrahedrons_3 // fits a line to a 3D tetrahedron set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -212,7 +225,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Tetrahedron_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<2>& tag) + const CGAL::Dimension_tag<2>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Tetrahedron_3 Tetrahedron; typedef typename K::Triangle_3 Triangle; @@ -233,13 +247,15 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting line - return linear_least_squares_fitting_3(triangles.begin(),triangles.end(),line,c,(Triangle*)NULL,k,tag); + return linear_least_squares_fitting_3(triangles.begin(),triangles.end(),line,c,(Triangle*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_tetrahedrons_3 // fits a line to a 3D tetrahedron set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -247,7 +263,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Tetrahedron_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<1>& tag) + const CGAL::Dimension_tag<1>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Tetrahedron_3 Tetrahedron; typedef typename K::Segment_3 Segment; @@ -270,13 +287,15 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting line - return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag); + return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_tetrahedrons_3 // fits a line to a 3D tetrahedron set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -284,7 +303,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Tetrahedron_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Tetrahedron_3 Tetrahedron; typedef typename K::Point_3 Point; @@ -305,7 +325,8 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting line - return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag); + return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_tetrahedra_3 diff --git a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_2.h b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_2.h index 7bd3d777d9d..2754fc65265 100644 --- a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_2.h +++ b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_2.h @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include @@ -41,7 +39,7 @@ namespace internal { // direction by default) template < typename InputIterator, - typename Kernel > + typename Kernel, typename Diagonalize_traits > typename Kernel::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -49,7 +47,8 @@ linear_least_squares_fitting_2(InputIterator first, typename Kernel::Point_2& c, // centroid const typename Kernel::Triangle_2*,// used for indirection const Kernel&, // kernel - const CGAL::Dimension_tag<2>& tag) + const CGAL::Dimension_tag<2>& tag, + const Diagonalize_traits&) { // types typedef typename Kernel::FT FT; @@ -71,7 +70,7 @@ linear_least_squares_fitting_2(InputIterator first, // 1 2 //Final combined covariance matrix for all triangles and their combined mass FT mass = 0.0; - FT covariance[3] = {0.0, 0.0, 0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0. }}; // assemble the 2nd order moment about the origin. FT temp[4] = {1/12.0, 1/24.0, @@ -123,21 +122,19 @@ linear_least_squares_fitting_2(InputIterator first, // std::cout<<"cov: "< eigen_values; - std::pair eigen_vectors; - FT eigen_vectors1[4]; - FT eigen_values1[2]; - eigen_symmetric(covariance,2, eigen_vectors1, eigen_values1); - eigen_values = std::make_pair(eigen_values1[0],eigen_values1[1]); - eigen_vectors = std::make_pair(Vector(eigen_vectors1[0],eigen_vectors1[1]),Vector(eigen_vectors1[2],eigen_vectors1[3])); + CGAL::cpp11::array eigen_values = {{ 0. , 0. }}; + CGAL::cpp11::array eigen_vectors = {{ 0., 0., 0. }}; + Diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (covariance, eigen_values, eigen_vectors); + // check unicity and build fitting line accordingly - if(eigen_values.first != eigen_values.second) + if(eigen_values[0] != eigen_values[1]) { // regular case - line = Line(c, eigen_vectors.first); - return (FT)1.0 - eigen_values.second / eigen_values.first; + line = Line(c, Vector(eigen_vectors[2],eigen_vectors[3])); + return (FT)1.0 - eigen_values[0] / eigen_values[1]; } else { @@ -150,7 +147,8 @@ linear_least_squares_fitting_2(InputIterator first, } // end linear_least_squares_fitting_2 for triangle set with 2D tag template < typename InputIterator, - typename Kernel > + typename Kernel, + typename Diagonalize_traits > typename Kernel::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -158,7 +156,8 @@ linear_least_squares_fitting_2(InputIterator first, typename Kernel::Point_2& c, // centroid const typename Kernel::Triangle_2*,// used for indirection const Kernel&, // kernel - const CGAL::Dimension_tag<1>& tag) + const CGAL::Dimension_tag<1>& tag, + const Diagonalize_traits& diagonalize_traits) { // types typedef typename Kernel::Triangle_2 Triangle; @@ -178,12 +177,14 @@ linear_least_squares_fitting_2(InputIterator first, segments.push_back(Segment(t[2],t[0])); } - return linear_least_squares_fitting_2(segments.begin(),segments.end(),line,c,tag,Kernel()); + return linear_least_squares_fitting_2(segments.begin(),segments.end(),line,c,tag,Kernel(), + diagonalize_traits); } // end linear_least_squares_fitting_2 for triangle set with 1D tag template < typename InputIterator, - typename Kernel > + typename Kernel, + typename Diagonalize_traits > typename Kernel::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -191,7 +192,8 @@ linear_least_squares_fitting_2(InputIterator first, typename Kernel::Point_2& c, // centroid const typename Kernel::Triangle_2*,// used for indirection const Kernel&, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const Diagonalize_traits& diagonalize_traits) { // types @@ -212,7 +214,8 @@ linear_least_squares_fitting_2(InputIterator first, points.push_back(Point(t[2])); } - return linear_least_squares_fitting_2(points.begin(),points.end(),line,c,tag,Kernel()); + return linear_least_squares_fitting_2(points.begin(),points.end(),line,c,tag,Kernel(), + diagonalize_traits); } // end linear_least_squares_fitting_2 for triangle set with 0D tag diff --git a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_3.h b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_3.h index aca731b7191..dc305ea73a6 100644 --- a/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_3.h +++ b/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_3.h @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -34,7 +33,8 @@ namespace internal { // fits a plane to a 3D triangle set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -42,7 +42,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Triangle_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<2>& tag) + const CGAL::Dimension_tag<2>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Triangle_3 Triangle; @@ -54,17 +55,18 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,K(),tag); // assemble covariance matrix - FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Triangle*) NULL,tag); // compute fitting plane - return fitting_plane_3(covariance,c,plane,k); + return fitting_plane_3(covariance,c,plane,k,diagonalize_traits); } // end linear_least_squares_fitting_triangles_3 // fits a plane to a 3D triangle set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -72,7 +74,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Triangle_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<1>& tag) + const CGAL::Dimension_tag<1>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Triangle_3 Triangle; typedef typename K::Segment_3 Segment; @@ -92,13 +95,15 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting plane - return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag); + return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_triangles_3 // fits a plane to a 3D triangle set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -106,7 +111,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Triangle_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Triangle_3 Triangle; typedef typename K::Point_3 Point; @@ -125,13 +131,15 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting plane - return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag); + return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_triangles_3 // fits a line to a 3D triangle set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -139,7 +147,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Triangle_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<2>& tag) + const CGAL::Dimension_tag<2>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::FT FT; typedef typename K::Triangle_3 Triangle; @@ -151,17 +160,18 @@ linear_least_squares_fitting_3(InputIterator first, c = centroid(first,beyond,K(),tag); // assemble covariance matrix - FT covariance[6] = {0.0,0.0,0.0,0.0,0.0,0.0}; + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Triangle*) NULL,tag); // compute fitting line - return fitting_line_3(covariance,c,line,k); + return fitting_line_3(covariance,c,line,k,diagonalize_traits); } // end linear_least_squares_fitting_triangles_3 // fits a line to a 3D triangle set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -169,7 +179,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Triangle_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<1>& tag) + const CGAL::Dimension_tag<1>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Triangle_3 Triangle; typedef typename K::Segment_3 Segment; @@ -189,13 +200,15 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting line - return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag); + return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_triangles_3 // fits a line to a 3D triangle set template < typename InputIterator, - typename K > + typename K, + typename Diagonalize_traits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -203,7 +216,8 @@ linear_least_squares_fitting_3(InputIterator first, typename K::Point_3& c, // centroid const typename K::Triangle_3*, // used for indirection const K& k, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const Diagonalize_traits& diagonalize_traits) { typedef typename K::Triangle_3 Triangle; typedef typename K::Point_3 Point; @@ -222,7 +236,8 @@ linear_least_squares_fitting_3(InputIterator first, } // compute fitting line - return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag); + return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag, + diagonalize_traits); } // end linear_least_squares_fitting_triangles_3 diff --git a/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_2.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_2.cpp index 429a97a236a..b8aa1207cc3 100644 --- a/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_2.cpp +++ b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_2.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -31,7 +32,9 @@ void test_2D() FT quality; quality = linear_least_squares_fitting_2(points.begin(),points.end(),line,CGAL::Dimension_tag<0>()); quality = linear_least_squares_fitting_2(points.begin(),points.end(),line,centroid,CGAL::Dimension_tag<0>()); - quality = linear_least_squares_fitting_2(points.begin(),points.end(),line,centroid,CGAL::Dimension_tag<0>(),k); + quality = linear_least_squares_fitting_2(points.begin(),points.end(),line,centroid,CGAL::Dimension_tag<0>(),k, + CGAL::Default_diagonalize_traits()); + std::cout << "done (quality: " << quality << ")" << std::endl; if(!line.is_horizontal()) @@ -71,7 +74,8 @@ void test_2D_point_set(const unsigned int nb_points) FT quality; quality = linear_least_squares_fitting_2(points.begin(),points.end(),line,CGAL::Dimension_tag<0>()); quality = linear_least_squares_fitting_2(points.begin(),points.end(),line,centroid,CGAL::Dimension_tag<0>()); - quality = linear_least_squares_fitting_2(points.begin(),points.end(),line,centroid,CGAL::Dimension_tag<0>(),k); + quality = linear_least_squares_fitting_2(points.begin(),points.end(),line,centroid,CGAL::Dimension_tag<0>(),k, + CGAL::Default_diagonalize_traits()); std::cout << "done (quality: " << quality << ")" << std::endl; diff --git a/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_3.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_3.cpp index 060e5c8e770..bd94792cf91 100644 --- a/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_3.cpp +++ b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_3.cpp @@ -3,6 +3,8 @@ #include #include +#include + #include #include @@ -43,13 +45,17 @@ void fit_point_set(std::list& points, std::cout << "fit 3D line..."; quality = linear_least_squares_fitting_3(points.begin(),points.end(),line,CGAL::Dimension_tag<0>()); quality = linear_least_squares_fitting_3(points.begin(),points.end(),line,centroid,CGAL::Dimension_tag<0>()); - quality = linear_least_squares_fitting_3(points.begin(),points.end(),line,centroid,CGAL::Dimension_tag<0>(),kernel); + quality = linear_least_squares_fitting_3(points.begin(),points.end(),line,centroid,CGAL::Dimension_tag<0>(),kernel, + CGAL::Default_diagonalize_traits()); + std::cout << "done (quality: " << quality << ")" << std::endl; std::cout << "fit 3D plane..."; quality = linear_least_squares_fitting_3(points.begin(),points.end(),plane,CGAL::Dimension_tag<0>()); quality = linear_least_squares_fitting_3(points.begin(),points.end(),plane,centroid,CGAL::Dimension_tag<0>()); - quality = linear_least_squares_fitting_3(points.begin(),points.end(),plane,centroid,CGAL::Dimension_tag<0>(),kernel); + quality = linear_least_squares_fitting_3(points.begin(),points.end(),plane,centroid,CGAL::Dimension_tag<0>(),kernel, + CGAL::Default_diagonalize_traits()); + std::cout << "done (quality: " << quality << ")" << std::endl; } diff --git a/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_3.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_3.cpp index 11ee3dda03f..3804156aedd 100644 --- a/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_3.cpp +++ b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_3.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -34,13 +35,15 @@ FT fit_set(std::list& segments, quality = linear_least_squares_fitting_3(segments.begin(),segments.end(),line,CGAL::Dimension_tag<1>()); quality = linear_least_squares_fitting_3(segments.begin(),segments.end(),line,centroid,CGAL::Dimension_tag<1>()); - quality = linear_least_squares_fitting_3(segments.begin(),segments.end(),line,centroid,CGAL::Dimension_tag<1>(),kernel); + quality = linear_least_squares_fitting_3(segments.begin(),segments.end(),line,centroid,CGAL::Dimension_tag<1>(),kernel, + CGAL::Default_diagonalize_traits()); quality = linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,CGAL::Dimension_tag<1>()); quality = linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,centroid,CGAL::Dimension_tag<1>()); - quality = linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,centroid,CGAL::Dimension_tag<1>(),kernel); + quality = linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,centroid,CGAL::Dimension_tag<1>(),kernel, + CGAL::Default_diagonalize_traits()); - return quality; + return quality; } diff --git a/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_spheres_3.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_spheres_3.cpp index 0867a9f85e6..d064d2034c5 100644 --- a/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_spheres_3.cpp +++ b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_spheres_3.cpp @@ -2,6 +2,7 @@ #include #include +#include #include @@ -34,19 +35,23 @@ int main(void) Kernel kernel; Point centroid; + linear_least_squares_fitting_3(spheres.begin(),spheres.end(),line,CGAL::Dimension_tag<3>()); linear_least_squares_fitting_3(spheres.begin(),spheres.end(),line,CGAL::Dimension_tag<2>()); linear_least_squares_fitting_3(spheres.begin(),spheres.end(),line,centroid,CGAL::Dimension_tag<3>()); linear_least_squares_fitting_3(spheres.begin(),spheres.end(),line,centroid,CGAL::Dimension_tag<2>()); - linear_least_squares_fitting_3(spheres.begin(),spheres.end(),line,centroid,CGAL::Dimension_tag<3>(),kernel); - linear_least_squares_fitting_3(spheres.begin(),spheres.end(),line,centroid,CGAL::Dimension_tag<2>(),kernel); - + linear_least_squares_fitting_3(spheres.begin(),spheres.end(),line,centroid,CGAL::Dimension_tag<3>(),kernel, + CGAL::Default_diagonalize_traits()); + linear_least_squares_fitting_3(spheres.begin(),spheres.end(),line,centroid,CGAL::Dimension_tag<2>(),kernel, + CGAL::Default_diagonalize_traits()); linear_least_squares_fitting_3(spheres.begin(),spheres.end(),plane,CGAL::Dimension_tag<3>()); linear_least_squares_fitting_3(spheres.begin(),spheres.end(),plane,CGAL::Dimension_tag<2>()); linear_least_squares_fitting_3(spheres.begin(),spheres.end(),plane,centroid,CGAL::Dimension_tag<3>()); linear_least_squares_fitting_3(spheres.begin(),spheres.end(),plane,centroid,CGAL::Dimension_tag<2>()); - linear_least_squares_fitting_3(spheres.begin(),spheres.end(),plane,centroid,CGAL::Dimension_tag<3>(),kernel); - linear_least_squares_fitting_3(spheres.begin(),spheres.end(),plane,centroid,CGAL::Dimension_tag<2>(),kernel); + linear_least_squares_fitting_3(spheres.begin(),spheres.end(),plane,centroid,CGAL::Dimension_tag<3>(),kernel, + CGAL::Default_diagonalize_traits()); + linear_least_squares_fitting_3(spheres.begin(),spheres.end(),plane,centroid,CGAL::Dimension_tag<2>(),kernel, + CGAL::Default_diagonalize_traits()); return 0; } diff --git a/Ridges_3/doc/Ridges_3/PackageDescription.txt b/Ridges_3/doc/Ridges_3/PackageDescription.txt index d79eaf73b9d..41da0e8439c 100644 --- a/Ridges_3/doc/Ridges_3/PackageDescription.txt +++ b/Ridges_3/doc/Ridges_3/PackageDescription.txt @@ -15,7 +15,7 @@ \cgalPkgSummaryEnd \cgalPkgShortInfoBegin \cgalPkgSince{3.3} -\cgalPkgDependsOn{ \ref PkgJet_fitting_3Summary and solvers from \ref thirdpartyEigen.} +\cgalPkgDependsOn{\ref PkgSolverSummary} \cgalPkgBib{cgal:cp-arutsm} \cgalPkgLicense{\ref licensesGPL "GPL"} \cgalPkgShortInfoEnd diff --git a/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/Concepts/WeightedApproximation_3.h b/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/Concepts/WeightedApproximation_3.h deleted file mode 100644 index 58c303a5add..00000000000 --- a/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/Concepts/WeightedApproximation_3.h +++ /dev/null @@ -1,136 +0,0 @@ -//Orthogonal projection of a point onto a weighted PCA plane. -//Copyright (C) 2014 INRIA - Sophia Antipolis -// -//This program is free software: you can redistribute it and/or modify -//it under the terms of the GNU General Public License as published by -//the Free Software Foundation, either version 3 of the License, or -//(at your option) any later version. -// -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. -// -//You should have received a copy of the GNU General Public License -//along with this program. If not, see . -// -// Author(s): Thijs van Lankveld - - -/// A concept for computing an approximation of a weighted point set. -/** \ingroup PkgScaleSpaceReconstruction3Concepts - * \cgalConcept - * This approximation can be used to fit other points to the point set. - * - * \cgalHasModel `CGAL::Weighted_PCA_approximation_3` - */ -class WeightedApproximation_3 { -public: -/// \name Types -/// \{ - typedef unspecified_type FT; ///< defines the field number type. - typedef unspecified_type Point; ///< defines the point type. - -/// \} - -public: -/// \name Constructors -/// \{ - /// constructs an approximation of a undefined point set. - /** The point set holds a fixed number of points with undefined coordinates. - * - * \param size is the size of the points set. - * - * \note this does not compute the approximation. - */ - WeightedApproximation_3( unsigned int size ); - -/// \} - - // computes the approximation of a point set. - /* Similar to constructing a approximation and calling - * [set_points(points_begin, points_end, weights_begin)](\ref WeightedApproximation_3::set_points ) - * - * \tparam PointIterator is an input iterator over the point collection. - * The value type of the iterator must be a `Point`. - * \tparam WeightIterator is an input iterator over the collection of - * weights. The value type of the iterator must be an `FT`. - * - * \param points_begin is an iterator to the first point. - * \param points_end is a past-the-end oterator for the points. - * \param weights_begin is an iterator to the weight of the first point. - * - * \pre The number of weights must be at least equal to the number of - * points. - */ - template < typename PointIterator, typename WeightIterator > - WeightedApproximation_3( PointIterator points_begin, PointIterator points_end, WeightIterator weights_begin ); - -public: -/// \name Point Set. -/// \{ - /// changes a weighted point in the set. - /** This invalidates the approximation. `compute()` should be called - * after all points have been set. - * \pre i must be smaller than the total size of the point set. - */ - void set_point( unsigned int i, const Point& p, const FT& w ); - - /// gives the size of the weighted point set. - std::size_t size() const; - -/// \} - - // changes the weighted point set. - /* After these points are set, the approximation is immediately computed. - * - * \tparam PointIterator is an input iterator over the point collection. - * The value type of the iterator must be a `Point`. - * \tparam WeightIterator is an input iterator over the collection of - * weights. The value type of the iterator must be an `FT`. - * - * \param points_begin is an iterator to the first point. - * \param points_end is a past-the-end iterator for the points. - * \param weights_begin is an iterator to the weight of the first point. - * - * \return whether the approximation converges. If the approximation does - * not converge this may indicate that the point set is too small, or the - * affine hull of the points cannot contain the approximation. - * - * \pre The points must fit in the approximation. - * \pre The number of weights must be at least equal to the number of - * points. - */ - template < typename PointIterator, typename WeightIterator > - bool set_points( PointIterator points_begin, PointIterator points_end, - WeightIterator weights_begin ); - -public: -/// \name Approximation -/// \{ - - /// computes the approximation. - /** \return whether the approximation converges. If the approximation does - * not converge this may indicate that the point set is too small, or the - * affine hull of the points cannot contain the approximation. - */ - bool compute(); - - /// checks whether the approximation has been computed successfully. - bool is_computed() const; -/// \} - -public: -/// \name Fitting -/// \{ - - /// fits a point to the approximation. - /** \param p is the point to fit. - * - * \return the point on the approximation closest to `p`. - * - * \pre The approximation must have been computed. - */ - Point fit( const Point& p ); -/// \} -}; // class WeightedApproximation_3 diff --git a/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/PackageDescription.txt b/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/PackageDescription.txt index 1ae18cbf86a..8351a47f4f8 100644 --- a/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/PackageDescription.txt +++ b/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/PackageDescription.txt @@ -26,14 +26,9 @@ \cgalClassifedRefPages -## Concepts ## - -- `WeightedApproximation_3` - ## Classes ## - `CGAL::Scale_space_surface_reconstruction_3` -- `CGAL::Weighted_PCA_approximation_3` */ diff --git a/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/Scale_space_reconstruction_3.txt b/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/Scale_space_reconstruction_3.txt index c16422509a8..beb6acb9d4a 100644 --- a/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/Scale_space_reconstruction_3.txt +++ b/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/Scale_space_reconstruction_3.txt @@ -90,7 +90,7 @@ The main class `Scale_space_surface_reconstruction_3` contains all the functiona The neighborhood size is estimated using `Orthogonal_k_neighbor_search`. The point set is generally stored in a `Orthogonal_k_neighbor_search::Tree`. When the neighborhood size is estimated, this tree is searched for nearest neighbors. -The scale-space is constructed at the original scale of the points. An iteration of increasing the scale is computed using a weighted PCA procedure. As described by Digne et al. \cgalCite{cgal:dmsl-ssmrp-11}, unlike similar methods this procedure does not lead to an undesirable clustering effect. By default the efficient \ref thirdpartyEigen library is used for this procedure. It is also possible to provide your own model for the `WeightedApproximation_3` concept. The weighted PCA procedure is performed locally per point, so it can be performed with parallel computing (linking with Intel TBB and passing the `Parallel_tag` to the reconstruction class is required). +The scale-space is constructed at the original scale of the points. An iteration of increasing the scale is computed using a weighted PCA procedure. As described by Digne et al. \cgalCite{cgal:dmsl-ssmrp-11}, unlike similar methods this procedure does not lead to an undesirable clustering effect. By default the efficient \ref thirdpartyEigen library is used for this procedure if available. Otherwise, the internal fallback `Internal_diagonalize_traits` is used. It is also possible to provide your own model for the `DiagonalizeTraits` concept. The weighted PCA procedure is performed locally per point, so it can be performed with parallel computing (linking with Intel TBB and passing the `Parallel_tag` to the reconstruction class is required). The mesh reconstruction is performed by filtering a \ref Chapter_3D_Alpha_Shapes "3D alpha shape" of the point set at a fixed scale. This filtering constructs a triangle for each regular facet; each singular facet results in two triangles facing opposite directions. diff --git a/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/dependencies b/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/dependencies index 73d4d9f43cf..9d74ca1bbde 100644 --- a/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/dependencies +++ b/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/dependencies @@ -4,3 +4,4 @@ STL_Extension Triangulation_3 Alpha_shapes_3 Spatial_searching +Solver_interface diff --git a/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h b/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h index 934120ef536..e2d1ba0b337 100644 --- a/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h +++ b/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h @@ -162,21 +162,58 @@ public: return; Static_search search(_tree, _pts[i], _nn[i]); - Approximation pca( _nn[i] ); + + Point barycenter (0., 0., 0.); + FT weight_sum = 0.; unsigned int column = 0; + // Compute total weight for( typename Static_search::iterator nit = search.begin(); nit != search.end() && column < _nn[i]; - ++nit, ++column ) { - pca.set_point( column, boost::get<0>(nit->first), 1.0 / _nn[boost::get<1>(nit->first)] ); - } - + ++nit, ++column ) + weight_sum += (1.0 / _nn[boost::get<1>(nit->first)]); + + column = 0; + // Compute barycenter + for( typename Static_search::iterator nit = search.begin(); + nit != search.end() && column < _nn[i]; + ++nit, ++column ) + { + Vector v (CGAL::ORIGIN, boost::get<0>(nit->first)); + barycenter = barycenter + ((1.0 / _nn[boost::get<1>(nit->first)]) / weight_sum) * v; + } + + CGAL::cpp11::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; + column = 0; + // Compute covariance matrix of Weighted PCA + for( typename Static_search::iterator nit = search.begin(); + nit != search.end() && column < _nn[i]; + ++nit, ++column ) + { + Vector v (barycenter, boost::get<0>(nit->first)); + FT w = (1.0 / _nn[boost::get<1>(nit->first)]); + v = w*v; + covariance[0] += w * v.x () * v.x (); + covariance[1] += w * v.x () * v.y (); + covariance[2] += w * v.x () * v.z (); + covariance[3] += w * v.y () * v.y (); + covariance[4] += w * v.y () * v.z (); + covariance[5] += w * v.z () * v.z (); + } + // Compute the weighted least-squares planar approximation of the point set. - if( !pca.compute() ) - return; + CGAL::cpp11::array eigenvectors = {{ 0., 0., 0., + 0., 0., 0., + 0., 0., 0. }}; + CGAL::cpp11::array eigenvalues = {{ 0., 0., 0. }}; + wA::diagonalize_selfadjoint_covariance_matrix + (covariance, eigenvalues, eigenvectors); // The vertex is moved by projecting it onto the plane // through the barycenter and orthogonal to the Eigen vector with smallest Eigen value. - _pts[i] = pca.fit( _pts[i] ); + Vector norm (eigenvectors[0], eigenvectors[1], eigenvectors[2]); + Vector b2p (barycenter, _pts[i]); + + _pts[i] = barycenter + b2p - ((norm * b2p) * norm); } }; // class AdvanceSS diff --git a/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_approximation_3.h b/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_approximation_3.h deleted file mode 100644 index afeef08ed56..00000000000 --- a/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_approximation_3.h +++ /dev/null @@ -1,177 +0,0 @@ -//Copyright (C) 2014 INRIA - Sophia Antipolis -// -//This program is free software: you can redistribute it and/or modify -//it under the terms of the GNU General Public License as published by -//the Free Software Foundation, either version 3 of the License, or -//(at your option) any later version. -// -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. -// -//You should have received a copy of the GNU General Public License -//along with this program. If not, see . -// -// Author(s): Thijs van Lankveld - - -#ifndef CGAL_SCALE_SPACE_RECONSTRUCTION_3_WEIGHTED_PCA_PROJECTION_3_H -#define CGAL_SCALE_SPACE_RECONSTRUCTION_3_WEIGHTED_PCA_PROJECTION_3_H - -#include - - -namespace CGAL { - -/// approximates a point set using a weighted least-squares plane. -/** \ingroup PkgScaleSpaceReconstruction3Classes - * The weighted least-squares planar approximation contains the barycenter - * of the points and is orthogonal to the eigenvector corresponding to the - * smallest eigenvalue. - * - * Point are fitted to this approximation by projecting them orthogonally onto - * the weighted least-squares plane. - * - * This class requires the eigenvector solvers of \ref thirdpartyEigen version - * 3.1.2 (or greater). - * - * \tparam Kernel the geometric traits class of the input and output. It - * must have a `RealEmbeddable` field number type. - * - * \note Irrespective of the geometric traits class, the approximation is - * always estimated up to double precision. - * - * \cgalModels `WeightedApproximation_3` - */ -template < class Kernel > -class Weighted_PCA_approximation_3 { -public: - typedef typename Kernel::FT FT; - typedef typename Kernel::Point_3 Point; - -private: - typedef Eigen::Matrix Matrix3D; // 3-by-dynamic double-value matrix. - typedef Eigen::Array Array1D; // 1-by-dynamic double-value array. - typedef Eigen::Matrix3d Matrix3; // 3-by-3 double-value matrix. - typedef Eigen::Vector3d Vector3; // 3-by-1 double-value matrix. - typedef Eigen::SelfAdjointEigenSolver< Matrix3 > EigenSolver; // Eigen value decomposition solver. - -private: - bool _comp; // Whether the eigenvalues are computed. - - Matrix3D _pts; // points. - Array1D _wts; // weights. - - Vector3 _bary; // barycenter. - Vector3 _norm; // normal. - -public: - // constructs an default approximation to hold the points. - /* \param size is the number of points that will be added. - */ - Weighted_PCA_approximation_3( unsigned int size ): _comp(false), _pts(3,size), _wts(1,size) {} - - // computes the weighted least-squares planar approximation of a point set. - /* Similar to constructing an empty projection and calling - * [set_points(points_begin, points_end, weights_begin)](\ref WeightedApproximation_3::set_points ) - * - * \tparam PointIterator is an input iterator over the point collection. - * The value type of the iterator must be a `Point`. - * \tparam WeightIterator is an input iterator over the collection of - * weights. The value type of the iterator must be an `FT`. - * - * \param points_begin is an iterator to the first point. - * \param points_end is a past-the-end oterator for the points. - * \param weights_begin is an iterator to the weight of the first point. - */ - template < typename PointIterator, typename WeightIterator > - Weighted_PCA_approximation_3( PointIterator points_begin, PointIterator points_end, WeightIterator weights_begin ) - : _comp(false) { - std::size_t size = std::distance( points_begin, points_end ); - _pts = Matrix3D(3,size); - _wts = Array1D(1,size); - set_points( points_begin, points_end, weights_begin ); - } - -public: - // sets a weighted point in the collection. - void set_point( unsigned int i, const Point& p, const FT& w ) { - _pts( 0, i ) = CGAL::to_double( p[0] ); - _pts( 1, i ) = CGAL::to_double( p[1] ); - _pts( 2, i ) = CGAL::to_double( p[2] ); - _wts( i ) = CGAL::to_double( w ); - _comp = false; - } - - // sets the weighted points and compute PCA. - template < typename PointIterator, typename WeightIterator > - bool set_points( PointIterator points_begin, PointIterator points_end, WeightIterator weights_begin ) { - for( unsigned int column = 0; points_begin != points_end; ++column, ++points_begin, ++weights_begin ) { - _pts( 0, column ) = CGAL::to_double( (*points_begin)[0] ); - _pts( 1, column ) = CGAL::to_double( (*points_begin)[1] ); - _pts( 2, column ) = CGAL::to_double( (*points_begin)[2] ); - _wts( column ) = CGAL::to_double( *weights_begin ); - } - return compute(); - } - - // gives the size of the weighted point set. - std::size_t size() const { return _pts.cols(); } - - // compute weighted PCA. - bool compute() { - // Construct the barycenter. - _bary = ( _pts.array().rowwise() * _wts ).rowwise().sum() / _wts.sum(); - - // Replace the points by their difference with the barycenter. - _pts = ( _pts.colwise() - _bary ).array().rowwise() * _wts; - - // Construct the weighted covariance matrix. - Matrix3 covar = Matrix3::Zero(); - for( int column = 0; column < _pts.cols(); ++column ) - covar += _wts.matrix()(column) * _pts.col(column) * _pts.col(column).transpose(); - - // Construct the Eigen system. - EigenSolver solver( covar ); - - // If the Eigen system does not converge, the vertex is not moved. - if( solver.info() != Eigen::Success ) - return false; - - // Find the Eigen vector with the smallest Eigen value. - std::ptrdiff_t index; - solver.eigenvalues().minCoeff( &index ); - if( solver.eigenvectors().col( index ).imag() != Vector3::Zero() ) { - // This should actually never happen, - // because the covariance matrix is symmetric! - CGAL_assertion( false ); - return false; - } - - // The normal is the Eigen vector with smallest Eigen value. - _norm = solver.eigenvectors().col( index ).real(); - _comp = true; - return true; - } - - // checks whether the weighted least-squares approximating plane has been computed. - bool is_computed() const { return _comp; } - -public: - // projects a point onto the weighted PCA plane. - Point fit( const Point& p ) { - CGAL_assertion( _comp ); - // The point is moved by projecting it onto the plane through the - // barycenter and orthogonal to the normal. - Vector3 to_p = Vector3( to_double( p[0] ), - to_double( p[1] ), - to_double( p[2] ) ) - _bary; - Vector3 proj = _bary + to_p - ( _norm.dot(to_p) * _norm ); - return Point( proj(0), proj(1), proj(2) ); - } -}; // class Weighted_PCA_approximation_3 - -} // namespace CGAL - -#endif // CGAL_SCALE_SPACE_RECONSTRUCTION_3_WEIGHTED_PCA_PROJECTION_3_H diff --git a/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h b/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h index d230e7a9c5b..3462a7c92fb 100644 --- a/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h +++ b/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h @@ -36,13 +36,10 @@ #include #include #include +#include #include -#ifdef CGAL_EIGEN3_ENABLED -#include -#endif // CGAL_EIGEN3_ENABLED - #include namespace CGAL { @@ -99,25 +96,22 @@ namespace CGAL { * only has an impact on the run-time. * \tparam Sh determines whether to collect the surface per shell. It * must be a `Boolean_tag` type. The default value is `Tag_true`. - * \tparam wA must be a model of `WeightedPCAProjection_3` and determines how - * to approximate a weighted point set. If \ref thirdpartyEigen 3.1.2 (or - * greater) is available and CGAL_EIGEN3_ENABLED is defined, then - * `Weighted_PCA_approximation_3` is used by default. + * \tparam wA must be a model of `DiagonalizeTraits` and determines + * how to diagonalize a weighted covariance matrix to approximate a + * weighted point set. It can be omitted: if Eigen 3 (or greater) is + * available and `CGAL_EIGEN3_ENABLED` is defined then an overload + * using `Eigen_diagonalize_traits` is provided. Otherwise, the + * internal implementation `Internal_diagonalize_traits` is used. * \tparam Ct indicates whether to use concurrent processing. It must be * either `Sequential_tag` or `Parallel_tag` (the default value). */ -template < class Gt, class FS = Tag_true, class Sh = Tag_true, class wA = Default, class Ct = Parallel_tag > +template < class Gt, class FS = Tag_true, class Sh = Tag_true, + class wA = Default_diagonalize_traits, class Ct = Parallel_tag > class Scale_space_surface_reconstruction_3 { - typedef typename Default::Get< wA, -#ifdef CGAL_EIGEN3_ENABLED - Weighted_PCA_approximation_3 -#else // CGAL_EIGEN3_ENABLED - void -#endif // CGAL_EIGEN3_ENABLED - >::type Approximation; public: typedef typename Gt::Point_3 Point; ///< defines the point type. + typedef typename Gt::Vector_3 Vector; ///< defines the vector type. typedef boost::tuple Point_and_int; private: diff --git a/Solver_interface/doc/Solver_interface/CGAL/Eigen_diagonalize_traits.h b/Solver_interface/doc/Solver_interface/CGAL/Eigen_diagonalize_traits.h new file mode 100644 index 00000000000..78630853eac --- /dev/null +++ b/Solver_interface/doc/Solver_interface/CGAL/Eigen_diagonalize_traits.h @@ -0,0 +1,53 @@ +namespace CGAL { + +/*! +\ingroup PkgSolver + +The class `Eigen_diagonalize_traits` provides an interface to the +diagonalization of covariance matrices of \ref thirdpartyEigen +"Eigen". + +The version 3.1 (or greater) of \ref thirdpartyEigen "Eigen" must be +available on the system. + +\cgalModels `DiagonalizeTraits` + + +\tparam FT Number type +\tparam dim Dimension of the matrices and vectors + +\sa http://eigen.tuxfamily.org + +Example +-------------- + + +*/ + + + +template +class Eigen_diagonalize_traits{ + +public: + static bool + diagonalize_selfadjoint_covariance_matrix( + const cpp11::array& cov, + cpp11::array& eigenvalues); + + static bool + diagonalize_selfadjoint_covariance_matrix( + const cpp11::array& cov, + cpp11::array& eigenvalues, + cpp11::array& eigenvectors); + + static bool + extract_largest_eigenvector_of_covariance_matrix ( + const cpp11::array& cov, + cpp11::array &normal); + + +}; + +} // namespace CGAL + diff --git a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/include/CGAL/Eigen_matrix.h b/Solver_interface/doc/Solver_interface/CGAL/Eigen_matrix.h similarity index 53% rename from Surface_mesh_parameterization/doc/Surface_mesh_parameterization/include/CGAL/Eigen_matrix.h rename to Solver_interface/doc/Solver_interface/CGAL/Eigen_matrix.h index db99a7ffa9c..98cba67ebad 100644 --- a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/include/CGAL/Eigen_matrix.h +++ b/Solver_interface/doc/Solver_interface/CGAL/Eigen_matrix.h @@ -2,24 +2,18 @@ namespace CGAL { /*! -\ingroup PkgSurfaceParameterizationAlgebra +\ingroup PkgSolver -The class `Eigen_sparse_matrix` is a C++ wrapper around \ref thirdpartyEigen "Eigen" matrix type `Eigen::SparseMatrix` +The class `Eigen_sparse_matrix` is a wrapper around \ref thirdpartyEigen "Eigen" matrix type `Eigen::SparseMatrix` that represents general matrices, be they symmetric or not. -The version 3.1 (or greater) of \ref thirdpartyEigen "Eigen" must be available on the system. \cgalModels `SparseLinearAlgebraTraits_d::Matrix` -Parameters --------------- - -`T`: Number type. +\tparam T Number type. \sa `CGAL::Eigen_solver_traits` \sa `CGAL::Eigen_sparse_symmetric_matrix` \sa `CGAL::Eigen_vector` -\sa http://eigen.tuxfamily.org - */ template< typename T > class Eigen_sparse_matrix { @@ -41,23 +35,19 @@ typedef unspecified_type EigenType; namespace CGAL { /*! -\ingroup PkgSurfaceParameterizationAlgebra +\ingroup PkgSolver -The class `Eigen_sparse_symmetric_matrix` is a C++ wrapper around \ref thirdpartyEigen "Eigen" matrix type `Eigen::SparseMatrix`. +The class `Eigen_sparse_symmetric_matrix` is a wrapper around \ref thirdpartyEigen "Eigen" matrix type `Eigen::SparseMatrix` As the matrix is symmetric only the lower triangle part is stored. \cgalModels `SparseLinearAlgebraTraits_d::Matrix` -Parameters --------------- - -`T`: Number type. +\tparam T Number type. \sa `CGAL::Eigen_solver_traits` -\sa `CGAL::Eigen_sparse_symmetric_matrix` +\sa `CGAL::Eigen_sparse_matrix` \sa `CGAL::Eigen_vector` -\sa http://eigen.tuxfamily.org */ template< typename T > @@ -75,4 +65,29 @@ typedef unspecified_type EigenType; /// @} }; /* end Eigen_sparse_symmetric_matrix */ + + +/*! +\ingroup PkgSolver + +The class `Eigen_matrix` is a wrapper around \ref thirdpartyEigen "Eigen" +matrix type +`Eigen::Matrix`. + + +\cgalModels `SvdTraits::Matrix` + +\tparam T Number type. + +\sa `CGAL::Eigen_svd` +\sa `CGAL::Eigen_vector` + +*/ +template< typename T > +class Eigen_matrix { +public: + +}; + + } /* end namespace CGAL */ diff --git a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/include/CGAL/Eigen_solver_traits.h b/Solver_interface/doc/Solver_interface/CGAL/Eigen_solver_traits.h similarity index 83% rename from Surface_mesh_parameterization/doc/Surface_mesh_parameterization/include/CGAL/Eigen_solver_traits.h rename to Solver_interface/doc/Solver_interface/CGAL/Eigen_solver_traits.h index 764f64e45ea..b6ace272000 100644 --- a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/include/CGAL/Eigen_solver_traits.h +++ b/Solver_interface/doc/Solver_interface/CGAL/Eigen_solver_traits.h @@ -2,18 +2,15 @@ namespace CGAL { /*! -\ingroup PkgSurfaceParameterizationAlgebra +\ingroup PkgSolver The class `Eigen_solver_traits` provides an interface to the sparse solvers of \ref thirdpartyEigen "Eigen". The version 3.1 (or greater) of \ref thirdpartyEigen "Eigen" must be available on the system. -\cgalModels `#SparseLinearAlgebraTraitsWithFactor_d` and `#NormalEquationSparseLinearAlgebraTraits_d` +\cgalModels `SparseLinearAlgebraTraitsWithFactor_d` and `NormalEquationSparseLinearAlgebraTraits_d` -Parameters --------------- -`T`: a sparse solver of \ref thirdpartyEigen "Eigen". The default solver is the iterative bi-congugate gradient stabilized solver -`Eigen::BiCGSTAB` for `double`. +\tparam T A sparse solver of \ref thirdpartyEigen "Eigen". The default solver is the iterative bi-congugate gradient stabilized solver `Eigen::BiCGSTAB` for `double`. \sa `CGAL::Eigen_sparse_matrix` \sa `CGAL::Eigen_sparse_symmetric_matrix` diff --git a/Jet_fitting_3/doc/Jet_fitting_3/CGAL/Eigen_svd.h b/Solver_interface/doc/Solver_interface/CGAL/Eigen_svd.h similarity index 66% rename from Jet_fitting_3/doc/Jet_fitting_3/CGAL/Eigen_svd.h rename to Solver_interface/doc/Solver_interface/CGAL/Eigen_svd.h index 974d4ffa48a..4bb7061d928 100644 --- a/Jet_fitting_3/doc/Jet_fitting_3/CGAL/Eigen_svd.h +++ b/Solver_interface/doc/Solver_interface/CGAL/Eigen_svd.h @@ -2,11 +2,11 @@ namespace CGAL { /*! -\ingroup PkgJet_fitting_3 +\ingroup PkgSolver The class `Eigen_svd` provides an algorithm to solve in the least square sense a linear system with a singular value decomposition using -\ref thirdpartyEigen. The field type is `double`. +\ref thirdpartyEigen. \cgalModels `SvdTraits` @@ -15,7 +15,11 @@ square sense a linear system with a singular value decomposition using class Eigen_svd { public: -/// @} + typedef double FT; + + typedef Eigen_vector Vector; + + typedef Eigen_matrix Matrix; }; /* end Eigen_svd */ } /* end namespace CGAL */ diff --git a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/include/CGAL/Eigen_vector.h b/Solver_interface/doc/Solver_interface/CGAL/Eigen_vector.h similarity index 56% rename from Surface_mesh_parameterization/doc/Surface_mesh_parameterization/include/CGAL/Eigen_vector.h rename to Solver_interface/doc/Solver_interface/CGAL/Eigen_vector.h index 9b5a0b24521..3ce95292cc4 100644 --- a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/include/CGAL/Eigen_vector.h +++ b/Solver_interface/doc/Solver_interface/CGAL/Eigen_vector.h @@ -2,22 +2,21 @@ namespace CGAL { /*! -\ingroup PkgSurfaceParameterizationAlgebra +\ingroup PkgSolver -The class `Eigen_vector` is a C++ wrapper around \ref thirdpartyEigen "Eigen" vector, which is a simple array of numbers. -The version 3.1 (or greater) of \ref thirdpartyEigen "Eigen" must be available on the system. +The class `Eigen_vector` is a wrapper around \ref thirdpartyEigen "Eigen" vector +type , +which is a simple array of numbers. +\cgalModels `SvdTraits::Vector` \cgalModels `SparseLinearAlgebraTraits_d::Vector`. -Parameters --------------- -`T`: Number type. +\tparam T Number type. \sa `CGAL::Eigen_solver_traits` \sa `CGAL::Eigen_sparse_matrix` \sa `CGAL::Eigen_sparse_symmetric_matrix` -\sa http://eigen.tuxfamily.org */ template< typename T > diff --git a/Solver_interface/doc/Solver_interface/CGAL/Internal_diagonalize_traits.h b/Solver_interface/doc/Solver_interface/CGAL/Internal_diagonalize_traits.h new file mode 100644 index 00000000000..9c0cee1cff1 --- /dev/null +++ b/Solver_interface/doc/Solver_interface/CGAL/Internal_diagonalize_traits.h @@ -0,0 +1,46 @@ +namespace CGAL { + +/*! +\ingroup PkgSolver + +The class `Internal_diagonalize_traits` provides an internal +implementation for the diagonalization of Variance-Covariance +Matrices. + +\cgalModels `DiagonalizeTraits` + +\tparam FT Number type +\tparam dim Dimension of the matrices and vectors + +Example +-------------- + +*/ + + + +template +class Internal_diagonalize_traits{ + +public: + static bool + diagonalize_selfadjoint_covariance_matrix( + const cpp11::array& cov, + cpp11::array& eigenvalues); + + static bool + diagonalize_selfadjoint_covariance_matrix( + const cpp11::array& cov, + cpp11::array& eigenvalues, + cpp11::array& eigenvectors); + + static bool + extract_largest_eigenvector_of_covariance_matrix ( + const cpp11::array& cov, + cpp11::array &normal); + + +}; + +} // namespace CGAL + diff --git a/Solver_interface/doc/Solver_interface/Concepts/DiagonalizeTraits.h b/Solver_interface/doc/Solver_interface/Concepts/DiagonalizeTraits.h new file mode 100644 index 00000000000..00341ec9266 --- /dev/null +++ b/Solver_interface/doc/Solver_interface/Concepts/DiagonalizeTraits.h @@ -0,0 +1,51 @@ +/*! +\ingroup PkgSolverConcepts +\cgalConcept + +Concept providing functions to extract eigenvectors and eigenvalue +from covariance matrices represented by an array `a`, using symmetric +diagonalization. For example, a matrix of dimension 3 is defined as +follows: +
      +\f$ \begin{bmatrix} + a[0] & a[1] & a[2] \\ + a[1] & a[3] & a[4] \\ + a[2] & a[4] & a[5] \\ + \end{bmatrix}\f$ +
      +\cgalHasModel `CGAL::Eigen_diagonalize_traits` +\cgalHasModel `CGAL::Internal_diagonalize_traits` +*/ +template +class DiagonalizeTraits +{ +public: + /// fill `eigenvalues` with the eigenvalues of the covariance matrix represented by `cov`. + /// Eigenvalues are sorted by increasing order. + /// \return `true` if the operation was successful and `false` otherwise. + static bool + diagonalize_selfadjoint_covariance_matrix( + const cpp11::array& cov, + cpp11::array& eigenvalues); + + /// fill `eigenvalues` with the eigenvalues and `eigenvectors` with + /// the eigenvectors of the covariance matrix represented by `cov`. + /// Eigenvalues are sorted by increasing order. + /// \return `true` if the operation was successful and `false` + /// otherwise. + static bool + diagonalize_selfadjoint_covariance_matrix( + const cpp11::array& cov, + cpp11::array& eigenvalues, + cpp11::array& eigenvectors); + + + /// Extract the eigenvector associated to the largest eigenvalue + /// of the covariance matrix represented by `cov`. + /// \return `true` if the operation was successful and `false` otherwise. + static bool + extract_largest_eigenvector_of_covariance_matrix ( + const cpp11::array& cov, + cpp11::array &normal); +}; + diff --git a/Surface_mesh_skeletonization/doc/Surface_mesh_skeletonization/Concepts/NormalEquationSparseLinearAlgebraTraits_d.h b/Solver_interface/doc/Solver_interface/Concepts/NormalEquationSparseLinearAlgebraTraits_d.h similarity index 97% rename from Surface_mesh_skeletonization/doc/Surface_mesh_skeletonization/Concepts/NormalEquationSparseLinearAlgebraTraits_d.h rename to Solver_interface/doc/Solver_interface/Concepts/NormalEquationSparseLinearAlgebraTraits_d.h index 9767d45aa7d..81520f973b7 100644 --- a/Surface_mesh_skeletonization/doc/Surface_mesh_skeletonization/Concepts/NormalEquationSparseLinearAlgebraTraits_d.h +++ b/Solver_interface/doc/Solver_interface/Concepts/NormalEquationSparseLinearAlgebraTraits_d.h @@ -1,6 +1,7 @@ /*! -\ingroup PkgMeanCurvatureSkeleton3Concepts +\ingroup PkgSolverConcepts + \cgalConcept diff --git a/Surface_modeling/doc/Surface_modeling/Concepts/SparseLinearAlgebraTraitsWithFactor_d.h b/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraitsWithFactor_d.h similarity index 69% rename from Surface_modeling/doc/Surface_modeling/Concepts/SparseLinearAlgebraTraitsWithFactor_d.h rename to Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraitsWithFactor_d.h index 2f64c66d578..1da0282a169 100644 --- a/Surface_modeling/doc/Surface_modeling/Concepts/SparseLinearAlgebraTraitsWithFactor_d.h +++ b/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraitsWithFactor_d.h @@ -1,6 +1,6 @@ /*! -\ingroup PkgSurfaceModelingConcepts +\ingroup PkgSolverConcepts \cgalConcept @brief Concept describing the set of requirements for a direct sparse linear system solver with factorization. @@ -31,16 +31,16 @@ SparseLinearAlgebraTraitsWithFactor_d(); /// @{ /*! -Factorize the sparse matrix A. -This factorization is used in SparseLinearAlgebraTraitsWithFactor_d::linear_solver to solve the system for different right-hand side vectors. + Factorize the sparse matrix `A`. +This factorization is used in `SparseLinearAlgebraTraitsWithFactor_d::linear_solver()` to solve the system for different right-hand side vectors. See `::SparseLinearAlgebraTraits_d::linear_solver()` for the description of `D`. -@return true if the factorization is successful +@return `true` if the factorization is successful */ bool factor(const Matrix& A, NT& D); /*! -Solve the sparse linear system \f$ A \times X = B\f$, with \f$ A \f$ being the matrix provided in SparseLinearAlgebraTraitsWithFactor_d::factor. -@return true if the solver is successful +Solve the sparse linear system \f$ A \times X = B\f$, with \f$ A \f$ being the matrix provided in `SparseLinearAlgebraTraitsWithFactor_d::factor()`. +@return `true` if the solver is successful */ bool linear_solver(const Vector& B, Vector& X); diff --git a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Concepts/SparseLinearAlgebraTraits_d.h b/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraits_d.h similarity index 81% rename from Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Concepts/SparseLinearAlgebraTraits_d.h rename to Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraits_d.h index e8872f54e03..b6fc4e8c57d 100644 --- a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Concepts/SparseLinearAlgebraTraits_d.h +++ b/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraits_d.h @@ -1,18 +1,14 @@ /*! -\ingroup PkgSurfaceParameterizationConcepts +\ingroup PkgSolverConcepts + \cgalConcept The concept `SparseLinearAlgebraTraits_d` is used to solve sparse linear systems A\f$ \times \f$ X = B. -\cgalRefines `LinearAlgebraTraits_d` \cgalHasModel `CGAL::Eigen_solver_traits` -\cgalHasModel `OpenNL::DefaultLinearSolverTraits` in OpenNL package -\cgalHasModel `OpenNL::SymmetricLinearSolverTraits` in OpenNL package -\sa `SparseLinearAlgebraTraits_d::Matrix` -\sa `SparseLinearAlgebraTraits_d::Vector` */ @@ -66,23 +62,23 @@ bool linear_solver(const Matrix& A, const Vector& B, Vector& X, NT& D); /// @} +}; /* end SparseLinearAlgebraTraits_d */ + + /*! -\ingroup PkgSurfaceParameterizationConcepts \cgalConcept `SparseLinearAlgebraTraits_d::Vector` is a concept of a vector that can be multiplied by a sparse matrix. -\cgalRefines `LinearAlgebraTraits_d::Vector` - \cgalHasModel `CGAL::Eigen_vector` -\cgalHasModel `OpenNL::FullVector` in `OpenNL` package \sa `SparseLinearAlgebraTraits_d` \sa `SparseLinearAlgebraTraits_d::Matrix` */ -class Vector { + +class SparseLinearAlgebraTraits_d::Vector { public: /// \name Types @@ -142,23 +138,20 @@ NT& operator[](int row); }; /* end Vector */ /*! -\ingroup PkgSurfaceParameterizationConcepts + \cgalConcept `SparseLinearAlgebraTraits_d::Matrix` is a concept of a sparse matrix class. -\cgalRefines `LinearAlgebraTraits_d::Matrix` - \cgalHasModel `CGAL::Eigen_sparse_matrix` \cgalHasModel `CGAL::Eigen_sparse_symmetric_matrix` -\cgalHasModel `OpenNL::SparseMatrix` in `OpenNL` package \sa `SparseLinearAlgebraTraits_d` \sa `SparseLinearAlgebraTraits_d::Vector` */ -class Matrix { + class SparseLinearAlgebraTraits_d::Matrix { public: /// \name Types @@ -243,6 +236,3 @@ void set_coef(int row, int column, NT value, bool new_coef = false); }; /* end Matrix */ - -}; /* end SparseLinearAlgebraTraits_d */ - diff --git a/Jet_fitting_3/doc/Jet_fitting_3/Concepts/SvdTraits.h b/Solver_interface/doc/Solver_interface/Concepts/SvdTraits.h similarity index 57% rename from Jet_fitting_3/doc/Jet_fitting_3/Concepts/SvdTraits.h rename to Solver_interface/doc/Solver_interface/Concepts/SvdTraits.h index 01230f9a162..495485fbe83 100644 --- a/Jet_fitting_3/doc/Jet_fitting_3/Concepts/SvdTraits.h +++ b/Solver_interface/doc/Solver_interface/Concepts/SvdTraits.h @@ -1,23 +1,12 @@ /*! - \ingroup PkgJet_fitting_3Concepts + \ingroup PkgSolverConcepts \cgalConcept - The concept `SvdTraits` describes the set of requirements to be - fulfilled by any class used to instantiate the third template - parameter of the class - `CGAL::Monge_via_jet_fitting`. - - It describes the linear algebra types and algorithms needed by the - class `CGAL::Monge_via_jet_fitting`. - - \cgalHeading{Requirements} - - The scalar type, `SvdTraits::FT`, must be the same as that of - the `LocalKernel` concept : `LocalKernel::FT`. + The concept `SvdTraits` describes the linear algebra types and algorithms needed + to solve in the least square sense a linear system with a singular value decomposition \cgalHasModel `CGAL::Eigen_svd` - - \sa `LocalKernel` + \cgalHasModel `CGAL::Lapack_svd` */ class SvdTraits { @@ -39,7 +28,7 @@ public: /*! The matrix type, model of the concept `SvdTraits::Matrix`. */ - typedef unspecified_type matrix; + typedef unspecified_type Matrix; /// @} @@ -60,9 +49,10 @@ public: }; /* end SvdTraits */ /*! -\ingroup PkgJet_fitting_3Concepts \cgalConcept -Concept of vector type used by the concept SvdTraits. +Concept of vector type used by the concept `SvdTraits`. + +\cgalHasModel `CGAL::Eigen_vector` */ class SvdTraits::Vector { public: @@ -76,12 +66,12 @@ public: size_t size(); /*! - return the \f$ i^{th}\f$ entry, \f$ i\f$ from \f$ 0\f$ to \f$ size()-1\f$. + return the `i`th entry, `i` from `0` to `size()-1`. */ FT operator()(size_t i); /*! - set the \f$ i^{th}\f$ entry to `value`. + set the `i`'th entry to `value`. */ void set(size_t i, const FT value); @@ -93,9 +83,10 @@ public: /*! -\ingroup PkgJet_fitting_3Concepts \cgalConcept -Concept of matrix type used by the concept SvdTraits. +Concept of matrix type used by the concept `SvdTraits`. + +\cgalHasModel `CGAL::Eigen_matrix` */ class SvdTraits::Matrix { public: @@ -115,13 +106,13 @@ public: size_t number_of_columns(); /*! - return the entry at row \f$ i\f$ and column \f$ j\f$, \f$ i\f$ from \f$ 0\f$ to `number_of_rows - 1`, - \f$ j\f$ from \f$ 0\f$ to `number_of_columns - 1`. + return the entry at row `i` and column `j`, `i` from `0` to `number_of_rows - 1`, + `j` from `0` to `number_of_columns - 1`. */ FT operator()(size_t i, size_t j); /*! - set the entry at row \f$ i\f$ and column \f$ j\f$ to \f$ value\f$. + set the entry at row `i` and column `j` to `value`. */ void set(size_t i, size_t j, const FT value); }; diff --git a/Solver_interface/doc/Solver_interface/Doxyfile.in b/Solver_interface/doc/Solver_interface/Doxyfile.in new file mode 100644 index 00000000000..0f3e79647fd --- /dev/null +++ b/Solver_interface/doc/Solver_interface/Doxyfile.in @@ -0,0 +1,7 @@ +@INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS} + +PROJECT_NAME = "CGAL ${CGAL_CREATED_VERSION_NUM} - CGAL and Solvers" +INPUT = ${CMAKE_SOURCE_DIR}/Solver_interface/doc/Solver_interface/ +EXAMPLE_PATH = ${CMAKE_SOURCE_DIR}/Solver_interface/examples/Solver_interface/ + + diff --git a/Solver_interface/doc/Solver_interface/PackageDescription.txt b/Solver_interface/doc/Solver_interface/PackageDescription.txt new file mode 100644 index 00000000000..1fc89d13a10 --- /dev/null +++ b/Solver_interface/doc/Solver_interface/PackageDescription.txt @@ -0,0 +1,50 @@ +/// \defgroup PkgSolver CGAL and Solvers Reference + +/// \defgroup PkgSolverConcepts Concepts +/// \ingroup PkgSolver +/// + + +/*! +\addtogroup PkgSolver +\cgalPkgDescriptionBegin{CGAL and Solvers,PkgSolverSummary} +\cgalPkgPicture{solver.png} +\cgalPkgSummaryBegin +\cgalPkgAuthors{CGAL Editorial Board } +\cgalPkgDesc{This package provides concepts and models for solving linear systems with dense or sparse matrices.} +\cgalPkgManuals{Chapter_CGAL_and_Solvers,PkgSolver} +\cgalPkgSummaryEnd +\cgalPkgShortInfoBegin +\cgalPkgSince{3.7} +\cgalPkgBib{cgal:eb-solver } +\cgalPkgLicense{\ref licensesLGPL "LGPL"} +\cgalPkgShortInfoEnd +\cgalPkgDescriptionEnd + +\cgalClassifedRefPages + +## Concepts ## + +- `DiagonalizeTraits` +- `SparseLinearAlgebraTraits_d` +- `SparseLinearAlgebraTraitsWithFactor_d` +- `SvdTraits` + + +## Classes ## + +- `CGAL::Eigen_solver_traits` +- `CGAL::Eigen_svd` +- `CGAL::Eigen_diagonalize_traits` +- `CGAL::Eigen_matrix` +- `CGAL::Eigen_vector` +- `CGAL::Eigen_sparse_matrix` +- `CGAL::Eigen_sparse_symmetric_matrix` +- `CGAL::Internal_diagonalize_traits` +- `CGAL::Lapack_svd` + +*/ + + + + diff --git a/Solver_interface/doc/Solver_interface/Solver_interface.txt b/Solver_interface/doc/Solver_interface/Solver_interface.txt new file mode 100644 index 00000000000..cc021566810 --- /dev/null +++ b/Solver_interface/doc/Solver_interface/Solver_interface.txt @@ -0,0 +1,107 @@ +namespace CGAL { +/*! + +\mainpage User Manual +\anchor Chapter_CGAL_and_Solvers +\anchor chapterSolvers +\cgalAutoToc +\authors %CGAL Editorial Board + +Several \cgal packages have to solve linear systems with dense or +sparse matrices. This package provides concepts and models for that +purpose. + +We generally provide models using the \ref thirdpartyEigen +library. Wrappers for the Eigen classes `Eigen_matrix` and +`Eigen_vector` are also provided when needed. + +It is straightforward to develop equivalent models for +other solvers, for example those found in the Intel Math Kernel +Library (MKL). + + +\section SectionSolverDiagonalize Matrix Diagonalization + +The concept `DiagonalizeTraits` defines an interface for the +diagonalization and computation of eigenvectors and eigenvalues of a +symmetric matrix. `T` is the number type and `dim` is the dimension of +the matrices and vector (set to 3 by default). We provide two models +for this concept: + +- `Eigen_diagonalize_traits` uses the \ref thirdpartyEigen library. +- `Internal_diagonalize_traits` is an internal implementation that does not +depend on another library. + +Although both models achieve the same computation, +`Eigen_diagonalize_traits` is faster and should thus be used if the +\ref thirdpartyEigen library is available. The eigenvalues are stored +in ascending order and eigenvectors are stored in accordance. + +This is an example of an eigendecomposition of a matrix using this +class: + + +\cgalExample{Solver_interface/diagonalize_matrix.cpp} + + +\section SectionSolverSVD Singular Value Decomposition + +The concept `SvdTraits` defines an interface for solving in the least +square sense a linear system with a singular value decomposition. The +field type is `double`. We provide two models for this concept: + +- `Eigen_svd` uses the \ref thirdpartyEigen library. +- `Lapack_svd` uses the \ref thirdpartyLapack library. + +Here is a simple example that shows how to handle matrices, vectors +and this solver: + +\cgalExample{Solver_interface/singular_value_decomposition.cpp} + + + + +\section SectionSolverSparse Sparse Solvers + +We define 3 concepts for sparse linear algebra: + +- `SparseLinearAlgebraTraits_d` +- `SparseLinearAlgebraTraitsWithFactor_d` +- `NormalEquationSparseLinearAlgebraTraits_d` + +An interface to the sparse solvers from the \ref thirdpartyEigen +library is provided as a model for these 3 concepts through the class +`Eigen_solver_traits`. This solver traits class can be used for an +iterative or a direct, symmetric or general sparse solvers. The +specific solver to be used must be given as template parameter. + +Each \cgal package using a sparse solver specifies which type of matrix +and solver is required: + +\code{.cpp} + +typedef CGAL::Eigen_sparse_matrix::EigenType EigenMatrix; + +//iterative general solver +typedef CGAL::Eigen_solver_traits< Eigen::BiCGSTAB > Iterative_general_solver; + +//iterative symmetric solver +typedef CGAL::Eigen_solver_traits< Eigen::ConjugateGradient > Iterative_symmetric_solver; + +//direct symmetric solver +typedef CGAL::Eigen_solver_traits< Eigen::SimplicialCholesky > Direct_symmetric_solver; + +\endcode + +Here is an example that shows how to fill the sparse matrix and call +the solver: + +\cgalExample{Solver_interface/sparse_solvers.cpp} + + + + +*/ +} /* namespace CGAL */ + diff --git a/Solver_interface/doc/Solver_interface/dependencies b/Solver_interface/doc/Solver_interface/dependencies new file mode 100644 index 00000000000..5d9a51f054b --- /dev/null +++ b/Solver_interface/doc/Solver_interface/dependencies @@ -0,0 +1,5 @@ +Manual +Kernel_23 +STL_Extension +Algebraic_foundations +Miscellany diff --git a/Solver_interface/doc/Solver_interface/examples.txt b/Solver_interface/doc/Solver_interface/examples.txt new file mode 100644 index 00000000000..6f2d6ff1f88 --- /dev/null +++ b/Solver_interface/doc/Solver_interface/examples.txt @@ -0,0 +1,5 @@ +/*! +\example Solver_interface/diagonalize_matrix.cpp +\example Solver_interface/singular_value_decomposition.cpp +\example Solver_interface/sparse_solvers.cpp +*/ diff --git a/Solver_interface/doc/Solver_interface/fig/solver.png b/Solver_interface/doc/Solver_interface/fig/solver.png new file mode 100755 index 00000000000..ea9b0ba8238 Binary files /dev/null and b/Solver_interface/doc/Solver_interface/fig/solver.png differ diff --git a/Solver_interface/examples/Solver_interface/CMakeLists.txt b/Solver_interface/examples/Solver_interface/CMakeLists.txt new file mode 100644 index 00000000000..eead05a759f --- /dev/null +++ b/Solver_interface/examples/Solver_interface/CMakeLists.txt @@ -0,0 +1,45 @@ +# Created by the script cgal_create_cmake_script +# This is the CMake script for compiling a CGAL application. + + +project( examples_ ) + +cmake_minimum_required(VERSION 2.8.10) + +find_package(CGAL QUIET COMPONENTS Core ) + +if ( CGAL_FOUND ) + + include( ${CGAL_USE_FILE} ) + + include( CGAL_CreateSingleSourceCGALProgram ) + + include_directories (BEFORE "../include") + + # Use Eigen or BLAS and LAPACK (optional) + find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) + if (NOT EIGEN3_FOUND) + find_package(LAPACK) + if(LAPACK_FOUND) + include( ${LAPACK_USE_FILE} ) + endif(LAPACK_FOUND) + else() + include( ${EIGEN3_USE_FILE} ) + endif() + + if(EIGEN3_FOUND OR LAPACK_FOUND) + create_single_source_cgal_program( "singular_value_decomposition.cpp" ) + endif() + + if(EIGEN3_FOUND) + create_single_source_cgal_program( "sparse_solvers.cpp" ) + endif() + + create_single_source_cgal_program( "diagonalize_matrix.cpp" ) + +else() + + message(STATUS "This program requires the CGAL library, and will not be compiled.") + +endif() + diff --git a/Solver_interface/examples/Solver_interface/diagonalize_matrix.cpp b/Solver_interface/examples/Solver_interface/diagonalize_matrix.cpp new file mode 100644 index 00000000000..43d5a7acdc9 --- /dev/null +++ b/Solver_interface/examples/Solver_interface/diagonalize_matrix.cpp @@ -0,0 +1,51 @@ +#include + +#ifdef CGAL_EIGEN3_ENABLED +#include +#else +#include +#endif + +typedef double FT; +typedef CGAL::cpp11::array Eigen_matrix; +typedef CGAL::cpp11::array Eigen_vector; +typedef CGAL::cpp11::array Eigen_three_vectors; + +// If Eigen is enabled, use it, otherwise fallback to the internal model +#ifdef CGAL_EIGEN3_ENABLED +typedef CGAL::Eigen_diagonalize_traits Diagonalize_traits; +#else +typedef CGAL::Internal_diagonalize_traits Diagonalize_traits; +#endif + +int main(void) +{ + Eigen_matrix covariance = {{ 0., 0., 0., 0., 0., 0. }}; + + // Fill matrix with random numbers + for (std::size_t i = 0; i < 6; ++ i) + covariance[i] = rand (); + + Eigen_vector eigenvalues; + Eigen_three_vectors eigenvectors; + + if (!(Diagonalize_traits::diagonalize_selfadjoint_covariance_matrix (covariance, + eigenvalues, + eigenvectors))) + { + std::cerr << "Error: cannot diagonalize matrix" << std::endl; + return -1; + } + + // Print result + for (std::size_t i = 0; i < 3; ++ i) + { + std::cout << "Eigenvalue " << i+1 << " = " << eigenvalues[i] << std::endl + << " with eigenvector [ "; + for (std::size_t j = 0; j < 3; ++ j) + std::cout << eigenvectors[3*i + j] << " "; + std::cout << "]" << std::endl; + } + + return 0; +} diff --git a/Solver_interface/examples/Solver_interface/singular_value_decomposition.cpp b/Solver_interface/examples/Solver_interface/singular_value_decomposition.cpp new file mode 100644 index 00000000000..11a14619ad0 --- /dev/null +++ b/Solver_interface/examples/Solver_interface/singular_value_decomposition.cpp @@ -0,0 +1,44 @@ +// If Eigen is available, use it, otherwise switch to Lapack +#ifdef CGAL_EIGEN3_ENABLED +#include +#include +#include +typedef CGAL::Eigen_svd Svd; + +#else +#ifdef CGAL_LAPACK_ENABLED +#include +typedef CGAL::Lapack_svd Svd; +#endif +#endif + +typedef Svd::FT FT; +typedef Svd::Vector Eigen_vector; +typedef Svd::Matrix Eigen_matrix; + +int main(void) +{ + std::size_t degree = 3; + + Eigen_vector B (degree); + Eigen_matrix M (degree, degree); + + // Fill B and M with random numbers + for (std::size_t i = 0; i < degree; ++ i) + { + B.set (i, rand()); + for (std::size_t j = 0; j < degree; ++ j) + M.set (i, j, rand()); + } + + // Solve MX=B + std::cout << Svd::solve(M, B) << std::endl; + + // Print result + std::cout << "Solution of SVD = [ "; + for (std::size_t i = 0; i < degree; ++ i) + std::cout << B.vector()[i] << " "; + std::cout << "]" << std::endl; + + return 0; +} diff --git a/Solver_interface/examples/Solver_interface/sparse_solvers.cpp b/Solver_interface/examples/Solver_interface/sparse_solvers.cpp new file mode 100644 index 00000000000..a9e0ba4824b --- /dev/null +++ b/Solver_interface/examples/Solver_interface/sparse_solvers.cpp @@ -0,0 +1,62 @@ +#include +#include + + +typedef CGAL::Eigen_solver_traits::EigenType> > Eigen_solver; +typedef Eigen_solver::NT FT; +typedef Eigen_solver::Matrix Eigen_matrix; +typedef Eigen_solver::Vector Eigen_vector; + + +int main(void) +{ + srand (time (NULL)); + std::size_t degree = 3000; + std::size_t nb_nonzero_coef = 100; + + Eigen_vector B (degree); + Eigen_matrix A (degree); + + Eigen_vector diag (degree); + + // Randomly make some coefficients of the matrix non-zero + for (std::size_t i = 0; i < nb_nonzero_coef; ++ i) + { + std::size_t x = rand () % degree; + std::size_t y = rand () % degree; + if (x == y) + continue; + + FT value = rand () / static_cast (RAND_MAX); + + A.add_coef (x, y, value); + diag.set (x, diag.vector()[x] - value); + + B.set (x, 1.); + } + + for (std::size_t i = 0; i < degree; ++ i) + A.add_coef (i, i, diag.vector()[i]); + + // Create sparse matrix + A.assemble_matrix(); + + Eigen_vector X (degree); + FT d; + + Eigen_solver solver; + if (!(solver.linear_solver (A, B, X, d))) + { + std::cerr << "Error: linear solver failed" << std::endl; + return -1; + } + + // Print extract of result + std::cout << "Vector X (non-zero coefficients) = [ "; + for (std::size_t i = 0; i < degree; ++ i) + if (X.vector()[i] != 0.) + std::cout << X.vector()[i] << " "; + std::cout << "]" << std::endl; + + return 0; +} diff --git a/Solver_interface/include/CGAL/Default_diagonalize_traits.h b/Solver_interface/include/CGAL/Default_diagonalize_traits.h new file mode 100644 index 00000000000..93ead75f01b --- /dev/null +++ b/Solver_interface/include/CGAL/Default_diagonalize_traits.h @@ -0,0 +1,58 @@ +#ifndef CGAL_DEFAULT_DIAGONALIZE_TRAITS_H +#define CGAL_DEFAULT_DIAGONALIZE_TRAITS_H + +#ifdef CGAL_EIGEN3_ENABLED +#include +#else +#include +#endif + + +namespace CGAL { + + + // Wrapper class designed to automatically use + // Eigen_diagonalize_traits if Eigen is available and otherwise use + // the fallback Internal_diagonalize_traits class. + +template +class Default_diagonalize_traits{ + +#ifdef CGAL_EIGEN3_ENABLED + typedef Eigen_diagonalize_traits Base; +#else + typedef Internal_diagonalize_traits Base; +#endif + +public: + static bool + diagonalize_selfadjoint_covariance_matrix( + const cpp11::array& cov, + cpp11::array& eigenvalues) + { + return Base::diagonalize_selfadjoint_covariance_matrix (cov, eigenvalues); + } + + static bool + diagonalize_selfadjoint_covariance_matrix( + const cpp11::array& cov, + cpp11::array& eigenvalues, + cpp11::array& eigenvectors) + { + return Base::diagonalize_selfadjoint_covariance_matrix (cov, eigenvalues, eigenvectors); + } + + // Extract the eigenvector associated to the largest eigenvalue + static bool + extract_largest_eigenvector_of_covariance_matrix ( + const cpp11::array& cov, + cpp11::array &normal) + { + return Base::extract_largest_eigenvector_of_covariance_matrix (cov, normal); + } +}; + + +} // namespace CGAL + +#endif // CGAL_DEFAULT_DIAGONALIZE_TRAITS_H diff --git a/Solver_interface/include/CGAL/Eigen_diagonalize_traits.h b/Solver_interface/include/CGAL/Eigen_diagonalize_traits.h new file mode 100644 index 00000000000..1c65e154e76 --- /dev/null +++ b/Solver_interface/include/CGAL/Eigen_diagonalize_traits.h @@ -0,0 +1,149 @@ +// Copyright (c) 2014 INRIA Sophia-Antipolis (France). +// 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 +// 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) : Jocelyn Meyron and Quentin Mérigot +// + +#ifndef CGAL_EIGEN_DIAGONALIZE_TRAITS_H +#define CGAL_EIGEN_DIAGONALIZE_TRAITS_H + +#include +#include + +#include + +namespace CGAL { + +/// A model of the concept `DiagonalizeTraits` using \ref thirdpartyEigen. +/// \cgalModels `DiagonalizeTraits` + +template +class Eigen_diagonalize_traits{ + + typedef Eigen::Matrix Matrix; + typedef Eigen::Matrix Vector; + + // Construct the covariance matrix + static Matrix + construct_covariance_matrix + (const cpp11::array& cov) { + Matrix m; + + for (std::size_t i = 0; i < dim; ++ i) + for (std::size_t j = i; j < dim; ++ j) + { + m(i,j) = static_cast(cov[(dim * i) + j - ((i * (i+1)) / 2)]); + if (i != j) + m(j,i) = m(i,j); + } + + return m; + } + + // Diagonalize a selfadjoint matrix + static bool + diagonalize_selfadjoint_matrix (Matrix& m, + Matrix& eigenvectors, + Vector& eigenvalues) { + Eigen::SelfAdjointEigenSolver eigensolver(m); + + if (eigensolver.info() != Eigen::Success) { + return false; + } + + eigenvalues = eigensolver.eigenvalues(); + eigenvectors = eigensolver.eigenvectors(); + + return true; + } + +public: + static bool + diagonalize_selfadjoint_covariance_matrix( + const cpp11::array& cov, + cpp11::array& eigenvalues) + { + Matrix m = construct_covariance_matrix(cov); + + // Diagonalizing the matrix + Vector eigenvalues_; + Matrix eigenvectors_; + bool res = diagonalize_selfadjoint_matrix(m, eigenvectors_, eigenvalues_); + + if (res) + { + for (std::size_t i = 0; i < dim; ++ i) + eigenvalues[i] = static_cast(eigenvalues_[i]); + } + + return res; + } + + static bool + diagonalize_selfadjoint_covariance_matrix( + const cpp11::array& cov, + cpp11::array& eigenvalues, + cpp11::array& eigenvectors) + { + Matrix m = construct_covariance_matrix(cov); + + // Diagonalizing the matrix + Vector eigenvalues_; + Matrix eigenvectors_; + bool res = diagonalize_selfadjoint_matrix(m, eigenvectors_, eigenvalues_); + + if (res) + { + for (std::size_t i = 0; i < dim; ++ i) + { + eigenvalues[i] = static_cast(eigenvalues_[i]); + + for (std::size_t j = 0; j < dim; ++ j) + eigenvectors[dim*i + j]=static_cast(eigenvectors_(j,i)); + } + } + + return res; + } + + // Extract the eigenvector associated to the largest eigenvalue + static bool + extract_largest_eigenvector_of_covariance_matrix ( + const cpp11::array& cov, + cpp11::array &normal) + { + // Construct covariance matrix + Matrix m = construct_covariance_matrix(cov); + + // Diagonalizing the matrix + Vector eigenvalues; + Matrix eigenvectors; + if (! diagonalize_selfadjoint_matrix(m, eigenvectors, eigenvalues)) { + return false; + } + + // Eigenvalues are sorted by increasing order + for (unsigned int i = 0; i < dim; ++ i) + normal[i] = static_cast (eigenvectors(i,dim-1)); + + return true; + } +}; + +} // namespace CGAL + +#endif // CGAL_EIGEN_DIAGONALIZE_TRAITS_H diff --git a/Solver_interface/include/CGAL/Eigen_solver_traits.h b/Solver_interface/include/CGAL/Eigen_solver_traits.h index e641c121b89..e9396d17595 100644 --- a/Solver_interface/include/CGAL/Eigen_solver_traits.h +++ b/Solver_interface/include/CGAL/Eigen_solver_traits.h @@ -69,7 +69,7 @@ namespace internal { /// is a generic traits class for solving asymmetric or symmetric positive definite (SPD) /// sparse linear systems using one of the Eigen solvers. /// The default solver is the iterative bi-congugate gradient stabilized solver -/// Eigen::BiCGSTAB for double. +/// Eigen::BiCGSTAB for double. /// /// \cgalModels `SparseLinearAlgebraTraitsWithFactor_d`. @@ -79,6 +79,7 @@ class Eigen_solver_traits typedef typename EigenSolverT::Scalar Scalar; // Public types public: + typedef EigenSolverT Solver; typedef Scalar NT; typedef typename internal::Get_eigen_matrix::type Matrix; typedef Eigen_vector Vector; @@ -159,7 +160,7 @@ protected: }; -//specilization of the solver for BiCGSTAB as for surface parameterization, the +//specialization of the solver for BiCGSTAB as for surface parameterization, the //intializer should be a vector of one's (this was the case in 3.1-alpha but not in the official 3.1). template<> class Eigen_solver_traits< Eigen::BiCGSTAB::EigenType> > @@ -168,6 +169,7 @@ class Eigen_solver_traits< Eigen::BiCGSTAB::EigenTyp typedef EigenSolverT::Scalar Scalar; // Public types public: + typedef EigenSolverT Solver; typedef Scalar NT; typedef internal::Get_eigen_matrix::type Matrix; typedef Eigen_vector Vector; diff --git a/Solver_interface/include/CGAL/Internal_diagonalize_traits.h b/Solver_interface/include/CGAL/Internal_diagonalize_traits.h new file mode 100644 index 00000000000..99bac71ff8f --- /dev/null +++ b/Solver_interface/include/CGAL/Internal_diagonalize_traits.h @@ -0,0 +1,247 @@ +#ifndef CGAL_INTERNAL_DIAGONALIZE_TRAITS_H +#define CGAL_INTERNAL_DIAGONALIZE_TRAITS_H + +#include + +namespace CGAL { + + /// A model of the concept `DiagonalizeTraits` + /// \cgalModels `DiagonalizeTraits` + +template +class Internal_diagonalize_traits{ + + public: + static bool + diagonalize_selfadjoint_covariance_matrix + (const cpp11::array& cov, + cpp11::array& eigenvalues) + { + cpp11::array eigenvectors; + return diagonalize_selfadjoint_covariance_matrix (cov, eigenvalues, eigenvectors); + } + + // Extract the eigenvector associated to the largest eigenvalue + static bool + extract_largest_eigenvector_of_covariance_matrix + (const cpp11::array& cov, + cpp11::array &normal) + { + cpp11::array eigenvalues; + cpp11::array eigenvectors; + + diagonalize_selfadjoint_covariance_matrix (cov, eigenvalues, eigenvectors); + + for (std::size_t i = 0; i < dim; ++ i) + normal[i] = static_cast (eigenvectors[(dim*(dim-1))+i]); + + return true; + } + + static bool diagonalize_selfadjoint_covariance_matrix + (const cpp11::array& mat, + cpp11::array& eigen_values, + cpp11::array& eigen_vectors) + { + const int n = dim; + + const int MAX_ITER = 100; + static const FT EPSILON = (FT)0.00001; + + // number of entries in mat + int nn = (n*(n+1))/2; + + // copy matrix + FT *a = new FT[nn]; + int ij; + + // This function requires lower triangular, so we switch + for (int i = 0; i < n; ++ i) + for (int j = i; j < n; ++ j) + a[(n * i) + j - ((i * (i+1)) / 2)] + = mat[i + (j * (j+1) / 2)]; + + // Fortran-porting + a--; + + // init diagonalization matrix as the unit matrix + FT *v = new FT[n*n]; + ij = 0; + int i; + for(i=0; i a_normEPS && nb_iter < MAX_ITER) + { + nb_iter++; + FT thr_nn = thr / nn; + + for(int l=1; l< n; l++) + { + for(int m=l+1; m<=n; m++) + { + // compute sinx and cosx + int lq = (l*l-l)/2; + int mq = (m*m-m)/2; + + int lm = l + mq; + FT a_lm = a[lm]; + FT a_lm_2 = a_lm * a_lm; + + if(a_lm_2 < thr_nn) + continue; + + int ll = l + lq; + int mm = m + mq; + FT a_ll = a[ll]; + FT a_mm = a[mm]; + + FT delta = a_ll - a_mm; + + FT x; + if(delta == 0.0) + x = (FT) - CGAL_PI / 4; + else + x = (FT)(- std::atan( (a_lm+a_lm) / delta ) / 2.0); + + FT sinx = std::sin(x); + FT cosx = std::cos(x); + FT sinx_2 = sinx * sinx; + FT cosx_2 = cosx * cosx; + FT sincos = sinx * cosx; + + // rotate L and M columns + int ilv = n*(l-1); + int imv = n*(m-1); + + int i; + for( i=1; i<=n;i++ ) + { + if( (i!=l) && (i!=m) ) + { + int iq = (i*i-i)/2; + + int im; + if( i eigen_values[j]) + { + k = j; + x = eigen_values[j]; + } + + eigen_values[k] = eigen_values[i]; + eigen_values[i] = x; + + int jj = index[k]; + index[k] = index[i]; + index[i] = jj; + } + + + // save eigen vectors + v++; // back to C++ + ij = 0; + for(int k=0; k` - `CGAL::Discrete_authalic_parameterizer_3` - `CGAL::Discrete_conformal_map_parameterizer_3` -- `CGAL::LSCM_parameterizer_3` +- `CGAL::LSCM_parameterizer_3` - `CGAL::Mean_value_coordinates_parameterizer_3` ## Border Parameterization Methods ## @@ -122,16 +121,6 @@ The package provides an interface with `CGAL::Polyhedron_3`: A `(u,v)` pair is computed for each inner vertex (i.e.\ its halfedges share the same `(u,v)` pair), while a `(u,v)` pair is computed for each border halfedge. The user must iterate over the mesh halfedges to get the result. -## Sparse Linear Algebra ## - -Since parameterizing meshes requires -efficient representation of sparse matrices and efficient iterative or -direct linear solvers, we provide an interface to several -sparse linear solvers: - - Eigen 3.1 (or greater) is the library recommended by %CGAL solving sparse systems. - - OpenNL (authored by Bruno Lévy) is shipped with %CGAL is the default solver. - - `OpenNL::DefaultLinearSolverTraits` in OpenNL package - - `OpenNL::SymmetricLinearSolverTraits` in OpenNL package ## Helper Classes ## @@ -250,18 +239,6 @@ The package provides an interface with `CGAL::Polyhedron_3`: -/*! \defgroup PkgSurfaceParameterizationAlgebra Sparse Linear Algebra - \ingroup PkgSurfaceParameterization - -Since parameterizing meshes requires -efficient representation of sparse matrices and efficient iterative or -direct linear solvers, we provide an interface to several -sparse linear solvers: - - Eigen 3.1 (or greater) is the library recommended by %CGAL solving sparse systems. - - OpenNL (authored by Bruno Lévy) is shipped with %CGAL is the default solver. - - `OpenNL::DefaultLinearSolverTraits` in OpenNL package - - `OpenNL::SymmetricLinearSolverTraits` in OpenNL package -*/ /*! \defgroup PkgSurfaceParameterizationHelper Helper Class diff --git a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Surface_mesh_parameterization.txt b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Surface_mesh_parameterization.txt index 3254b254d80..b0db3a7d7d6 100644 --- a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Surface_mesh_parameterization.txt +++ b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Surface_mesh_parameterization.txt @@ -40,9 +40,8 @@ data structure. Since parameterizing meshes require efficient representation of sparse matrices and efficient iterative or direct linear solvers, we provide -a unified interface to a linear solver library (\ref thirdpartyEigen "Eigen"), -and propose a separate package devoted to OpenNL sparse -linear solver. +a unified interface to linear solvers as described in Chapter +\ref PkgSolverSummary. Note that linear solvers commonly use double precision floating point numbers. Therefore, this package is intended to be used with a \cgal %Cartesian kernel with doubles. @@ -69,8 +68,8 @@ Parameterizer_traits_3::Error_code parameterize (Paramet The function `parameterize()` applies a default surface parameterization method, namely Floater Mean Value Coordinates \cgalCite{cgal:f-mvc-03}, with an -arc-length circular border parameterization, and using OpenNL sparse -linear solver \cgalCite{cgal:l-nmdgp-05}. The `ParameterizationMesh_3` concept defines the input meshes handled by `parameterize()`. See Section \ref secInputMeshforparameterize. The result is stored into the `(u,v)` fields of the mesh halfedges. +arc-length circular border parameterization, and using a sparse +linear solver from the \ref thirdpartyEigen library. The `ParameterizationMesh_3` concept defines the input meshes handled by `parameterize()`. See Section \ref secInputMeshforparameterize. The result is stored into the `(u,v)` fields of the mesh halfedges. The mesh must be a triangle mesh surface with one connected component. Note: `Parameterizer_traits_3` is the (pure virtual) superclass of all surface parameterizations and defines the error codes. @@ -155,7 +154,7 @@ and \ref secBorderParameterizationsforFreeMethods. \subsection Surface_mesh_parameterizationTheSparseLinearAlgebraTraitsd The SparseLinearAlgebraTraits_d Concept This package solves sparse linear systems using solvers which are models -of `SparseLinearAlgebraTraits_d`. See Section \ref secSparseLinearAlgebra. +of `SparseLinearAlgebraTraits_d`. See Chapter \ref PkgSolverSummary. \subsection Surface_mesh_parameterizationTheParameterizationMesh3 The ParameterizationMesh_3 and ParameterizationPatchableMesh_3 Concepts @@ -419,65 +418,7 @@ Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor, Parameterizer() \endcode -\section secSparseLinearAlgebra Sparse Linear Algebra -Parameterizing triangle meshes requires both efficient representation -of sparse matrices and efficient iterative or direct linear -solvers. We provide links to \ref thirdpartyEigen "Eigen" library -and include a separate package devoted to OpenNL sparse linear solver. - -\subsection Surface_mesh_parameterizationListofSolvers List of Solvers - -We provide an interface to several sparse linear solvers, as models -of the `SparseLinearAlgebraTraits_d` concept: - -- An interface to sparse solvers from the `OpenNL` library \cgalCite{cgal:l-nmdgp-05} is provided through classes -`OpenNL::DefaultLinearSolverTraits` and -`OpenNL::SymmetricLinearSolverTraits`. The OpenNL library version shipped with \cgal is a lightweight default sparse linear solver. It does not support large systems, but it is portable and -supports exact number types. - -- An interface to all sparse solvers from the \ref thirdpartyEigen "Eigen" library is provided through the class -`Eigen_solver_traits`. This solver traits class can be used for an iterative or a direct, -symmetric or general sparse solvers. The \ref thirdpartyEigen "Eigen" solver to be used must be given as template parameter. - -\subsection Surface_mesh_parameterizationEigenSolver Eigen Solver Example - -The example \ref Surface_mesh_parameterization/Eigen_parameterization.cpp "Eigen_parameterization.cpp" computes the -default parameterization method (Floater mean value coordinates with a circular border), -but specifically instantiates an \ref thirdpartyEigen "Eigen" solver. Specifying a specific solver -instead of the default one (OpenNL) means using the third parameter of -`Mean_value_coordinates_parameterizer_3`. The differences with the first -example \ref Surface_mesh_parameterization/Simple_parameterization.cpp "Simple_parameterization.cpp" are: - -\code{.cpp} - -#include - -... - -//*************************************** -// Floater Mean Value Coordinates parameterization -// (circular border) with Eigen solver -//*************************************** - -// Circular border parameterizer (the default) -typedef CGAL::Circular_border_arc_length_parameterizer_3 -Border_parameterizer; -// Eigen solver -typedef CGAL::Eigen_solver_traits<> Solver; - -// Floater Mean Value Coordinates parameterization -// (circular border) with Eigen solver -typedef CGAL::Mean_value_coordinates_parameterizer_3 -Parameterizer; - -Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor, Parameterizer()); - -... - -\endcode \section secCuttingaMesh Cutting a Mesh @@ -605,63 +546,7 @@ and is therefore non-singular (Gram theorem). -\subsection Surface_mesh_parameterizationPrecision Precision -Two algorithms of this package construct the sparse linear system(s) -using trigonometric functions, and are this incompatible with exact arithmetic: - -
        - -
      • Floater mean value coordinates - -
      • Circular border parameterization - -
      - -On the other hand, linear solvers commonly use double precision floating point -numbers. - -OpenNL's BICGSTAB solver (accessible through the -`OpenNL::DefaultLinearSolverTraits` interface) -is the only solver supported by this package which -computes exact results, when used with an exact arithmetic. This package is -intended to be used mainly with a \cgal %Cartesian kernel with doubles. - -\subsection Surface_mesh_parameterizationOpenNLsBICGSTAB OpenNL's BICGSTAB Solver with an Exact Arithmetic - -The BICGSTAB conjugate gradient is in disguise a direct solver. -In a nutshell, it computes a vector basis -orthogonal with respect to the matrix, and the coordinates of the solution in this vector basis. -Each iteration computes one component of the basis and one coordinate, therefore the algorithm -converges to the solution in \f$ n\f$ iterations, where \f$ n\f$ is the dimension of the matrix. More precisely, it is shown to converge in \f$ k\f$ iteration, where \f$ k\f$ is the number of distinct eigenvalues of the matrix. - -\subsection Surface_mesh_parameterizationSolverswith Solvers with a Floating Point Arithmetic - -OpenNL's BICGSTAB example: - -When inexact numerical types are used (e.g. doubles), accumulated errors slow down convergence -(in practice, it requires approximately \f$ 5k\f$ iterations to converge). -The required number of iterations depends on the eigenvalues of the matrix, and these eigenvalues depend -on the shape of the triangles. The optimum is when the triangles are equilateral (then the solver converges -in less than 10 iterations). The worst case is obtained when the mesh has a large number of skinny triangles (near-singular Jacobian matrix of the triangle). In this case, the spectrum of the matrix -is wide (many different eigenvalues), and the solver requires nearly \f$ 5n\f$ iterations to converge. - -\subsection Surface_mesh_parameterizationAlgorithmic Algorithmic Complexity - -In this package, we focus on piecewise linear mappings onto a planar -domain. All surface parameterization methods are based on solving one (or two) -sparse linear system(s). -The algorithmic complexity is dominated by the resolution of the sparse linear system(s). - -OpenNL's BICGSTAB example: - -At each iteration, the operation of highest complexity is the product between the sparse-matrix and a vector. -The sparse matrix has a fixed number of non-zero coefficients per row, -therefore the matrix / vector product has \f$ O(n)\f$ complexity. -Since convergence is reached after \f$ k\f$ iterations, the complexity is \f$ O(k.n)\f$ -(where \f$ k\f$ is the number of distinct eigenvalues of the matrix). -Therefore, best case complexity is \f$ O(n)\f$ (equilateral triangles), -and worst case complexity is \f$ O(n^2)\f$ (skinny triangles). \section Surface_mesh_parameterizationSoftware Software Design @@ -801,7 +686,7 @@ The purpose of such a model is to:
    1. Support several kind of meshes.
    2. Hide the implementation of extra fields specific to the parameterization domain (`index`, `u`, `v`, `is_parameterized`). -
    3. Handle in the mesh type the complexity of virtually cutting a mesh +
    4. %Handle in the mesh type the complexity of virtually cutting a mesh to make it homeomorphic to a disk (instead of duplicating this code in each parameterization method). @@ -834,15 +719,6 @@ This mainly means that: can be set per corner (which is a more general way of saying per half-edge). -\subsection Surface_mesh_parameterizationSparseLinearAlgebraTraitsd SparseLinearAlgebraTraits_d Concept - -This package solves sparse linear systems using solvers which are models -of `SparseLinearAlgebraTraits_d`. - -`SparseLinearAlgebraTraits_d` is a sub-concept of the `LinearAlgebraTraits_d` concept -in `Kernel_d`. -The goal is to adapt easily code written for dense matrices to sparse ones, -and vice-versa. \subsection Surface_mesh_parameterizationCuttingaMesh_1 Cutting a Mesh @@ -855,23 +731,7 @@ not intend to cover this topic at the moment. \section Surface_mesh_parameterizationExtendingthe Extending the Package and Reusing Code -\subsection Surface_mesh_parameterizationReusingMesh Reusing Mesh Adaptors -`ParameterizationMesh_3` defines a concept to access to a -general polyhedral mesh. -It is optimized for the `Surface_mesh_parameterization` package -only in the sense that it -defines the accessors to fields specific to the parameterization domain -(`index`, `u`, `v`, `is_parameterized`). - -It may be easily generalized. - -\subsection Surface_mesh_parameterizationReusingSparse Reusing Sparse Linear Algebra - -The `SparseLinearAlgebraTraits_d` concept and the traits classes -for \ref thirdpartyEigen "Eigen" and OpenNL are independent of the rest of the -`Surface_mesh_parameterization` package, and may be reused by -\cgal developers for other purposes. \subsection Surface_mesh_parameterizationAddingNewParameterization Adding New Parameterization Methods @@ -900,6 +760,7 @@ Square, circular and two-points border parameterizations are good starting point Obviously, this package would benefit of having robust algorithms which transform arbitrary meshes into topological disks. + */ } /* namespace CGAL */ diff --git a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/dependencies b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/dependencies index a6cc4284470..2a05e3c250a 100644 --- a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/dependencies +++ b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/dependencies @@ -8,3 +8,6 @@ Polyhedron Kernel_d Surface_modeling Surface_mesh_skeletonization +Solver_interface +Convex_hull_2 + diff --git a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/examples.txt b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/examples.txt index ad452ebbd2c..0049c0118bb 100644 --- a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/examples.txt +++ b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/examples.txt @@ -1,5 +1,6 @@ -/// \example Surface_mesh_parameterization/Simple_parameterization.cpp -/// \example Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp -/// \example Surface_mesh_parameterization/Complete_parameterization_example.cpp -/// \example Surface_mesh_parameterization/Eigen_parameterization.cpp -/// \example Surface_mesh_parameterization/polyhedron_ex_parameterization.cpp +/*! + \example Surface_mesh_parameterization/Simple_parameterization.cpp + \example Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp + \example Surface_mesh_parameterization/Complete_parameterization_example.cpp + \example Surface_mesh_parameterization/polyhedron_ex_parameterization.cpp +*/ diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp index 6665e621f15..1b89de29246 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp @@ -27,7 +27,6 @@ int main(int argc, char * argv[]) std::cerr << "PARAMETERIZATION" << std::endl; std::cerr << " Discrete Authalic Parameterization" << std::endl; std::cerr << " circle border" << std::endl; - std::cerr << " OpenNL solver" << std::endl; //*************************************** // decode parameters @@ -68,7 +67,7 @@ int main(int argc, char * argv[]) //*************************************** // Discrete Authalic Parameterization - // (defaults are circular border and OpenNL solver) + // (defaults are circular border and Eigen solver) //*************************************** typedef CGAL::Discrete_authalic_parameterizer_3 diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index fa3cdc67ac6..7c82a6f5b8a 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -62,25 +62,25 @@ if ( CGAL_FOUND ) list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY}) endif() - # Executables that do *not* require Eigen + + find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) + + if (EIGEN3_FOUND) + # Executables that require Eigen 3.1 + include( ${EIGEN3_USE_FILE} ) create_single_source_cgal_program( "Authalic_parameterization.cpp" ) create_single_source_cgal_program( "Mesh_cutting_parameterization.cpp" ) create_single_source_cgal_program( "Simple_parameterization.cpp" ) create_single_source_cgal_program( "Square_border_parameterization.cpp" ) - find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) - - if (EIGEN3_FOUND) - # Executables that require Eigen 3.1 - include( ${EIGEN3_USE_FILE} ) create_single_source_cgal_program( "Complete_parameterization_example.cpp" ) - create_single_source_cgal_program( "Eigen_parameterization.cpp" ) + + create_single_source_cgal_program( "polyhedron_ex_parameterization.cpp" ) + else(EIGEN3_FOUND) message(STATUS "NOTICE: Some examples require Eigen 3.1 (or greater) and will not be compiled.") endif(EIGEN3_FOUND) - create_single_source_cgal_program( "polyhedron_ex_parameterization.cpp" ) - else() message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.") diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp index e0d23c9b9aa..c0786005d2e 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp @@ -248,14 +248,10 @@ int main(int argc, char * argv[]) // Border parameterizer typedef CGAL::Square_border_arc_length_parameterizer_3 Border_parameterizer; - // Eigen solver - typedef CGAL::Eigen_solver_traits<> Solver; - // Discrete Authalic Parameterization (square border) // with Eigen solver typedef CGAL::Discrete_authalic_parameterizer_3 Parameterizer; + Border_parameterizer> Parameterizer; Parameterizer::Error_code err = CGAL::parameterize(mesh_patch, Parameterizer()); switch(err) { diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Eigen_parameterization.cmd b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Eigen_parameterization.cmd deleted file mode 100644 index c85f1308eb3..00000000000 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Eigen_parameterization.cmd +++ /dev/null @@ -1 +0,0 @@ -data/mannequin-devil.off diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Eigen_parameterization.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Eigen_parameterization.cpp deleted file mode 100644 index 7c97b3f8823..00000000000 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Eigen_parameterization.cpp +++ /dev/null @@ -1,124 +0,0 @@ -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - - -// ---------------------------------------------------------------------------- -// Private types -// ---------------------------------------------------------------------------- - -typedef CGAL::Simple_cartesian Kernel; -typedef CGAL::Polyhedron_3 Polyhedron; - - -// ---------------------------------------------------------------------------- -// main() -// ---------------------------------------------------------------------------- - -int main(int argc, char * argv[]) -{ - std::cerr << "PARAMETERIZATION" << std::endl; - std::cerr << " Floater parameterization" << std::endl; - std::cerr << " Circle border" << std::endl; - std::cerr << " Eigen solver" << std::endl; - - //*************************************** - // decode parameters - //*************************************** - - if (argc-1 != 1) - { - std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl; - return(EXIT_FAILURE); - } - - // File name is: - const char* input_filename = argv[1]; - - //*************************************** - // Read the mesh - //*************************************** - - // Read the mesh - std::ifstream stream(input_filename); - Polyhedron mesh; - stream >> mesh; - if(!stream || !mesh.is_valid() || mesh.empty()) - { - std::cerr << "Error: cannot read OFF file " << input_filename << std::endl; - return EXIT_FAILURE; - } - - //*************************************** - // Create Polyhedron adaptor - // Note: no cutting => we support only - // meshes that are topological disks - //*************************************** - - typedef CGAL::Parameterization_polyhedron_adaptor_3 - Parameterization_polyhedron_adaptor; - - Parameterization_polyhedron_adaptor mesh_adaptor(mesh); - - //*************************************** - // Floater Mean Value Coordinates parameterization - // (circular border) with Eigen solver - //*************************************** - - // Circular border parameterizer (the default) - typedef CGAL::Circular_border_arc_length_parameterizer_3 - Border_parameterizer; - // Eigen solver - typedef CGAL::Eigen_solver_traits<> Solver; - - // Floater Mean Value Coordinates parameterization - // (circular border) with Eigen solver - typedef CGAL::Mean_value_coordinates_parameterizer_3 - Parameterizer; - - Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor, Parameterizer()); - - switch(err) { - case Parameterizer::OK: // Success - break; - case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported - case Parameterizer::ERROR_NON_TRIANGULAR_MESH: - case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC: - case Parameterizer::ERROR_BORDER_TOO_SHORT: - std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl; - return EXIT_FAILURE; - break; - default: // Error - std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl; - return EXIT_FAILURE; - break; - }; - - //*************************************** - // Output - //*************************************** - - // Raw output: dump (u,v) pairs - Polyhedron::Vertex_const_iterator pVertex; - for (pVertex = mesh.vertices_begin(); - pVertex != mesh.vertices_end(); - pVertex++) - { - // (u,v) pair is stored in any halfedge - double u = mesh_adaptor.info(pVertex->halfedge())->uv().x(); - double v = mesh_adaptor.info(pVertex->halfedge())->uv().y(); - std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl; - } - - return EXIT_SUCCESS; -} diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp index 413ecb4eaf0..d012ca50755 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp @@ -93,7 +93,6 @@ int main(int argc, char * argv[]) std::cerr << "PARAMETERIZATION" << std::endl; std::cerr << " Floater parameterization" << std::endl; std::cerr << " Circle border" << std::endl; - std::cerr << " OpenNL solver" << std::endl; std::cerr << " Very simple cut if model is not a topological disk" << std::endl; //*************************************** diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Simple_parameterization.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Simple_parameterization.cpp index 490a3761e26..68a076f5770 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Simple_parameterization.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Simple_parameterization.cpp @@ -25,7 +25,6 @@ int main(int argc, char * argv[]) std::cerr << "PARAMETERIZATION" << std::endl; std::cerr << " Floater parameterization" << std::endl; std::cerr << " Circle border" << std::endl; - std::cerr << " OpenNL solver" << std::endl; //*************************************** // decode parameters @@ -66,7 +65,7 @@ int main(int argc, char * argv[]) //*************************************** // Floater Mean Value Coordinates parameterization - // (defaults are circular border and OpenNL solver) + // (defaults are circular border and Eigen solver) //*************************************** typedef CGAL::Parameterizer_traits_3 diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp index e6c5335d124..426d9a9dc55 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp @@ -26,7 +26,6 @@ int main(int argc, char * argv[]) std::cerr << "PARAMETERIZATION" << std::endl; std::cerr << " Floater parameterization" << std::endl; std::cerr << " square border" << std::endl; - std::cerr << " OpenNL solver" << std::endl; //*************************************** // decode parameters diff --git a/Surface_mesh_parameterization/include/CGAL/Barycentric_mapping_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Barycentric_mapping_parameterizer_3.h index f9b4186010a..2ba0d2aac74 100644 --- a/Surface_mesh_parameterization/include/CGAL/Barycentric_mapping_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Barycentric_mapping_parameterizer_3.h @@ -24,6 +24,7 @@ #include #include +#include /// \file Barycentric_mapping_parameterizer_3.h @@ -58,7 +59,7 @@ namespace CGAL { \sa `CGAL::Fixed_border_parameterizer_3` \sa `CGAL::Discrete_authalic_parameterizer_3` \sa `CGAL::Discrete_conformal_map_parameterizer_3` -\sa `CGAL::LSCM_parameterizer_3` +\sa `CGAL::LSCM_parameterizer_3` \sa `CGAL::Mean_value_coordinates_parameterizer_3` */ @@ -68,7 +69,7 @@ template class BorderParameterizer_3 = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d - = OpenNL::DefaultLinearSolverTraits + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > class Barycentric_mapping_parameterizer_3 : public Fixed_border_parameterizer_3 #include +#include /// \file Discrete_authalic_parameterizer_3.h @@ -55,7 +56,7 @@ namespace CGAL { /// \sa `CGAL::Fixed_border_parameterizer_3` /// \sa `CGAL::Barycentric_mapping_parameterizer_3` /// \sa `CGAL::Discrete_conformal_map_parameterizer_3` -/// \sa `CGAL::LSCM_parameterizer_3` +/// \sa `CGAL::LSCM_parameterizer_3` /// \sa `CGAL::Mean_value_coordinates_parameterizer_3` template @@ -64,7 +65,7 @@ template class BorderParameterizer_3 ///< Strategy to parameterize the surface border = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d ///< Traits class to solve a sparse linear system - = OpenNL::DefaultLinearSolverTraits + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > class Discrete_authalic_parameterizer_3 : public Fixed_border_parameterizer_3 #include +#include /// \file Discrete_conformal_map_parameterizer_3.h @@ -61,7 +62,7 @@ namespace CGAL { /// \sa `CGAL::Fixed_border_parameterizer_3` /// \sa `CGAL::Barycentric_mapping_parameterizer_3` /// \sa `CGAL::Discrete_authalic_parameterizer_3` -/// \sa `CGAL::LSCM_parameterizer_3` +/// \sa `CGAL::LSCM_parameterizer_3` /// \sa `CGAL::Mean_value_coordinates_parameterizer_3` template @@ -70,7 +71,7 @@ template class BorderParameterizer_3 = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d - = OpenNL::DefaultLinearSolverTraits + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > class Discrete_conformal_map_parameterizer_3 : public Fixed_border_parameterizer_3 #include -#include +#include + #include #include @@ -80,8 +81,8 @@ template class BorderParameterizer_3 ///< Strategy to parameterize the surface border = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d ///< Traits class to solve a sparse linear system - = OpenNL::DefaultLinearSolverTraits -> + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > + class Fixed_border_parameterizer_3 : public Parameterizer_traits_3 { diff --git a/Surface_mesh_parameterization/include/CGAL/LSCM_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/LSCM_parameterizer_3.h index ef820d9b813..47def05f44c 100644 --- a/Surface_mesh_parameterization/include/CGAL/LSCM_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/LSCM_parameterizer_3.h @@ -43,15 +43,17 @@ namespace CGAL { /// \ingroup PkgSurfaceParameterizationMethods /// -/// The class LSCM_parameterizer_3 implements the +/// The class `LSCM_parameterizer_3` implements the /// *Least Squares Conformal Maps (LSCM)* parameterization \cgalCite{cgal:lprm-lscm-02}. /// /// This is a conformal parameterization, i.e. it attempts to preserve angles. /// -/// This is a free border parameterization. No need to map the surface's border +/// This is a free border parameterization. No need to map the border of the surface /// onto a convex polygon (only two pinned vertices are needed to ensure a /// unique solution), but one-to-one mapping is *not* guaranteed. /// +/// Note that his parametrization method has no template parameter for changing the sparse solver. +/// /// \cgalModels `ParameterizerTraits_3` /// /// @@ -66,14 +68,17 @@ template < class ParameterizationMesh_3, ///< 3D surface mesh. class BorderParameterizer_3 - = Two_vertices_parameterizer_3, + = Two_vertices_parameterizer_3 +#ifndef DOXYGEN_RUNNING + , ///< Strategy to parameterize the surface border. ///< The minimum is to parameterize two vertices. - class SparseLinearAlgebraTraits_d + class SparseLinearAlgebraTraits_d = OpenNL::SymmetricLinearSolverTraits - ///< Traits class to solve a sparse linear system. - ///< We may use a symmetric definite positive solver because LSCM - ///< solves the system in the least squares sense. + //< Traits class to solve a sparse linear system. + //< We may use a symmetric definite positive solver because LSCM + //< solves the system in the least squares sense. +#endif > class LSCM_parameterizer_3 : public Parameterizer_traits_3 @@ -94,11 +99,11 @@ public: /// Export BorderParameterizer_3 template parameter. typedef BorderParameterizer_3 Border_param; - /// Export SparseLinearAlgebraTraits_d template parameter. + +// Private types +private: typedef SparseLinearAlgebraTraits_d Sparse_LA; -// Private types -private: // Mesh_Adaptor_3 subtypes: typedef typename Adaptor::NT NT; typedef typename Adaptor::Point_2 Point_2; diff --git a/Surface_mesh_parameterization/include/CGAL/Mean_value_coordinates_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Mean_value_coordinates_parameterizer_3.h index bbb8246fb81..c9826a07b7c 100644 --- a/Surface_mesh_parameterization/include/CGAL/Mean_value_coordinates_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Mean_value_coordinates_parameterizer_3.h @@ -24,6 +24,7 @@ #include #include +#include /// \file Mean_value_coordinates_parameterizer_3.h @@ -56,7 +57,7 @@ namespace CGAL { /// \sa `CGAL::Barycentric_mapping_parameterizer_3` /// \sa `CGAL::Discrete_authalic_parameterizer_3` /// \sa `CGAL::Discrete_conformal_map_parameterizer_3` -/// \sa `CGAL::LSCM_parameterizer_3` +/// \sa `CGAL::LSCM_parameterizer_3` template < @@ -64,8 +65,9 @@ template class BorderParameterizer_3 ///< Strategy to parameterize the surface border = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d ///< Traits class to solve a sparse linear system - = OpenNL::DefaultLinearSolverTraits + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > + class Mean_value_coordinates_parameterizer_3 : public Fixed_border_parameterizer_3, - CGAL::Eigen_solver_traits<> - >()); + Mesh_patch_polyhedron, + CGAL::Square_border_arc_length_parameterizer_3 >() + ); switch(err) { case Parameterizer::OK: // Success break; diff --git a/Surface_modeling/doc/Surface_modeling/PackageDescription.txt b/Surface_modeling/doc/Surface_modeling/PackageDescription.txt index f0c9b321e95..1f047cd016b 100644 --- a/Surface_modeling/doc/Surface_modeling/PackageDescription.txt +++ b/Surface_modeling/doc/Surface_modeling/PackageDescription.txt @@ -31,7 +31,6 @@ under positional constraints of some of its vertices, without requiring any addi ## Concepts ## - `DeformationClosestRotationTraits_3` - `RawPoint_3` -- `SparseLinearAlgebraTraitsWithFactor_d` - `SurfaceModelingWeights` ## Algebraic Traits ## diff --git a/Surface_modeling/doc/Surface_modeling/dependencies b/Surface_modeling/doc/Surface_modeling/dependencies index 0988d1b453e..f39bf90fd2c 100644 --- a/Surface_modeling/doc/Surface_modeling/dependencies +++ b/Surface_modeling/doc/Surface_modeling/dependencies @@ -7,3 +7,5 @@ Stream_support Polyhedron BGL Surface_mesh_parameterization +Solver_interface + diff --git a/Surface_reconstruction_points_3/doc/Surface_reconstruction_points_3/PackageDescription.txt b/Surface_reconstruction_points_3/doc/Surface_reconstruction_points_3/PackageDescription.txt index 050a9cb09e0..bdeb66f2d3c 100644 --- a/Surface_reconstruction_points_3/doc/Surface_reconstruction_points_3/PackageDescription.txt +++ b/Surface_reconstruction_points_3/doc/Surface_reconstruction_points_3/PackageDescription.txt @@ -10,7 +10,7 @@ \cgalPkgSummaryEnd \cgalPkgShortInfoBegin \cgalPkgSince{3.5} -\cgalPkgDependsOn{\ref thirdpartyEigen} +\cgalPkgDependsOn{\ref PkgSolverSummary} \cgalPkgBib{cgal:asg-srps} \cgalPkgLicense{\ref licensesGPL "GPL"} \cgalPkgDemo{See Polyhedral Surface,polyhedron_3.zip} diff --git a/Surface_reconstruction_points_3/doc/Surface_reconstruction_points_3/dependencies b/Surface_reconstruction_points_3/doc/Surface_reconstruction_points_3/dependencies index 85ac52dc0d8..28de26d11fa 100644 --- a/Surface_reconstruction_points_3/doc/Surface_reconstruction_points_3/dependencies +++ b/Surface_reconstruction_points_3/doc/Surface_reconstruction_points_3/dependencies @@ -7,3 +7,4 @@ Stream_support Surface_mesher Point_set_processing_3 Surface_mesh_parameterization +Solver_interface