alexkr / biject
Bijection class
1.0
2015-07-07 18:23 UTC
Requires
None
Requires (Dev)
- phpunit/phpunit: ^4.7
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-09-02 17:55:15 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