Skip to content

Commit 4313752

Browse files
committed
Added docstring
1 parent 78f0b01 commit 4313752

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/tdamapper/cover.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,20 @@ def __init__(
467467
)
468468

469469
def apply(self, X):
470+
"""
471+
Covers the dataset using landmarks.
472+
473+
This function yields all the hypercubes intersecting the dataset.
474+
475+
This function returns a generator that yields each element of the
476+
open cover as a list of ids. The ids are the indices of the points
477+
in the original dataset.
478+
479+
:param X: A dataset of n points.
480+
:type X: array-like of shape (n, m) or list-like of length n
481+
:return: A generator of lists of ids.
482+
:rtype: generator of lists of ints
483+
"""
470484
super().fit(X)
471485
lmrks_to_cover = super().landmarks(X)
472486
while lmrks_to_cover:

0 commit comments

Comments
 (0)