From 3cfc598df6a152559f10ba840a8856587e1b1888 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 14 Apr 2017 13:30:04 +0000 Subject: Fix Sphinx and unitary tests issues git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@2354 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 7852df8e3fcea5b0b7f37f79f2b8b34cfd1db62c --- src/cython/doc/rips_complex_user.rst | 156 ++++++++++++++++++----------------- 1 file changed, 80 insertions(+), 76 deletions(-) (limited to 'src/cython/doc/rips_complex_user.rst') diff --git a/src/cython/doc/rips_complex_user.rst b/src/cython/doc/rips_complex_user.rst index c89409a0..65d10304 100644 --- a/src/cython/doc/rips_complex_user.rst +++ b/src/cython/doc/rips_complex_user.rst @@ -60,8 +60,9 @@ Finally, it is asked to display information about the simplicial complex. repr(simplex_tree.num_simplices()) + ' simplices - ' + \ repr(simplex_tree.num_vertices()) + ' vertices.' print(result_str) + fmt = '%s -> %.2f' for filtered_value in simplex_tree.get_filtration(): - print(filtered_value) + print(fmt % tuple(filtered_value)) When launching (Rips maximal distance between 2 points is 12.0, is expanded until dimension 1 - one skeleton graph in other words), the output is: @@ -69,24 +70,24 @@ until dimension 1 - one skeleton graph in other words), the output is: .. testoutput:: Rips complex is of dimension 1 - 18 simplices - 7 vertices. - ([0], 0.0) - ([1], 0.0) - ([2], 0.0) - ([3], 0.0) - ([4], 0.0) - ([5], 0.0) - ([6], 0.0) - ([2, 3], 5.0) - ([4, 5], 5.385164807134504) - ([0, 2], 5.830951894845301) - ([0, 1], 6.082762530298219) - ([1, 3], 6.324555320336759) - ([1, 2], 6.708203932499369) - ([5, 6], 7.280109889280518) - ([2, 4], 8.94427190999916) - ([0, 3], 9.433981132056603) - ([4, 6], 9.486832980505138) - ([3, 6], 11.0) + [0] -> 0.00 + [1] -> 0.00 + [2] -> 0.00 + [3] -> 0.00 + [4] -> 0.00 + [5] -> 0.00 + [6] -> 0.00 + [2, 3] -> 5.00 + [4, 5] -> 5.39 + [0, 2] -> 5.83 + [0, 1] -> 6.08 + [1, 3] -> 6.32 + [1, 2] -> 6.71 + [5, 6] -> 7.28 + [2, 4] -> 8.94 + [0, 3] -> 9.43 + [4, 6] -> 9.49 + [3, 6] -> 11.00 Example from OFF file ^^^^^^^^^^^^^^^^^^^^^ @@ -107,32 +108,33 @@ Finally, it is asked to display information about the Rips complex. repr(simplex_tree.num_simplices()) + ' simplices - ' + \ repr(simplex_tree.num_vertices()) + ' vertices.' print(result_str) + fmt = '%s -> %.2f' for filtered_value in simplex_tree.get_filtration(): - print(filtered_value) + print(fmt % tuple(filtered_value)) the program output is: .. testoutput:: Rips complex is of dimension 1 - 18 simplices - 7 vertices. - ([0], 0.0) - ([1], 0.0) - ([2], 0.0) - ([3], 0.0) - ([4], 0.0) - ([5], 0.0) - ([6], 0.0) - ([2, 3], 5.0) - ([4, 5], 5.385164807134504) - ([0, 2], 5.830951894845301) - ([0, 1], 6.082762530298219) - ([1, 3], 6.324555320336759) - ([1, 2], 6.708203932499369) - ([5, 6], 7.280109889280518) - ([2, 4], 8.94427190999916) - ([0, 3], 9.433981132056603) - ([4, 6], 9.486832980505138) - ([3, 6], 11.0) + [0] -> 0.00 + [1] -> 0.00 + [2] -> 0.00 + [3] -> 0.00 + [4] -> 0.00 + [5] -> 0.00 + [6] -> 0.00 + [2, 3] -> 5.00 + [4, 5] -> 5.39 + [0, 2] -> 5.83 + [0, 1] -> 6.08 + [1, 3] -> 6.32 + [1, 2] -> 6.71 + [5, 6] -> 7.28 + [2, 4] -> 8.94 + [0, 3] -> 9.43 + [4, 6] -> 9.49 + [3, 6] -> 11.00 Distance matrix --------------- @@ -162,8 +164,9 @@ Finally, it is asked to display information about the simplicial complex. repr(simplex_tree.num_simplices()) + ' simplices - ' + \ repr(simplex_tree.num_vertices()) + ' vertices.' print(result_str) + fmt = '%s -> %.2f' for filtered_value in simplex_tree.get_filtration(): - print(filtered_value) + print(fmt % tuple(filtered_value)) When launching (Rips maximal distance between 2 points is 12.0, is expanded until dimension 1 - one skeleton graph in other words), the output is: @@ -171,24 +174,24 @@ until dimension 1 - one skeleton graph in other words), the output is: .. testoutput:: Rips complex is of dimension 1 - 18 simplices - 7 vertices. - ([0], 0.0) - ([1], 0.0) - ([2], 0.0) - ([3], 0.0) - ([4], 0.0) - ([5], 0.0) - ([6], 0.0) - ([2, 3], 5.0) - ([4, 5], 5.3851648071) - ([0, 2], 5.8309518948) - ([0, 1], 6.0827625303) - ([1, 3], 6.3245553203) - ([1, 2], 6.7082039325) - ([5, 6], 7.2801098893) - ([2, 4], 8.94427191) - ([0, 3], 9.4339811321) - ([4, 6], 9.4868329805) - ([3, 6], 11.0) + [0] -> 0.00 + [1] -> 0.00 + [2] -> 0.00 + [3] -> 0.00 + [4] -> 0.00 + [5] -> 0.00 + [6] -> 0.00 + [2, 3] -> 5.00 + [4, 5] -> 5.39 + [0, 2] -> 5.83 + [0, 1] -> 6.08 + [1, 3] -> 6.32 + [1, 2] -> 6.71 + [5, 6] -> 7.28 + [2, 4] -> 8.94 + [0, 3] -> 9.43 + [4, 6] -> 9.49 + [3, 6] -> 11.00 Example from csv file ^^^^^^^^^^^^^^^^^^^^^ @@ -209,29 +212,30 @@ Finally, it is asked to display information about the Rips complex. repr(simplex_tree.num_simplices()) + ' simplices - ' + \ repr(simplex_tree.num_vertices()) + ' vertices.' print(result_str) + fmt = '%s -> %.2f' for filtered_value in simplex_tree.get_filtration(): - print(filtered_value) + print(fmt % tuple(filtered_value)) the program output is: .. testoutput:: Rips complex is of dimension 1 - 18 simplices - 7 vertices. - ([0], 0.0) - ([1], 0.0) - ([2], 0.0) - ([3], 0.0) - ([4], 0.0) - ([5], 0.0) - ([6], 0.0) - ([2, 3], 5.0) - ([4, 5], 5.3851648071) - ([0, 2], 5.8309518948) - ([0, 1], 6.0827625303) - ([1, 3], 6.3245553203) - ([1, 2], 6.7082039325) - ([5, 6], 7.2801098893) - ([2, 4], 8.94427191) - ([0, 3], 9.4339811321) - ([4, 6], 9.4868329805) - ([3, 6], 11.0) + [0] -> 0.00 + [1] -> 0.00 + [2] -> 0.00 + [3] -> 0.00 + [4] -> 0.00 + [5] -> 0.00 + [6] -> 0.00 + [2, 3] -> 5.00 + [4, 5] -> 5.39 + [0, 2] -> 5.83 + [0, 1] -> 6.08 + [1, 3] -> 6.32 + [1, 2] -> 6.71 + [5, 6] -> 7.28 + [2, 4] -> 8.94 + [0, 3] -> 9.43 + [4, 6] -> 9.49 + [3, 6] -> 11.00 -- cgit v1.2.3