summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Alpha_shapes/include/gudhi/Alpha_shapes.h2
-rw-r--r--src/Contraction/example/Garland_heckbert/Error_quadric.h2
-rw-r--r--src/GudhUI/CMakeLists.txt3
-rw-r--r--src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h2
-rw-r--r--src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h34
5 files changed, 27 insertions, 16 deletions
diff --git a/src/Alpha_shapes/include/gudhi/Alpha_shapes.h b/src/Alpha_shapes/include/gudhi/Alpha_shapes.h
index b8efdb4d..ae2ee80d 100644
--- a/src/Alpha_shapes/include/gudhi/Alpha_shapes.h
+++ b/src/Alpha_shapes/include/gudhi/Alpha_shapes.h
@@ -171,7 +171,7 @@ class Alpha_shapes {
/** \brief Returns the number of simplices in the complex.
*
* Does not count the empty simplex. */
- const unsigned int& num_simplices() const {
+ unsigned num_simplices() const {
return _st.num_simplices();
}
diff --git a/src/Contraction/example/Garland_heckbert/Error_quadric.h b/src/Contraction/example/Garland_heckbert/Error_quadric.h
index 725a3a56..72134c9d 100644
--- a/src/Contraction/example/Garland_heckbert/Error_quadric.h
+++ b/src/Contraction/example/Garland_heckbert/Error_quadric.h
@@ -122,7 +122,7 @@ public :
* Return the point such that it minimizes the gradient of the quadric.
* Det must be passed with the determinant value of the gradient (should be non zero).
*/
- inline Point solve_linear_gradient(double det = grad_determinant()) const{
+ inline Point solve_linear_gradient(double det) const{
return Point({
(-coeff[1]*coeff[5]*coeff[8]+coeff[1]*coeff[7]*coeff[6]+coeff[2]*coeff[8]*coeff[4]-coeff[2]*coeff[5]*coeff[6]-coeff[3]*coeff[4]*coeff[7]+coeff[3]*coeff[5]*coeff[5])/ det,
(coeff[0]*coeff[5]*coeff[8]-coeff[0]*coeff[7]*coeff[6]-coeff[5]*coeff[2]*coeff[3]-coeff[1]*coeff[2]*coeff[8]+coeff[6]*coeff[2]*coeff[2]+coeff[1]*coeff[3]*coeff[7])/det,
diff --git a/src/GudhUI/CMakeLists.txt b/src/GudhUI/CMakeLists.txt
index ddbae969..9348868a 100644
--- a/src/GudhUI/CMakeLists.txt
+++ b/src/GudhUI/CMakeLists.txt
@@ -5,6 +5,7 @@ find_package(CGAL COMPONENTS Qt4)
find_package(Qt4)
find_package(QGLViewer)
find_package(OpenGL)
+
message("CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}")
message("CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}")
message("CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE}")
@@ -66,5 +67,5 @@ if ( CGAL_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND )
target_link_libraries( GudhUI ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
else()
- message(STATUS "NOTICE: This demo requires CGAL, the QGLViewer, OpenGL and Qt4, and will not be compiled.")
+ message(STATUS "NOTICE: GudhUI requires CGAL, the QGLViewer, OpenGL and Qt4, and will not be compiled.")
endif()
diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h
index aaaab8b0..6ad1fdd3 100644
--- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h
+++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_off_io.h
@@ -107,7 +107,7 @@ class Skeleton_blocker_off_visitor_reader {
}
void done() {
- complex_ = make_complex_from_top_faces(maximal_faces_.begin(), maximal_faces_.end(),
+ complex_ = make_complex_from_top_faces<Complex>(maximal_faces_.begin(), maximal_faces_.end(),
points_.begin(), points_.end() );
}
};
diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h
index 437482cb..8cea123a 100644
--- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h
+++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_geometric_complex.h
@@ -79,22 +79,13 @@ public Skeleton_blocker_complex<SkeletonBlockerGeometricDS> {
(*this)[Vertex_handle(current++)].point() = Point(point->begin(), point->end());
}
- template<typename SimpleHandleOutputIterator, typename PointIterator>
- friend Skeleton_blocker_geometric_complex make_complex_from_top_faces(
+ template<typename SkeletonBlockerGeometricComplex, typename SimpleHandleOutputIterator, typename PointIterator>
+ SkeletonBlockerGeometricComplex make_complex_from_top_faces(
SimpleHandleOutputIterator simplex_begin,
SimpleHandleOutputIterator simplex_end,
PointIterator points_begin,
PointIterator points_end,
- bool is_flag_complex = false) {
- Skeleton_blocker_geometric_complex complex;
- unsigned current = 0;
- complex =
- make_complex_from_top_faces<Skeleton_blocker_geometric_complex>(simplex_begin, simplex_end, is_flag_complex);
- for (auto point = points_begin; point != points_end; ++point)
- // complex.point(Vertex_handle(current++)) = Point(point->begin(),point->end());
- complex.point(Vertex_handle(current++)) = Point(*point);
- return complex;
- }
+ bool is_flag_complex);
/**
* @brief Constructor with a list of simplices.
@@ -215,6 +206,25 @@ public Skeleton_blocker_complex<SkeletonBlockerGeometricDS> {
}
};
+
+template<typename SkeletonBlockerGeometricComplex, typename SimpleHandleOutputIterator, typename PointIterator>
+SkeletonBlockerGeometricComplex make_complex_from_top_faces(
+ SimpleHandleOutputIterator simplex_begin,
+ SimpleHandleOutputIterator simplex_end,
+ PointIterator points_begin,
+ PointIterator points_end,
+ bool is_flag_complex = false) {
+ typedef SkeletonBlockerGeometricComplex SBGC;
+ SkeletonBlockerGeometricComplex complex;
+ unsigned current = 0;
+ complex =
+ make_complex_from_top_faces<SBGC>(simplex_begin, simplex_end, is_flag_complex);
+ for (auto point = points_begin; point != points_end; ++point)
+ // complex.point(Vertex_handle(current++)) = Point(point->begin(),point->end());
+ complex.point(typename SBGC::Vertex_handle(current++)) = typename SBGC::Point(*point);
+ return complex;
+}
+
} // namespace skbl
} // namespace Gudhi