summaryrefslogtreecommitdiff
path: root/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp
diff options
context:
space:
mode:
authorpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-04-12 13:07:58 +0000
committerpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-04-12 13:07:58 +0000
commit8f4c961a93fe928d06c7776a9e8f5ecd00fab9ca (patch)
tree0222aa7a5db950b15e7b1adf9f75cec2204c55fa /src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp
parente729d07cc53e4b6a189ebbfbfe4eb5db5449fbe0 (diff)
a few more correction. First of all, bottleneck distance is added (although there is something strange in the results, FG has been pinged about this). Second of all, all the programs in utylites should now read general files (and dimension of persistence to be read is one of the parameteds of files). This still need to be tested and will be tested soon.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@2339 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e60d14f07db223646597230d7f0bd78dd090bc0b
Diffstat (limited to 'src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp')
-rw-r--r--src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp b/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp
index bc466bd3..4315abb9 100644
--- a/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp
+++ b/src/Gudhi_stat/utilities/persistence_intervals/plot_persistence_intervals.cpp
@@ -42,9 +42,23 @@ int main( int argc , char** argv )
if ( argc != 2 )
{
std::cout << "To run this program, please provide the name of a file with persistence diagram \n";
+ std::cout << "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";
return 1;
}
- std::vector< std::pair< double , double > > intervals = read_gudhi_persistence_file_in_one_dimension( argv[1] , 2 );
+ unsigned dimension = std::numeric_limits<unsigned>::max();
+ int dim = -1;
+ if ( argc > 2 )
+ {
+ dim = atoi( argv[2] );
+ }
+ if ( (dim != -1) && (dim >= 0) )
+ {
+ dimension = (unsigned)dim;
+ }
+
+
+
+ std::vector< std::pair< double , double > > intervals = read_persistence_intervals_in_one_dimension_from_file( argv[1] , dimension );
Persistence_intervals b( intervals );
b.plot( argv[1] );
return 0;