diff options
author | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-12-09 14:55:03 +0000 |
---|---|---|
committer | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-12-09 14:55:03 +0000 |
commit | b7b23c26b855b83d03870cfd90b001fa2dedfd86 (patch) | |
tree | df1989bb5a51ca6e68e5932a943be11aaa568ce3 /src/Gudhi_stat/utilities/persistence_vectors | |
parent | 28fd0e09e42425b12929990542f739f8334c13f0 (diff) |
Fix to Marc's comments.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@1841 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: c5be190621dcbb43433c027c78e782916cc6ae93
Diffstat (limited to 'src/Gudhi_stat/utilities/persistence_vectors')
2 files changed, 15 insertions, 9 deletions
diff --git a/src/Gudhi_stat/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp b/src/Gudhi_stat/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp index 7b7faef0..2ca5989e 100644 --- a/src/Gudhi_stat/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp +++ b/src/Gudhi_stat/utilities/persistence_vectors/compute_distance_of_persistence_vectors.cpp @@ -43,7 +43,13 @@ int main( int argc , char** argv ) return 1; } - int p = atoi( argv[1] ); + int pp = atoi( argv[1] ); + double p = std::numeric_limits<double>::max(); + if ( pp != -1 ) + { + p = pp; + } + std::vector< const char* > filenames; for ( int i = 2 ; i < argc ; ++i ) @@ -80,17 +86,17 @@ int main( int argc , char** argv ) } //and now output the result to the screen and a file: - ofstream out; + std::ofstream out; out.open( "distance" ); for ( size_t i = 0 ; i != distance.size() ; ++i ) { for ( size_t j = 0 ; j != distance.size() ; ++j ) { - cout << distance[i][j] << " "; + std::cout << distance[i][j] << " "; out << distance[i][j] << " "; } - cout << endl; - out << endl; + std::cout << std::endl; + out << std::endl; } out.close(); diff --git a/src/Gudhi_stat/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp b/src/Gudhi_stat/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp index 74172712..78c6ab91 100644 --- a/src/Gudhi_stat/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp +++ b/src/Gudhi_stat/utilities/persistence_vectors/compute_scalar_product_of_persistence_vectors.cpp @@ -70,17 +70,17 @@ int main( int argc , char** argv ) } //and now output the result to the screen and a file: - ofstream out; + std::ofstream out; out.open( "scalar_product" ); for ( size_t i = 0 ; i != scalar_product.size() ; ++i ) { for ( size_t j = 0 ; j != scalar_product.size() ; ++j ) { - cout << scalar_product[i][j] << " "; + std::cout << scalar_product[i][j] << " "; out << scalar_product[i][j] << " "; } - cout << endl; - out << endl; + std::cout << std::endl; + out << std::endl; } out.close(); return 0; |