public abstract class MathHelper extends Object
| Constructor and Description |
|---|
MathHelper() |
| Modifier and Type | Method and Description |
|---|---|
static long |
cantor(long x,
long y)
Pairing function to uniquely encode two natural numbers into a single
number.
|
static long[] |
reverseCantor(long z)
Creates number pair from given cantor number.
|
public static long cantor(long x,
long y)
x - first number (>= 0)y - second number (>= 0)public static long[] reverseCantor(long z)
z - cantor numberCopyright © 2014 - 2018–2018 University of Leipzig. All rights reserved.