summaryrefslogtreecommitdiff
path: root/src/Alpha_complex/test
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-06-16 13:30:27 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-06-16 13:30:27 +0000
commit77b57ae69fa2042b652d91d8015c1d9533176090 (patch)
treee59a2ef63474de5064d4d687c4fe6df5de533b0b /src/Alpha_complex/test
parent17fd245908ba07d6bad974efa0be1ec6093262ec (diff)
Alpha_complex renamed.
Compilation and tests are OK. bimap is stored in class. bimap is now on CGAL Vertex_iterator - instead of points. is_gabriel not computed when simplex dimension is 1. is_gabriel not computed when filt(Tau) is not NaN. Delaunay_triangulation is a pointer constructed in Delaunay_triangulation_off_io.h git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alphashapes@617 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 4fa4a26ce47066efe22aed99734ff1dd821ad70b
Diffstat (limited to 'src/Alpha_complex/test')
-rw-r--r--src/Alpha_complex/test/Alpha_complex_unit_test.cpp (renamed from src/Alpha_complex/test/Alpha_shapes_unit_test.cpp)50
-rw-r--r--src/Alpha_complex/test/CMakeLists.txt14
2 files changed, 32 insertions, 32 deletions
diff --git a/src/Alpha_complex/test/Alpha_shapes_unit_test.cpp b/src/Alpha_complex/test/Alpha_complex_unit_test.cpp
index d5db3bfa..38168f10 100644
--- a/src/Alpha_complex/test/Alpha_shapes_unit_test.cpp
+++ b/src/Alpha_complex/test/Alpha_complex_unit_test.cpp
@@ -20,13 +20,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define BOOST_TEST_MODULE alpha_shapes
+#define BOOST_TEST_MODULE alpha_complex
#include <boost/test/included/unit_test.hpp>
#include <boost/system/error_code.hpp>
#include <boost/chrono/thread_clock.hpp>
// to construct a Delaunay_triangulation from a OFF file
#include "gudhi/Alpha_shapes/Delaunay_triangulation_off_io.h"
-#include "gudhi/Alpha_shapes.h"
+#include "gudhi/Alpha_complex.h"
// to construct a simplex_tree from Delaunay_triangulation
#include "gudhi/graph_simplicial_complex.h"
@@ -48,49 +48,49 @@
// Use dynamic_dimension_tag for the user to be able to set dimension
typedef CGAL::Epick_d< CGAL::Dynamic_dimension_tag > K;
typedef CGAL::Delaunay_triangulation<K> T;
-// The triangulation uses the default instanciation of the
+// The triangulation uses the default instantiation of the
// TriangulationDataStructure template parameter
BOOST_AUTO_TEST_CASE( OFF_file ) {
// ----------------------------------------------------------------------------
//
- // Init of an alpha-shape from a OFF file
+ // Init of an alpha-complex from a OFF file
//
// ----------------------------------------------------------------------------
std::string off_file_name("S4_100.off");
std::cout << "========== OFF FILE NAME = " << off_file_name << " ==========" << std::endl;
- Gudhi::alphashapes::Alpha_shapes alpha_shapes_from_file(off_file_name, 4);
+ Gudhi::alphacomplex::Alpha_complex alpha_complex_from_file(off_file_name);
const int DIMENSION = 4;
- std::cout << "alpha_shapes_from_file.dimension()=" << alpha_shapes_from_file.dimension() << std::endl;
- BOOST_CHECK(alpha_shapes_from_file.dimension() == DIMENSION);
+ std::cout << "alpha_complex_from_file.dimension()=" << alpha_complex_from_file.dimension() << std::endl;
+ BOOST_CHECK(alpha_complex_from_file.dimension() == DIMENSION);
const double FILTRATION = 0.0;
- std::cout << "alpha_shapes_from_file.filtration()=" << alpha_shapes_from_file.filtration() << std::endl;
- BOOST_CHECK(alpha_shapes_from_file.filtration() == FILTRATION);
+ std::cout << "alpha_complex_from_file.filtration()=" << alpha_complex_from_file.filtration() << std::endl;
+ BOOST_CHECK(alpha_complex_from_file.filtration() == FILTRATION);
const int NUMBER_OF_VERTICES = 100;
- std::cout << "alpha_shapes_from_file.num_vertices()=" << alpha_shapes_from_file.num_vertices() << std::endl;
- BOOST_CHECK(alpha_shapes_from_file.num_vertices() == NUMBER_OF_VERTICES);
+ std::cout << "alpha_complex_from_file.num_vertices()=" << alpha_complex_from_file.num_vertices() << std::endl;
+ BOOST_CHECK(alpha_complex_from_file.num_vertices() == NUMBER_OF_VERTICES);
const int NUMBER_OF_SIMPLICES = 6779;
- std::cout << "alpha_shapes_from_file.num_simplices()=" << alpha_shapes_from_file.num_simplices() << std::endl;
- BOOST_CHECK(alpha_shapes_from_file.num_simplices() == NUMBER_OF_SIMPLICES);
+ std::cout << "alpha_complex_from_file.num_simplices()=" << alpha_complex_from_file.num_simplices() << std::endl;
+ BOOST_CHECK(alpha_complex_from_file.num_simplices() == NUMBER_OF_SIMPLICES);
}
BOOST_AUTO_TEST_CASE( Delaunay_triangulation ) {
// ----------------------------------------------------------------------------
//
- // Init of an alpha-shape from a Delauny triangulation
+ // Init of an alpha-complex from a Delaunay triangulation
//
// ----------------------------------------------------------------------------
- T dt(8);
+ T dt;
std::string off_file_name("S8_10.off");
std::cout << "========== OFF FILE NAME = " << off_file_name << " ==========" << std::endl;
- Gudhi::alphashapes::Delaunay_triangulation_off_reader<T> off_reader(off_file_name, dt);
+ Gudhi::alphacomplex::Delaunay_triangulation_off_reader<T> off_reader(off_file_name, dt);
std::cout << "off_reader.is_valid()=" << off_reader.is_valid() << std::endl;
BOOST_CHECK(off_reader.is_valid());
@@ -106,21 +106,21 @@ BOOST_AUTO_TEST_CASE( Delaunay_triangulation ) {
std::cout << "dt.number_of_finite_full_cells()=" << dt.number_of_finite_full_cells() << std::endl;
BOOST_CHECK(dt.number_of_finite_full_cells() == NUMBER_OF_FINITE_FULL_CELLS);
- Gudhi::alphashapes::Alpha_shapes alpha_shapes_from_dt(dt);
+ Gudhi::alphacomplex::Alpha_complex alpha_complex_from_dt(dt);
const int DIMENSION = 8;
- std::cout << "alpha_shapes_from_dt.dimension()=" << alpha_shapes_from_dt.dimension() << std::endl;
- BOOST_CHECK(alpha_shapes_from_dt.dimension() == DIMENSION);
+ std::cout << "alpha_complex_from_dt.dimension()=" << alpha_complex_from_dt.dimension() << std::endl;
+ BOOST_CHECK(alpha_complex_from_dt.dimension() == DIMENSION);
const double FILTRATION = 0.0;
- std::cout << "alpha_shapes_from_dt.filtration()=" << alpha_shapes_from_dt.filtration() << std::endl;
- BOOST_CHECK(alpha_shapes_from_dt.filtration() == FILTRATION);
+ std::cout << "alpha_complex_from_dt.filtration()=" << alpha_complex_from_dt.filtration() << std::endl;
+ BOOST_CHECK(alpha_complex_from_dt.filtration() == FILTRATION);
- std::cout << "alpha_shapes_from_dt.num_vertices()=" << alpha_shapes_from_dt.num_vertices() << std::endl;
- BOOST_CHECK(alpha_shapes_from_dt.num_vertices() == NUMBER_OF_VERTICES);
+ std::cout << "alpha_complex_from_dt.num_vertices()=" << alpha_complex_from_dt.num_vertices() << std::endl;
+ BOOST_CHECK(alpha_complex_from_dt.num_vertices() == NUMBER_OF_VERTICES);
const int NUMBER_OF_SIMPLICES = 997;
- std::cout << "alpha_shapes_from_dt.num_simplices()=" << alpha_shapes_from_dt.num_simplices() << std::endl;
- BOOST_CHECK(alpha_shapes_from_dt.num_simplices() == NUMBER_OF_SIMPLICES);
+ std::cout << "alpha_complex_from_dt.num_simplices()=" << alpha_complex_from_dt.num_simplices() << std::endl;
+ BOOST_CHECK(alpha_complex_from_dt.num_simplices() == NUMBER_OF_SIMPLICES);
}
diff --git a/src/Alpha_complex/test/CMakeLists.txt b/src/Alpha_complex/test/CMakeLists.txt
index 3cf97b71..72e8390a 100644
--- a/src/Alpha_complex/test/CMakeLists.txt
+++ b/src/Alpha_complex/test/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.6)
-project(GUDHIAlphaShapesTest)
+project(GUDHIAlphaComplexTest)
# need CGAL 4.7
# cmake -DCGAL_DIR=~/workspace/CGAL-4.7-Ic-41 ../../..
@@ -16,16 +16,16 @@ if(CGAL_FOUND)
include_directories (BEFORE "../../include")
add_definitions(-DDEBUG_TRACES)
- add_executable ( AlphaShapesUnitTest Alpha_shapes_unit_test.cpp )
- target_link_libraries(AlphaShapesUnitTest ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
- add_test(AlphaShapesUnitTest ${CMAKE_CURRENT_BINARY_DIR}/AlphaShapesUnitTest)
+ add_executable ( AlphaComplexUnitTest Alpha_complex_unit_test.cpp )
+ target_link_libraries(AlphaComplexUnitTest ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+ add_test(AlphaComplexUnitTest ${CMAKE_CURRENT_BINARY_DIR}/AlphaComplexUnitTest)
else()
- message(WARNING "Eigen3 not found. Version 3.1.0 is required for Alpha shapes feature.")
+ message(WARNING "Eigen3 not found. Version 3.1.0 is required for Alpha complex feature.")
endif()
else()
- message(WARNING "CGAL version: ${CGAL_VERSION} is too old to compile Alpha shapes feature. Version 4.6.0 is required.")
+ message(WARNING "CGAL version: ${CGAL_VERSION} is too old to compile Alpha complex feature. Version 4.6.0 is required.")
endif ()
endif()
-cpplint_add_tests("${CMAKE_SOURCE_DIR}/src/Alpha_shapes/include/gudhi")
+cpplint_add_tests("${CMAKE_SOURCE_DIR}/src/Alpha_complex/include/gudhi")