From d965a53c39266dd37cd9058837b80469347fc5d3 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 25 Sep 2017 08:47:06 +0000 Subject: Fix weighted alpha complex 3d git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/weighted_alpha_complex_fix@2709 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 3e7d1f73038d193b566e790a3095b6f802c48b48 --- .../example/weighted_alpha_complex_3d_persistence.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp index 34b90933..ce45d16d 100644 --- a/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp +++ b/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp @@ -115,6 +115,7 @@ int main(int argc, char * const argv[]) { if (weights_ifstr.good()) { double weight = 0.0; std::size_t index = 0; + wp.reserve(lp.size()); // Attempt read the weight in a double format, return false if it fails while ((weights_ifstr >> weight) && (index < lp.size())) { wp.push_back(Weighted_point_3(lp[index], weight)); @@ -130,7 +131,7 @@ int main(int argc, char * const argv[]) { } // alpha shape construction from points. CGAL has a strange behavior in REGULARIZED mode. - Alpha_shape_3 as(lp.begin(), lp.end(), 0, Alpha_shape_3::GENERAL); + Alpha_shape_3 as(wp.begin(), wp.end(), 0, Alpha_shape_3::GENERAL); #ifdef DEBUG_TRACES std::cout << "Alpha shape computed in GENERAL mode" << std::endl; #endif // DEBUG_TRACES -- cgit v1.2.3 From 6965bcc31dfc44ba82524637b4184f8dfdd86e9c Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 25 Sep 2017 15:44:28 +0000 Subject: Do not advertise nor use the exact bottleneck distance version git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@2711 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e441b042d15bfbe727789803ca17b17711a48d9c --- .../example/bottleneck_read_file_example.cpp | 12 ++++++------ src/cython/doc/bottleneck_distance_user.rst | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/Bottleneck_distance/example/bottleneck_read_file_example.cpp b/src/Bottleneck_distance/example/bottleneck_read_file_example.cpp index 1408681a..24d73c57 100644 --- a/src/Bottleneck_distance/example/bottleneck_read_file_example.cpp +++ b/src/Bottleneck_distance/example/bottleneck_read_file_example.cpp @@ -25,21 +25,21 @@ #include #include #include // for pair -#include -#include #include +#include // for numeric_limits int main(int argc, char** argv) { if (argc < 3) { - std::cout << "To run this program please provide as an input two files with persistence diagrams. Each file " << - "should contain a birth-death pair per line. Third, optional parameter is an error bound on a bottleneck" << - " distance (set by default to zero). The program will now terminate \n"; + std::cout << "To run this program please provide as an input two files with persistence diagrams. Each file" << + " should contain a birth-death pair per line. Third, optional parameter is an error bound on a bottleneck" << + " distance (set by default to the smallest positive double value). If you set the error bound to 0, be" << + " aware this version is exact but expensive. The program will now terminate \n"; return -1; } std::vector> diag1 = Gudhi::read_persistence_intervals_in_dimension(argv[1]); std::vector> diag2 = Gudhi::read_persistence_intervals_in_dimension(argv[2]); - double tolerance = 0.; + double tolerance = std::numeric_limits::min(); if (argc == 4) { tolerance = atof(argv[3]); } diff --git a/src/cython/doc/bottleneck_distance_user.rst b/src/cython/doc/bottleneck_distance_user.rst index 0066992f..7692dce2 100644 --- a/src/cython/doc/bottleneck_distance_user.rst +++ b/src/cython/doc/bottleneck_distance_user.rst @@ -25,7 +25,7 @@ This example computes the bottleneck distance from 2 persistence diagrams: message = "Bottleneck distance approximation=" + '%.2f' % gudhi.bottleneck_distance(diag1, diag2, 0.1) print(message) - message = "Bottleneck distance exact value=" + '%.2f' % gudhi.bottleneck_distance(diag1, diag2, 0) + message = "Bottleneck distance value=" + '%.2f' % gudhi.bottleneck_distance(diag1, diag2) print(message) The output is: @@ -33,4 +33,4 @@ The output is: .. testoutput:: Bottleneck distance approximation=0.81 - Bottleneck distance exact value=0.75 + Bottleneck distance value=0.75 -- cgit v1.2.3 From 822765550b4f944bef11e6fe7de56fb72fb00640 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 26 Sep 2017 08:27:39 +0000 Subject: Gudhi 2.0.1-rc2 version git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@2715 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 76499766ca670017df0c963c3b5a49c343eb1a47 --- CMakeGUDHIVersion.txt | 2 +- src/Doxyfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt index d5620218..87daf28e 100644 --- a/CMakeGUDHIVersion.txt +++ b/CMakeGUDHIVersion.txt @@ -1,6 +1,6 @@ set (GUDHI_MAJOR_VERSION 2) set (GUDHI_MINOR_VERSION 0) -set (GUDHI_PATCH_VERSION 1-rc1) +set (GUDHI_PATCH_VERSION 1-rc2) set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION}) message(STATUS "GUDHI version : ${GUDHI_VERSION}") diff --git a/src/Doxyfile b/src/Doxyfile index 6c01aefc..7f5975eb 100644 --- a/src/Doxyfile +++ b/src/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "GUDHI" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "2.0.1-rc1" +PROJECT_NUMBER = "2.0.1-rc2" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a -- cgit v1.2.3