From 202430d3d5c14c092f54401ba03425abf727c00b Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 20 Apr 2020 15:51:48 +0200 Subject: [PATCH 1/7] docs: cleanup, mixed integer concepts relinking, fixing typos --- .../Concepts/DiagonalizeTraits.h | 1 - .../Concepts/MixedIntegerProgramTraits.h | 106 ++++++++---------- ...ormalEquationSparseLinearAlgebraTraits_d.h | 3 - .../Concepts/SparseLinearAlgebraTraits_d.h | 9 +- .../SparseLinearAlgebraWithFactorTraits_d.h | 3 - .../doc/Solver_interface/Concepts/SvdTraits.h | 5 +- .../doc/Solver_interface/Solver_interface.txt | 11 +- .../CGAL/GLPK_mixed_integer_program_traits.h | 7 +- .../CGAL/Mixed_integer_program_traits.h | 24 ++-- .../CGAL/SCIP_mixed_integer_program_traits.h | 3 +- 10 files changed, 76 insertions(+), 96 deletions(-) diff --git a/Solver_interface/doc/Solver_interface/Concepts/DiagonalizeTraits.h b/Solver_interface/doc/Solver_interface/Concepts/DiagonalizeTraits.h index 103d9d125a4..7b00e83e119 100644 --- a/Solver_interface/doc/Solver_interface/Concepts/DiagonalizeTraits.h +++ b/Solver_interface/doc/Solver_interface/Concepts/DiagonalizeTraits.h @@ -21,7 +21,6 @@ follows: \cgalHasModel `CGAL::Eigen_diagonalize_traits` */ - template class DiagonalizeTraits { diff --git a/Solver_interface/doc/Solver_interface/Concepts/MixedIntegerProgramTraits.h b/Solver_interface/doc/Solver_interface/Concepts/MixedIntegerProgramTraits.h index 7da661329d6..8504337f1fc 100644 --- a/Solver_interface/doc/Solver_interface/Concepts/MixedIntegerProgramTraits.h +++ b/Solver_interface/doc/Solver_interface/Concepts/MixedIntegerProgramTraits.h @@ -1,16 +1,13 @@ - - class MixedIntegerProgramTraits - /*! +\ingroup PkgSolverInterfaceConcepts \cgalConcept `MixedIntegerProgramVariable` is a concept of a variable in a Mixed Integer Programming (MIP) problem. \cgalHasModel `CGAL::Variable` - */ template class MixedIntegerProgramVariable @@ -25,7 +22,7 @@ public: typedef unspecified_type FT; /*! - A variable can be continuous, integer, or binary + A variable can be continuous, integer, or binary. */ enum Variable_type { CONTINUOUS, INTEGER, BINARY }; @@ -43,10 +40,10 @@ public: /// \name Operations /// @{ - /// Returns the variable type + /// Returns the variable type. Variable_type variable_type() const; - /// Sets/Changes the variable type + /// Sets/Changes the variable type. void set_variable_type(Variable_type t); /*! @@ -69,26 +66,26 @@ public: */ void set_index(int idx); - /// Returns the solver that owns this variable + /// Returns the solver that owns this variable. const MixedIntegerProgramTraits* solver() const; MixedIntegerProgramTraits* solver(); - /// Sets the lower bound + /// Sets the lower bound. void set_lower_bound(FT lb); - /// Sets the upper bound + /// Sets the upper bound. void set_upper_bound(FT ub); - /// Sets both lower and upper bounds + /// Sets both lower and upper bounds. void set_bounds(FT lb, FT ub); - /// Gets the lower bound + /// Gets the lower bound. FT lower_bound() const; - /// Gets the upper bound + /// Gets the upper bound. FT upper_bound() const; - /// Gets both lower and upper bounds + /// Gets both lower and upper bounds. void get_bounds(FT& lb, FT& ub) const; /// Gets the infinity threshold (e.g., 1e20). @@ -108,17 +105,15 @@ public: }; /* end MixedIntegerProgramVariable */ +/*! +\ingroup PkgSolverInterfaceConcepts +\cgalConcept +`MixedIntegerProgramLinearConstraint` is a concept of a linear +constraint in a Mixed Integer Programming (MIP) problem. - /*! - - \cgalConcept - - `MixedIntegerProgramLinearConstraint` is a concept of a linear - constraint in a Mixed Integer Programming (MIP) problem. - - \cgalHasModel `CGAL::Linear_constraint` - */ +\cgalHasModel `CGAL::Linear_constraint` +*/ template class MixedIntegerProgramLinearConstraint { @@ -155,26 +150,26 @@ public: */ void set_index(int idx); - /// Returns the solver that owns this constraint + /// Returns the solver that owns this constraint. const MixedIntegerProgramTraits* solver() const; MixedIntegerProgramTraits* solver(); - /// Sets the lower bound + /// Sets the lower bound. void set_lower_bound(FT lb); - /// Sets the upper bound + /// Sets the upper bound. void set_upper_bound(FT ub); - /// Sets both lower and upper bounds + /// Sets both lower and upper bounds. void set_bounds(FT lb, FT ub); - /// Gets the lower bound + /// Gets the lower bound. FT lower_bound() const; - /// Gets the upper bound + /// Gets the upper bound. FT upper_bound() const; - /// Gets both lower and upper bounds + /// Gets both lower and upper bounds. void get_bounds(FT& lb, FT& ub) const; /// Gets the infinity threshold (e.g., 1e20). @@ -207,17 +202,15 @@ public: }; /* end MixedIntegerProgramLinearConstraint */ +/*! +\ingroup PkgSolverInterfaceConcepts +\cgalConcept +`MixedIntegerProgramLinearObjective` is a concept of the linear +objective function in a Mixed Integer Programming (MIP) problem. - /*! - - \cgalConcept - - `MixedIntegerProgramLinearObjective` is a concept of the linear - objective function in a Mixed Integer Programming (MIP) problem. - - \cgalHasModel `CGAL::Linear_objective` - */ +\cgalHasModel `CGAL::Linear_objective` +*/ template class MixedIntegerProgramLinearObjective { @@ -225,7 +218,7 @@ public: /// \name Types /// @{ - /// The objective sense (i.e., optimization direction) + /// The objective sense (i.e., optimization direction). enum Sense { MINIMIZE, MAXIMIZE, UNDEFINED }; /// @} @@ -275,10 +268,8 @@ public: }; /* end MixedIntegerProgramLinearObjective */ - - /*! -\ingroup PkgSolverConcepts +\ingroup PkgSolverInterfaceConcepts \cgalConcept @brief Concept describing the set of requirements for (constrained or unconstrained) @@ -290,12 +281,10 @@ to solve the problem. \cgalHasModel `CGAL::GLPK_mixed_integer_program_traits` \cgalHasModel `CGAL::SCIP_mixed_integer_program_traits` */ - template class MixedIntegerProgramTraits { public: - /// \name Creation /// @{ @@ -335,42 +324,42 @@ public: /// solver is destroyed. MixedIntegerProgramLinearObjective* create_objective(Sense sense); - /// Returns the number of variables + /// Returns the number of variables. std::size_t number_of_variables() const; - /// Returns the variables + /// Returns the variables. const std::vector& variables() const; std::vector& variables(); - /// Returns the number of constraints + /// Returns the number of constraints. std::size_t number_of_constraints() const; - /// Returns the constraints + /// Returns the constraints. const std::vector& constraints() const; std::vector& constraints(); - /// Returns the number of continuous variables + /// Returns the number of continuous variables. std::size_t number_of_continuous_variables() const; - /// Returns the number of integer variables + /// Returns the number of integer variables. std::size_t number_of_integer_variables() const; - /// Returns the number of binary variables + /// Returns the number of binary variables. std::size_t number_of_binary_variables() const; - /// Returns true if all variables are continuous + /// Returns true if all variables are continuous. bool is_continuous() const; - /// Returns true if this is a mixed integer program + /// Returns true if this is a mixed integer program. bool is_mixed_integer_program() const; - /// Returns true if this is an integer program + /// Returns true if this is an integer program. bool is_integer_program() const; - /// Returns true if binary program + /// Returns true if binary program. bool is_binary_program() const; - /// Returns the objective + /// Returns the objective. const MixedIntegerProgramLinearObjective * objective() const; MixedIntegerProgramLinearObjective * objective(); @@ -391,4 +380,5 @@ public: void clear(); /// @} -}; /* end MixedIntegerProgramTraits */ \ No newline at end of file + +}; /* end MixedIntegerProgramTraits */ diff --git a/Solver_interface/doc/Solver_interface/Concepts/NormalEquationSparseLinearAlgebraTraits_d.h b/Solver_interface/doc/Solver_interface/Concepts/NormalEquationSparseLinearAlgebraTraits_d.h index 33235cef1dd..36c16f629ea 100644 --- a/Solver_interface/doc/Solver_interface/Concepts/NormalEquationSparseLinearAlgebraTraits_d.h +++ b/Solver_interface/doc/Solver_interface/Concepts/NormalEquationSparseLinearAlgebraTraits_d.h @@ -1,6 +1,5 @@ /*! \ingroup PkgSolverInterfaceConcepts - \cgalConcept Concept describing the set of requirements for solving the normal equation \f$ A^t A X = A^t B \f$, @@ -10,7 +9,6 @@ Concept describing the set of requirements for solving the normal equation \f$ A \cgalHasModel `CGAL::Eigen_solver_traits` */ - class NormalEquationSparseLinearAlgebraTraits_d { public: @@ -70,4 +68,3 @@ bool normal_equation_solver(const Matrix& A, const Vector& B, Vector& X); /// @} }; /* end NormalEquationSparseLinearAlgebraTraits_d */ - diff --git a/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraits_d.h b/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraits_d.h index 942e83f280d..5f54077d83c 100644 --- a/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraits_d.h +++ b/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraits_d.h @@ -1,13 +1,11 @@ /*! \ingroup PkgSolverInterfaceConcepts - \cgalConcept The concept `SparseLinearAlgebraTraits_d` is used to solve sparse linear systems A\f$ \times \f$ X = B. \cgalHasModel `CGAL::Eigen_solver_traits` */ - class SparseLinearAlgebraTraits_d { public: @@ -68,7 +66,6 @@ by a sparse matrix. \sa `SparseLinearAlgebraTraits_d` \sa `SparseLinearAlgebraTraits_d::Matrix` - */ class SparseLinearAlgebraTraits_d::Vector { @@ -126,7 +123,6 @@ NT& operator[](Index row); }; /* end Vector */ /*! - \cgalConcept `SparseLinearAlgebraTraits_d::Matrix` is a concept of a sparse matrix class. @@ -150,7 +146,6 @@ Index type */ typedef unspecified_type Index; - /*! */ @@ -214,8 +209,8 @@ in the matrix by setting `new_coef` to `true`. void set_coef(Index row, Index column, NT value, bool new_coef = false); /*! -swaps the content of `*this` and `m` - */ +Swaps the content of `*this` and `m`. +*/ void swap(Matrix& m); /// Multiplication with a scalar. diff --git a/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraWithFactorTraits_d.h b/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraWithFactorTraits_d.h index b7cbed1fee4..5bf3bf2aba1 100644 --- a/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraWithFactorTraits_d.h +++ b/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraWithFactorTraits_d.h @@ -1,4 +1,3 @@ - /*! \ingroup PkgSolverInterfaceConcepts \cgalConcept @@ -11,7 +10,6 @@ method to solve the system for different right-hand vectors. \cgalHasModel `CGAL::Eigen_solver_traits` */ - class SparseLinearAlgebraWithFactorTraits_d { public: @@ -48,4 +46,3 @@ bool linear_solver(const Matrix& B, Vector& X); /// @} }; /* end SparseLinearAlgebraWithFactorTraits_d */ - diff --git a/Solver_interface/doc/Solver_interface/Concepts/SvdTraits.h b/Solver_interface/doc/Solver_interface/Concepts/SvdTraits.h index 2b7e1d1a484..fa2405e5a07 100644 --- a/Solver_interface/doc/Solver_interface/Concepts/SvdTraits.h +++ b/Solver_interface/doc/Solver_interface/Concepts/SvdTraits.h @@ -98,12 +98,12 @@ public: /*! Return the number of rows of the matrix. - */ + */ size_t number_of_rows(); /*! Return the number of columns of the matrix. - */ + */ size_t number_of_columns(); /*! @@ -117,4 +117,3 @@ public: */ void set(size_t i, size_t j, const FT value); }; - diff --git a/Solver_interface/doc/Solver_interface/Solver_interface.txt b/Solver_interface/doc/Solver_interface/Solver_interface.txt index 3b29f43fd59..587442df349 100644 --- a/Solver_interface/doc/Solver_interface/Solver_interface.txt +++ b/Solver_interface/doc/Solver_interface/Solver_interface.txt @@ -27,6 +27,7 @@ high performance libraries, e.g., Gurobi . + \section SectionSolverDiagonalize Matrix Diagonalization The concept `DiagonalizeTraits` defines an interface for the @@ -41,6 +42,7 @@ class: \cgalExample{Solver_interface/diagonalize_matrix.cpp} + \section SectionSolverSVD Singular Value Decomposition The concept `SvdTraits` defines an interface for solving in the least @@ -55,7 +57,6 @@ and this solver: - \section SectionSolverSparse Sparse Solvers We define 3 concepts for sparse linear algebra: @@ -102,17 +103,16 @@ formulating and solving (constrained or unconstrained) mixed integer programs. It can also be used for general linear programs. The field type is `double`. We provide two models of this concept: -`GLPK_mixed_integer_program_traits` using \ref thirdpartyGLPK and -`SCIP_mixed_integer_program_traits` using \ref thirdpartySCIP. +`CGAL::GLPK_mixed_integer_program_traits` using \ref thirdpartyGLPK and +`CGAL::SCIP_mixed_integer_program_traits` using \ref thirdpartySCIP. Here is an example that shows how to formulate and solve a simple -mixed integer programs using this solver. +mixed integer program using this solver. \cgalExample{Solver_interface/mixed_integer_program.cpp} - \section SolversHistory Implementation History This package is the result of the increasing needs for linear solvers in \cgal. The first packages that introduced the solver concepts were @@ -132,4 +132,3 @@ with the help of Andreas Fabri. */ } /* namespace CGAL */ - diff --git a/Solver_interface/include/CGAL/GLPK_mixed_integer_program_traits.h b/Solver_interface/include/CGAL/GLPK_mixed_integer_program_traits.h index bb6f707b154..44a215a67de 100644 --- a/Solver_interface/include/CGAL/GLPK_mixed_integer_program_traits.h +++ b/Solver_interface/include/CGAL/GLPK_mixed_integer_program_traits.h @@ -20,7 +20,7 @@ namespace CGAL { - /// \ingroup PkgSolver + /// \ingroup PkgSolverInterfaceRef /// /// This class provides an interface for formulating and solving /// mixed integer programs (constrained or unconstrained) using @@ -28,8 +28,8 @@ namespace CGAL { /// /// \ref thirdpartyGLPK must be available on the system. /// \note For better performance, please consider using - /// `SCIP_mixed_integer_program_traits`, or derive a new - /// model from `Mixed_integer_program_traits`. + /// `CGAL::SCIP_mixed_integer_program_traits`, or derive a new + /// model from `CGAL::Mixed_integer_program_traits`. /// /// \cond SKIP_IN_MANUAL /// \tparam FT Number type @@ -38,7 +38,6 @@ namespace CGAL { /// \cgalModels `MixedIntegerProgramTraits` /// /// \sa `SCIP_mixed_integer_program_traits` - template class GLPK_mixed_integer_program_traits : public Mixed_integer_program_traits { diff --git a/Solver_interface/include/CGAL/Mixed_integer_program_traits.h b/Solver_interface/include/CGAL/Mixed_integer_program_traits.h index 9b7bc5e7a9a..df11eea5377 100644 --- a/Solver_interface/include/CGAL/Mixed_integer_program_traits.h +++ b/Solver_interface/include/CGAL/Mixed_integer_program_traits.h @@ -96,7 +96,9 @@ namespace CGAL { }; /// \endcond - /// The variables of mixed integer programs. + /// \ingroup PkgSolverInterfaceRef + /// + /// The variable of a mixed integer program. /// /// \cgalModels `MixedIntegerProgramVariable` template @@ -193,7 +195,10 @@ namespace CGAL { }; /// \endcond - /// The linear constraint. + /// \ingroup PkgSolverInterfaceRef + /// + /// The linear constraint of a mixed integer program. + /// /// \cgalModels `MixedIntegerProgramLinearConstraint` template class Linear_constraint : public Linear_expression, public Bound @@ -222,7 +227,9 @@ namespace CGAL { }; - /// The linear objective. + /// \ingroup PkgSolverInterfaceRef + /// + /// The linear objective of a mixed integer program. /// /// \cgalModels `MixedIntegerProgramLinearObjective` /// @@ -256,16 +263,16 @@ namespace CGAL { /// \endcond }; - /// \ingroup PkgSolver + /// \ingroup PkgSolverInterfaceRef /// - /// The class `Mixed_integer_program_traits` provides an interface for + /// The class `CGAL::Mixed_integer_program_traits` provides an interface for /// formulating and solving (constrained or unconstrained) mixed integer /// programs. It can also be used for general linear programs. /// \note The solve() function is virtual and thus this class cannot be /// instantiated directly. Client code should use the inherited - /// classes, i.e., `GLPK_mixed_integer_program_traits` or - /// `SCIP_mixed_integer_program_traits`. Alternatively, use - /// `Mixed_integer_program_traits` as a base to derive a new model + /// classes, i.e., `CGAL::GLPK_mixed_integer_program_traits` or + /// `CGAL::SCIP_mixed_integer_program_traits`. Alternatively, use + /// `CGAL::Mixed_integer_program_traits` as a base to derive a new model /// (using e.g., CBC , /// Gurobi for better /// performance). @@ -275,7 +282,6 @@ namespace CGAL { /// \endcond /// /// \cgalModels `MixedIntegerProgramTraits` - template class Mixed_integer_program_traits { diff --git a/Solver_interface/include/CGAL/SCIP_mixed_integer_program_traits.h b/Solver_interface/include/CGAL/SCIP_mixed_integer_program_traits.h index ce8e28f1307..8f3459e4b74 100644 --- a/Solver_interface/include/CGAL/SCIP_mixed_integer_program_traits.h +++ b/Solver_interface/include/CGAL/SCIP_mixed_integer_program_traits.h @@ -20,7 +20,7 @@ namespace CGAL { - /// \ingroup PkgSolver + /// \ingroup PkgSolverInterfaceRef /// /// This class provides an interface for formulating and solving /// mixed integer programs (constrained or unconstrained) using @@ -35,7 +35,6 @@ namespace CGAL { /// \cgalModels `MixedIntegerProgramTraits` /// /// \sa `GLPK_mixed_integer_program_traits` - template class SCIP_mixed_integer_program_traits : public Mixed_integer_program_traits { From 8ff4f7793d0046c46bfbd3bf1f6e936a569ca463 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Thu, 23 Apr 2020 13:26:03 +0200 Subject: [PATCH 2/7] Use std::size_t to avoid integer overflow --- .../internal/Rich_grid.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Rich_grid.h b/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Rich_grid.h index d1cbc5485cf..67c0d1d7e8f 100644 --- a/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Rich_grid.h +++ b/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Rich_grid.h @@ -195,15 +195,19 @@ void Rich_grid::init(std::vector > &vert, radius = _radius; - x_side = (unsigned int)ceil((bbox.xmax() - bbox.xmin()) / radius); - y_side = (unsigned int)ceil((bbox.ymax() - bbox.ymin()) / radius); - z_side = (unsigned int)ceil((bbox.zmax() - bbox.zmin()) / radius); + std::size_t x_size = (std::size_t)ceil((bbox.xmax() - bbox.xmin()) / radius); + std::size_t y_size = (std::size_t)ceil((bbox.ymax() - bbox.ymin()) / radius); + std::size_t z_size = (std::size_t)ceil((bbox.zmax() - bbox.zmin()) / radius); - x_side = (x_side > 0) ? x_side : 1; - y_side = (y_side > 0) ? y_side : 1; - z_side = (z_side > 0) ? z_side : 1; + x_size = (x_size > 0) ? x_size : 1; + y_size = (y_size > 0) ? y_size : 1; + z_size = (z_size > 0) ? z_size : 1; - indices.resize(x_side * y_side * z_side + 1, -1); + indices.resize(x_size * y_size * z_size + 1, -1); + + x_side = int(x_size); + y_side = int(y_size); + z_side = int(z_size); std::sort(rich_points.begin(), rich_points.end(), Z_Sort()); From 428e47ebb6a9ff98f1064c46fb3c0cd3406439b9 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Thu, 23 Apr 2020 13:26:16 +0200 Subject: [PATCH 3/7] Fix bbox initialization --- .../include/CGAL/edge_aware_upsample_point_set.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 09dbfce95bf..c76c2ae065e 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -388,7 +388,7 @@ edge_aware_upsample_point_set( // copy rich point set std::vector rich_point_set(number_of_input); - CGAL::Bbox_3 bbox(0., 0., 0., 0., 0., 0.); + CGAL::Bbox_3 bbox; typename PointRange::const_iterator it = begin; // point iterator for(unsigned int i = 0; it != end; ++it, ++i) From f4af887bd04986e60f7c07b0606013162088614d Mon Sep 17 00:00:00 2001 From: Alexander Kobel Date: Thu, 23 Apr 2020 11:52:20 +0200 Subject: [PATCH 4/7] Make f square-free in Construct_curve_2 (fix #2224) Documentation in Curve_analysis_2 suggests that this was intended behavior, but not added. --- .../CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h index b1a9cd95ca3..28b26273996 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h @@ -427,7 +427,11 @@ public: Curve_analysis_2 operator() (const Polynomial_2& f) const { - return _m_kernel->curve_cache_2()(f); + if (_m_kernel->is_square_free_2_object()(f)) { + return _m_kernel->curve_cache_2()(f); + } else { + return _m_kernel->curve_cache_2()(_m_kernel->make_square_free_2_object()(f)); + } } protected: From 52bcf27c0a07963b86e68be8b14562aa959db9e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 24 Apr 2020 18:43:31 +0200 Subject: [PATCH 5/7] Remove wrapper around removed function estimate_geodesic_distance() --- .../Heat_method_3/Surface_mesh_geodesic_distances_3.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h index 5f9e7879219..e9a0d73eda3 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h @@ -897,16 +897,6 @@ public: base().clear_sources(); } - /** - * get estimated distance from the current source set to a vertex `vd`. - * \warning The return type is `double` even when used with an exact kernel. - */ - double - estimate_geodesic_distance(vertex_descriptor vd) const - { - return base().estimate_geodesic_distance(vd); - } - /** * returns the source set. */ @@ -916,7 +906,6 @@ public: return base().sources(); } - /** * fills the distance property map with the estimated geodesic distance of each vertex to the closest source vertex. * \tparam VertexDistanceMap a property map model of `WritablePropertyMap` From 487e31548123baae20bca92a3dad325ac50ddab5 Mon Sep 17 00:00:00 2001 From: Mael Date: Mon, 27 Apr 2020 12:07:12 +0200 Subject: [PATCH 6/7] Remove non-disableable output --- .../Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Heat_method_3/include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h b/Heat_method_3/include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h index 25e410932f9..0e01d9dbdb7 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h @@ -342,7 +342,6 @@ private: //then go back to top of the stack } } - std::cout<< a << " edges were flipped: " << std::endl; } From 627a7b29be217de9e8dd9fc65bab34552d75c9ac Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 27 Apr 2020 17:08:35 +0200 Subject: [PATCH 7/7] Fix warnings --- CGAL_Core/include/CGAL/CORE/extLong_impl.h | 4 ++-- .../CGAL/Periodic_3_triangulation_ds_cell_base_3.h | 6 +++--- .../include/CGAL/Surface_mesher/Surface_mesher.h | 12 ++++++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CGAL_Core/include/CGAL/CORE/extLong_impl.h b/CGAL_Core/include/CGAL/CORE/extLong_impl.h index 2cfe0042e7e..0baeb58fbcd 100644 --- a/CGAL_Core/include/CGAL/CORE/extLong_impl.h +++ b/CGAL_Core/include/CGAL/CORE/extLong_impl.h @@ -125,9 +125,9 @@ extLong& extLong::operator*= (const extLong& y) { if (std::fabs(d - p) <= std::fabs(d) * relEps) { val = p; flag = 0; - } else if (d > EXTLONG_MAX) { + } else if (d > static_cast(EXTLONG_MAX)) { *this = CORE_posInfty; - } else if (d < EXTLONG_MIN) { + } else if (d < static_cast(EXTLONG_MIN)) { *this = CORE_negInfty; } else { #ifdef CORE_DEBUG diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h index f8f32f0e820..1109c4a0181 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h @@ -180,9 +180,9 @@ public: int bit_offset = 3 * vhi; // first reset the bit to 0 (AND), then assign the value given in input (OR) - off = off & ~(1 << bit_offset) | (offo[0] << bit_offset); - off = off & ~(1 << (bit_offset + 1)) | (offo[1] << (bit_offset + 1)); - off = off & ~(1 << (bit_offset + 2)) | (offo[2] << (bit_offset + 2)); + off = (off & ~(1 << bit_offset)) | (offo[0] << bit_offset); + off = (off & ~(1 << (bit_offset + 1))) | (offo[1] << (bit_offset + 1)); + off = (off & ~(1 << (bit_offset + 2))) | (offo[2] << (bit_offset + 2)); CGAL_postcondition(offset(vhi) == o); } diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h index 870f4c985d5..ee59d6e91f6 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h @@ -479,11 +479,15 @@ namespace CGAL { // On enleve la facette de la liste des mauvaises facettes #ifdef CGAL_SURFACE_MESHER_TAG_BAD if(f.first->is_bad(f.second)) + { +#endif // CGAL_SURFACE_MESHER_TAG_BAD + if(f.first < other_side.first) + facets_to_refine.erase(f); + else + facets_to_refine.erase(other_side); +#ifdef CGAL_SURFACE_MESHER_TAG_BAD + } #endif // CGAL_SURFACE_MESHER_TAG_BAD - if(f.first < other_side.first) - facets_to_refine.erase(f); - else - facets_to_refine.erase(other_side); // Le compteur des visites est remis a zero reset_visited(f); reset_visited(other_side);