summaryrefslogtreecommitdiff
path: root/src/python/doc/rips_complex_user.rst
diff options
context:
space:
mode:
authoryuichi-ike <yuichi.ike.1990@gmail.com>2020-05-21 11:02:00 +0900
committeryuichi-ike <yuichi.ike.1990@gmail.com>2020-05-21 11:02:00 +0900
commit0c47b28201093851140ab499331017ef42312ce7 (patch)
treee0f4d09d0fc5cf36705b09f919081917d5195f63 /src/python/doc/rips_complex_user.rst
parent97e889f34e929f3c2306803b6c37b57926bd1245 (diff)
DTM Rips added (straightforward way)
Diffstat (limited to 'src/python/doc/rips_complex_user.rst')
-rw-r--r--src/python/doc/rips_complex_user.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/python/doc/rips_complex_user.rst b/src/python/doc/rips_complex_user.rst
index 819568be..eb2657df 100644
--- a/src/python/doc/rips_complex_user.rst
+++ b/src/python/doc/rips_complex_user.rst
@@ -398,3 +398,23 @@ The output is:
.. testoutput::
[(0, (3.1622776601683795, inf)), (0, (3.1622776601683795, 5.39834563766817)), (0, (3.1622776601683795, 5.39834563766817))]
+
+DTM Rips Complex
+----------------
+
+`DtmdRipsComplex <rips_complex_ref.html#dtm-rips-complex-reference-manual>`_ builds a simplicial complex from a point set or a full distence matrix (in the form of ndarray), as described in the above example.
+
+.. testcode::
+
+ import numpy as np
+ from dtm_rips_complex import DtmRipsComplex
+ pts = np.array([[2.0, 2.0], [0.0, 1.0], [3.0, 4.0]])
+ dtm_rips = DtmRipsComplex(points=pts, k=2)
+ st = dtm_rips.create_simplex_tree(max_dimension=2)
+ print(st.persistence())
+
+The output is:
+
+.. testoutput::
+
+ [(0, (3.1622776601683795, inf)), (0, (3.1622776601683795, 5.39834563766817)), (0, (3.1622776601683795, 5.39834563766817))]