diff options
author | skachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-09-28 12:33:22 +0000 |
---|---|---|
committer | skachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-09-28 12:33:22 +0000 |
commit | d16822ea1d3cedea66dcddd390becdd4cbb557bb (patch) | |
tree | b1c592e415f43c1be425608db861e5348e61dcf3 /src/Witness_complex/example/witness_complex_from_file.cpp | |
parent | 1c09c91ddf4d38196a91bbff5ae432fb13be6762 (diff) | |
parent | a138c9ed4fb9770a3612ff4ee0f914942bbe9724 (diff) |
Merged trunk into relaxed witness branch
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/relaxed-witness@1579 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: a9ca2e7a968ebf4bb80cfa795965ae78511e8dd4
Diffstat (limited to 'src/Witness_complex/example/witness_complex_from_file.cpp')
-rw-r--r-- | src/Witness_complex/example/witness_complex_from_file.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/Witness_complex/example/witness_complex_from_file.cpp b/src/Witness_complex/example/witness_complex_from_file.cpp index 77109512..53207ad2 100644 --- a/src/Witness_complex/example/witness_complex_from_file.cpp +++ b/src/Witness_complex/example/witness_complex_from_file.cpp @@ -34,14 +34,9 @@ #include <string> #include <vector> -using namespace Gudhi; -using namespace Gudhi::witness_complex; - typedef std::vector< Vertex_handle > typeVectorVertex; typedef std::vector< std::vector <double> > Point_Vector; -typedef Witness_complex< Simplex_tree<> > WitnessComplex; - /** * \brief Customized version of read_points * which takes into account a possible nbP first line @@ -68,17 +63,6 @@ read_points_cust(std::string file_name, std::vector< std::vector< double > > & p in_file.close(); } -/** Write a gnuplot readable file. - * Data range is a random access range of pairs (arg, value) - */ -template < typename Data_range > -void write_data(Data_range & data, std::string filename) { - std::ofstream ofs(filename, std::ofstream::out); - for (auto entry : data) - ofs << entry.first << ", " << entry.second << "\n"; - ofs.close(); -} - int main(int argc, char * const argv[]) { if (argc != 3) { std::cerr << "Usage: " << argv[0] @@ -91,7 +75,7 @@ int main(int argc, char * const argv[]) { clock_t start, end; // Construct the Simplex Tree - Simplex_tree<> simplex_tree; + Gudhi::Simplex_tree<> simplex_tree; // Read the point file Point_Vector point_vector; @@ -109,7 +93,7 @@ int main(int argc, char * const argv[]) { // Compute witness complex start = clock(); - WitnessComplex(knn, simplex_tree, nbL, point_vector[0].size()); + Gudhi::witness_complex::witness_complex(knn, nbL, point_vector[0].size(), simplex_tree); end = clock(); std::cout << "Witness complex took " << static_cast<double>(end - start) / CLOCKS_PER_SEC << " s. \n"; |