summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cython/CMakeLists.txt13
-rw-r--r--src/cython/doc/nerve_gic_complex_user.rst6
-rwxr-xr-xsrc/cython/test/test_cover_complex.py5
3 files changed, 15 insertions, 9 deletions
diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt
index 92eb6c94..8f1dec76 100644
--- a/src/cython/CMakeLists.txt
+++ b/src/cython/CMakeLists.txt
@@ -188,30 +188,33 @@ if(CYTHON_FOUND)
add_gudhi_py_test(test_bottleneck_distance)
# Cover complex
+ file(COPY ${CMAKE_SOURCE_DIR}/data/points/human.off DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
+ file(COPY ${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat.off DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
+ file(COPY ${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat_PCA1 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
add_test(NAME cover_complex_nerve_example_py_test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/nerve_of_a_covering.py"
- -f ${CMAKE_SOURCE_DIR}/data/points/human.off -c 2 -r 10 -g 0.3)
+ -f human.off -c 2 -r 10 -g 0.3)
add_test(NAME cover_complex_coordinate_gic_example_py_test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/coordinate_graph_induced_complex.py"
- -f ${CMAKE_SOURCE_DIR}/data/points/human.off -c 0 -v)
+ -f human.off -c 0 -v)
add_test(NAME cover_complex_functional_gic_example_py_test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/functional_graph_induced_complex.py"
- -o ${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat.off
- -f ${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat_PCA1 -v)
+ -o lucky_cat.off
+ -f lucky_cat_PCA1 -v)
add_test(NAME cover_complex_voronoi_gic_example_py_test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/voronoi_graph_induced_complex.py"
- -f ${CMAKE_SOURCE_DIR}/data/points/human.off -n 700 -v)
+ -f human.off -n 700 -v)
add_gudhi_py_test(test_cover_complex)
endif (NOT CGAL_VERSION VERSION_LESS 4.8.1)
diff --git a/src/cython/doc/nerve_gic_complex_user.rst b/src/cython/doc/nerve_gic_complex_user.rst
index b2669303..d774827e 100644
--- a/src/cython/doc/nerve_gic_complex_user.rst
+++ b/src/cython/doc/nerve_gic_complex_user.rst
@@ -100,12 +100,12 @@ the program output is:
.. testoutput::
Nerve is of dimension 1 - 41 simplices - 21 vertices.
- [1]
[0]
+ [1]
[4]
- [0, 4]
+ [1, 4]
[2]
- [1, 2]
+ [0, 2]
[8]
[2, 8]
[5]
diff --git a/src/cython/test/test_cover_complex.py b/src/cython/test/test_cover_complex.py
index 39bf20a3..58935264 100755
--- a/src/cython/test/test_cover_complex.py
+++ b/src/cython/test/test_cover_complex.py
@@ -51,8 +51,9 @@ def test_files_creation():
def test_nerve():
nerve = CoverComplex()
- assert (nerve.read_point_cloud('cloud') == True)
nerve.set_type('Nerve')
+ assert (nerve.read_point_cloud('cloud') == True)
+ nerve.set_color_from_coordinate()
nerve.set_graph_from_file('graph')
nerve.set_cover_from_file('cover')
nerve.find_simplices()
@@ -66,6 +67,7 @@ def test_graph_induced_complex():
gic = CoverComplex()
gic.set_type('GIC')
assert (gic.read_point_cloud('cloud') == True)
+ gic.set_color_from_coordinate()
gic.set_graph_from_file('graph')
gic.set_cover_from_file('cover')
gic.find_simplices()
@@ -79,6 +81,7 @@ def test_voronoi_graph_induced_complex():
gic = CoverComplex()
gic.set_type('GIC')
assert (gic.read_point_cloud('cloud') == True)
+ gic.set_color_from_coordinate()
gic.set_graph_from_file('graph')
gic.set_cover_from_Voronoi(2)
gic.find_simplices()