| Recommend this page to a friend! |
| Info | Documentation | Reputation | Support forum | Blog | Links |
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not yet rated by the users | Total: 71 | All time: 10,270 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
| File | Role | Description | ||
|---|---|---|---|---|
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Lic. | License text | |||
| Data | Auxiliary data | |||
| 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. |
| 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 | 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 |