summaryrefslogtreecommitdiff
path: root/src/Gudhi_stat/utilities
diff options
context:
space:
mode:
Diffstat (limited to 'src/Gudhi_stat/utilities')
-rw-r--r--src/Gudhi_stat/utilities/persistence_heat_maps/CMakeLists.txt34
-rw-r--r--src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp6
-rw-r--r--src/Gudhi_stat/utilities/persistence_heat_maps/create_pssk.cpp1
-rw-r--r--src/Gudhi_stat/utilities/persistence_heat_maps/simple_diagram.txt.mps11
-rw-r--r--src/Gudhi_stat/utilities/persistence_intervals/CMakeLists.txt7
-rw-r--r--src/Gudhi_stat/utilities/persistence_intervals/compute_bottleneck_distance.cpp4
-rw-r--r--src/Gudhi_stat/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp2
-rw-r--r--src/Gudhi_stat/utilities/persistence_landscapes/CMakeLists.txt11
-rw-r--r--src/Gudhi_stat/utilities/persistence_landscapes/simple_diagram.txt.land13
-rw-r--r--src/Gudhi_stat/utilities/persistence_landscapes_on_grid/CMakeLists.txt11
-rw-r--r--src/Gudhi_stat/utilities/persistence_landscapes_on_grid/simple_diagram.txt.g_land104
-rw-r--r--src/Gudhi_stat/utilities/persistence_vectors/CMakeLists.txt11
-rw-r--r--src/Gudhi_stat/utilities/persistence_vectors/simple_diagram.txt.vect1
-rw-r--r--src/Gudhi_stat/utilities/sliding_window_embedding.cpp1
14 files changed, 187 insertions, 30 deletions
diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/CMakeLists.txt b/src/Gudhi_stat/utilities/persistence_heat_maps/CMakeLists.txt
index 39240db2..07903dda 100644
--- a/src/Gudhi_stat/utilities/persistence_heat_maps/CMakeLists.txt
+++ b/src/Gudhi_stat/utilities/persistence_heat_maps/CMakeLists.txt
@@ -2,30 +2,40 @@ cmake_minimum_required(VERSION 2.6)
project(GUDHI_STAT)
#persitence heat maps
-add_executable ( average_persistence_heat_maps average_persistence_heat_maps.cpp )
-target_link_libraries(average_persistence_heat_maps ${Boost_SYSTEM_LIBRARY})
add_executable ( create_persistence_heat_maps create_persistence_heat_maps.cpp )
target_link_libraries(create_persistence_heat_maps ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( plot_persistence_heat_map plot_persistence_heat_map.cpp )
-target_link_libraries(plot_persistence_heat_map ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( compute_distance_of_persistence_heat_maps compute_distance_of_persistence_heat_maps.cpp )
-target_link_libraries(compute_distance_of_persistence_heat_maps ${Boost_SYSTEM_LIBRARY})
-
-add_executable ( compute_scalar_product_of_persistence_heat_maps compute_scalar_product_of_persistence_heat_maps.cpp )
-target_link_libraries(compute_scalar_product_of_persistence_heat_maps ${Boost_SYSTEM_LIBRARY})
+add_test ( create_persistence_heat_maps ${CMAKE_CURRENT_BINARY_DIR}/create_persistence_heat_maps 10 -1 -1 4 -1 ../../example/simple_diagram.txt )
add_executable ( create_pssk create_pssk.cpp )
target_link_libraries(create_pssk ${Boost_SYSTEM_LIBRARY})
+add_test ( create_pssk ${CMAKE_CURRENT_BINARY_DIR}/create_pssk 10 -1 -1 4 -1 ../../example/simple_diagram.txt )
-add_executable ( create_persistence_heat_maps_weighted_by_distance_from_diagonal create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp )
+add_executable ( create_persistence_heat_maps_weighted_by_distance_from_diagonal create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp )
target_link_libraries(create_persistence_heat_maps_weighted_by_distance_from_diagonal ${Boost_SYSTEM_LIBRARY})
+add_test ( create_persistence_heat_maps_weighted_by_distance_from_diagonal ${CMAKE_CURRENT_BINARY_DIR}/create_persistence_heat_maps_weighted_by_distance_from_diagonal 10 -1 -1 4 -1 ../../example/simple_diagram.txt )
add_executable ( create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal.cpp )
target_link_libraries(create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal ${Boost_SYSTEM_LIBRARY})
+add_test ( create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal ${CMAKE_CURRENT_BINARY_DIR}/create_persistence_heat_maps_weighted_by_squared_distance_from_diagonal 10 -1 -1 4 -1 ../../example/simple_diagram.txt )
add_executable ( create_persistence_heat_maps_weighted_by_arctan_of_their_persistence create_persistence_heat_maps_weighted_by_arctan_of_their_persistence.cpp )
target_link_libraries(create_persistence_heat_maps_weighted_by_arctan_of_their_persistence ${Boost_SYSTEM_LIBRARY})
+add_test ( create_persistence_heat_maps_weighted_by_arctan_of_their_persistence ${CMAKE_CURRENT_BINARY_DIR}/create_persistence_heat_maps_weighted_by_arctan_of_their_persistence 10 -1 -1 4 -1 ../../example/simple_diagram.txt )
+
+add_executable ( average_persistence_heat_maps average_persistence_heat_maps.cpp )
+target_link_libraries(average_persistence_heat_maps ${Boost_SYSTEM_LIBRARY})
+add_test ( average_persistence_heat_maps ${CMAKE_CURRENT_BINARY_DIR}/average_persistence_heat_maps simple_diagram.txt.mps simple_diagram.txt.mps )
+
+add_executable ( plot_persistence_heat_map plot_persistence_heat_map.cpp )
+target_link_libraries(plot_persistence_heat_map ${Boost_SYSTEM_LIBRARY})
+add_test ( plot_persistence_heat_map ${CMAKE_CURRENT_BINARY_DIR}/plot_persistence_heat_map simple_diagram.txt.mps )
+
+add_executable ( compute_distance_of_persistence_heat_maps compute_distance_of_persistence_heat_maps.cpp )
+target_link_libraries(compute_distance_of_persistence_heat_maps ${Boost_SYSTEM_LIBRARY})
+add_test ( compute_distance_of_persistence_heat_maps ${CMAKE_CURRENT_BINARY_DIR}/compute_distance_of_persistence_heat_maps 1 simple_diagram.txt.mps simple_diagram.txt.mps )
+
+add_executable ( compute_scalar_product_of_persistence_heat_maps compute_scalar_product_of_persistence_heat_maps.cpp )
+target_link_libraries(compute_scalar_product_of_persistence_heat_maps ${Boost_SYSTEM_LIBRARY})
+add_test ( compute_scalar_product_of_persistence_heat_maps ${CMAKE_CURRENT_BINARY_DIR}/compute_scalar_product_of_persistence_heat_maps simple_diagram.txt.mps simple_diagram.txt.mps )
diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp
index ecef449a..351cfd6f 100644
--- a/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp
+++ b/src/Gudhi_stat/utilities/persistence_heat_maps/create_persistence_heat_maps_weighted_by_distance_from_diagonal.cpp
@@ -62,8 +62,10 @@ int main( int argc , char** argv )
dimension = (unsigned)dim;
}
+ //std::cout << "Parameters of the program : size_of_grid : " << size_of_grid << ", min_ : " << min_ << ", max_ : " << max_ << ", stdiv: " << stdiv << ", dim : " << dim << std::endl;
+
std::vector< const char* > filenames;
- for ( int i = 6 ; i < argc ; ++i )
+ for ( int i = 6 ; i != argc ; ++i )
{
filenames.push_back( argv[i] );
}
@@ -76,7 +78,7 @@ int main( int argc , char** argv )
for ( size_t i = 0 ; i != filenames.size() ; ++i )
{
std::cout << "Creating a heat map based on a file : " << filenames[i] << std::endl;
- Persistence_heat_maps<distance_from_diagonal_scaling> l( filenames[i] , filter , size_of_grid , min_ , max_ , dimension );
+ Persistence_heat_maps<distance_from_diagonal_scaling> l( filenames[i] , filter , false , size_of_grid , min_ , max_ , dimension );
std::stringstream ss;
ss << filenames[i] << ".mps";
diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/create_pssk.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/create_pssk.cpp
index 78989ccc..dfab5cdb 100644
--- a/src/Gudhi_stat/utilities/persistence_heat_maps/create_pssk.cpp
+++ b/src/Gudhi_stat/utilities/persistence_heat_maps/create_pssk.cpp
@@ -38,7 +38,6 @@ int main( int argc , char** argv )
std::cout << "The first parameter of a program is an integer, a size of a grid.\n";
std::cout << "The second and third parameters are min and max of the grid. If you want those numbers to be computed based on the data, set them both to -1 \n";
std::cerr << "The fourth parameter is an integer, the standard deviation of a gaussian kernel expressed in a number of pixels \n";
- std::cerr << "The fourth parameter is an integer, the standard deviation of a gaussian kernel expressed in a number of pixels \n";
std::cout << "The fifth parameter of this program is a dimension of persistence that will be used in creation of the persistence heat maps.";
std::cout << "If our input files contain persistence pairs of various dimension, as a fifth parameter of the procedure please provide the dimension of persistence you want to use.";
std::cout << "If in your file there are only birth-death pairs of the same dimension, set the first parameter to -1." << std::endl;
diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/simple_diagram.txt.mps b/src/Gudhi_stat/utilities/persistence_heat_maps/simple_diagram.txt.mps
new file mode 100644
index 00000000..b7643887
--- /dev/null
+++ b/src/Gudhi_stat/utilities/persistence_heat_maps/simple_diagram.txt.mps
@@ -0,0 +1,11 @@
+0.93 8.0707
+0.0492104 0.03889 0.0190956 0.00603584 0.00131569 0.000120934 2.10152e-05 0 0 0
+0.0650745 0.0539306 0.0296488 0.011745 0.00357642 0.000695928 0.000120934 0 0 0
+0.0572665 0.0559446 0.0409942 0.0230905 0.00937173 0.00242903 0.000422102 0 0 0
+0.0409942 0.0559656 0.0573874 0.0408475 0.0192639 0.00628964 0.00178718 0.000422102 0.000120934 2.10152e-05
+0.0296488 0.0540515 0.0657704 0.0519133 0.0283092 0.0132056 0.00628964 0.00242903 0.000695928 0.000120934
+0.0190956 0.0393121 0.0516395 0.0465955 0.0359385 0.0283092 0.0192639 0.00937173 0.00357642 0.00131569
+0.00847814 0.0188418 0.0281882 0.0358964 0.0465955 0.0519133 0.0408475 0.0230905 0.011745 0.00603584
+0.00242903 0.00628964 0.0132056 0.0281882 0.0516395 0.0657704 0.0573874 0.0409942 0.0296488 0.0190956
+0.000422102 0.00178718 0.00628964 0.0188418 0.0393121 0.0540515 0.0559656 0.0559446 0.0539306 0.03889
+0 0.000422102 0.00242903 0.00847814 0.0190956 0.0296488 0.0409942 0.0572665 0.0650745 0.0492104
diff --git a/src/Gudhi_stat/utilities/persistence_intervals/CMakeLists.txt b/src/Gudhi_stat/utilities/persistence_intervals/CMakeLists.txt
index 9420a8ea..a317bd67 100644
--- a/src/Gudhi_stat/utilities/persistence_intervals/CMakeLists.txt
+++ b/src/Gudhi_stat/utilities/persistence_intervals/CMakeLists.txt
@@ -4,18 +4,23 @@ project(GUDHI_STAT)
#persitence diagrams
add_executable ( plot_persistence_intervals plot_persistence_intervals.cpp )
target_link_libraries( plot_persistence_intervals ${Boost_SYSTEM_LIBRARY})
+add_test ( plot_persistence_intervals ${CMAKE_CURRENT_BINARY_DIR}/plot_persistence_intervals ../../example/simple_diagram.txt )
add_executable ( compute_birth_death_range_in_persistence_diagram compute_birth_death_range_in_persistence_diagram.cpp )
target_link_libraries( compute_birth_death_range_in_persistence_diagram ${Boost_SYSTEM_LIBRARY})
+add_test ( compute_birth_death_range_in_persistence_diagram ${CMAKE_CURRENT_BINARY_DIR}/compute_birth_death_range_in_persistence_diagram -1 ../../example/simple_diagram.txt )
add_executable ( compute_number_of_dominant_intervals compute_number_of_dominant_intervals.cpp )
target_link_libraries( compute_number_of_dominant_intervals ${Boost_SYSTEM_LIBRARY})
+add_test ( compute_number_of_dominant_intervals ${CMAKE_CURRENT_BINARY_DIR}/compute_number_of_dominant_intervals ../../example/simple_diagram.txt -1 2 )
add_executable ( plot_histogram_of_intervals_lengths plot_histogram_of_intervals_lengths.cpp )
target_link_libraries( plot_histogram_of_intervals_lengths ${Boost_SYSTEM_LIBRARY})
+add_test ( plot_histogram_of_intervals_lengths ${CMAKE_CURRENT_BINARY_DIR}/plot_histogram_of_intervals_lengths ../../example/simple_diagram.txt 2 )
add_executable ( plot_persistence_Betti_numbers plot_persistence_Betti_numbers.cpp )
target_link_libraries( plot_persistence_Betti_numbers ${Boost_SYSTEM_LIBRARY})
+add_test ( plot_persistence_Betti_numbers ${CMAKE_CURRENT_BINARY_DIR}/plot_persistence_Betti_numbers ../../example/simple_diagram.txt )
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
add_executable ( compute_bottleneck_distance compute_bottleneck_distance.cpp )
@@ -23,5 +28,5 @@ target_link_libraries( compute_bottleneck_distance ${Boost_SYSTEM_LIBRARY})
if (TBB_FOUND)
target_link_libraries(compute_bottleneck_distance ${TBB_LIBRARIES})
endif(TBB_FOUND)
-
+add_test ( compute_bottleneck_distance ${CMAKE_CURRENT_BINARY_DIR}/compute_bottleneck_distance ../../example/simple_diagram.txt ../../example/simple_diagram.txt )
endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
diff --git a/src/Gudhi_stat/utilities/persistence_intervals/compute_bottleneck_distance.cpp b/src/Gudhi_stat/utilities/persistence_intervals/compute_bottleneck_distance.cpp
index d8b533cf..43929695 100644
--- a/src/Gudhi_stat/utilities/persistence_intervals/compute_bottleneck_distance.cpp
+++ b/src/Gudhi_stat/utilities/persistence_intervals/compute_bottleneck_distance.cpp
@@ -64,9 +64,7 @@ int main( int argc , char** argv )
std::vector< Persistence_intervals_with_distances > persistence_intervals;
for ( size_t i = 0 ; i != filenames.size() ; ++i )
{
- Persistence_intervals_with_distances pers(filenames[i] , dimension );
- std::cerr << "perss : " << pers << std::endl;
- getchar();
+ Persistence_intervals_with_distances pers(filenames[i] , dimension );
persistence_intervals.push_back( pers );
}
diff --git a/src/Gudhi_stat/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp b/src/Gudhi_stat/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp
index acfb0eed..994c6913 100644
--- a/src/Gudhi_stat/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp
+++ b/src/Gudhi_stat/utilities/persistence_intervals/plot_histogram_of_intervals_lengths.cpp
@@ -39,7 +39,7 @@ int main( int argc , char** argv )
if ( argc != 3 )
{
std::cout << "To run this program, please provide the name of a file with persistence diagram and number of dominant intervals you would like to get \n";
- std::cout << "The second 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";
+ std::cout << "The third 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";
return 1;
}
unsigned dimension = std::numeric_limits<unsigned>::max();
diff --git a/src/Gudhi_stat/utilities/persistence_landscapes/CMakeLists.txt b/src/Gudhi_stat/utilities/persistence_landscapes/CMakeLists.txt
index 9caf73f6..9eda94a2 100644
--- a/src/Gudhi_stat/utilities/persistence_landscapes/CMakeLists.txt
+++ b/src/Gudhi_stat/utilities/persistence_landscapes/CMakeLists.txt
@@ -4,18 +4,23 @@ project(GUDHI_STAT)
#persitence landscapes
-add_executable ( average_landscapes average_landscapes.cpp )
-target_link_libraries(average_landscapes ${Boost_SYSTEM_LIBRARY})
-
add_executable ( create_landscapes create_landscapes.cpp )
target_link_libraries(create_landscapes ${Boost_SYSTEM_LIBRARY})
+add_test ( create_landscapes ${CMAKE_CURRENT_BINARY_DIR}/create_landscapes -1 ../../example/simple_diagram.txt )
+
+add_executable ( average_landscapes average_landscapes.cpp )
+target_link_libraries(average_landscapes ${Boost_SYSTEM_LIBRARY})
+add_test ( average_landscapes ${CMAKE_CURRENT_BINARY_DIR}/average_landscapes simple_diagram.txt.land simple_diagram.txt.land simple_diagram.txt.land )
add_executable ( plot_landscapes plot_landscapes.cpp )
target_link_libraries(plot_landscapes ${Boost_SYSTEM_LIBRARY})
+add_test ( plot_landscapes ${CMAKE_CURRENT_BINARY_DIR}/plot_landscapes simple_diagram.txt.land )
add_executable ( compute_distance_of_landscapes compute_distance_of_landscapes.cpp )
target_link_libraries(compute_distance_of_landscapes ${Boost_SYSTEM_LIBRARY})
+add_test ( compute_distance_of_landscapes ${CMAKE_CURRENT_BINARY_DIR}/compute_distance_of_landscapes 1 simple_diagram.txt.land simple_diagram.txt.land )
add_executable ( compute_scalar_product_of_landscapes compute_scalar_product_of_landscapes.cpp )
target_link_libraries(compute_scalar_product_of_landscapes ${Boost_SYSTEM_LIBRARY})
+add_test ( compute_scalar_product_of_landscapes ${CMAKE_CURRENT_BINARY_DIR}/compute_scalar_product_of_landscapes simple_diagram.txt.land simple_diagram.txt.land )
diff --git a/src/Gudhi_stat/utilities/persistence_landscapes/simple_diagram.txt.land b/src/Gudhi_stat/utilities/persistence_landscapes/simple_diagram.txt.land
new file mode 100644
index 00000000..b99d2f62
--- /dev/null
+++ b/src/Gudhi_stat/utilities/persistence_landscapes/simple_diagram.txt.land
@@ -0,0 +1,13 @@
+#lambda_0
+1 0
+1.5 0.5
+2 0
+3 0
+3.5 0.5
+4 0
+5 0
+5.5 0.5
+6 0
+7 0
+7.5 0.5
+8 0
diff --git a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/CMakeLists.txt b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/CMakeLists.txt
index bb7c3987..639b3d3d 100644
--- a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/CMakeLists.txt
+++ b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/CMakeLists.txt
@@ -5,18 +5,23 @@ project(GUDHI_STAT)
#persitence landscapes on a grid
-add_executable ( average_landscapes_on_grid average_landscapes_on_grid.cpp )
-target_link_libraries(average_landscapes_on_grid ${Boost_SYSTEM_LIBRARY})
-
add_executable ( create_landscapes_on_grid create_landscapes_on_grid.cpp )
target_link_libraries(create_landscapes_on_grid ${Boost_SYSTEM_LIBRARY})
+add_test ( create_landscapes_on_grid ${CMAKE_CURRENT_BINARY_DIR}/create_landscapes_on_grid 100 -1 -1 -1 ../../example/simple_diagram.txt )
+
+add_executable ( average_landscapes_on_grid average_landscapes_on_grid.cpp )
+target_link_libraries(average_landscapes_on_grid ${Boost_SYSTEM_LIBRARY})
+add_test ( average_landscapes_on_grid ${CMAKE_CURRENT_BINARY_DIR}/average_landscapes_on_grid simple_diagram.txt.g_land simple_diagram.txt.g_land )
add_executable ( plot_landscapes_on_grid plot_landscapes_on_grid.cpp )
target_link_libraries(plot_landscapes_on_grid ${Boost_SYSTEM_LIBRARY})
+add_test ( plot_landscapes_on_grid ${CMAKE_CURRENT_BINARY_DIR}/plot_landscapes_on_grid simple_diagram.txt.g_land simple_diagram.txt.g_land )
add_executable ( compute_distance_of_landscapes_on_grid compute_distance_of_landscapes_on_grid.cpp )
target_link_libraries(compute_distance_of_landscapes_on_grid ${Boost_SYSTEM_LIBRARY})
+add_test ( compute_distance_of_landscapes_on_grids ${CMAKE_CURRENT_BINARY_DIR}/compute_distance_of_landscapes_on_grid simple_diagram.txt.g_land simple_diagram.txt.g_land )
add_executable ( compute_scalar_product_of_landscapes_on_grid compute_scalar_product_of_landscapes_on_grid.cpp )
target_link_libraries(compute_scalar_product_of_landscapes_on_grid ${Boost_SYSTEM_LIBRARY})
+add_test ( compute_scalar_product_of_landscapes_on_grid ${CMAKE_CURRENT_BINARY_DIR}/compute_scalar_product_of_landscapes_on_grid simple_diagram.txt.g_land simple_diagram.txt.g_land )
diff --git a/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/simple_diagram.txt.g_land b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/simple_diagram.txt.g_land
new file mode 100644
index 00000000..dc53b932
--- /dev/null
+++ b/src/Gudhi_stat/utilities/persistence_landscapes_on_grid/simple_diagram.txt.g_land
@@ -0,0 +1,104 @@
+1
+8
+101
+
+0.07
+0.14
+0.21
+0.28
+0.35
+0.42
+0.49
+0.42
+0.35
+0.28
+0.21
+0.14
+0.07
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.07
+0.14
+0.21
+0.28
+0.35
+0.42
+0.49
+0.42
+0.35
+0.28
+0.21
+0.14
+0.07
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.07
+0.14
+0.21
+0.28
+0.35
+0.42
+0.49
+0.42
+0.35
+0.28
+0.21
+0.14
+0.07
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.07
+0.14
+0.21
+0.28
+0.35
+0.42
+0.49
+0.42
+0.35
+0.28
+0.21
+0.14
+0.07
+
+
diff --git a/src/Gudhi_stat/utilities/persistence_vectors/CMakeLists.txt b/src/Gudhi_stat/utilities/persistence_vectors/CMakeLists.txt
index ebf4898e..25742c2e 100644
--- a/src/Gudhi_stat/utilities/persistence_vectors/CMakeLists.txt
+++ b/src/Gudhi_stat/utilities/persistence_vectors/CMakeLists.txt
@@ -2,19 +2,24 @@ cmake_minimum_required(VERSION 2.6)
project(GUDHI_STAT)
#persitence vectors
-add_executable ( average_persistence_vectors average_persistence_vectors.cpp )
-target_link_libraries(average_persistence_vectors ${Boost_SYSTEM_LIBRARY})
-
add_executable ( create_persistence_vectors create_persistence_vectors.cpp )
target_link_libraries(create_persistence_vectors ${Boost_SYSTEM_LIBRARY})
+add_test ( create_persistence_vectors ${CMAKE_CURRENT_BINARY_DIR}/create_persistence_vectors -1 ../../example/simple_diagram.txt )
+
+add_executable ( average_persistence_vectors average_persistence_vectors.cpp )
+target_link_libraries(average_persistence_vectors ${Boost_SYSTEM_LIBRARY})
+add_test ( average_persistence_vectors ${CMAKE_CURRENT_BINARY_DIR}/average_persistence_vectors simple_diagram.txt.vect simple_diagram.txt.vect )
add_executable ( compute_distance_of_persistence_vectors compute_distance_of_persistence_vectors.cpp )
target_link_libraries(compute_distance_of_persistence_vectors ${Boost_SYSTEM_LIBRARY})
+add_test ( compute_distance_of_persistence_vectors ${CMAKE_CURRENT_BINARY_DIR}/compute_distance_of_persistence_vectors -1 simple_diagram.txt.vect simple_diagram.txt.vect )
add_executable ( compute_scalar_product_of_persistence_vectors compute_scalar_product_of_persistence_vectors.cpp )
target_link_libraries(compute_scalar_product_of_persistence_vectors ${Boost_SYSTEM_LIBRARY})
+add_test ( compute_scalar_product_of_persistence_vectors ${CMAKE_CURRENT_BINARY_DIR}/compute_scalar_product_of_persistence_vectors simple_diagram.txt.vect simple_diagram.txt.vect )
add_executable ( plot_persistence_vectors plot_persistence_vectors.cpp )
target_link_libraries(plot_persistence_vectors ${Boost_SYSTEM_LIBRARY})
+add_test ( plot_persistence_vectors ${CMAKE_CURRENT_BINARY_DIR}/plot_persistence_vectors simple_diagram.txt.vect )
diff --git a/src/Gudhi_stat/utilities/persistence_vectors/simple_diagram.txt.vect b/src/Gudhi_stat/utilities/persistence_vectors/simple_diagram.txt.vect
new file mode 100644
index 00000000..1d4eeaaf
--- /dev/null
+++ b/src/Gudhi_stat/utilities/persistence_vectors/simple_diagram.txt.vect
@@ -0,0 +1 @@
+0.707107 0.707107 0.707107 0.707107 0.707107 0.707107 0.707107 0.707107 0.707107 0.707107 \ No newline at end of file
diff --git a/src/Gudhi_stat/utilities/sliding_window_embedding.cpp b/src/Gudhi_stat/utilities/sliding_window_embedding.cpp
index 1373b52c..84e8f827 100644
--- a/src/Gudhi_stat/utilities/sliding_window_embedding.cpp
+++ b/src/Gudhi_stat/utilities/sliding_window_embedding.cpp
@@ -5,7 +5,6 @@
#include <sstream>
#include <cstdlib>
#include <sys/stat.h>
-#include <unistd.h>
#include <string>
#include <gudhi/time_series_analysis/sliding_window.h>