@code{(require 'hilbert-fill)}
@ftindex hilbert-fill

@noindent
@cindex Peano
@cindex Hilbert
@cindex Space-Filling
The @dfn{Peano-Hilbert Space-Filling Curve} is a one-to-one mapping
@cindex Peano-Hilbert Space-Filling Curve
between a unit line segment and an @var{n}-dimensional unit cube.

@noindent
The integer procedures map the non-negative integers to an
arbitrarily large @var{n}-dimensional cube with its corner at the
origin and all coordinates are non-negative.

@noindent
For any exact nonnegative integers @var{scalar} and @var{rank},

@example
(= @var{scalar} (hilbert-coordinates->integer
           (integer->hilbert-coordinates @var{scalar} @var{rank})))
                                       @result{} #t
@end example


@defun integer->hilbert-coordinates scalar rank

Returns a list of @var{rank} integer coordinates corresponding to exact
non-negative integer @var{scalar}.  The lists returned by @code{integer->hilbert-coordinates} for @var{scalar} arguments
0 and 1 will differ in the first element.
@end defun

@defun hilbert-coordinates->integer coords

Returns an exact non-negative integer corresponding to @var{coords}, a list
of non-negative integer coordinates.
@end defun
