Recursively replaces coordinate pairs by (radius, angle), quantizes
only the angles on uniform grids and keeps the final radius exactly
(Han et al. 2025, Definition 1). Level-1 angles span
\([0, 2\pi)\) and are given bits_first bits; deeper levels
span \([0, \pi/2]\) and get bits_rest.
Arguments
- x
Vector whose length is a power of two, at least 2.
- bits_first
Bits per level-1 angle.
- bits_rest
Bits per deeper angle.
- quantize
TRUE(default) quantizes the angles;FALSEreconstructs from the exact angles, which isolates the transformation from the quantization and must be lossless. Both routes are available.
Value
A list with reconstruction, estimate,
radius, codes, mse, relative_l2,
bits_per_coord, n, method.
References
Han, I., Kacham, P., Karbasi, A., Mirrokni, V. and Zandieh, A. (2025). PolarQuant. arXiv:2502.02617.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_polqnt(V)
#> $reconstruction
#> [1] 2.449244 3.665552 3.665552 5.485886 3.665552 5.485886 5.485886 8.210209
#>
#> $estimate
#> [1] 2.449244 3.665552 3.665552 5.485886 3.665552 5.485886 5.485886 8.210209
#>
#> $radius
#> [1] 14.28286
#>
#> $codes
#> [1] 2 2 2 2 2 2 2
#>
#> $mse
#> [1] 1.488373
#>
#> $relative_l2
#> [1] 0.2415938
#>
#> $bits_per_coord
#> [1] 2.75
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "PolarQuant polar-transformation quantization"
#>
