Skip to content

Commit b71ba6e

Browse files
committed
Comments
1 parent 71dea5c commit b71ba6e

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/vitessce/data_utils/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@
2222
sdata_morton_sort_points,
2323
# Functions for querying
2424
sdata_morton_query_rect,
25+
row_ranges_to_row_indices,
2526
)

src/vitessce/data_utils/spatialdata_points_zorder.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@
88
from spatialdata import get_element_annotators
99
import dask.dataframe as dd
1010

11-
### Perform rectangle range queries
12-
13-
# Given a query rectangle region (x_0, y_0) to (x_1, y_1):
14-
# Steps:
15-
# 0. Knowledge of MORTON_CODE_NUM_BITS (and by extension MORTON_CODE_VALUE_MIN/MORTON_CODE_VALUE_MAX).
16-
# 1. `O(2)`: Get the first and last rows of the dataframe, to identify (x_min, y_min) and (x_max, y_max) respectively. These values are needed for normalization.
17-
# - Update: this does not work. The first point is only guaranteed to have y_min, but its X coordinate may be any value. The last row seems to not be guaranteed to have either x_max or y_max.
18-
# 2. `O(?)`: Get the morton code value intervals covering the query rectangle region (in morton code space).
19-
# 3. `O(num_intervals * log(N))`: For each morton code (morton_start, morton_end) interval, perform binary search to identify the corresponding table row ranges.
20-
# 4. Concatenate the table rows in the resulting table row ranges.
21-
# 5. If the rectangle covering is loose (as opposed to exact), filter the resulting rows to only those in the query rectangle region.
2211

2312
MORTON_CODE_NUM_BITS = 32 # Resulting morton codes will be stored as uint32.
2413
MORTON_CODE_VALUE_MIN = 0

0 commit comments

Comments
 (0)