cantor-pairing
The Cantor pairing function is a primitive recursive pairing function.
Installation
npm i @progstream/cantor-pairing
Usage
import pairing from '@progstream/cantor-pairing'
pairing.pair(3, 8)
// 74
pairing.unpair(74)
// [3, 8]
The Cantor pairing function is a primitive recursive pairing function.
npm i @progstream/cantor-pairing
import pairing from '@progstream/cantor-pairing'
pairing.pair(3, 8)
// 74
pairing.unpair(74)
// [3, 8]
npm i @progstream/cantor-pairing
4
1.0.1
MIT
2.94 kB
5