summaryrefslogtreecommitdiff
path: root/src/Gudhi_stat/include/gudhi/concretizations/read_persitence_from_file.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Gudhi_stat/include/gudhi/concretizations/read_persitence_from_file.h')
-rw-r--r--src/Gudhi_stat/include/gudhi/concretizations/read_persitence_from_file.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/Gudhi_stat/include/gudhi/concretizations/read_persitence_from_file.h b/src/Gudhi_stat/include/gudhi/concretizations/read_persitence_from_file.h
index d2e6ec3c..03446289 100644
--- a/src/Gudhi_stat/include/gudhi/concretizations/read_persitence_from_file.h
+++ b/src/Gudhi_stat/include/gudhi/concretizations/read_persitence_from_file.h
@@ -4,7 +4,7 @@
*
* Author(s): Pawel Dlotko
*
- * Copyright (C) 2015 INRIA Sophia-Saclay (France)
+ * Copyright (C) 2015 INRIA (France)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -35,7 +35,12 @@ namespace Gudhi
namespace Gudhi_stat
{
-
+/**
+ * This method reads persistence from standalone file. The format of the file is as follows:
+ * In every line there are two numbers which denotes birth and death of a persistence interval. The file is not supposed to contains any nonwhite characters excet from digits. In particular symbols
+ * like 'inf' are not allowed.
+ * If begin of the interval is greater than the end of the interval, those two numbers are swapped.
+**/
std::vector< std::pair< double , double > > read_standard_file( const char* filename )
{
bool dbg = false;
@@ -78,6 +83,17 @@ std::vector< std::pair< double , double > > read_standard_file( const char* file
return barcode;
}//read_standard_file
+
+
+/**
+ * This procedure reads Gudhi style file. The format of a Gudhi style file is as follows:
+ * Each line consist of the following information:
+ * A prime number p indicating that the class is nontrivial over Z_p field.
+ * A positive numebr, being a dimension of a persistence class
+ * A birth and a death time of a class.
+ * Death time may be infitnity, in which case a string 'inf' is used.
+ * If begin of the interval is greater than the end of the interval, those two numbers are swapped.
+**/
std::vector< std::pair< double , double > > read_gudhi_file( const char* filename , size_t dimension = 0 )
{
bool dbg = false;