aboutsummaryrefslogtreecommitdiffstats
path: root/phil-spc.txi
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:29 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:29 -0800
commit8466d8cfa486fb30d1755c4261b781135083787b (patch)
treec8c12c67246f543c3cc4f64d1c07e003cb1d45ae /phil-spc.txi
parent87b82b5822ca54228cfa6df29be3ad9d4bc47d16 (diff)
downloadslib-8466d8cfa486fb30d1755c4261b781135083787b.tar.gz
slib-8466d8cfa486fb30d1755c4261b781135083787b.zip
Import Upstream version 3a1upstream/3a1
Diffstat (limited to 'phil-spc.txi')
-rw-r--r--phil-spc.txi38
1 files changed, 38 insertions, 0 deletions
diff --git a/phil-spc.txi b/phil-spc.txi
new file mode 100644
index 0000000..1193c6c
--- /dev/null
+++ b/phil-spc.txi
@@ -0,0 +1,38 @@
+@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