Name
Encode::Positive::Pairs - encode pairs of positive integers as a single integer and vice versa
Synopsis
use Encode::Positive::Pairs;
my ($i, $j) = Encode::Positive::Pairs::singleToPair(4);
ok $i == 1 && $j == 1;
ok 4 == Encode::Positive::Pairs::pairToSingle(1, 1);
Description
Encode::Positive::Pairs::singleToPair($n)
finds the pair of positive integers ($i, $j) with $j < $i corresponding to the positive integer $n
Encode::Positive::Pairs::pairToSingle($i, $j)
finds the single integer representing the pair of positive integers ($i, $j)
Installation
Standard Module::Build process for building and installing modules:
perl Build.PL
./Build
./Build test
./Build install
Author
philiprbrenan@gmail.com
http://www.appaapps.com
Copyright
Copyright (c) 2017 Philip R Brenan.
This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.