(code: torch.Tensor, depth)
| 46 | |
| 47 | |
| 48 | def z_order_decode(code: torch.Tensor, depth): |
| 49 | x, y, z = z_order_decode_(code, depth=depth) |
| 50 | grid_coord = torch.stack([x, y, z], dim=-1) # (N, 3) |
| 51 | return grid_coord |
| 52 | |
| 53 | |
| 54 | def hilbert_encode(grid_coord: torch.Tensor, depth: int = 16): |