Data::Password::zxcvbn::Combinatorics - some combinatorial functions
version 1.0.0
This module provides a few combinatorial functions that are used throughout the library.
nCk
my $combinations = nCk($available,$taken);
Returns the binomial coefficient:
/ $available \ | | \ $taken /
enumerate_substitution_maps
my $enumeration = enumerate_substitution_maps(\%substitutions);
Given a hashref of arrayrefs, interprets it as a map of substitutions. Returns an arrayref of hashrefs, containing all reverse-substitutions.
For example, given:
{'a' => ['@', '4']}
("'a' can be replaced with either '@' or '4'")
it returns:
[{'@' => 'a'}, {'4' => 'a'}] ],
("in one case, '@' could have been substituted for 'a'; in the other, '4' could have been substituted for 'a'")
factorial
my $fact = factorial($number);
Returns the factorial of the given number.
Gianni Ceccarelli <gianni.ceccarelli@broadbean.com>
This software is copyright (c) 2018 by BroadBean UK, a CareerBuilder Company.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Data::Password::zxcvbn, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Password::zxcvbn
CPAN shell
perl -MCPAN -e shell install Data::Password::zxcvbn
For more information on module installation, please visit the detailed CPAN module installation guide.