Bit::Vector โ Efficient bit vector, set of integers and "big int" math library
| Use Case | Command | Description |
|---|---|---|
| ๐ฆ Create a bit vector | Bit::Vector->new($bits) | Create a new bit vector of given size, all bits cleared |
| ๐ข Create from hex string | Bit::Vector->new_Hex($bits,$string) | Create and initialize from hexadecimal string |
| ๐ข Create from binary string | Bit::Vector->new_Bin($bits,$string) | Create and initialize from binary string |
| ๐ข Create from decimal string | Bit::Vector->new_Dec($bits,$string) | Create and initialize from decimal string |
| ๐ข Create from enumeration | Bit::Vector->new_Enum($bits,$string) | Create and initialize from "2,3,5-7" style string |
| ๐ Get size | $vector->Size() | Return number of bits in the vector |
| โ๏ธ Resize | $vector->Resize($bits) | Change size, preserving lower bits |
| ๐ Clone | $vec2 = $vec1->Clone() | Create exact duplicate |
| ๐ Shadow | $vec2 = $vec1->Shadow() | Create same-size empty vector |
| ๐ Copy | $vec2->Copy($vec1) | Copy contents (sign extension if larger) |
| ๐งน Empty | $vector->Empty() | Clear all bits |
| ๐งน Fill | $vector->Fill() | Set all bits |
| ๐ Flip | $vector->Flip() | Complement all bits |
| ๐ Test bit | $vector->bit_test($index) | Return 0/1 for bit at index |
| ๐ Contains | $vector->contains($index) | Same as bit_test |
| โ๏ธ Set bit | $vector->Bit_On($index) | Set bit at index to 1 |
| โ๏ธ Clear bit | $vector->Bit_Off($index) | Set bit at index to 0 |
| โ๏ธ Flip bit | $vector->bit_flip($index) | Toggle bit, return new state |
| โ๏ธ Copy bit | $vector->Bit_Copy($index,$bit) | Set bit to given boolean |
| ๐ข Convert to hex | $string = $vector->to_Hex() | Return hexadecimal string |
| ๐ข Import from hex | $vector->from_Hex($string) | Read from hex string |
| ๐ข Convert to binary | $string = $vector->to_Bin() | Return binary string |
| ๐ข Import from binary | $vector->from_Bin($string) | Read from binary string |
| ๐ข Convert to decimal | $string = $vector->to_Dec() | Return decimal string (signed) |
| ๐ข Import from decimal | $vector->from_Dec($string) | Read from decimal string |
| ๐ข Convert to enumeration | $string = $vector->to_Enum() | Return "2,3,5-7" style string |
| ๐ข Import from enumeration | $vector->from_Enum($string) | Read from enumeration string |
| โ Increment | $carry = $vector->increment() | Add 1 to vector (unsigned) |
| โ Decrement | $carry = $vector->decrement() | Subtract 1 (unsigned) |
| โ Add | $vec3->add($vec1,$vec2,$carry) | Add with carry, returns (carry,overflow) |
| โ Subtract | $vec3->subtract($vec1,$vec2,$carry) | Subtract with carry |
| โ๏ธ Multiply | $vec3->Multiply($vec1,$vec2) | Multiply (signed), result may be larger |
| โ Divide | $quot->Divide($vec1,$vec2,$rest) | Divide, get quotient and remainder |
| ๐ข Negate | $vec2->Neg($vec1) | Two's complement negation |
| ๐ข Absolute | $vec2->Abs($vec1) | Absolute value |
| ๐ข Compare (unsigned) | $vec1->Lexicompare($vec2) | Return -1,0,1 |
| ๐ข Compare (signed) | $vec1->Compare($vec2) | Return -1,0,1 |
| ๐ข Equality | $vec1->equal($vec2) | Return boolean |
| ๐ข Is empty | $vector->is_empty() | True if all bits zero |
| ๐ข Is full | $vector->is_full() | True if all bits one |
| ๐ข Rotate left | $carry = $vector->rotate_left() | Circular shift left through carry |
| ๐ข Rotate right | $carry = $vector->rotate_right() | Circular shift right through carry |
| ๐ข Shift left | $carry = $vector->shift_left($carry_in) | Shift left, feed carry |
| ๐ข Shift right | $carry = $vector->shift_right($carry_in) | Shift right, feed carry |
| ๐ข Move left (multiple bits) | $vector->Move_Left($bits) | Shift left by $bits positions |
| ๐ข Move right | $vector->Move_Right($bits) | Shift right by $bits positions |
| ๐ข Insert bits | $vector->Insert($offset,$bits) | Insert cleared bits at offset, lose top bits |
| ๐ข Delete bits | $vector->Delete($offset,$bits) | Remove bits at offset, zeros at top |
| ๐ข Interval empty | $vector->Interval_Empty($min,$max) | Clear range of bits |
| ๐ข Interval fill | $vector->Interval_Fill($min,$max) | Set range of bits |
| ๐ข Interval flip | $vector->Interval_Flip($min,$max) | Complement range |
| ๐ข Interval reverse | $vector->Interval_Reverse($min,$max) | Reverse bit order in range |
| ๐ Scan intervals (ascending) | ($min,$max) = $vector->Interval_Scan_inc($start) | Find next block of set bits upward |
| ๐ Scan intervals (descending) | ($min,$max) = $vector->Interval_Scan_dec($start) | Find next block of set bits downward |
| ๐ Interval copy | $vec2->Interval_Copy($vec1,$off2,$off1,$len) | Copy a stretch of bits between vectors |
| ๐ Interval substitute (splice) | $vec2->Interval_Substitute($vec1,$off2,$len2,$off1,$len1) | Replace/insert/delete bits, auto-resize |
| ๐ข Block store (binary) | $vector->Block_Store($buffer) | Load vector from binary string (low byte first) |
| ๐ข Block read | $buffer = $vector->Block_Read() | Export vector as binary string |
| ๐ข Word store (machine-dependent) | $vector->Word_Store($offset,$word) | Store a machine word at given offset |
| ๐ข Word read | $word = $vector->Word_Read($offset) | Read a machine word |
| ๐ข Chunk store (portable) | $vector->Chunk_Store($chunksize,$offset,$chunk) | Store a chunk of bits (1 to Long_Bits) |
| ๐ข Chunk read | $chunk = $vector->Chunk_Read($chunksize,$offset) | Read a chunk of bits |
| ๐ข Prime sieve | $vector->Primes() | Set bits at prime indices |
| ๐ข Reverse | $vec2->Reverse($vec1) | Reverse the order of all bits |
| ๐ข Set operations (union) | $vec3->Or($vec1,$vec2) | Bitwise OR |
| ๐ข Intersection | $vec3->And($vec1,$vec2) | Bitwise AND |
| ๐ข Difference | $vec3->AndNot($vec1,$vec2) | Bitwise AND NOT |
| ๐ข Symmetric difference | $vec3->Xor($vec1,$vec2) | Bitwise XOR |
| ๐ข Complement | $vec2->Not($vec1) | Bitwise NOT |
| ๐ข Subset test | $set1->subset($set2) | True if all bits of set1 are in set2 |
| ๐ข Norm (population count) | $norm = $set->Norm() | Number of set bits |
| ๐ข Min/Max | $min = $set->Min(); $max = $set->Max() | Smallest/largest index with set bit |
| ๐ข GCD | $vecgcd->GCD($veca,$vecb) | Greatest Common Divisor |
| ๐ข Power | $vec3->Power($vec1,$vec2) | Exponentiation (base**exp) |
| ๐ข Matrix multiplication (XOR) | $m3->Multiplication(...) | Boolean matrix multiplication (XOR sum) |
| ๐ข Matrix product (OR) | $m3->Product(...) | Boolean matrix multiplication (OR sum) |
| ๐ข Transitive closure | $matrix->Closure($rows,$cols) | Reflexive transitive closure (Kleene) |
| ๐ข Transpose | $matrix2->Transpose(...) | Transpose a boolean matrix |
See Bit::Vector::Overload(3).
See Bit::Vector::String(3).
$version = Bit::Vector->Version(); โ Returns version number$bits = Bit::Vector->Word_Bits(); โ Number of bits in a machine word (unsigned int)$bits = Bit::Vector->Long_Bits(); โ Number of bits in an unsigned long$vector = Bit::Vector->new($bits); โ Constructor, creates vector with $bits bits (cleared)@veclist = Bit::Vector->new($bits,$count); โ Create multiple vectors$vector = Bit::Vector->new_Hex($bits,$string); โ Constructor from hex$vector = Bit::Vector->new_Bin($bits,$string); โ Constructor from binary$vector = Bit::Vector->new_Dec($bits,$string); โ Constructor from decimal$vector = Bit::Vector->new_Enum($bits,$string); โ Constructor from enumeration$vector = Bit::Vector->Concat_List(@vectors); โ Concatenate list of vectors$vec2 = $vec1->new($bits); โ Alternative constructor call@veclist = $vec->new($bits,$count); โ Multiple vectors via object$vec2 = $vec1->Shadow(); โ Same size, empty vector$vec2 = $vec1->Clone(); โ Exact duplicate$vector = $vec1->Concat($vec2); โ Concatenate two vectors$vector = $vec1->Concat_List($vec2,$vec3,...); โ Concatenate list$bits = $vector->Size(); โ Number of bits$vector->Resize($bits); โ Change size$vec2->Copy($vec1); โ Copy with sign extension$vector->Empty(); โ Clear all bits$vector->Fill(); โ Set all bits$vector->Flip(); โ Complement all bits$vector->Primes(); โ Sieve of Eratosthenes$vec2->Reverse($vec1); โ Reverse bit order$vector->Interval_Empty($min,$max); โ Clear range$vector->Interval_Fill($min,$max); โ Set range$vector->Interval_Flip($min,$max); โ Flip range$vector->Interval_Reverse($min,$max); โ Reverse range($min,$max) = $vector->Interval_Scan_inc($start) โ Next set block upward($min,$max) = $vector->Interval_Scan_dec($start) โ Next set block downward$vec2->Interval_Copy($vec1,$offset2,$offset1,$length); โ Copy interval$vec2->Interval_Substitute($vec1,$off2,$len2,$off1,$len1); โ Splice-like operation$vector->is_empty() โ Boolean: all bits zero$vector->is_full() โ Boolean: all bits one$vec1->equal($vec2) โ Boolean: equality$vec1->Lexicompare($vec2) โ Unsigned comparison (-1,0,1)$vec1->Compare($vec2) โ Signed comparison$string = $vector->to_Hex() โ Export hex$vector->from_Hex($string) โ Import hex$string = $vector->to_Bin() โ Export binary$vector->from_Bin($string) โ Import binary$string = $vector->to_Dec() โ Export decimal (signed)$vector->from_Dec($string) โ Import decimal$string = $vector->to_Enum() โ Export enumeration$vector->from_Enum($string) โ Import enumeration$vector->Bit_Off($index); โ Clear bit$vector->Bit_On($index); โ Set bit$bit = $vector->bit_flip($index) โ Flip bit, return new state$bit = $vector->bit_test($index) โ Test bit$vector->Bit_Copy($index,$bit); โ Copy boolean to bit$vector->LSB($bit); โ Set least significant bit$vector->MSB($bit); โ Set most significant bit$bit = $vector->lsb(); โ Get LSB$bit = $vector->msb(); โ Get MSB$carry = $vector->rotate_left(); โ Left rotate through carry$carry = $vector->rotate_right(); โ Right rotate$carry = $vector->shift_left($carry_in); โ Left shift with carry in$carry = $vector->shift_right($carry_in); โ Right shift$vector->Move_Left($bits); โ Shift left by $bits positions$vector->Move_Right($bits); โ Shift right by $bits positions$vector->Insert($offset,$bits); โ Insert cleared bits, lose top bits$vector->Delete($offset,$bits); โ Delete bits, zeros at top$carry = $vector->increment(); โ Add 1 (unsigned)$carry = $vector->decrement(); โ Subtract 1 (unsigned)$overflow = $vec2->inc($vec1); โ Increment copy$overflow = $vec2->dec($vec1); โ Decrement copy$carry = $vec3->add($vec1,$vec2,$carry); โ Add with carry$carry = $vec3->subtract($vec1,$vec2,$carry); โ Subtract with carry$vec2->Neg($vec1); โ Two's complement negation$vec2->Abs($vec1); โ Absolute value$sign = $vector->Sign(); โ Return -1,0,1$vec3->Multiply($vec1,$vec2); โ Multiplication (signed)$quot->Divide($vec1,$vec2,$rest); โ Division, quotient and remainder$vecgcd->GCD($veca,$vecb); โ Greatest Common Divisor$vecgcd->GCD($vecx,$vecy,$veca,$vecb); โ GCD with linear combination$vec3->Power($vec1,$vec2); โ Exponentiation$vector->Block_Store($buffer); โ Load from binary string$buffer = $vector->Block_Read(); โ Export as binary string$size = $vector->Word_Size(); โ Number of machine words$vector->Word_Store($offset,$word); โ Store a word$word = $vector->Word_Read($offset); โ Read a word$vector->Word_List_Store(@words); โ Store list of words@words = $vector->Word_List_Read(); โ Read list of words$vector->Word_Insert($offset,$count); โ Insert words$vector->Word_Delete($offset,$count); โ Delete words$vector->Chunk_Store($chunksize,$offset,$chunk); โ Store a chunk$chunk = $vector->Chunk_Read($chunksize,$offset); โ Read a chunk$vector->Chunk_List_Store($chunksize,@chunks); โ Store list of chunks@chunks = $vector->Chunk_List_Read($chunksize); โ Read list of chunks$vector->Index_List_Remove(@indices); โ Turn off bits at indices$vector->Index_List_Store(@indices); โ Turn on bits at indices@indices = $vector->Index_List_Read(); โ List of indices with set bits$vec3->Or($vec1,$vec2); โ Union (bitwise OR)$vec3->And($vec1,$vec2); โ Intersection (AND)$vec3->AndNot($vec1,$vec2); โ Difference (AND NOT)$vec3->Xor($vec1,$vec2); โ Symmetric difference (XOR)$vec2->Not($vec1); โ Complement (NOT)$set1->subset($set2) โ Subset test$norm = $set->Norm(); โ Population count (byte lookup)$norm = $set->Norm2(); โ Population count (min-set/cleared)$norm = $set->Norm3(); โ Population count (per set bit)$min = $set->Min(); โ Minimum index with set bit$max = $set->Max(); โ Maximum index with set bit$m3->Multiplication($r3,$c3,$m1,$r1,$c1,$m2,$r2,$c2); โ Boolean matrix multiplication (XOR)$m3->Product($r3,$c3,$m1,$r1,$c1,$m2,$r2,$c2); โ Boolean matrix multiplication (OR)$matrix->Closure($rows,$cols); โ Reflexive transitive closure$matrix2->Transpose($rows2,$cols2,$matrix1,$rows1,$cols1); โ Transpose matrixnew()).Block_Read()/Block_Store(). Binary/hex strings have LSB at right.Word_ are MACHINE-DEPENDENT. Use Chunk_ methods for portability (chunk size โค 32 bits).Long_Bits(). For portability, use โค 32 bits.Concat, Concat_List, Copy, Interval_Copy, Interval_Substitute, Multiply (result may be larger), Power (result โฅ base).$vector->Size()-1.Storable automatically.See Bit::Vector::Overload(3).
See Bit::Vector::String(3).
$version = Bit::Vector->Version(); โ Returns version number.$bits = Bit::Vector->Word_Bits(); โ Number of bits in an unsigned int (machine word).$bits = Bit::Vector->Long_Bits(); โ Number of bits in an unsigned long.$vector = Bit::Vector->new($bits); โ Creates a new bit vector of given size, all bits cleared. Zero-length vectors are permitted. Raises exception on memory failure.@veclist = Bit::Vector->new($bits,$count); โ Creates multiple vectors. Returns empty list if $count=0.$vector = Bit::Vector->new_Hex($bits,$string); โ Creates and initializes from hex string. More efficient than separate new() and from_Hex().$vector = Bit::Vector->new_Bin($bits,$string); โ Creates and initializes from binary string.$vector = Bit::Vector->new_Dec($bits,$string); โ Creates and initializes from decimal string.$vector = Bit::Vector->new_Enum($bits,$string); โ Creates and initializes from enumeration string (e.g., "2,3,5-7").$vector = Bit::Vector->Concat_List(@vectors); โ Concatenates all vectors. Rightmost becomes least significant. Empty list returns empty vector.$vec2 = $vec1->new($bits); โ Alternative constructor call, $vec1 is unused.$vec2 = $vec1->Shadow(); โ Creates new vector of same size, all zeros.$vec2 = $vec1->Clone(); โ Creates exact duplicate.$vector = $vec1->Concat($vec2); โ Concatenates $vec1 (most significant) and $vec2 (least significant).$vector = $vec1->Concat_List($vec2,$vec3,...); โ Concatenates list.$bits = $vector->Size(); โ Returns number of bits.$vector->Resize($bits); โ Changes size, preserving lower bits. May reuse memory. Zero-length permitted.$vec2->Copy($vec1); โ Copies contents with sign extension if target larger. If source larger, truncates lower bits.$vector->Empty(); โ Clears all bits.$vector->Fill(); โ Sets all bits.$vector->Flip(); โ Complements all bits.$vector->Primes(); โ Sets bits at prime indices using Sieve of Eratosthenes.$vec2->Reverse($vec1); โ Reverses bit order.$vector->Interval_Empty($min,$max); โ Clears bits in range [min,max].$vector->Interval_Fill($min,$max); โ Sets bits in range.$vector->Interval_Flip($min,$max); โ Flips bits in range.$vector->Interval_Reverse($min,$max); โ Reverses bit order in range.($min,$max) = $vector->Interval_Scan_inc($start) โ Returns next contiguous block of set bits starting from $start upward. Returns empty list if none.($min,$max) = $vector->Interval_Scan_dec($start) โ Same but searches downward.$vec2->Interval_Copy($vec1,$offset2,$offset1,$length); โ Copies a stretch of bits from $vec1 to $vec2. Length auto-truncated if out of bounds. Handles overlapping intervals.$vec2->Interval_Substitute($vec1,$off2,$len2,$off1,$len1); โ Splice operation: replaces interval in $vec2 with interval from $vec1. Automatically resizes $vec2. If $len1=0: delete interval. If $len2=0: insert. In-place possible.$vector->is_empty() โ Returns true if all bits are zero (or length zero).$vector->is_full() โ Returns true if all bits are one. For length zero returns false.$vec1->equal($vec2) โ Returns true if vectors are identical.$vec1->Lexicompare($vec2) โ Unsigned comparison: returns -1, 0, or 1.$vec1->Compare($vec2) โ Signed comparison.$string = $vector->to_Hex() โ Returns hexadecimal string (LSB at right).$vector->from_Hex($string) โ Reads from hex string. Too-short string clears remaining bits. Too-long string ignores extra characters. Syntax error on invalid characters.$string = $vector->to_Bin() โ Returns binary string (LSB at right).$vector->from_Bin($string) โ Reads from binary string. Same truncation behavior as from_Hex.$string = $vector->to_Dec() โ Returns decimal string (signed). Uses divide-and-conquer for speed. Beware: large positive numbers may appear negative if MSB set.$vector->from_Dec($string) โ Reads decimal string (signed). Overflow error if number doesn't fit. Use eval to catch errors.$string = $vector->to_Enum() โ Returns enumeration string (e.g., "2,3,5-7").$vector->from_Enum($string) โ Parses enumeration string. Indices and ranges may overlap. Syntax error on invalid characters.$vector->Bit_Off($index); โ Clears bit at index.$vector->Bit_On($index); โ Sets bit.$bit = $vector->bit_flip($index) โ Flips bit, returns new state.$bit = $vector->bit_test($index) โ Returns 0 or 1.$vector->Bit_Copy($index,$bit); โ Sets bit to given boolean.$vector->LSB($bit); โ Sets least significant bit.$vector->MSB($bit); โ Sets most significant bit.$bit = $vector->lsb(); โ Returns LSB.$bit = $vector->msb(); โ Returns MSB.$carry = $vector->rotate_left(); โ Rotates left through carry. LSB moves to MSB? Actually: LSB becomes carry, carry becomes MSB? Wait, diagram shows LSB becomes carry, MSB becomes LSB? The diagram: LSB carry, MSB rotate_right(); โ Rotates right.$carry = $vector->shift_left($carry_in); โ Shifts left, LSB gets carry_in, MSB becomes carry_out.$carry = $vector->shift_right($carry_in); โ Shifts right, MSB gets carry_in, LSB becomes carry_out.$vector->Move_Left($bits); โ Shifts left by $bits positions, losing top bits, inserting zeros at bottom. If $bits >= size, vector becomes zero.$vector->Move_Right($bits); โ Shifts right by $bits positions, losing bottom bits, inserting zeros at top.$vector->Insert($offset,$bits); โ Inserts $bits cleared bits at $offset, shifting existing bits up, losing top $bits bits. Does not grow vector.$vector->Delete($offset,$bits); โ Removes $bits bits at $offset, shifting remaining bits down, zeros at top. Does not shrink.$carry = $vector->increment(); โ Increments (unsigned). Returns carry if overflow.$carry = $vector->decrement(); โ Decrements (unsigned). Returns carry if underflow.$overflow = $vec2->inc($vec1); โ Increments a copy, returns overflow flag.$overflow = $vec2->dec($vec1); โ Decrements a copy.$carry = $vec3->add($vec1,$vec2,$carry); โ Addition with carry. In list context returns (carry, overflow). Overflow is true if sign is wrong due to carry.$carry = $vec3->subtract($vec1,$vec2,$carry); โ Subtraction with carry. Returns (carry, overflow) in list context.$vec2->Neg($vec1); โ Two's complement negation. Beware: negating 2^(n-1) yields itself.$vec2->Abs($vec1); โ Absolute value. Same caveat for 2^(n-1).$sign = $vector->Sign(); โ Returns 0 if zero, -1 if negative, 1 if positive.$vec3->Multiply($vec1,$vec2); โ Signed multiplication. Result vector may be larger than factors. Overflow error if result doesn't fit.$quot->Divide($vec1,$vec2,$rest); โ Signed division. $quot and $rest must be distinct. Division by zero error.$vecgcd->GCD($veca,$vecb); โ Greatest Common Divisor (Euclid's algorithm).$vecgcd->GCD($vecx,$vecy,$veca,$vecb); โ Extended GCD: finds x,y such that GCD = x*a + y*b.$vec3->Power($vec1,$vec2); โ Exponentiation: $vec1 ** $vec2. $vec3 must be same size as base or larger. $vec2 must be positive.$vector->Block_Store($buffer); โ Loads vector from binary string (low byte first).$buffer = $vector->Block_Read(); โ Exports vector as binary string.$size = $vector->Word_Size(); โ Number of machine words.$vector->Word_Store($offset,$word); โ Stores a word at offset.$word = $vector->Word_Read($offset); โ Reads a word.$vector->Word_List_Store(@words); โ Stores list of words (first becomes least significant).@words = $vector->Word_List_Read(); โ Reads all words.$vector->Word_Insert($offset,$count); โ Inserts $count cleared words at offset, loses top words.$vector->Word_Delete($offset,$count); โ Deletes words at offset, zeros at top.$vector->Chunk_Store($chunksize,$offset,$chunk); โ Stores a chunk of bits (1..Long_Bits).$chunk = $vector->Chunk_Read($chunksize,$offset); โ Reads a chunk.$vector->Chunk_List_Store($chunksize,@chunks); โ Fills vector with list of chunks.@chunks = $vector->Chunk_List_Read($chunksize); โ Reads vector as list of chunks. Beware of large lists.$vector->Index_List_Remove(@indices); โ Turns off bits at given indices. Does not clear vector first.$vector->Index_List_Store(@indices); โ Turns on bits at indices. Does not clear vector first.@indices = $vector->Index_List_Read(); โ Returns list of indices of set bits (ascending). Beware of large lists.$vec3->Or($vec1,$vec2); โ Union (bitwise OR).$vec3->And($vec1,$vec2); โ Intersection (AND).$vec3->AndNot($vec1,$vec2); โ Difference (AND NOT).$vec3->Xor($vec1,$vec2); โ Symmetric difference (XOR).$vec2->Not($vec1); โ Complement (NOT).$set1->subset($set2) โ Returns true if $set1 is subset of $set2.$norm = $set->Norm(); โ Returns number of set bits (byte lookup table).$norm = $set->Norm2(); โ Population count using min(set, cleared bits).$norm = $set->Norm3(); โ Population count per set bit (slow for dense).$min = $set->Min(); โ Smallest index with set bit, or MAX_LONG if empty.$max = $set->Max(); โ Largest index with set bit, or MIN_LONG if empty.$m3->Multiplication($r3,$c3,$m1,$r1,$c1,$m2,$r2,$c2); โ Boolean matrix multiplication (XOR as addition).$m3->Product($r3,$c3,$m1,$r1,$c1,$m2,$r2,$c2); โ Boolean matrix multiplication (OR as addition).$matrix->Closure($rows,$cols); โ Reflexive transitive closure (Kleene's algorithm). Modifies matrix in place.$matrix2->Transpose($rows2,$cols2,$matrix1,$rows1,$cols1); โ Transpose matrix. In-place only if quadratic.Bit::Vector::Overload(3), Bit::Vector::String(3), Storable(3).
Set::IntRange(3), Math::MatrixBool(3), Math::MatrixReal(3), DFA::Kleene(3), Math::Kleene(3), Graph::Kruskal(3).
This document describes Bit::Vector version 7.4.
Steffen Beyer
STBEY@cpan.org
http://www.engelschall.com/u/sb/download/
Copyright (c) 1995 - 2013 by Steffen Beyer. All rights reserved.
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, i.e., under the terms of the "Artistic License" or the "GNU General Public License".
The C library at the core of this Perl module can additionally be redistributed and/or modified under the terms of the "GNU Library General Public License".
This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Generated by phpman v4.9.26-1-g511901d Author: Che Dong Under GNU General Public License
2026-08-09 09:21 @2600:1f28:365:80b0:50b3:453e:ff52:20f7
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format