From 30eb48c287ef6453a095535306b2a9acf672472a Mon Sep 17 00:00:00 2001 From: skachano Date: Tue, 4 Oct 2016 19:49:40 +0000 Subject: Strong witness is ready as well git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/relaxed-witness@1636 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 1e50ece69054b45787353c37877fdfa970209f20 --- src/Witness_complex/test/simple_witness_complex.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/Witness_complex/test') diff --git a/src/Witness_complex/test/simple_witness_complex.cpp b/src/Witness_complex/test/simple_witness_complex.cpp index 30b168c1..0c2c3710 100644 --- a/src/Witness_complex/test/simple_witness_complex.cpp +++ b/src/Witness_complex/test/simple_witness_complex.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -40,6 +41,7 @@ typedef CGAL::Epick_d Kernel; typedef typename Kernel::FT FT; typedef typename Kernel::Point_d Point_d; typedef Gudhi::witness_complex::Witness_complex WitnessComplex; +typedef Gudhi::witness_complex::Strong_witness_complex StrongWitnessComplex; /* All landmarks and witnesses are taken on the grid in the following manner. LWLWL 2W4W7 @@ -52,7 +54,7 @@ typedef Gudhi::witness_complex::Witness_complex WitnessComplex; */ BOOST_AUTO_TEST_CASE(simple_witness_complex) { - Simplex_tree complex, relaxed_complex; + Simplex_tree complex, relaxed_complex, strong_relaxed_complex; std::vector witnesses, landmarks; @@ -92,11 +94,20 @@ BOOST_AUTO_TEST_CASE(simple_witness_complex) { // BOOST_CHECK(complex.num_simplices() == 24); - witness_complex.create_complex(relaxed_complex, 8.01); + // witness_complex.create_complex(relaxed_complex, 8.01); - std::cout << "Num_simplices: " << relaxed_complex.num_simplices() << "\n"; - std::cout << relaxed_complex << "\n"; + // std::cout << "Num_simplices: " << relaxed_complex.num_simplices() << "\n"; + // std::cout << relaxed_complex << "\n"; + StrongWitnessComplex strong_witness_complex(landmarks.begin(), + landmarks.end(), + witnesses.begin(), + witnesses.end()); + + strong_witness_complex.create_complex(strong_relaxed_complex, 9.1); + std::cout << "Num_simplices: " << strong_relaxed_complex.num_simplices() << "\n"; + std::cout << strong_relaxed_complex << "\n"; + //BOOST_CHECK(relaxed_complex.num_simplices() == 24); //BOOST_CHECK(witnessComplex.is_witness_complex(knn, false)); -- cgit v1.2.3