summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-02-02 16:49:52 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-02-02 16:49:52 +0000
commitbaa98e772b9d97d8b7c22fc8292f54b5047f0569 (patch)
tree08d0d3aa89455313383229da43404aad2ae8f2d8
parent5ae31a73253f6b29f5cbf1e04af17acf62741d9e (diff)
Fix readme and doc issue after merge
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/rips_complex_from_correlation_matrix@3213 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 4fd050a6f686044aa6f6dcc290025e321e0dba1b
-rw-r--r--src/Persistent_cohomology/doc/Intro_persistent_cohomology.h13
-rw-r--r--src/Rips_complex/utilities/CMakeLists.txt8
-rw-r--r--src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp (renamed from src/Persistent_cohomology/example/rips_correlation_matrix_persistence.cpp)0
-rw-r--r--src/Rips_complex/utilities/ripscomplex.md23
4 files changed, 43 insertions, 1 deletions
diff --git a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h
index 4dbe82c7..3113a22c 100644
--- a/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h
+++ b/src/Persistent_cohomology/doc/Intro_persistent_cohomology.h
@@ -162,6 +162,19 @@ persistence diagram with a family of field coefficients.
Rips_complex/rips_distance_matrix_persistence.cpp</a> computes the Rips complex of a distance matrix and
outputs its persistence diagram.
+The file should contain square or lower triangular distance matrix with semicolons as separators.
+The code do not check if it is dealing with a distance matrix. It is the user responsibility to provide a valid input.
+Please refer to data/distance_matrix/lower_triangular_distance_matrix.csv for an example of a file.
+
+\li <a href="_rips_complex_2rips_correlation_matrix_persistence_8cpp-example.html">
+Rips_complex/rips_correlation_matrix_persistence.cpp</a>
+computes the Rips complex of a correlation matrix and outputs its persistence diagram.
+
+Note that no check is performed if the matrix given as the input is a correlation matrix.
+It is the user responsibility to ensure that this is the case. The input is to be given either as a square or a lower
+triangular matrix.
+Please refer to data/correlation_matrix/lower_triangular_correlation_matrix.csv for an example of a file.
+
\li <a href="_alpha_complex_2alpha_complex_3d_persistence_8cpp-example.html">
Alpha_complex/alpha_complex_3d_persistence.cpp</a> computes the persistent homology with
\f$\mathbb{Z}/2\mathbb{Z}\f$ coefficients of the alpha complex on points sampling from an OFF file.
diff --git a/src/Rips_complex/utilities/CMakeLists.txt b/src/Rips_complex/utilities/CMakeLists.txt
index baa571fa..b99fc808 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(rips_correlation_matrix_persistence rips_correlation_matrix_persistence.cpp)
+target_link_libraries(rips_correlation_matrix_persistence ${Boost_SYSTEM_LIBRARY} ${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(rips_correlation_matrix_persistence ${TBB_LIBRARIES})
endif()
add_test(NAME Rips_complex_utility_from_rips_distance_matrix COMMAND $<TARGET_FILE:rips_distance_matrix_persistence>
@@ -17,5 +21,9 @@ add_test(NAME Rips_complex_utility_from_rips_distance_matrix COMMAND $<TARGET_FI
add_test(NAME Rips_complex_utility_from_rips_on_tore_3D COMMAND $<TARGET_FILE:rips_persistence>
"${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-r" "0.25" "-m" "0.5" "-d" "3" "-p" "3")
+add_test(NAME Rips_complex_utility_from_rips_correlation_matrix COMMAND $<TARGET_FILE:rips_correlation_matrix_persistence>
+ "${CMAKE_SOURCE_DIR}/data/correlation_matrix/lower_triangular_correlation_matrix.csv" "-c" "0.3" "-d" "3" "-p" "3" "-m" "0")
+
install(TARGETS rips_distance_matrix_persistence DESTINATION bin)
install(TARGETS rips_persistence DESTINATION bin)
+install(TARGETS rips_correlation_matrix_persistence DESTINATION bin)
diff --git a/src/Persistent_cohomology/example/rips_correlation_matrix_persistence.cpp b/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp
index 676ef793..676ef793 100644
--- a/src/Persistent_cohomology/example/rips_correlation_matrix_persistence.cpp
+++ b/src/Rips_complex/utilities/rips_correlation_matrix_persistence.cpp
diff --git a/src/Rips_complex/utilities/ripscomplex.md b/src/Rips_complex/utilities/ripscomplex.md
index 4291fae7..3f064e67 100644
--- a/src/Rips_complex/utilities/ripscomplex.md
+++ b/src/Rips_complex/utilities/ripscomplex.md
@@ -39,11 +39,32 @@ Same as `rips_persistence` but taking a distance matrix as input.
**Usage**
-`rips_persistence [options] <CSV input file>`
+`rips_distance_matrix_persistence [options] <CSV input file>`
where
`<CSV input file>` is the path to the file containing a distance matrix. Can be square or lower triangular matrix. Separator is ';'.
+The code do not check if it is dealing with a distance matrix. It is the user responsibility to provide a valid input.
+Please refer to data/distance_matrix/lower_triangular_distance_matrix.csv for an example of a file.
**Example**
`rips_distance_matrix_persistence data/distance_matrix/full_square_distance_matrix.csv -r 15 -d 3 -p 3 -m 0`
+
+
+## rips_correlation_matrix_persistence ##
+
+Same as `rips_distance_matrix_persistence` but taking a correlation matrix as input.
+
+**Usage**
+
+`rips_correlation_matrix_persistence [options] <CSV input file>`
+
+where
+`<CSV input file>` is the path to the file containing a correlation matrix. Can be square or lower triangular matrix. Separator is ';'.
+Note that no check is performed if the matrix given as the input is a correlation matrix.
+It is the user responsibility to ensure that this is the case.
+Please refer to data/correlation_matrix/lower_triangular_correlation_matrix.csv for an example of a file.
+
+**Example**
+
+`rips_correlation_matrix_persistence data/distance_matrix/full_square_distance_matrix.csv -r 15 -d 3 -p 3 -m 0`