index.html // ^^^^^^^^^^^^^^^ // // or just make ...ceteris paribus (everything necessary to // make the same thing happen being inserted in the makefile). ?>
|
|
Binary Hyperbolic Pairing Function
version 0.1
|
Another in my series of "hyperbolic" pairing functions. This one pairs two numbers by concatenating their bits (except for the leading ones) with a prefix, which orders the pairs in rather thick "shells," but it's practical in that encoding or decoding a pair takes a constant number of operations, and a linear amount of time per bit of input.
Also included is a "tupling function," implemented as a Python class that converts a list of positive ints to a single positive int (and back), and also supports iteration, reverse iteration, and push and pop on both ends (with limitations).
The Jupyter notebook pdf explains the math of the things fairly well, although there's a lot of obsoleted and experimental code still in there.
"The notebook as a pdf.", "binary_hyperbolic_pairing.ipynb" => "The Jupyter notebook source.", "bin_pair_py.txt" => "The working code as a Python module." ); $subst_url = array( ); echo "
';
if( isset( $subst_url[$file] ) ) $url = $subst_url[ $file ];
else $url = $file;
if( $line[0]=="d" ) {
echo "$file/";
} else {
echo "$file (${size}K)";
}
echo " | \n";
if( isset( $cmt[$file] ) ) {
echo "$cmt[$file] | \n"; } echo "
This static page was made with a
php script.
Last change
--Steve Witham
Up to my temporary home page.