summaryrefslogtreecommitdiff
path: root/src/Alpha_complex/include/gudhi/Alpha_complex.h
diff options
context:
space:
mode:
authorglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-04-16 07:24:53 +0000
committerglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-04-16 07:24:53 +0000
commit351059be74b4f613d798ca4364a0e37202c3f378 (patch)
tree971f76b22b26db6beb6a1e12f953167a874164e0 /src/Alpha_complex/include/gudhi/Alpha_complex.h
parentc396b71ba7480365d0211f0de5410bfb07a9b25d (diff)
Minor tweaks to alpha-complex
* use the dimension of the kernel for the TDS * recycle a vector git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@1134 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 590f625287629dd041afd5ce479c99b48a476b64
Diffstat (limited to 'src/Alpha_complex/include/gudhi/Alpha_complex.h')
-rw-r--r--src/Alpha_complex/include/gudhi/Alpha_complex.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h
index ca2b68ca..a1900cb9 100644
--- a/src/Alpha_complex/include/gudhi/Alpha_complex.h
+++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h
@@ -77,7 +77,7 @@ template<class Kernel = CGAL::Epick_d<CGAL::Dynamic_dimension_tag>>
class Alpha_complex : public Simplex_tree<> {
public:
// Add an int in TDS to save point index in the structure
- typedef CGAL::Triangulation_data_structure<CGAL::Dynamic_dimension_tag,
+ typedef CGAL::Triangulation_data_structure<typename Kernel::Dimension,
CGAL::Triangulation_vertex<Kernel, std::ptrdiff_t>,
CGAL::Triangulation_full_cell<Kernel> > TDS;
/** \brief A Delaunay triangulation of a set of points in \f$ \mathbb{R}^D\f$.*/
@@ -287,13 +287,15 @@ class Alpha_complex : public Simplex_tree<> {
// --------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------
+ // Will be re-used many times
+ Vector_of_CGAL_points pointVector;
// ### For i : d -> 0
for (int decr_dim = dimension(); decr_dim >= 0; decr_dim--) {
// ### Foreach Sigma of dim i
for (auto f_simplex : skeleton_simplex_range(decr_dim)) {
int f_simplex_dim = dimension(f_simplex);
if (decr_dim == f_simplex_dim) {
- Vector_of_CGAL_points pointVector;
+ pointVector.clear();
#ifdef DEBUG_TRACES
std::cout << "Sigma of dim " << decr_dim << " is";
#endif // DEBUG_TRACES