cantor_pairing: Uniquely encode two non-negative integers to a single...

Description Usage Arguments Value Examples

Description

This function uniquely encodes two non-negative integers to a single non-negative integer, using the Cantor pairing function. See the Wikipedia article for more information.

Usage

1

Arguments

x

A non-negative integer.

y

A non-negative integer.

Value

A non-negative integer.

Examples

1
2

BenjaK/pairing documentation built on May 5, 2019, 2:40 p.m.