diff options
7 files changed, 24 insertions, 13 deletions
diff --git a/src/Coxeter_triangulation/include/gudhi/Functions/Function_affine_plane_in_Rd.h b/src/Coxeter_triangulation/include/gudhi/Functions/Function_affine_plane_in_Rd.h index dc6f5f90..a9e2d507 100644 --- a/src/Coxeter_triangulation/include/gudhi/Functions/Function_affine_plane_in_Rd.h +++ b/src/Coxeter_triangulation/include/gudhi/Functions/Function_affine_plane_in_Rd.h @@ -57,7 +57,7 @@ struct Function_affine_plane_in_Rd { * The dimension of the vector should be the ambient dimension of the manifold. */ Function_affine_plane_in_Rd(const Eigen::MatrixXd& normal_matrix, const Eigen::VectorXd& offset) - : normal_matrix_(normal_matrix), d_(normal_matrix.rows()), k_(normal_matrix.cols()), m_(d_ - k_), off_(offset) { + : normal_matrix_(normal_matrix), d_(normal_matrix.rows()), k_(normal_matrix.cols()), off_(offset) { normal_matrix_.colwise().normalize(); } @@ -73,14 +73,13 @@ struct Function_affine_plane_in_Rd { : normal_matrix_(normal_matrix), d_(normal_matrix.rows()), k_(normal_matrix.cols()), - m_(d_ - k_), off_(Eigen::VectorXd::Zero(d_)) { normal_matrix_.colwise().normalize(); } private: Eigen::MatrixXd normal_matrix_; - std::size_t d_, k_, m_; + std::size_t d_, k_; Eigen::VectorXd off_; }; diff --git a/src/Coxeter_triangulation/include/gudhi/Functions/Function_moment_curve_in_Rd.h b/src/Coxeter_triangulation/include/gudhi/Functions/Function_moment_curve_in_Rd.h index 11b379f3..f315d794 100644 --- a/src/Coxeter_triangulation/include/gudhi/Functions/Function_moment_curve_in_Rd.h +++ b/src/Coxeter_triangulation/include/gudhi/Functions/Function_moment_curve_in_Rd.h @@ -46,6 +46,11 @@ struct Function_moment_curve_in_Rd { return result; } + /** @brief Returns the radius of the moment curve. */ + double get_radius() const{ + return r_; + } + /** * \brief Constructor of the function that defines an implicit moment curve * in the d-dimensional Euclidean space. @@ -53,7 +58,7 @@ struct Function_moment_curve_in_Rd { * @param[in] r Numerical parameter. * @param[in] d The ambient dimension. */ - Function_moment_curve_in_Rd(double r, std::size_t d) : m_(1), k_(d - 1), d_(d), r_(r) {} + Function_moment_curve_in_Rd(double r, std::size_t d) : k_(d - 1), d_(d), r_(r) {} /** * \brief Constructor of the function that defines an implicit moment curve @@ -64,10 +69,10 @@ struct Function_moment_curve_in_Rd { * @param[in] offset The offset of the moment curve. */ Function_moment_curve_in_Rd(double r, std::size_t d, Eigen::VectorXd& offset) - : m_(1), k_(d - 1), d_(d), r_(r), off_(offset) {} + : k_(d - 1), d_(d), r_(r), off_(offset) {} private: - std::size_t m_, k_, d_; + std::size_t k_, d_; double r_; Eigen::VectorXd off_; }; diff --git a/src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Integer_combination_iterator.h b/src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Integer_combination_iterator.h index 3ee73754..594b6fbf 100644 --- a/src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Integer_combination_iterator.h +++ b/src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Integer_combination_iterator.h @@ -68,7 +68,7 @@ class Integer_combination_iterator public: template <class Bound_range> Integer_combination_iterator(const uint& n, const uint& k, const Bound_range& bounds) - : value_(k + 2), is_end_(n == 0 || k == 0), n_(n), k_(k) { + : value_(k + 2), is_end_(n == 0 || k == 0), k_(k) { bounds_.reserve(k + 2); uint sum_radices = 0; for (auto b : bounds) { @@ -96,13 +96,12 @@ class Integer_combination_iterator } // Used for the creating an end iterator - Integer_combination_iterator() : is_end_(true), n_(0), k_(0) {} + Integer_combination_iterator() : is_end_(true), k_(0) {} private: value_t value_; // the dereference value bool is_end_; // is true when the current integer combination is the final one - uint n_; uint k_; std::vector<uint> bounds_; }; diff --git a/src/Persistence_representations/test/persistence_heat_maps_test.cpp b/src/Persistence_representations/test/persistence_heat_maps_test.cpp index b3240758..bf531773 100644 --- a/src/Persistence_representations/test/persistence_heat_maps_test.cpp +++ b/src/Persistence_representations/test/persistence_heat_maps_test.cpp @@ -78,7 +78,7 @@ BOOST_AUTO_TEST_CASE(check_compute_percentage_of_active_of_heat_maps) { to_compute_percentage_of_active.push_back(&q); to_compute_percentage_of_active.push_back(&r); Persistence_heat_maps<constant_scaling_function> percentage_of_active; - percentage_of_active.compute_percentage_of_active(to_compute_percentage_of_active, 0.1); + percentage_of_active.compute_percentage_of_active(to_compute_percentage_of_active, 0); Persistence_heat_maps<constant_scaling_function> template_percentage_of_active; template_percentage_of_active.load_from_file("data/template_percentage_of_active_of_heat_maps"); diff --git a/src/Simplex_tree/test/simplex_tree_ctor_and_move_unit_test.cpp b/src/Simplex_tree/test/simplex_tree_ctor_and_move_unit_test.cpp index 229ae46f..f6118fe0 100644 --- a/src/Simplex_tree/test/simplex_tree_ctor_and_move_unit_test.cpp +++ b/src/Simplex_tree/test/simplex_tree_ctor_and_move_unit_test.cpp @@ -98,8 +98,16 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(simplex_copy_constructor, Simplex_tree, list_of_te BOOST_CHECK(st == st4); BOOST_CHECK(st3 == st); +#ifdef __clang__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wself-assign-overloaded" +#endif st = st; - print_simplex_filtration(st4, "Third self copy assignment from the default Simplex_tree"); +#ifdef __clang__ +#pragma GCC diagnostic pop +#endif + + print_simplex_filtration(st, "Third self copy assignment from the default Simplex_tree"); BOOST_CHECK(st3 == st); diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Trie.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Trie.h index 18ae6a92..116bc779 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Trie.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/internal/Trie.h @@ -150,7 +150,7 @@ struct Trie { ++s_pos; while (s_pos != s.end() && current != 0) { bool found = false; - for (const auto child : current->childs) { + for (const auto& child : current->childs) { if (child->v == *s_pos) { ++s_pos; current = child.get(); diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h index 5db9c2fd..e686aaec 100755 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h @@ -267,7 +267,7 @@ void Skeleton_blocker_complex<SkeletonBlockerDS>::remove_blocker_include_in_simp template<typename SkeletonBlockerDS> void Skeleton_blocker_complex<SkeletonBlockerDS>::tip_blockers(Vertex_handle a, Vertex_handle b, std::vector<Simplex> & buffer) const { - for (auto const & blocker : this->const_blocker_range(a)) { + for (auto const blocker : this->const_blocker_range(a)) { Simplex beta = (*blocker); beta.remove_vertex(a); buffer.push_back(beta); |