diff options
author | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-10-21 12:26:22 +0000 |
---|---|---|
committer | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-10-21 12:26:22 +0000 |
commit | 19451e20b6d47b6a84d5ad89d99497e0e60cd377 (patch) | |
tree | d10ab5934dd78ae943070ec131ad0241e360b892 /src/Gudhi_stat/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp | |
parent | 60ded8e74aaec4fa519162dd15276c072f2acb2e (diff) |
The library changed from inherritance to templates.
Are the files from include/abstract removed?
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@1741 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 6f768b08a7a900a56278adcf371a31840916d3ba
Diffstat (limited to 'src/Gudhi_stat/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp')
-rw-r--r-- | src/Gudhi_stat/utilities/persistence_heat_maps/compute_distance_of_persistence_heat_maps.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
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 e462f009..bfe2a7ab 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 @@ -21,8 +21,6 @@ */ - -#include <gudhi/abstract_classes/Abs_Topological_data.h> #include <gudhi/concretizations/Persistence_heat_maps.h> @@ -53,13 +51,13 @@ int main( int argc , char** argv ) { filenames.push_back( argv[i] ); } - std::vector< Abs_Topological_data_with_distances* > maps; + std::vector< Persistence_heat_maps > maps; maps.reserve( filenames.size() ); for ( size_t file_no = 0 ; file_no != filenames.size() ; ++file_no ) { - Persistence_heat_maps* l = new Persistence_heat_maps; - l->load_from_file( filenames[file_no] ); - maps.push_back( (Abs_Topological_data_with_distances*)l ); + Persistence_heat_maps l; + l.load_from_file( filenames[file_no] ); + maps.push_back( l ); } //and now we will compute the scalar product of landscapes. @@ -77,7 +75,7 @@ int main( int argc , char** argv ) { for ( size_t j = i ; j != filenames.size() ; ++j ) { - distance[i][j] = distance[j][i] = ((Persistence_heat_maps*)maps[i])->distance( maps[j] , p ) ; + distance[i][j] = distance[j][i] = maps[i].distance( maps[j] , p ) ; } } |