diff options
author | skachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-04-02 12:38:30 +0000 |
---|---|---|
committer | skachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-04-02 12:38:30 +0000 |
commit | 35c75c5d30236dd29ad8e4d4f12de8223e73b58e (patch) | |
tree | e5a55fffe8cc8cf9977fd31b12dcf6a06db6c387 /src/Witness_complex/example/witness_complex_from_file.cpp | |
parent | b76ee21ac17dbfc630bb16d66fec4b1c2ee4013a (diff) |
Added also changes in the cpp file
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/witness@539 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: e32f574c7cf93f67de3d08b43f9c6de5a4a8396d
Diffstat (limited to 'src/Witness_complex/example/witness_complex_from_file.cpp')
-rw-r--r-- | src/Witness_complex/example/witness_complex_from_file.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Witness_complex/example/witness_complex_from_file.cpp b/src/Witness_complex/example/witness_complex_from_file.cpp index e2a80e92..cec1d1b8 100644 --- a/src/Witness_complex/example/witness_complex_from_file.cpp +++ b/src/Witness_complex/example/witness_complex_from_file.cpp @@ -23,6 +23,9 @@ #include <iostream> #include <fstream> #include <ctime> + +//#include <stdlib.h> + //#include "gudhi/graph_simplicial_complex.h" #include "gudhi/Witness_complex.h" @@ -86,5 +89,13 @@ int main (int argc, char * const argv[]) end = clock(); std::cout << "Howdy world! The process took " << (double)(end-start)/CLOCKS_PER_SEC << " s. \n"; - + char buffer[100]; + int i = sprintf(buffer,"%s_%s_result.txt",argv[1],argv[2]); + if (i >= 0) + { + std::string out_file = (std::string)buffer; + std::ofstream ofs (out_file, std::ofstream::out); + witnessComplex.st_to_file(ofs); + ofs.close(); + } } |