summaryrefslogtreecommitdiff
path: root/src/Persistence_representations/utilities
diff options
context:
space:
mode:
authorGard Spreemann <gspr@nonempty.org>2020-05-20 08:42:23 +0200
committerGard Spreemann <gspr@nonempty.org>2020-05-20 08:42:23 +0200
commit9b3079646ee3f6a494b83e864b3e10b8a93597d0 (patch)
tree63ecae8cf0d09b72907805e68f19765c7dd9694a /src/Persistence_representations/utilities
parent81816dae256a9f3c0653b1d21443c3c32da7a974 (diff)
parent97e889f34e929f3c2306803b6c37b57926bd1245 (diff)
Merge tag 'tags/gudhi-release-3.2.0' into dfsg/latest
Diffstat (limited to 'src/Persistence_representations/utilities')
-rw-r--r--src/Persistence_representations/utilities/CMakeLists.txt10
-rw-r--r--src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt19
-rw-r--r--src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp6
-rw-r--r--src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp10
-rw-r--r--src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp10
-rw-r--r--src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp6
-rw-r--r--src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp6
-rw-r--r--src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp6
-rw-r--r--src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp6
-rw-r--r--src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp6
-rw-r--r--src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp4
-rw-r--r--src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt7
-rw-r--r--src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp8
-rw-r--r--src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp10
-rw-r--r--src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp8
-rw-r--r--src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp6
-rw-r--r--src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp4
-rw-r--r--src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp2
-rw-r--r--src/Persistence_representations/utilities/persistence_landscapes/CMakeLists.txt8
-rw-r--r--src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp6
-rw-r--r--src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp10
-rw-r--r--src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp10
-rw-r--r--src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp6
-rw-r--r--src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp4
-rw-r--r--src/Persistence_representations/utilities/persistence_landscapes_on_grid/CMakeLists.txt8
-rw-r--r--src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp6
-rw-r--r--src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp10
-rw-r--r--src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp10
-rw-r--r--src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp6
-rw-r--r--src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp4
-rw-r--r--src/Persistence_representations/utilities/persistence_vectors/CMakeLists.txt8
-rw-r--r--src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp6
-rw-r--r--src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp14
-rw-r--r--src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp10
-rw-r--r--src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp6
-rw-r--r--src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp4
36 files changed, 143 insertions, 127 deletions
diff --git a/src/Persistence_representations/utilities/CMakeLists.txt b/src/Persistence_representations/utilities/CMakeLists.txt
index fc51b1d6..85633b7b 100644
--- a/src/Persistence_representations/utilities/CMakeLists.txt
+++ b/src/Persistence_representations/utilities/CMakeLists.txt
@@ -14,7 +14,7 @@ function(add_persistence_representation_creation_utility creation_utility)
install(TARGETS ${creation_utility} DESTINATION bin)
endfunction(add_persistence_representation_creation_utility)
-function(add_persistence_representation_plot_utility plot_utility tool_extension)
+function(add_persistence_representation_plot_utility creation_utility plot_utility tool_extension)
add_executable ( ${plot_utility} ${plot_utility}.cpp )
# as the function is called in a subdirectory level, need to '../' to find persistence heat maps files
@@ -22,17 +22,21 @@ function(add_persistence_representation_plot_utility plot_utility tool_extension
"${CMAKE_CURRENT_BINARY_DIR}/../first.pers${tool_extension}")
#add_test(NAME Persistence_representation_utilities_${plot_utility}_second COMMAND $<TARGET_FILE:${plot_utility}>
# "${CMAKE_CURRENT_BINARY_DIR}/../second.pers${tool_extension}")
+ set_tests_properties(Persistence_representation_utilities_${plot_utility}_first PROPERTIES DEPENDS
+ Persistence_representation_utilities_${creation_utility})
if(GNUPLOT_PATH)
add_test(NAME Persistence_representation_utilities_${plot_utility}_first_gnuplot COMMAND ${GNUPLOT_PATH}
"-e" "load '${CMAKE_CURRENT_BINARY_DIR}/../first.pers${tool_extension}_GnuplotScript'")
#add_test(NAME Persistence_representation_utilities_${plot_utility}_second_gnuplot COMMAND ${GNUPLOT_PATH}
# "-e" "load '${CMAKE_CURRENT_BINARY_DIR}/../second.pers${tool_extension}_GnuplotScript'")
+ set_tests_properties(Persistence_representation_utilities_${plot_utility}_first_gnuplot PROPERTIES DEPENDS
+ Persistence_representation_utilities_${plot_utility}_first)
endif()
install(TARGETS ${plot_utility} DESTINATION bin)
endfunction(add_persistence_representation_plot_utility)
-function(add_persistence_representation_function_utility function_utility tool_extension)
+function(add_persistence_representation_function_utility creation_utility function_utility tool_extension)
add_executable ( ${function_utility} ${function_utility}.cpp )
# ARGV2 is an optional argument
@@ -48,6 +52,8 @@ function(add_persistence_representation_function_utility function_utility tool_e
"${CMAKE_CURRENT_BINARY_DIR}/../first.pers${tool_extension}"
"${CMAKE_CURRENT_BINARY_DIR}/../second.pers${tool_extension}")
endif()
+ set_tests_properties(Persistence_representation_utilities_${function_utility} PROPERTIES DEPENDS
+ Persistence_representation_utilities_${creation_utility})
install(TARGETS ${function_utility} DESTINATION bin)
endfunction(add_persistence_representation_function_utility)
diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt
index 89ef232f..e4c471c2 100644
--- a/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt
+++ b/src/Persistence_representations/utilities/persistence_heat_maps/CMakeLists.txt
@@ -2,13 +2,24 @@ project(Persistence_representations_heat_maps_utilities)
add_persistence_representation_creation_utility(create_pssk "10" "-1" "-1" "4" "-1")
add_persistence_representation_creation_utility(create_p_h_m_weighted_by_arctan_of_their_persistence "10" "-1" "-1" "4" "-1")
+
add_persistence_representation_creation_utility(create_p_h_m_weighted_by_distance_from_diagonal "10" "-1" "-1" "4" "-1")
+# Tests output the same file
+set_tests_properties(Persistence_representation_utilities_create_p_h_m_weighted_by_distance_from_diagonal PROPERTIES DEPENDS
+ Persistence_representation_utilities_create_p_h_m_weighted_by_arctan_of_their_persistence)
+
add_persistence_representation_creation_utility(create_p_h_m_weighted_by_squared_diag_distance "10" "-1" "-1" "4" "-1")
+# Tests output the same file
+set_tests_properties(Persistence_representation_utilities_create_p_h_m_weighted_by_squared_diag_distance PROPERTIES DEPENDS
+ Persistence_representation_utilities_create_p_h_m_weighted_by_distance_from_diagonal)
+
# Need to set grid min and max for further average, distance and scalar_product
add_persistence_representation_creation_utility(create_persistence_heat_maps "10" "0" "35" "10" "-1")
+set_tests_properties(Persistence_representation_utilities_create_persistence_heat_maps PROPERTIES DEPENDS
+ Persistence_representation_utilities_create_p_h_m_weighted_by_squared_diag_distance)
-add_persistence_representation_plot_utility(plot_persistence_heat_map ".mps")
+add_persistence_representation_plot_utility(create_persistence_heat_maps plot_persistence_heat_map ".mps")
-add_persistence_representation_function_utility(average_persistence_heat_maps ".mps")
-add_persistence_representation_function_utility(compute_distance_of_persistence_heat_maps ".mps" "1")
-add_persistence_representation_function_utility(compute_scalar_product_of_persistence_heat_maps ".mps")
+add_persistence_representation_function_utility(create_persistence_heat_maps average_persistence_heat_maps ".mps")
+add_persistence_representation_function_utility(create_persistence_heat_maps compute_distance_of_persistence_heat_maps ".mps" "1")
+add_persistence_representation_function_utility(create_persistence_heat_maps compute_scalar_product_of_persistence_heat_maps ".mps")
diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp
index 3d088b58..54b1f77d 100644
--- a/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp
+++ b/src/Persistence_representations/utilities/persistence_heat_maps/average_persistence_heat_maps.cpp
@@ -17,12 +17,12 @@ using constant_scaling_function = Gudhi::Persistence_representations::constant_s
using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps<constant_scaling_function>;
int main(int argc, char** argv) {
- std::cout << "This program computes average of persistence heat maps stored in files (the files needs to be "
+ std::clog << "This program computes average of persistence heat maps stored in files (the files needs to be "
<< "created beforehand).\n"
<< "The parameters of this programs are names of files with persistence heat maps.\n";
if (argc < 3) {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
+ std::clog << "Wrong number of parameters, the program will now terminate \n";
return 1;
}
@@ -46,6 +46,6 @@ int main(int argc, char** argv) {
delete maps[i];
}
- std::cout << "Average can be found in 'average.mps' file\n";
+ std::clog << "Average can be found in 'average.mps' file\n";
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp
index 48000bb1..757a97fc 100644
--- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp
+++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp
@@ -19,14 +19,14 @@ using constant_scaling_function = Gudhi::Persistence_representations::constant_s
using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps<constant_scaling_function>;
int main(int argc, char** argv) {
- std::cout << "This program computes distance of persistence heat maps stored in files (the files needs to be "
+ std::clog << "This program computes distance of persistence heat maps stored in files (the files needs to be "
<< "created beforehand).\n"
<< "The first parameter of a program is an integer p. The program compute L^p distance of the two heat "
<< "maps. For L^infty distance choose p = -1. \n"
<< "The remaining parameters of this program are names of files with persistence heat maps.\n";
if (argc < 3) {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
+ std::clog << "Wrong number of parameters, the program will now terminate \n";
return 1;
}
@@ -69,14 +69,14 @@ int main(int argc, char** argv) {
out.open("distance.mps");
for (size_t i = 0; i != distance.size(); ++i) {
for (size_t j = 0; j != distance.size(); ++j) {
- std::cout << distance[i][j] << " ";
+ std::clog << distance[i][j] << " ";
out << distance[i][j] << " ";
}
- std::cout << std::endl;
+ std::clog << std::endl;
out << std::endl;
}
out.close();
- std::cout << "Distance can be found in 'distance.mps' file\n";
+ std::clog << "Distance can be found in 'distance.mps' file\n";
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp
index 8a96f1b0..e7f18ce1 100644
--- a/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp
+++ b/src/Persistence_representations/utilities/persistence_heat_maps/compute_scalar_product_of_persistence_heat_maps.cpp
@@ -18,12 +18,12 @@ using constant_scaling_function = Gudhi::Persistence_representations::constant_s
using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps<constant_scaling_function>;
int main(int argc, char** argv) {
- std::cout << "This program computes scalar product of persistence heat maps stored in a file (the file needs to be "
+ std::clog << "This program computes scalar product of persistence heat maps stored in a file (the file needs to be "
<< "created beforehand). \n"
<< "The parameters of this programs are names of files with persistence heat maps.\n";
if (argc < 3) {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
+ std::clog << "Wrong number of parameters, the program will now terminate \n";
return 1;
}
@@ -60,14 +60,14 @@ int main(int argc, char** argv) {
out.open("scalar_product.mps");
for (size_t i = 0; i != scalar_product.size(); ++i) {
for (size_t j = 0; j != scalar_product.size(); ++j) {
- std::cout << scalar_product[i][j] << " ";
+ std::clog << scalar_product[i][j] << " ";
out << scalar_product[i][j] << " ";
}
- std::cout << std::endl;
+ std::clog << std::endl;
out << std::endl;
}
out.close();
- std::cout << "Distance can be found in 'scalar_product.mps' file\n";
+ std::clog << "Distance can be found in 'scalar_product.mps' file\n";
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp
index f82a39b0..6b38b930 100644
--- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp
+++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_arctan_of_their_persistence.cpp
@@ -20,7 +20,7 @@ using Persistence_heat_maps =
Gudhi::Persistence_representations::Persistence_heat_maps<arc_tan_of_persistence_of_point>;
int main(int argc, char** argv) {
- std::cout << "This program creates persistence heat map files (*.mps) of persistence diagrams files (*.pers) "
+ std::clog << "This program creates persistence heat map files (*.mps) of persistence diagrams files (*.pers) "
<< "provided as an input.The Gaussian kernels are weighted by the arc tangential of their persistence.\n"
<< "The first parameter of a program is an integer, a size of a grid.\n"
<< "The second and third parameters are min and max of the grid. If you want those numbers to be computed "
@@ -36,7 +36,7 @@ int main(int argc, char** argv) {
<< "The remaining parameters are the names of files with persistence diagrams. \n";
if (argc < 7) {
- std::cout << "Wrong parameter list, the program will now terminate \n";
+ std::clog << "Wrong parameter list, the program will now terminate \n";
return 1;
}
@@ -58,7 +58,7 @@ int main(int argc, char** argv) {
std::vector<std::vector<double> > filter = Gudhi::Persistence_representations::create_Gaussian_filter(stdiv, 1);
for (size_t i = 0; i != filenames.size(); ++i) {
- std::cout << "Creating a heat map based on a file : " << filenames[i] << std::endl;
+ std::clog << "Creating a heat map based on a file : " << filenames[i] << std::endl;
Persistence_heat_maps l(filenames[i], filter, false, size_of_grid, min_, max_, dimension);
std::stringstream ss;
diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp
index 5a657b13..fece2e36 100644
--- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp
+++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_distance_from_diagonal.cpp
@@ -19,7 +19,7 @@ using distance_from_diagonal_scaling = Gudhi::Persistence_representations::dista
using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps<distance_from_diagonal_scaling>;
int main(int argc, char** argv) {
- std::cout << "This program creates persistence heat map files (*.mps) of persistence diagrams files (*.pers) "
+ std::clog << "This program creates persistence heat map files (*.mps) of persistence diagrams files (*.pers) "
<< "provided as an input.The Gaussian kernels are weighted by the distance of a center from the "
<< "diagonal.\n"
<< "The first parameter of a program is an integer, a size of a grid.\n"
@@ -36,7 +36,7 @@ int main(int argc, char** argv) {
<< "The remaining parameters are the names of files with persistence diagrams. \n";
if (argc < 7) {
- std::cout << "Wrong parameter list, the program will now terminate \n";
+ std::clog << "Wrong parameter list, the program will now terminate \n";
return 1;
}
@@ -58,7 +58,7 @@ int main(int argc, char** argv) {
std::vector<std::vector<double> > filter = Gudhi::Persistence_representations::create_Gaussian_filter(stdiv, 1);
for (size_t i = 0; i != filenames.size(); ++i) {
- std::cout << "Creating a heat map based on a file : " << filenames[i] << std::endl;
+ std::clog << "Creating a heat map based on a file : " << filenames[i] << std::endl;
Persistence_heat_maps l(filenames[i], filter, false, size_of_grid, min_, max_, dimension);
std::stringstream ss;
diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp
index 8d67a54d..86e6fc19 100644
--- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp
+++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp
@@ -21,7 +21,7 @@ using Persistence_heat_maps =
Gudhi::Persistence_representations::Persistence_heat_maps<squared_distance_from_diagonal_scaling>;
int main(int argc, char** argv) {
- std::cout << "This program creates persistence heat map files (*.mps) of persistence diagrams files (*.pers) "
+ std::clog << "This program creates persistence heat map files (*.mps) of persistence diagrams files (*.pers) "
<< "provided as an input.The Gaussian kernels are weighted by the square of distance of a center from the "
<< "diagonal.\n"
<< "The first parameter of a program is an integer, a size of a grid.\n"
@@ -38,7 +38,7 @@ int main(int argc, char** argv) {
<< "The remaining parameters are the names of files with persistence diagrams. \n";
if (argc < 7) {
- std::cout << "Wrong parameter list, the program will now terminate \n";
+ std::clog << "Wrong parameter list, the program will now terminate \n";
return 1;
}
@@ -60,7 +60,7 @@ int main(int argc, char** argv) {
std::vector<std::vector<double> > filter = Gudhi::Persistence_representations::create_Gaussian_filter(stdiv, 1);
for (size_t i = 0; i != filenames.size(); ++i) {
- std::cout << "Creating a heat map based on a file : " << filenames[i] << std::endl;
+ std::clog << "Creating a heat map based on a file : " << filenames[i] << std::endl;
Persistence_heat_maps l(filenames[i], filter, false, size_of_grid, min_, max_, dimension);
std::stringstream ss;
diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp
index 29170c32..ca27f8e3 100644
--- a/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp
+++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_persistence_heat_maps.cpp
@@ -19,7 +19,7 @@ using constant_scaling_function = Gudhi::Persistence_representations::constant_s
using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps<constant_scaling_function>;
int main(int argc, char** argv) {
- std::cout << "This program creates persistence heat map files (*.mps) of persistence diagrams files (*.pers) "
+ std::clog << "This program creates persistence heat map files (*.mps) of persistence diagrams files (*.pers) "
<< "provided as an input.\n"
<< "The first parameter of a program is an integer, a size of a grid.\n"
<< "The second and third parameters are min and max of the grid. If you want those numbers to be computed "
@@ -35,7 +35,7 @@ int main(int argc, char** argv) {
<< "The remaining parameters are the names of files with persistence diagrams. \n";
if (argc < 7) {
- std::cout << "Wrong parameter list, the program will now terminate \n";
+ std::clog << "Wrong parameter list, the program will now terminate \n";
return 1;
}
size_t size_of_grid = (size_t)atoi(argv[1]);
@@ -55,7 +55,7 @@ int main(int argc, char** argv) {
std::vector<std::vector<double> > filter = Gudhi::Persistence_representations::create_Gaussian_filter(stdiv, 1);
for (size_t i = 0; i != filenames.size(); ++i) {
- std::cout << "Creating a heat map based on file : " << filenames[i] << std::endl;
+ std::clog << "Creating a heat map based on file : " << filenames[i] << std::endl;
Persistence_heat_maps l(filenames[i], filter, false, size_of_grid, min_, max_, dimension);
std::stringstream ss;
diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp
index 995771b9..d2ebcc7e 100644
--- a/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp
+++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_pssk.cpp
@@ -18,7 +18,7 @@
using PSSK = Gudhi::Persistence_representations::PSSK;
int main(int argc, char** argv) {
- std::cout << "This program creates PSSK files (*.pssk) of persistence diagrams files (*.pers) "
+ std::clog << "This program creates PSSK files (*.pssk) of persistence diagrams files (*.pers) "
<< "provided as an input.\n"
<< "The first parameter of a program is an integer, a size of a grid.\n"
<< "The second and third parameters are min and max of the grid. If you want those numbers to be computed "
@@ -34,7 +34,7 @@ int main(int argc, char** argv) {
<< "The remaining parameters are the names of files with persistence diagrams. \n";
if (argc < 7) {
- std::cout << "Wrong parameter list, the program will now terminate \n";
+ std::clog << "Wrong parameter list, the program will now terminate \n";
return 1;
}
@@ -56,7 +56,7 @@ int main(int argc, char** argv) {
std::vector<std::vector<double> > filter = Gudhi::Persistence_representations::create_Gaussian_filter(stdiv, 1);
for (size_t i = 0; i != filenames.size(); ++i) {
- std::cout << "Creating a PSSK based on a file : " << filenames[i] << std::endl;
+ std::clog << "Creating a PSSK based on a file : " << filenames[i] << std::endl;
PSSK l(filenames[i], filter, size_of_grid, min_, max_, dimension);
std::stringstream ss;
diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp
index cf6e07cb..87cc97d1 100644
--- a/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp
+++ b/src/Persistence_representations/utilities/persistence_heat_maps/plot_persistence_heat_map.cpp
@@ -17,10 +17,10 @@ using constant_scaling_function = Gudhi::Persistence_representations::constant_s
using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps<constant_scaling_function>;
int main(int argc, char** argv) {
- std::cout << "This program creates a gnuplot script from a persistence heat maps stored in a file (the file needs "
+ std::clog << "This program creates a gnuplot script from a persistence heat maps stored in a file (the file needs "
<< "to be created beforehand). Please call the code with the name of a single heat maps file \n";
if (argc != 2) {
- std::cout << "Wrong parameter list, the program will now terminate \n";
+ std::clog << "Wrong parameter list, the program will now terminate \n";
return 1;
}
Persistence_heat_maps l;
diff --git a/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt
index a025183e..118c1e9b 100644
--- a/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt
+++ b/src/Persistence_representations/utilities/persistence_intervals/CMakeLists.txt
@@ -3,17 +3,16 @@ project(Persistence_representations_intervals_utilities)
add_executable ( plot_histogram_of_intervals_lengths plot_histogram_of_intervals_lengths.cpp )
-add_test(NAME plot_histogram_of_intervals_lengths COMMAND $<TARGET_FILE:plot_histogram_of_intervals_lengths>
+add_test(NAME Persistence_representation_utilities_plot_histogram_of_intervals_lengths COMMAND $<TARGET_FILE:plot_histogram_of_intervals_lengths>
"${CMAKE_CURRENT_BINARY_DIR}/../first.pers" "-1")
install(TARGETS plot_histogram_of_intervals_lengths DESTINATION bin)
-add_persistence_representation_plot_utility(plot_persistence_intervals "")
-add_persistence_representation_plot_utility(plot_persistence_Betti_numbers "")
+add_persistence_representation_plot_utility(plot_histogram_of_intervals_lengths plot_persistence_intervals "")
+add_persistence_representation_plot_utility(plot_histogram_of_intervals_lengths plot_persistence_Betti_numbers "")
add_persistence_representation_creation_utility(compute_birth_death_range_in_persistence_diagram "-1")
-
add_executable ( compute_number_of_dominant_intervals compute_number_of_dominant_intervals.cpp )
add_test(NAME Persistence_representation_utilities_compute_number_of_dominant_intervals
COMMAND $<TARGET_FILE:compute_number_of_dominant_intervals>
diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp
index 519cc47d..72325cad 100644
--- a/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp
+++ b/src/Persistence_representations/utilities/persistence_intervals/compute_birth_death_range_in_persistence_diagram.cpp
@@ -18,7 +18,7 @@
using Persistence_intervals = Gudhi::Persistence_representations::Persistence_intervals;
int main(int argc, char** argv) {
- std::cout << "This program computes the range of birth and death times of persistence pairs in diagrams provided as "
+ std::clog << "This program computes the range of birth and death times of persistence pairs in diagrams provided as "
<< "an input.\n"
<< "The first parameter is the dimension of persistence to be used to create persistence intervals. "
<< "If your file contains the information about dimension of persistence pairs, please provide here the "
@@ -27,7 +27,7 @@ int main(int argc, char** argv) {
<< "The remaining parameters of the program are the names of files with persistence diagrams.\n";
if (argc < 3) {
- std::cout << "Wrong parameter list, the program will now terminate \n";
+ std::clog << "Wrong parameter list, the program will now terminate \n";
return 1;
}
@@ -45,12 +45,12 @@ int main(int argc, char** argv) {
double max_ = -std::numeric_limits<double>::max();
for (size_t file_no = 0; file_no != filenames.size(); ++file_no) {
- std::cout << "Creating diagram based on a file : " << filenames[file_no] << std::endl;
+ std::clog << "Creating diagram based on a file : " << filenames[file_no] << std::endl;
Persistence_intervals p(filenames[file_no], dimension);
std::pair<double, double> min_max_ = p.get_x_range();
if (min_max_.first < min_) min_ = min_max_.first;
if (min_max_.second > max_) max_ = min_max_.second;
}
- std::cout << "Birth-death range : min: " << min_ << ", max: " << max_ << std::endl;
+ std::clog << "Birth-death range : min: " << min_ << ", max: " << max_ << std::endl;
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp
index 6155727a..465bf72e 100644
--- a/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp
+++ b/src/Persistence_representations/utilities/persistence_intervals/compute_bottleneck_distance.cpp
@@ -18,7 +18,7 @@
using Persistence_intervals_with_distances = Gudhi::Persistence_representations::Persistence_intervals_with_distances;
int main(int argc, char** argv) {
- std::cout << "This program computes the bottleneck distance of persistence pairs in diagrams provided as "
+ std::clog << "This program computes the bottleneck distance of persistence pairs in diagrams provided as "
<< "an input.\n"
<< "The first parameter is the dimension of persistence to be used to create persistence intervals. "
<< "If your file contains the information about dimension of persistence pairs, please provide here the "
@@ -27,7 +27,7 @@ int main(int argc, char** argv) {
<< "The remaining parameters of the program are the names of files with persistence diagrams.\n";
if (argc < 3) {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
+ std::clog << "Wrong number of parameters, the program will now terminate \n";
return 1;
}
@@ -70,14 +70,14 @@ int main(int argc, char** argv) {
out.open("distance.itv");
for (size_t i = 0; i != distance.size(); ++i) {
for (size_t j = 0; j != distance.size(); ++j) {
- std::cout << distance[i][j] << " ";
+ std::clog << distance[i][j] << " ";
out << distance[i][j] << " ";
}
- std::cout << std::endl;
+ std::clog << std::endl;
out << std::endl;
}
out.close();
- std::cout << "Distance can be found in 'distance.itv' file\n";
+ std::clog << "Distance can be found in 'distance.itv' file\n";
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp b/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp
index dd6e1a5b..ea1fe717 100644
--- a/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp
+++ b/src/Persistence_representations/utilities/persistence_intervals/compute_number_of_dominant_intervals.cpp
@@ -18,10 +18,10 @@
using Persistence_intervals = Gudhi::Persistence_representations::Persistence_intervals;
int main(int argc, char** argv) {
- std::cout << "This program compute the dominant intervals. A number of intervals to be displayed is a parameter of "
+ std::clog << "This program compute the dominant intervals. A number of intervals to be displayed is a parameter of "
"this program. \n";
if (argc != 4) {
- std::cout << "To run this program, please provide the name of a file with persistence diagram, dimension of "
+ std::clog << "To run this program, please provide the name of a file with persistence diagram, dimension of "
"intervals that should be taken into account (if your file contains only persistence pairs in a "
"single dimension, set it up to -1) and number of dominant intervals you would like to get \n";
return 1;
@@ -33,9 +33,9 @@ int main(int argc, char** argv) {
}
Persistence_intervals p(argv[1], dimension);
std::vector<std::pair<double, double> > dominant_intervals = p.dominant_intervals(atoi(argv[3]));
- std::cout << "Here are the dominant intervals : " << std::endl;
+ std::clog << "Here are the dominant intervals : " << std::endl;
for (size_t i = 0; i != dominant_intervals.size(); ++i) {
- std::cout << " " << dominant_intervals[i].first << "," << dominant_intervals[i].second << " " << std::endl;
+ std::clog << " " << dominant_intervals[i].first << "," << dominant_intervals[i].second << " " << std::endl;
}
return 0;
diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp
index 13d2133f..e5eec3f5 100644
--- a/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp
+++ b/src/Persistence_representations/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp
@@ -18,10 +18,10 @@
using Persistence_intervals = Gudhi::Persistence_representations::Persistence_intervals;
int main(int argc, char** argv) {
- std::cout << "This program computes a histogram of barcode's length. A number of bins in the histogram is a "
+ std::clog << "This program computes a histogram of barcode's length. A number of bins in the histogram is a "
<< "parameter of this program. \n";
if ((argc != 3) && (argc != 4)) {
- std::cout << "To run this program, please provide the name of a file with persistence diagram and number of "
+ std::clog << "To run this program, please provide the name of a file with persistence diagram and number of "
<< "dominant intervals you would like to get. Set a negative number dominant intervals value "
<< "If your file contains only birth-death pairs.\n"
<< "The third parameter is the dimension of the persistence that is to be used. If your "
@@ -59,7 +59,7 @@ int main(int argc, char** argv) {
out << std::endl;
out.close();
- std::cout << "To visualize, install gnuplot and type the command: gnuplot -persist -e \"load \'"
+ std::clog << "To visualize, install gnuplot and type the command: gnuplot -persist -e \"load \'"
<< gnuplot_script.str().c_str() << "\'\"" << std::endl;
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp
index 451be77f..27c69e07 100644
--- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp
+++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_Betti_numbers.cpp
@@ -19,7 +19,7 @@ using Persistence_intervals = Gudhi::Persistence_representations::Persistence_in
int main(int argc, char** argv) {
if ((argc != 3) && (argc != 2)) {
- std::cout << "This program creates a gnuplot script of Betti numbers from a single persistence diagram file"
+ std::clog << "This program creates a gnuplot script of Betti numbers from a single persistence diagram file"
<< "(*.pers).\n"
<< "To run this program, please provide the name of a file with persistence diagram.\n"
<< "The second optional parameter of a program is the dimension of the persistence that is to be used. "
@@ -68,7 +68,7 @@ int main(int argc, char** argv) {
out << std::endl;
out.close();
- std::cout << "To visualize, install gnuplot and type the command: gnuplot -persist -e \"load \'"
+ std::clog << "To visualize, install gnuplot and type the command: gnuplot -persist -e \"load \'"
<< gnuplot_script.str().c_str() << "\'\"" << std::endl;
return 0;
diff --git a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp
index 09a56869..199a3266 100644
--- a/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp
+++ b/src/Persistence_representations/utilities/persistence_intervals/plot_persistence_intervals.cpp
@@ -19,7 +19,7 @@ using Persistence_intervals = Gudhi::Persistence_representations::Persistence_in
int main(int argc, char** argv) {
if ((argc != 3) && (argc != 2)) {
- std::cout << "This program creates a gnuplot script from a single persistence diagram file (*.pers).\n"
+ std::clog << "This program creates a gnuplot script from a single persistence diagram file (*.pers).\n"
<< "To run this program, please provide the name of a file with persistence diagram.\n"
<< "The second optional parameter of a program is the dimension of the persistence that is to be used. "
<< "If your file contains only birth-death pairs, you can skip this parameter.\n";
diff --git a/src/Persistence_representations/utilities/persistence_landscapes/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_landscapes/CMakeLists.txt
index 6b24d032..4df84d36 100644
--- a/src/Persistence_representations/utilities/persistence_landscapes/CMakeLists.txt
+++ b/src/Persistence_representations/utilities/persistence_landscapes/CMakeLists.txt
@@ -2,8 +2,8 @@ project(Persistence_representations_landscapes_utilities)
add_persistence_representation_creation_utility(create_landscapes "-1")
-add_persistence_representation_plot_utility(plot_landscapes ".land")
+add_persistence_representation_plot_utility(create_landscapes plot_landscapes ".land")
-add_persistence_representation_function_utility(average_landscapes ".land")
-add_persistence_representation_function_utility(compute_distance_of_landscapes ".land" "1")
-add_persistence_representation_function_utility(compute_scalar_product_of_landscapes ".land")
+add_persistence_representation_function_utility(create_landscapes average_landscapes ".land")
+add_persistence_representation_function_utility(create_landscapes compute_distance_of_landscapes ".land" "1")
+add_persistence_representation_function_utility(create_landscapes compute_scalar_product_of_landscapes ".land")
diff --git a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp
index 04a0ada4..612e9700 100644
--- a/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp
+++ b/src/Persistence_representations/utilities/persistence_landscapes/average_landscapes.cpp
@@ -16,13 +16,13 @@
using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape;
int main(int argc, char** argv) {
- std::cout << "This program computes average of persistence landscapes stored in files (the files needs to be "
+ std::clog << "This program computes average of persistence landscapes stored in files (the files needs to be "
<< "created beforehand).\n"
<< "The parameters of this programs are names of files with persistence landscapes.\n";
std::vector<const char*> filenames;
if (argc < 3) {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
+ std::clog << "Wrong number of parameters, the program will now terminate \n";
return 1;
}
@@ -46,6 +46,6 @@ int main(int argc, char** argv) {
delete lands[i];
}
- std::cout << "Average can be found in 'average.land' file\n";
+ std::clog << "Average can be found in 'average.land' file\n";
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp
index 1093c1aa..2246a37d 100644
--- a/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp
+++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_distance_of_landscapes.cpp
@@ -18,14 +18,14 @@
using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape;
int main(int argc, char** argv) {
- std::cout << "This program computes distance of persistence landscapes stored in files (the files needs to be "
+ std::clog << "This program computes distance of persistence landscapes stored in files (the files needs to be "
<< "created beforehand).\n"
<< "The first parameter of a program is an integer p. The program compute L^p distance of the two heat "
<< "maps. For L^infty distance choose p = -1. \n"
<< "The remaining parameters of this program are names of files with persistence landscapes.\n";
if (argc < 3) {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
+ std::clog << "Wrong number of parameters, the program will now terminate \n";
return 1;
}
@@ -68,14 +68,14 @@ int main(int argc, char** argv) {
out.open("distance.land");
for (size_t i = 0; i != distance.size(); ++i) {
for (size_t j = 0; j != distance.size(); ++j) {
- std::cout << distance[i][j] << " ";
+ std::clog << distance[i][j] << " ";
out << distance[i][j] << " ";
}
- std::cout << std::endl;
+ std::clog << std::endl;
out << std::endl;
}
out.close();
- std::cout << "Distance can be found in 'distance.land' file\n";
+ std::clog << "Distance can be found in 'distance.land' file\n";
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp
index 16b76497..44f50543 100644
--- a/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp
+++ b/src/Persistence_representations/utilities/persistence_landscapes/compute_scalar_product_of_landscapes.cpp
@@ -17,12 +17,12 @@
using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape;
int main(int argc, char** argv) {
- std::cout << "This program computes scalar product of persistence landscapes stored in a file (the file needs to be "
+ std::clog << "This program computes scalar product of persistence landscapes stored in a file (the file needs to be "
<< "created beforehand). \n"
<< "The parameters of this programs are names of files with persistence landscapes.\n";
if (argc < 3) {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
+ std::clog << "Wrong number of parameters, the program will now terminate \n";
return 1;
}
@@ -59,14 +59,14 @@ int main(int argc, char** argv) {
out.open("scalar_product.land");
for (size_t i = 0; i != scalar_product.size(); ++i) {
for (size_t j = 0; j != scalar_product.size(); ++j) {
- std::cout << scalar_product[i][j] << " ";
+ std::clog << scalar_product[i][j] << " ";
out << scalar_product[i][j] << " ";
}
- std::cout << std::endl;
+ std::clog << std::endl;
out << std::endl;
}
out.close();
- std::cout << "Distance can be found in 'scalar_product.land' file\n";
+ std::clog << "Distance can be found in 'scalar_product.land' file\n";
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp
index 4d772086..fab5c75f 100644
--- a/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp
+++ b/src/Persistence_representations/utilities/persistence_landscapes/create_landscapes.cpp
@@ -18,7 +18,7 @@
using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape;
int main(int argc, char** argv) {
- std::cout << "This program creates persistence landscapes files (*.land) of persistence diagrams files (*.pers) "
+ std::clog << "This program creates persistence landscapes files (*.land) of persistence diagrams files (*.pers) "
<< "provided as an input.\n"
<< "The first parameter of this program is a dimension of persistence that will be used in creation of "
<< "the persistence heat maps."
@@ -29,7 +29,7 @@ int main(int argc, char** argv) {
<< "The remaining parameters are the names of files with persistence diagrams. \n";
if (argc < 3) {
- std::cout << "Wrong parameter list, the program will now terminate \n";
+ std::clog << "Wrong parameter list, the program will now terminate \n";
return 1;
}
std::vector<const char*> filenames;
@@ -43,7 +43,7 @@ int main(int argc, char** argv) {
}
for (size_t i = 0; i != filenames.size(); ++i) {
- std::cout << "Creating a landscape based on file : " << filenames[i] << std::endl;
+ std::clog << "Creating a landscape based on file : " << filenames[i] << std::endl;
Persistence_landscape l(filenames[i], dimension);
std::stringstream ss;
ss << filenames[i] << ".land";
diff --git a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp
index 1fe03640..da9b9bba 100644
--- a/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp
+++ b/src/Persistence_representations/utilities/persistence_landscapes/plot_landscapes.cpp
@@ -16,10 +16,10 @@
using Persistence_landscape = Gudhi::Persistence_representations::Persistence_landscape;
int main(int argc, char** argv) {
- std::cout << "This program creates a gnuplot script from a persistence landscape stored in a file (the file needs "
+ std::clog << "This program creates a gnuplot script from a persistence landscape stored in a file (the file needs "
<< "to be created beforehand). Please call the code with the name of a single landscape file.\n";
if (argc != 2) {
- std::cout << "Wrong parameter list, the program will now terminate \n";
+ std::clog << "Wrong parameter list, the program will now terminate \n";
return 1;
}
diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/CMakeLists.txt
index 36f3196b..8cd965f1 100644
--- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/CMakeLists.txt
+++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/CMakeLists.txt
@@ -3,8 +3,8 @@ project(Persistence_representations_lanscapes_on_grid_utilities)
# Need to set grid min and max for further average, distance and scalar_product
add_persistence_representation_creation_utility(create_landscapes_on_grid "100" "0" "35" "-1")
-add_persistence_representation_plot_utility(plot_landscapes_on_grid ".g_land")
+add_persistence_representation_plot_utility(create_landscapes_on_grid plot_landscapes_on_grid ".g_land")
-add_persistence_representation_function_utility(average_landscapes_on_grid ".g_land")
-add_persistence_representation_function_utility(compute_distance_of_landscapes_on_grid ".g_land" "1")
-add_persistence_representation_function_utility(compute_scalar_product_of_landscapes_on_grid ".g_land")
+add_persistence_representation_function_utility(create_landscapes_on_grid average_landscapes_on_grid ".g_land")
+add_persistence_representation_function_utility(create_landscapes_on_grid compute_distance_of_landscapes_on_grid ".g_land" "1")
+add_persistence_representation_function_utility(create_landscapes_on_grid compute_scalar_product_of_landscapes_on_grid ".g_land")
diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp
index f92cde72..39f7a67f 100644
--- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp
+++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/average_landscapes_on_grid.cpp
@@ -16,12 +16,12 @@
using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid;
int main(int argc, char** argv) {
- std::cout << "This program computes average of persistence landscapes on grid stored in files (the files needs to "
+ std::clog << "This program computes average of persistence landscapes on grid stored in files (the files needs to "
<< "be created beforehand).\n"
<< "The parameters of this programs are names of files with persistence landscapes on grid.\n";
if (argc < 3) {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
+ std::clog << "Wrong number of parameters, the program will now terminate \n";
return 1;
}
@@ -46,6 +46,6 @@ int main(int argc, char** argv) {
delete lands[i];
}
- std::cout << "Average can be found in 'average.g_land' file\n";
+ std::clog << "Average can be found in 'average.g_land' file\n";
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp
index baec6aeb..01fd09d8 100644
--- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp
+++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_distance_of_landscapes_on_grid.cpp
@@ -18,14 +18,14 @@
using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid;
int main(int argc, char** argv) {
- std::cout << "This program computes distance of persistence landscapes on grid stored in files (the files needs to "
+ std::clog << "This program computes distance of persistence landscapes on grid stored in files (the files needs to "
<< "be created beforehand).\n"
<< "The first parameter of a program is an integer p. The program compute L^p distance of the two heat "
<< "maps. For L^infty distance choose p = -1. \n"
<< "The remaining parameters of this program are names of files with persistence landscapes on grid.\n";
if (argc < 3) {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
+ std::clog << "Wrong number of parameters, the program will now terminate \n";
return 1;
}
@@ -68,14 +68,14 @@ int main(int argc, char** argv) {
out.open("distance.g_land");
for (size_t i = 0; i != distance.size(); ++i) {
for (size_t j = 0; j != distance.size(); ++j) {
- std::cout << distance[i][j] << " ";
+ std::clog << distance[i][j] << " ";
out << distance[i][j] << " ";
}
- std::cout << std::endl;
+ std::clog << std::endl;
out << std::endl;
}
out.close();
- std::cout << "Distance can be found in 'distance.g_land' file\n";
+ std::clog << "Distance can be found in 'distance.g_land' file\n";
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp
index e94dacdb..71c2f419 100644
--- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp
+++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/compute_scalar_product_of_landscapes_on_grid.cpp
@@ -17,13 +17,13 @@
using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid;
int main(int argc, char** argv) {
- std::cout
+ std::clog
<< "This program computes scalar product of persistence landscapes on grid stored in a file (the file needs to "
<< "be created beforehand). \n"
<< "The parameters of this programs are names of files with persistence landscapes on grid.\n";
if (argc < 3) {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
+ std::clog << "Wrong number of parameters, the program will now terminate \n";
return 1;
}
@@ -60,14 +60,14 @@ int main(int argc, char** argv) {
out.open("scalar_product.g_land");
for (size_t i = 0; i != scalar_product.size(); ++i) {
for (size_t j = 0; j != scalar_product.size(); ++j) {
- std::cout << scalar_product[i][j] << " ";
+ std::clog << scalar_product[i][j] << " ";
out << scalar_product[i][j] << " ";
}
- std::cout << std::endl;
+ std::clog << std::endl;
out << std::endl;
}
out.close();
- std::cout << "Distance can be found in 'scalar_product.g_land' file\n";
+ std::clog << "Distance can be found in 'scalar_product.g_land' file\n";
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp
index d510c3df..788313c4 100644
--- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp
+++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/create_landscapes_on_grid.cpp
@@ -18,7 +18,7 @@
using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid;
int main(int argc, char** argv) {
- std::cout << "This program creates persistence landscapes on grid files (*.g_land) of persistence diagrams files "
+ std::clog << "This program creates persistence landscapes on grid files (*.g_land) of persistence diagrams files "
<< "(*.pers) provided as an input.\n"
<< "The first parameter of a program is an integer, a size of a grid.\n"
<< "The second and third parameters are min and max of the grid. If you want those numbers to be computed "
@@ -32,7 +32,7 @@ int main(int argc, char** argv) {
<< "The remaining parameters are the names of files with persistence diagrams. \n";
if (argc < 6) {
- std::cout << "Wrong parameter list, the program will now terminate \n";
+ std::clog << "Wrong parameter list, the program will now terminate \n";
return 1;
}
@@ -51,7 +51,7 @@ int main(int argc, char** argv) {
}
for (size_t i = 0; i != filenames.size(); ++i) {
- std::cout << "Creating persistence landscape on a grid based on a file : " << filenames[i] << std::endl;
+ std::clog << "Creating persistence landscape on a grid based on a file : " << filenames[i] << std::endl;
Persistence_landscape_on_grid l;
if ((min_ != -1) || (max_ != -1)) {
l = Persistence_landscape_on_grid(filenames[i], min_, max_, size_of_grid, dimension);
diff --git a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp
index 4e20f37f..ec6112b5 100644
--- a/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp
+++ b/src/Persistence_representations/utilities/persistence_landscapes_on_grid/plot_landscapes_on_grid.cpp
@@ -16,11 +16,11 @@
using Persistence_landscape_on_grid = Gudhi::Persistence_representations::Persistence_landscape_on_grid;
int main(int argc, char** argv) {
- std::cout << "This program creates a gnuplot script from a persistence landscape on grid stored in a file (the file "
+ std::clog << "This program creates a gnuplot script from a persistence landscape on grid stored in a file (the file "
<< "needs to be created beforehand). Please call the code with the name of a single landscape on grid file"
<< ".\n";
if (argc != 2) {
- std::cout << "Wrong parameter list, the program will now terminate \n";
+ std::clog << "Wrong parameter list, the program will now terminate \n";
return 1;
}
diff --git a/src/Persistence_representations/utilities/persistence_vectors/CMakeLists.txt b/src/Persistence_representations/utilities/persistence_vectors/CMakeLists.txt
index bc982094..5b22ca84 100644
--- a/src/Persistence_representations/utilities/persistence_vectors/CMakeLists.txt
+++ b/src/Persistence_representations/utilities/persistence_vectors/CMakeLists.txt
@@ -2,8 +2,8 @@ project(Persistence_vectors_utilities)
add_persistence_representation_creation_utility(create_persistence_vectors "-1")
-add_persistence_representation_plot_utility(plot_persistence_vectors ".vect")
+add_persistence_representation_plot_utility(create_persistence_vectors plot_persistence_vectors ".vect")
-add_persistence_representation_function_utility(average_persistence_vectors ".vect")
-add_persistence_representation_function_utility(compute_distance_of_persistence_vectors ".vect" "1")
-add_persistence_representation_function_utility(compute_scalar_product_of_persistence_vectors ".vect")
+add_persistence_representation_function_utility(create_persistence_vectors average_persistence_vectors ".vect")
+add_persistence_representation_function_utility(create_persistence_vectors compute_distance_of_persistence_vectors ".vect" "1")
+add_persistence_representation_function_utility(create_persistence_vectors compute_scalar_product_of_persistence_vectors ".vect")
diff --git a/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp
index 89e42f0f..4eb32eb3 100644
--- a/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp
+++ b/src/Persistence_representations/utilities/persistence_vectors/average_persistence_vectors.cpp
@@ -17,12 +17,12 @@ using Euclidean_distance = Gudhi::Euclidean_distance;
using Vector_distances_in_diagram = Gudhi::Persistence_representations::Vector_distances_in_diagram<Euclidean_distance>;
int main(int argc, char** argv) {
- std::cout << "This program computes average of persistence vectors stored in files (the files needs to "
+ std::clog << "This program computes average of persistence vectors stored in files (the files needs to "
<< "be created beforehand).\n"
<< "The parameters of this programs are names of files with persistence vectors.\n";
if (argc < 3) {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
+ std::clog << "Wrong number of parameters, the program will now terminate \n";
return 1;
}
@@ -47,7 +47,7 @@ int main(int argc, char** argv) {
delete lands[i];
}
- std::cout << "Done \n";
+ std::clog << "Done \n";
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp
index 541dd25f..236981a3 100644
--- a/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp
+++ b/src/Persistence_representations/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp
@@ -19,14 +19,14 @@ using Euclidean_distance = Gudhi::Euclidean_distance;
using Vector_distances_in_diagram = Gudhi::Persistence_representations::Vector_distances_in_diagram<Euclidean_distance>;
int main(int argc, char** argv) {
- std::cout << "This program compute distance of persistence vectors stored in a file (the file needs to be created "
+ std::clog << "This program compute distance of persistence vectors stored in a file (the file needs to be created "
"beforehand). \n";
- std::cout << "The first parameter of a program is an integer p. The program compute l^p distance of the vectors. For "
+ std::clog << "The first parameter of a program is an integer p. The program compute l^p distance of the vectors. For "
"l^infty distance choose p = -1. \n";
- std::cout << "The remaining parameters of this programs are names of files with persistence vectors.\n";
+ std::clog << "The remaining parameters of this programs are names of files with persistence vectors.\n";
if (argc < 3) {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
+ std::clog << "Wrong number of parameters, the program will now terminate \n";
return 1;
}
@@ -69,14 +69,14 @@ int main(int argc, char** argv) {
out.open("distance.vect");
for (size_t i = 0; i != distance.size(); ++i) {
for (size_t j = 0; j != distance.size(); ++j) {
- std::cout << distance[i][j] << " ";
+ std::clog << distance[i][j] << " ";
out << distance[i][j] << " ";
}
- std::cout << std::endl;
+ std::clog << std::endl;
out << std::endl;
}
out.close();
- std::cout << "Distance can be found in 'distance.vect' file\n";
+ std::clog << "Distance can be found in 'distance.vect' file\n";
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp
index bbc50c98..c6ea0e1c 100644
--- a/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp
+++ b/src/Persistence_representations/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp
@@ -19,12 +19,12 @@ using Euclidean_distance = Gudhi::Euclidean_distance;
using Vector_distances_in_diagram = Gudhi::Persistence_representations::Vector_distances_in_diagram<Euclidean_distance>;
int main(int argc, char** argv) {
- std::cout << "This program computes scalar product of persistence vectors stored in a file (the file needs to "
+ std::clog << "This program computes scalar product of persistence vectors stored in a file (the file needs to "
<< "be created beforehand). \n"
<< "The parameters of this programs are names of files with persistence vectors.\n";
if (argc < 3) {
- std::cout << "Wrong number of parameters, the program will now terminate \n";
+ std::clog << "Wrong number of parameters, the program will now terminate \n";
return 1;
}
@@ -61,14 +61,14 @@ int main(int argc, char** argv) {
out.open("scalar_product.vect");
for (size_t i = 0; i != scalar_product.size(); ++i) {
for (size_t j = 0; j != scalar_product.size(); ++j) {
- std::cout << scalar_product[i][j] << " ";
+ std::clog << scalar_product[i][j] << " ";
out << scalar_product[i][j] << " ";
}
- std::cout << std::endl;
+ std::clog << std::endl;
out << std::endl;
}
out.close();
- std::cout << "Distance can be found in 'scalar_product.vect' file\n";
+ std::clog << "Distance can be found in 'scalar_product.vect' file\n";
return 0;
}
diff --git a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp
index f974c3d3..608e04e5 100644
--- a/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp
+++ b/src/Persistence_representations/utilities/persistence_vectors/create_persistence_vectors.cpp
@@ -19,7 +19,7 @@ using Euclidean_distance = Gudhi::Euclidean_distance;
using Vector_distances_in_diagram = Gudhi::Persistence_representations::Vector_distances_in_diagram<Euclidean_distance>;
int main(int argc, char** argv) {
- std::cout << "This program creates persistence vectors files (*.vect) of persistence diagrams files (*.pers) "
+ std::clog << "This program creates persistence vectors files (*.vect) of persistence diagrams files (*.pers) "
<< "provided as an input.\n"
<< "The first parameter of this program is a dimension of persistence that will be used in creation of "
<< "the persistence heat maps."
@@ -30,11 +30,11 @@ int main(int argc, char** argv) {
<< "The remaining parameters are the names of files with persistence diagrams. \n";
if (argc < 3) {
- std::cout << "Wrong parameter list, the program will now terminate \n";
+ std::clog << "Wrong parameter list, the program will now terminate \n";
return 1;
}
- std::cout << "The remaining parameters are the names of files with persistence diagrams. \n";
+ std::clog << "The remaining parameters are the names of files with persistence diagrams. \n";
int dim = atoi(argv[1]);
unsigned dimension = std::numeric_limits<unsigned>::max();
if (dim >= 0) {
diff --git a/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp b/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp
index de08fcfe..2decb134 100644
--- a/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp
+++ b/src/Persistence_representations/utilities/persistence_vectors/plot_persistence_vectors.cpp
@@ -17,10 +17,10 @@ using Euclidean_distance = Gudhi::Euclidean_distance;
using Vector_distances_in_diagram = Gudhi::Persistence_representations::Vector_distances_in_diagram<Euclidean_distance>;
int main(int argc, char** argv) {
- std::cout << "This program create a Gnuplot script to plot persistence vector. Please call this program with the "
+ std::clog << "This program create a Gnuplot script to plot persistence vector. Please call this program with the "
"name of file with persistence vector. \n";
if (argc != 2) {
- std::cout << "Wrong number of parameters, the program will now terminate. \n";
+ std::clog << "Wrong number of parameters, the program will now terminate. \n";
return 1;
}
Vector_distances_in_diagram l;