|
21 | 21 | from tdamapper.utils.vptree import PivotingStrategy, VPTree, VPTreeKind |
22 | 22 |
|
23 | 23 | T = TypeVar("T") |
24 | | -T_contra = TypeVar("T_contra", contravariant=True) |
25 | 24 | S = TypeVar("S") |
| 25 | + |
| 26 | +T_contra = TypeVar("T_contra", contravariant=True) |
26 | 27 | S_contra = TypeVar("S_contra", contravariant=True) |
27 | 28 |
|
| 29 | +CubicalAlgorithm = Literal["standard", "proximity"] |
| 30 | + |
28 | 31 |
|
29 | 32 | class _Pullback(Generic[S_contra, T_contra]): |
30 | 33 | """ |
@@ -291,21 +294,17 @@ class BaseCubicalCover: |
291 | 294 |
|
292 | 295 | :param n_intervals: The number of intervals to use for each dimension. |
293 | 296 | Must be positive and less than or equal to the length of the dataset. |
294 | | - Defaults to 1. |
295 | 297 | :param overlap_frac: The fraction of overlap between adjacent intervals on |
296 | 298 | each dimension, must be in the range (0.0, 0.5]. If not specified, the |
297 | 299 | overlap_frac is computed such that the volume of the overlap within |
298 | | - each hypercube is half the total volume. Defaults to None. |
| 300 | + each hypercube is half the total volume. |
299 | 301 | :param kind: Specifies whether to use a flat or a hierarchical vantage |
300 | | - point tree. Acceptable values are 'flat' or 'hierarchical'. Defaults to |
301 | | - 'flat'. |
| 302 | + point tree. |
302 | 303 | :param leaf_capacity: The maximum number of points in a leaf node of the |
303 | | - vantage point tree. Must be a positive value. Defaults to 1. |
| 304 | + vantage point tree. Must be a positive value. |
304 | 305 | :param leaf_radius: The radius of the leaf nodes. If not specified, it |
305 | | - defaults to the value of `radius`. Must be a positive value. Defaults |
306 | | - to None. |
| 306 | + defaults to the value of `radius`. Must be a positive value. |
307 | 307 | :param pivoting: The method used for pivoting in the vantage point tree. |
308 | | - Acceptable values are None, 'random', or 'furthest'. Defaults to None. |
309 | 308 | """ |
310 | 309 |
|
311 | 310 | _overlap_frac: float |
@@ -553,9 +552,6 @@ def apply(self, X: ArrayRead[NDArray[np.float_]]) -> Iterator[list[int]]: |
553 | 552 | yield neigh_ids |
554 | 553 |
|
555 | 554 |
|
556 | | -CubicalAlgorithm = Literal["standard", "proximity"] |
557 | | - |
558 | | - |
559 | 555 | class CubicalCover(ParamsMixin): |
560 | 556 | """ |
561 | 557 | Wrapper class for cubical cover algorithms, which cover data with open |
|
0 commit comments