diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2020-05-13 23:19:35 +0200 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2020-05-13 23:19:35 +0200 |
commit | 4220ee79bf32aed1c8ee3bb9b04dea3888b74d2d (patch) | |
tree | c62ac12c03693d3a8f3abf6e8f7b00c7be0e55ea /src/Rips_complex/utilities/rips_persistence.cpp | |
parent | 8ba3ca48e03e379fca0a0b68a508d8357a367f52 (diff) | |
parent | 1efd71c502bacce375e1950e10a8112208acd0cf (diff) |
Merge remote-tracking branch 'origin/master' into tomato2
Diffstat (limited to 'src/Rips_complex/utilities/rips_persistence.cpp')
-rw-r--r-- | src/Rips_complex/utilities/rips_persistence.cpp | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/src/Rips_complex/utilities/rips_persistence.cpp b/src/Rips_complex/utilities/rips_persistence.cpp index daa7e1db..9d7490b3 100644 --- a/src/Rips_complex/utilities/rips_persistence.cpp +++ b/src/Rips_complex/utilities/rips_persistence.cpp @@ -49,11 +49,8 @@ int main(int argc, char* argv[]) { Simplex_tree simplex_tree; rips_complex_from_file.create_complex(simplex_tree, dim_max); - std::cout << "The complex contains " << simplex_tree.num_simplices() << " simplices \n"; - std::cout << " and has dimension " << simplex_tree.dimension() << " \n"; - - // Sort the simplices in the order of the filtration - simplex_tree.initialize_filtration(); + std::clog << "The complex contains " << simplex_tree.num_simplices() << " simplices \n"; + std::clog << " and has dimension " << simplex_tree.dimension() << " \n"; // Compute the persistence diagram of the complex Persistent_cohomology pcoh(simplex_tree); @@ -84,7 +81,7 @@ void program_options(int argc, char* argv[], std::string& off_file_points, std:: po::options_description visible("Allowed options", 100); visible.add_options()("help,h", "produce help message")( "output-file,o", po::value<std::string>(&filediag)->default_value(std::string()), - "Name of file in which the persistence diagram is written. Default print in std::cout")( + "Name of file in which the persistence diagram is written. Default print in std::clog")( "max-edge-length,r", po::value<Filtration_value>(&threshold)->default_value(std::numeric_limits<Filtration_value>::infinity()), "Maximal length of an edge for the Rips complex construction.")( @@ -107,17 +104,17 @@ void program_options(int argc, char* argv[], std::string& off_file_points, std:: po::notify(vm); if (vm.count("help") || !vm.count("input-file")) { - std::cout << std::endl; - std::cout << "Compute the persistent homology with coefficient field Z/pZ \n"; - std::cout << "of a Rips complex defined on a set of input points.\n \n"; - std::cout << "The output diagram contains one bar per line, written with the convention: \n"; - std::cout << " p dim b d \n"; - std::cout << "where dim is the dimension of the homological feature,\n"; - std::cout << "b and d are respectively the birth and death of the feature and \n"; - std::cout << "p is the characteristic of the field Z/pZ used for homology coefficients." << std::endl << std::endl; - - std::cout << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl; - std::cout << visible << std::endl; + std::clog << std::endl; + std::clog << "Compute the persistent homology with coefficient field Z/pZ \n"; + std::clog << "of a Rips complex defined on a set of input points.\n \n"; + std::clog << "The output diagram contains one bar per line, written with the convention: \n"; + std::clog << " p dim b d \n"; + std::clog << "where dim is the dimension of the homological feature,\n"; + std::clog << "b and d are respectively the birth and death of the feature and \n"; + std::clog << "p is the characteristic of the field Z/pZ used for homology coefficients." << std::endl << std::endl; + + std::clog << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl; + std::clog << visible << std::endl; exit(-1); } } |