alexkr / biject
Bijection class
Installs: 143
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/alexkr/biject
Requires (Dev)
- phpunit/phpunit: ^4.7
This package is not auto-updated.
Last update: 2025-10-01 13:15:49 UTC
README
Simple implementation one-to-one correspondence function on PHP.
Code Example
Encoding:
$bijection = new AlexKR\Biject\Bijection();
$result = $bijection->encode(42); //q
Decoding:
$bijection = new AlexKR\Biject\Bijection();
$result = $bijection->decode('iq'); //512
Change alphabet:
$bijection = new AlexKR\Biject\Bijection('0123456789');
$result = $bijection->encode(17); //17
Installation
Install via Composer:
composer require alexkr/Biject
License
Biject is licensed under the MIT License