encode_hilbert: These functions are used to arrange a walk across a 2D matrix...

Description Usage Arguments Value

View source: R/hilbert.R

Description

These functions are used to arrange a walk across a 2D matrix to use cache more efficiently. They implement a space-filling curve in 2D. A space-filling curve gives you a single integer to index a two-dimensional array. If you have 2D tiles, then you would find the Hilbert index of each tile and sort by that index in order to improve cache use. Given an x and y value, translate it into a Hilbert z-value.

Usage

1

Arguments

x

An integer for one axis.

y

An integer for the other axis.

Value

A z-value to index the two of them.


dd-harp/globalrc documentation built on Sept. 20, 2021, 12:31 a.m.