Name : perl-Math-Combinatorics
| |
Version : 0.09
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.8.1
| Date : 2023-07-20 17:39:30
|
Group : Development/Libraries/Perl
| Source RPM : perl-Math-Combinatorics-0.09-lp155.8.1.src.rpm
|
Size : 0.04 MB
| |
Packager : https://www_suse_com/
| |
Summary : Perform combinations and permutations on lists
|
Description :
Combinatorics is the branch of mathematics studying the enumeration, combination, and permutation of sets of elements and the mathematical relations that characterize their properties. As a jumping off point, refer to:
http://mathworld.wolfram.com/Combinatorics.html
This module provides a pure-perl implementation of nCk, nCRk, nPk, nPRk, !n and n! (combination, multiset, permutation, string, derangement, and factorial, respectively). Functional and object-oriented usages allow problems such as the following to be solved:
* combine - nCk
http://mathworld.wolfram.com/Combination.html
\"Fun questions to ask the pizza parlor wait staff: how many possible combinations of 2 toppings can I get on my pizza?\".
* derange - !n
http://mathworld.wolfram.com/Derangement.html
\"A derangement of n ordered objects, denoted !n, is a permutation in which none of the objects appear in their \"natural\" (i.e., ordered) place.\"
* permute - nPk
http://mathworld.wolfram.com/Permutation.html
\"Master Mind Game: ways to arrange pieces of different colors in a certain number of positions, without repetition of a color\".
Object-oriented usage additionally allows solving these problems by calling the /new() manpage with a *frequency* vector:
* string - nPRk
http://mathworld.wolfram.com/String.html
\"Morse signals: diferent signals of 3 positions using the two symbols - and .\".
$o = Math::Combinatorics->new( count=>3 , data=>[qw(. -)] , frequency=>[3,3] ); while ( my AATTx = $o->next_multiset ) { my $p = Math::Combinatorics->new( data=>\\AATTx , frequency=>[map{1} AATTx] ); while ( my AATTy = $p->next_string ) { } }
* multiset/multichoose - nCRk
http://mathworld.wolfram.com/Multiset.html
\"ways to extract 3 balls at once of a bag with 3 black and 3 white balls\".
$o = Math::Combinatorics->new( count=>3 , data=>[qw(white black)] , frequency=>[3,3] ); while ( my AATTx = $o->next_multiset ) { }
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-M/15.5/noarch |