diff options
author | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-03-17 14:00:32 +0000 |
---|---|---|
committer | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-03-17 14:00:32 +0000 |
commit | 5b6290423812b24cc3f67a4a8e9c9027b9d95cd6 (patch) | |
tree | d673da130ac54998df1121c2f1f1327f2ef0aaab /src/Gudhi_stat/utilities | |
parent | a9e78e63472264dd2baaeac196a8a74692265e22 (diff) |
Adding a few corrections to gudhi_stat
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@2196 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: e5bbe287169cb6750aaadf81db65ef873186da06
Diffstat (limited to 'src/Gudhi_stat/utilities')
6 files changed, 16 insertions, 10 deletions
diff --git a/src/Gudhi_stat/utilities/CMakeLists.txt b/src/Gudhi_stat/utilities/CMakeLists.txt index 4b2f7081..b7989a96 100644 --- a/src/Gudhi_stat/utilities/CMakeLists.txt +++ b/src/Gudhi_stat/utilities/CMakeLists.txt @@ -140,5 +140,11 @@ target_link_libraries(Multiplicative_bootstrap ${Boost_SYSTEM_LIBRARY}) #add_executable ( compute_distance_between_vectors compute_distance_between_vectors.cpp ) #target_link_libraries(compute_distance_between_vectors ${Boost_SYSTEM_LIBRARY}) -add_executable ( sliding_window_embedding sliding_window_embedding.cpp ) -target_link_libraries(sliding_window_embedding ${Boost_SYSTEM_LIBRARY} ${TBB_LIBRARIES}) + +if(CGAL_FOUND) + add_executable ( sliding_window_embedding sliding_window_embedding.cpp ) + target_link_libraries(sliding_window_embedding ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY}) + if (TBB_FOUND) + target_link_libraries(sliding_window_embedding ${TBB_LIBRARIES}) + endif(TBB_FOUND) +endif(CGAL_FOUND) diff --git a/src/Gudhi_stat/utilities/Hausdorff_bootstrap.cpp b/src/Gudhi_stat/utilities/Hausdorff_bootstrap.cpp index a4eb73b8..78c75bd4 100644 --- a/src/Gudhi_stat/utilities/Hausdorff_bootstrap.cpp +++ b/src/Gudhi_stat/utilities/Hausdorff_bootstrap.cpp @@ -65,7 +65,7 @@ int main( int argc , char** argv ) //template < typename PointCloudCharacteristics , typename CharacteristicFunction , typename DistanceBetweenPointsCharacteristics > //In this case, the PointCloudCharacteristics is just a vector of numbers of points (in a order fixed on points vector). //CharacteristicFunction is just identity, transforming std::vector< size_t > to itself. - //DistanceBetweenPointsCharacteristics is the place were all happens. This class hace the information about the coordinates of the points, and allows to compute a Hausdorff distance between + //DistanceBetweenPointsCharacteristics is the place were all happens. This class have the information about the coordinates of the points, and allows to compute a Hausdorff distance between //the collection of all points, and the subsample. double result = bootstrap< std::vector< size_t > , //PointCloudCharacteristics diff --git a/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp b/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp index 1cf4de94..1b24771a 100644 --- a/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp +++ b/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp @@ -164,8 +164,7 @@ int main( int argc , char** argv ) std::cout << "Read : " << points.size() << " points.\n"; distance_between_landscapes distance( p );//L^p distance. - compute_persistence_landscape_of_a_point_cloud_in_certain_dimension characteristic_fun( points , dimension , threshold ); - + compute_persistence_landscape_of_a_point_cloud_in_certain_dimension characteristic_fun( points , dimension , threshold ); //and now we can run the real bootstrap. //template < typename PointCloudCharacteristics , typename CharacteristicFunction , typename DistanceBetweenPointsCharacteristics > diff --git a/src/Gudhi_stat/utilities/Multiplicative_bootstrap.cpp b/src/Gudhi_stat/utilities/Multiplicative_bootstrap.cpp index 9981d5c4..92020c21 100644 --- a/src/Gudhi_stat/utilities/Multiplicative_bootstrap.cpp +++ b/src/Gudhi_stat/utilities/Multiplicative_bootstrap.cpp @@ -51,7 +51,7 @@ int main( int argc , char** argv ) std::vector< Persistence_landscape* > collection_of_landscapes( filenames.size() ); for ( size_t i = 0 ; i != filenames.size() ; ++i ) { - std::vector< std::pair< double , double > > diag = read_standard_file( filenames[i].c_str() ); + std::vector< std::pair< double , double > > diag = read_gudhi_file( filenames[i].c_str() , 1 );//read_standard_file( filenames[i].c_str() ); collection_of_landscapes[i] = new Persistence_landscape( diag ); } @@ -61,7 +61,7 @@ int main( int argc , char** argv ) double result = multiplicative_bootstrap< Persistence_landscape , difference_of_objects<Persistence_landscape> , norm_of_objects<Persistence_landscape> > - ( collection_of_landscapes , number_of_repetitions_of_bootstrap , diff , norm , quantile ); + ( collection_of_landscapes , number_of_repetitions_of_bootstrap , diff , norm , quantile , 1 ); std::cout << "result of bootstrap : " << result << std::endl; return 0; diff --git a/src/Gudhi_stat/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp b/src/Gudhi_stat/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp index 631057af..cb094dff 100644 --- a/src/Gudhi_stat/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp +++ b/src/Gudhi_stat/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp @@ -34,9 +34,9 @@ using namespace Gudhi::Gudhi_stat; int main( int argc , char** argv ) { - std::cout << "This program compute dsitance of persistence landscapes stored in a file (the file needs to be created beforehand). \n"; - std::cout << "The first parameter of a program is an interger p. The program compute L^p distance of the two landscapes. For L^infty distance choose p = -1. \n"; - std::cout << "The remaining parameters of this programs are names of files with persistence landscapes.\n"; + std::cout << "This program compute dsitance of persistence heat maps stored in a file (the file needs to be created beforehand). \n"; + std::cout << "The first parameter of a program is an interger p. The program compute L^p distance of the two heat maps. For L^infty distance choose p = -1. \n"; + std::cout << "The remaining parameters of this programs are names of files with persistence heat maps.\n"; if ( argc < 3 ) { diff --git a/src/Gudhi_stat/utilities/sliding_window_embedding.cpp b/src/Gudhi_stat/utilities/sliding_window_embedding.cpp index 3df20125..1373b52c 100644 --- a/src/Gudhi_stat/utilities/sliding_window_embedding.cpp +++ b/src/Gudhi_stat/utilities/sliding_window_embedding.cpp @@ -32,6 +32,7 @@ int main( int argc , char** argv ) Sliding_window_embedding swe( time_series , 3 ); swe.create_point_cloud("pt_cloud"); + //persistent_cohomology::Persistent_cohomology<ST, Field_Zp >& a = swe.compute_persistence_of_Vietoris_Rips_complex( 1 , 2 ); |