Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2024-06-28 (3 months ago) | | Not yet rated by the users | | Total: 31 | | All time: 11,098 This week: 59 |
|
Description | | Author |
This class can get the combinations and permutations of a set of values.
It can take an array of numbers and calculate the combinations and the permutations between the numbers in the array.
The class returns an array with the resulting combinations and permutations. | |
|
|
Innovation award
Nominee: 17x
Winner: 1x |
|
Example
<?php
require_once 'Combinatorics.php';
$combinatorics = new Math_Combinatorics;
$set = range(0, 9);
$asc_num = 97;
while ($asc_num<= 122) {
# code...
array_push($set, chr($asc_num));
$asc_num++;
}
//??
echo $combinations = $combinatorics->combinations($set, 16);
//??
//$permutations = $combinatorics->permutations($set, 16);
?>
|
Details
Math_Combinatorics
This project is appropriate for someone who want to know about the combinations and permumentations.
different
If you use Math_Combinatorics, it will happen an error that show memories' limit.In order to solving problem,I tried to
changing source code.I use file_put_content function that stroe strings when generating a new possible string right away.
I also free the variable's memory which assigned the possible string so that it will not happen memories' error.
Requirement
It's only have to use PHP command line.
Dependency
It depends on this package: Math_Combinatorics
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.