Download .zip |
Info | Documentation | View files (8) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2017-01-12 (2 months ago) | Not yet rated by the users | Total: 47 | All time: 8,775 This week: 802 |
Version | License | PHP version | Categories | |||
bitmask-generator 1.0.0 | GNU General Publi... | 5 | Algorithms, PHP 5, Text processing |
Usage:
use Jelle_S\Util\BitMask\BitMaskGenerator;
$length = 5;
$minPositives = 2;
// BitMaskGenerator that generates bitmasks with a length of 5 and at least two
// positives (1's).
$generator = new BitMaskGenerator($length, $minPositives);
while ($mask = $generator->getNextMask()) {
print $mask . "\n";
}
Output:
00011
00101
00110
01001
01010
01100
10001
10010
10100
11000
00111
01011
01101
01110
10011
10101
10110
11001
11010
11100
01111
10111
11011
11101
11110
11111
Files |
File | Role | Description | ||
---|---|---|---|---|
src (1 file) | ||||
tests (1 file) | ||||
.codeclimate.yml | Data | Auxiliary data | ||
.travis.yml | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
phpunit.xml | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Version Control | Reuses | Unique User Downloads | Download Rankings | ||||||||||||||||
100% | 1 |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Other classes that need this package |
Class | Why it is needed | Dependency |
---|---|---|
PHP Array Intersections | Composer dependency. | Required |