summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-01-30 16:22:07 +0000
committerglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-01-30 16:22:07 +0000
commitc4a3e9ad811034c21d7664f5e47457d2b7ffb888 (patch)
tree18de7d3a4ef04469317ced5da41f3f989a859258
parent841ffc23f9e9b757bf4ab0813bdf86fb10908bd6 (diff)
Compile and doc utility
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/sparserips-glisse@3187 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: b9d1ff7172a9012dcca747c97b9367dc5a78800f
-rw-r--r--src/Rips_complex/utilities/CMakeLists.txt5
-rw-r--r--src/Rips_complex/utilities/README36
2 files changed, 41 insertions, 0 deletions
diff --git a/src/Rips_complex/utilities/CMakeLists.txt b/src/Rips_complex/utilities/CMakeLists.txt
index baa571fa..55cf5a6a 100644
--- a/src/Rips_complex/utilities/CMakeLists.txt
+++ b/src/Rips_complex/utilities/CMakeLists.txt
@@ -7,9 +7,13 @@ target_link_libraries(rips_distance_matrix_persistence ${Boost_PROGRAM_OPTIONS_L
add_executable(rips_persistence rips_persistence.cpp)
target_link_libraries(rips_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY})
+add_executable(sparse_rips_persistence sparse_rips_persistence.cpp)
+target_link_libraries(sparse_rips_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY})
+
if (TBB_FOUND)
target_link_libraries(rips_distance_matrix_persistence ${TBB_LIBRARIES})
target_link_libraries(rips_persistence ${TBB_LIBRARIES})
+ target_link_libraries(sparse_rips_persistence ${TBB_LIBRARIES})
endif()
add_test(NAME Rips_complex_utility_from_rips_distance_matrix COMMAND $<TARGET_FILE:rips_distance_matrix_persistence>
@@ -19,3 +23,4 @@ add_test(NAME Rips_complex_utility_from_rips_on_tore_3D COMMAND $<TARGET_FILE:ri
install(TARGETS rips_distance_matrix_persistence DESTINATION bin)
install(TARGETS rips_persistence DESTINATION bin)
+install(TARGETS sparse_rips_persistence DESTINATION bin)
diff --git a/src/Rips_complex/utilities/README b/src/Rips_complex/utilities/README
index 4d20c806..40fc58ba 100644
--- a/src/Rips_complex/utilities/README
+++ b/src/Rips_complex/utilities/README
@@ -72,3 +72,39 @@ The complex contains 46 simplices
3 1 11 12.0416
3 1 6.32456 6.7082
```
+
+
+
+
+## `rips_persistence` ##
+This program computes the persistent homology with coefficient field *Z/pZ*
+of a sparse (1+epsilon)-approximation of the Rips complex defined on a set of input points. The output diagram contains one bar per line, written with the convention:
+
+`p dim birth death`
+
+where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number).
+
+**Usage**
+`sparse_rips_persistence [options] <OFF input file>`
+
+**Allowed options**
+
+* `-h [ --help ]` Produce help message
+* `-o [ --output-file ]` Name of file in which the persistence diagram is written. Default print in standard output.
+* `-e [ --approximation ]` (default = .5) Epsilon, where the sparse Rips complex is a (1+epsilon)-approximation of the Rips complex.
+* `-d [ --cpx-dimension ]` (default = 1) Maximal dimension of the Rips complex we want to compute.
+* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology.
+* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals.
+
+**Example with Z/2Z coefficients**
+`rips_persistence ../../data/points/tore3D_1307.off -e .5 -m .1 -d 3 -p 2`
+
+outputs:
+```
+The complex contains 16742034 simplices
+ and has dimension 3
+2 0 0 inf
+2 1 0.0521735 0.645093
+2 2 0.0691677 0.289148
+2 1 0.0491747 0.265232
+```