From 5d2095ce1bb0907cc1de2d97c3b056d00f29a83d Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Mon, 3 Jun 2019 16:00:08 +0200 Subject: Fix #56 --- src/common/doc/installation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/doc/installation.h b/src/common/doc/installation.h index 8fb8b330..5d581b08 100644 --- a/src/common/doc/installation.h +++ b/src/common/doc/installation.h @@ -44,7 +44,7 @@ make doxygen \endverbatim * * \subsection helloworld Hello world ! - * The Hello world for GUDHI + * The Hello world for GUDHI * project is an example to help developers to make their own C++ project on top of the GUDHI library. * * \section optionallibrary Optional third-party library -- cgit v1.2.3 From 5661593ab3d8f7bd4cda867fc0348c86d26106e3 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Wed, 5 Jun 2019 07:57:54 +0200 Subject: Fix #20: Add OFF section in file format and all documents target to it instead of geomview.org documentation. Modify data/points/alphacomplexdoc.off in dimension 3 to be used as an example for OFF section in file format. --- data/points/alphacomplexdoc.off | 22 ++++++++-------- src/Alpha_complex/utilities/alphacomplex.md | 4 +-- src/Doxyfile.in | 3 ++- src/Nerve_GIC/doc/Intro_graph_induced_complex.h | 3 +-- src/common/doc/file_formats.h | 26 +++++++++++++++++++ .../example/vectordoubleoffreader_result.txt | 14 +++++------ src/common/include/gudhi/Off_reader.h | 3 +-- src/common/test/test_points_off_reader.cpp | 14 +++++------ src/cython/doc/fileformats.rst | 29 ++++++++++++++++++++++ src/cython/doc/nerve_gic_complex_user.rst | 3 +-- 10 files changed, 88 insertions(+), 33 deletions(-) (limited to 'src/common') diff --git a/data/points/alphacomplexdoc.off b/data/points/alphacomplexdoc.off index bb790193..a90db49a 100644 --- a/data/points/alphacomplexdoc.off +++ b/data/points/alphacomplexdoc.off @@ -1,10 +1,12 @@ -nOFF -2 7 0 0 -1.0 1.0 -7.0 0.0 -4.0 6.0 -9.0 6.0 -0.0 14.0 -2.0 19.0 -9.0 17.0 - +# Default is 3 dimension +OFF +# 7 vertices - 0 face - 0 edge +7 0 0 +# Point set: +1.0 1.0 0.0 +7.0 0.0 0.0 +4.0 6.0 0.0 +9.0 6.0 0.0 +0.0 14.0 0.0 +2.0 19.0 0.0 +9.0 17.0 0.0 diff --git a/src/Alpha_complex/utilities/alphacomplex.md b/src/Alpha_complex/utilities/alphacomplex.md index b77656ff..fcd16a3b 100644 --- a/src/Alpha_complex/utilities/alphacomplex.md +++ b/src/Alpha_complex/utilities/alphacomplex.md @@ -33,7 +33,7 @@ a prime number). where `` is the path to the input point cloud in -[nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). +[nOFF ASCII format]({{ site.officialurl }}/doc/latest/fileformats.html#FileFormatsOFF). **Allowed options** @@ -87,7 +87,7 @@ a prime number). ``` where `` is the path to the input point cloud in -[nOFF ASCII format](http://www.geomview.org/docs/html/OFF.html). +[nOFF ASCII format]({{ site.officialurl }}/doc/latest/fileformats.html#FileFormatsOFF). **Allowed options** diff --git a/src/Doxyfile.in b/src/Doxyfile.in index 54a438d4..5b1b8ecc 100644 --- a/src/Doxyfile.in +++ b/src/Doxyfile.in @@ -821,7 +821,8 @@ EXCLUDE_SYMBOLS = EXAMPLE_PATH = biblio/ \ example/ \ - utilities/ + utilities/ \ + data/ # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and diff --git a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h index bc8aecc3..e72d63dd 100644 --- a/src/Nerve_GIC/doc/Intro_graph_induced_complex.h +++ b/src/Nerve_GIC/doc/Intro_graph_induced_complex.h @@ -37,8 +37,7 @@ namespace cover_complex { * neato (from graphviz), * geomview, * KeplerMapper. - * Input point clouds are assumed to be - * OFF files. + * Input point clouds are assumed to be \ref FileFormatsOFF "OFF files" * * \section covers Covers * diff --git a/src/common/doc/file_formats.h b/src/common/doc/file_formats.h index 23214e25..235296d3 100644 --- a/src/common/doc/file_formats.h +++ b/src/common/doc/file_formats.h @@ -29,6 +29,32 @@ namespace Gudhi { \tableofcontents + \section FileFormatsOFF OFF file format + + OFF files must be conform to format described here: http://www.geomview.org/docs/html/OFF.html + + OFF files are mainly used as point cloud inputs. Here is an example of 7 points in a 3-dimensional space. As edges and + faces are not used for point set, there is no need to specify them (just set their numbers to 0): + + \include points/alphacomplexdoc.off + + For dimensions bigger than 3, the dimension can be set like here: + \verbatim + # Dimension is no more 3 + nOFF + # dimension 4 - 7 vertices - 0 face - 0 edge + 4 7 0 0 + # Point set: + 1.0 1.0 0.0 0.0 + 7.0 0.0 0.0 0.0 + 4.0 6.0 0.0 0.0 + 9.0 6.0 0.0 0.0 + 0.0 14.0 0.0 0.0 + 2.0 19.0 0.0 0.0 + 9.0 17.0 0.0 0.0 + \endverbatim + + \section FileFormatsPers Persistence Diagram Such a file, whose extension is usually `.pers`, contains a list of persistence intervals.
diff --git a/src/common/example/vectordoubleoffreader_result.txt b/src/common/example/vectordoubleoffreader_result.txt index 1deb8dbd..b399425a 100644 --- a/src/common/example/vectordoubleoffreader_result.txt +++ b/src/common/example/vectordoubleoffreader_result.txt @@ -1,7 +1,7 @@ -Point[0] = 1 1 -Point[1] = 7 0 -Point[2] = 4 6 -Point[3] = 9 6 -Point[4] = 0 14 -Point[5] = 2 19 -Point[6] = 9 17 +Point[0] = 1 1 0 +Point[1] = 7 0 0 +Point[2] = 4 6 0 +Point[3] = 9 6 0 +Point[4] = 0 14 0 +Point[5] = 2 19 0 +Point[6] = 9 17 0 diff --git a/src/common/include/gudhi/Off_reader.h b/src/common/include/gudhi/Off_reader.h index 05a1e145..fc951fe7 100644 --- a/src/common/include/gudhi/Off_reader.h +++ b/src/common/include/gudhi/Off_reader.h @@ -37,8 +37,7 @@ namespace Gudhi { /** \brief OFF file reader top class visitor. * - * OFF file must be conform to format described here : - * http://www.geomview.org/docs/html/OFF.html + * OFF file must be conform to \ref FileFormatsOFF */ class Off_reader { public: diff --git a/src/common/test/test_points_off_reader.cpp b/src/common/test/test_points_off_reader.cpp index ba3bab71..e4b76ed7 100644 --- a/src/common/test/test_points_off_reader.cpp +++ b/src/common/test/test_points_off_reader.cpp @@ -44,19 +44,19 @@ BOOST_AUTO_TEST_CASE( points_doc_test ) BOOST_CHECK(point_cloud.size() == 7); std::vector expected_points; - std::vector point = {1.0, 1.0}; + std::vector point = {1.0, 1.0, 0.0}; expected_points.push_back(Point_d(point.begin(), point.end())); - point = {7.0, 0.0}; + point = {7.0, 0.0, 0.0}; expected_points.push_back(Point_d(point.begin(), point.end())); - point = {4.0, 6.0}; + point = {4.0, 6.0, 0.0}; expected_points.push_back(Point_d(point.begin(), point.end())); - point = {9.0, 6.0}; + point = {9.0, 6.0, 0.0}; expected_points.push_back(Point_d(point.begin(), point.end())); - point = {0.0, 14.0}; + point = {0.0, 14.0, 0.0}; expected_points.push_back(Point_d(point.begin(), point.end())); - point = {2.0, 19.0}; + point = {2.0, 19.0, 0.0}; expected_points.push_back(Point_d(point.begin(), point.end())); - point = {9.0, 17.0}; + point = {9.0, 17.0, 0.0}; expected_points.push_back(Point_d(point.begin(), point.end())); BOOST_CHECK(point_cloud == expected_points); diff --git a/src/cython/doc/fileformats.rst b/src/cython/doc/fileformats.rst index e205cc8b..345dfdba 100644 --- a/src/cython/doc/fileformats.rst +++ b/src/cython/doc/fileformats.rst @@ -5,6 +5,35 @@ File formats ############ +OFF file format +*************** + +OFF files must be conform to format described here: +http://www.geomview.org/docs/html/OFF.html + +OFF files are mainly used as point cloud inputs. Here is an example of 7 points +in a 3-dimensional space. As edges and faces are not used for point set, there +is no need to specify them (just set their numbers to 0): + +.. literalinclude:: ../../data/points/alphacomplexdoc.off + +.. centered:: ../../points/alphacomplexdoc.off + +For dimensions bigger than 3, the dimension can be set like here:: + + # Dimension is no more 3 + nOFF + # dimension 4 - 7 vertices - 0 face - 0 edge + 4 7 0 0 + # Point set: + 1.0 1.0 0.0 0.0 + 7.0 0.0 0.0 0.0 + 4.0 6.0 0.0 0.0 + 9.0 6.0 0.0 0.0 + 0.0 14.0 0.0 0.0 + 2.0 19.0 0.0 0.0 + 9.0 17.0 0.0 0.0 + Persistence Diagram ******************* diff --git a/src/cython/doc/nerve_gic_complex_user.rst b/src/cython/doc/nerve_gic_complex_user.rst index 94a2b246..9101f45d 100644 --- a/src/cython/doc/nerve_gic_complex_user.rst +++ b/src/cython/doc/nerve_gic_complex_user.rst @@ -13,8 +13,7 @@ Visualizations of the simplicial complexes can be done with either neato (from `graphviz `_), `geomview `_, `KeplerMapper `_. -Input point clouds are assumed to be -`OFF files `_. +Input point clouds are assumed to be OFF files (cf. :doc:`fileformats`). Covers ------ -- cgit v1.2.3 From 18e07282a3b9b1e8616ca871d79d7dc820e94a85 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Fri, 7 Jun 2019 15:50:31 +0200 Subject: MathJax.js no more required --- src/common/doc/MathJax.js | 53 ----------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 src/common/doc/MathJax.js (limited to 'src/common') diff --git a/src/common/doc/MathJax.js b/src/common/doc/MathJax.js deleted file mode 100644 index 35e1994e..00000000 --- a/src/common/doc/MathJax.js +++ /dev/null @@ -1,53 +0,0 @@ -(function () { - var newMathJax = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js'; - var oldMathJax = 'cdn.mathjax.org/mathjax/latest/MathJax.js'; - - var replaceScript = function (script, src) { - // - // Make redirected script - // - var newScript = document.createElement('script'); - newScript.src = newMathJax + src.replace(/.*?(\?|$)/, '$1'); - // - // Move onload and onerror handlers to new script - // - newScript.onload = script.onload; - newScript.onerror = script.onerror; - script.onload = script.onerror = null; - // - // Move any content (old-style configuration scripts) - // - while (script.firstChild) newScript.appendChild(script.firstChild); - // - // Copy script id - // - if (script.id != null) newScript.id = script.id; - // - // Replace original script with new one - // - script.parentNode.replaceChild(newScript, script); - // - // Issue a console warning - // - console.warn('WARNING: cdn.mathjax.org has been retired. Check https://www.mathjax.org/cdn-shutting-down/ for migration tips.') - } - - if (document.currentScript) { - var script = document.currentScript; - replaceScript(script, script.src); - } else { - // - // Look for current script by searching for one with the right source - // - var n = oldMathJax.length; - var scripts = document.getElementsByTagName('script'); - for (var i = 0; i < scripts.length; i++) { - var script = scripts[i]; - var src = (script.src || '').replace(/.*?:\/\//,''); - if (src.substr(0, n) === oldMathJax) { - replaceScript(script, src); - break; - } - } - } -})(); \ No newline at end of file -- cgit v1.2.3