Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 71 | All time: 10,265 This week: 206 |
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 (8) |
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 |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
bitmask-generator-2017-01-12.zip 16KB | |
bitmask-generator-2017-01-12.tar.gz 15KB | |
Install with Composer |
Needed packages | ||
Class | Download | Why it is needed | Dependency |
---|---|---|---|
Lexographical PHP Permutations Generator | .zip .tar.gz | Composer dependency. | Required |
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 |