{
    "content": [
        {
            "type": "text",
            "text": "# Bit::Vector (perldoc)\n\n## NAME\n\nBit::Vector - Efficient bit vector, set of integers and \"big int\" math library\n\n## SYNOPSIS\n\nOVERLOADED OPERATORS\nSee Bit::Vector::Overload(3).\nMORE STRING IMPORT/EXPORT\nSee Bit::Vector::String(3).\nCLASS METHODS\nVersion\n$version = Bit::Vector->Version();\nWordBits\n$bits = Bit::Vector->WordBits();  #  bits in a machine word\nLongBits\n$bits = Bit::Vector->LongBits();  #  bits in an unsigned long\nnew\n$vector = Bit::Vector->new($bits);  #  bit vector constructor\n@veclist = Bit::Vector->new($bits,$count);\nnewHex\n$vector = Bit::Vector->newHex($bits,$string);\nnewBin\n$vector = Bit::Vector->newBin($bits,$string);\nnewDec\n$vector = Bit::Vector->newDec($bits,$string);\nnewEnum\n$vector = Bit::Vector->newEnum($bits,$string);\nConcatList\n$vector = Bit::Vector->ConcatList(@vectors);\nOBJECT METHODS\nnew\n$vec2 = $vec1->new($bits);  #  alternative call of constructor\n@veclist = $vec->new($bits,$count);\nShadow\n$vec2 = $vec1->Shadow();  #  new vector, same size but empty\nClone\n$vec2 = $vec1->Clone();  #  new vector, exact duplicate\nConcat\n$vector = $vec1->Concat($vec2);\nConcatList\n$vector = $vec1->ConcatList($vec2,$vec3,...);\nSize\n$bits = $vector->Size();\nResize\n$vector->Resize($bits);\n$vector->Resize($vector->Size()+5);\n$vector->Resize($vector->Size()-5);\nCopy\n$vec2->Copy($vec1);\nEmpty\n$vector->Empty();\nFill\n$vector->Fill();\nFlip\n$vector->Flip();\nPrimes\n$vector->Primes();  #  Sieve of Erathostenes\nReverse\n$vec2->Reverse($vec1);\nIntervalEmpty\n$vector->IntervalEmpty($min,$max);\nIntervalFill\n$vector->IntervalFill($min,$max);\nIntervalFlip\n$vector->IntervalFlip($min,$max);\nIntervalReverse\n$vector->IntervalReverse($min,$max);\nIntervalScaninc\nif (($min,$max) = $vector->IntervalScaninc($start))\nIntervalScandec\nif (($min,$max) = $vector->IntervalScandec($start))\nIntervalCopy\n$vec2->IntervalCopy($vec1,$offset2,$offset1,$length);\nIntervalSubstitute\n$vec2->IntervalSubstitute($vec1,$off2,$len2,$off1,$len1);\nisempty\nif ($vector->isempty())\nisfull\nif ($vector->isfull())\nequal\nif ($vec1->equal($vec2))\nLexicompare (unsigned)\nif ($vec1->Lexicompare($vec2) == 0)\nif ($vec1->Lexicompare($vec2) != 0)\nif ($vec1->Lexicompare($vec2) <  0)\nif ($vec1->Lexicompare($vec2) <= 0)\nif ($vec1->Lexicompare($vec2) >  0)\nif ($vec1->Lexicompare($vec2) >= 0)\nCompare (signed)\nif ($vec1->Compare($vec2) == 0)\nif ($vec1->Compare($vec2) != 0)\nif ($vec1->Compare($vec2) <  0)\nif ($vec1->Compare($vec2) <= 0)\nif ($vec1->Compare($vec2) >  0)\nif ($vec1->Compare($vec2) >= 0)\ntoHex\n$string = $vector->toHex();\nfromHex\n$vector->fromHex($string);\ntoBin\n$string = $vector->toBin();\nfromBin\n$vector->fromBin($string);\ntoDec\n$string = $vector->toDec();\nfromDec\n$vector->fromDec($string);\ntoEnum\n$string = $vector->toEnum();  #  e.g. \"2,3,5-7,11,13-19\"\nfromEnum\n$vector->fromEnum($string);\nBitOff\n$vector->BitOff($index);\nBitOn\n$vector->BitOn($index);\nbitflip\n$bit = $vector->bitflip($index);\nbittest\ncontains\n$bit = $vector->bittest($index);\n$bit = $vector->contains($index);\nif ($vector->bittest($index))\nif ($vector->contains($index))\nBitCopy\n$vector->BitCopy($index,$bit);\nLSB (least significant bit)\n$vector->LSB($bit);\nMSB (most significant bit)\n$vector->MSB($bit);\nlsb (least significant bit)\n$bit = $vector->lsb();\nmsb (most significant bit)\n$bit = $vector->msb();\nrotateleft\n$carry = $vector->rotateleft();\nrotateright\n$carry = $vector->rotateright();\nshiftleft\n$carry = $vector->shiftleft($carry);\nshiftright\n$carry = $vector->shiftright($carry);\nMoveLeft\n$vector->MoveLeft($bits);  #  shift left \"$bits\" positions\nMoveRight\n$vector->MoveRight($bits);  #  shift right \"$bits\" positions\nInsert\n$vector->Insert($offset,$bits);\nDelete\n$vector->Delete($offset,$bits);\nincrement\n$carry = $vector->increment();\ndecrement\n$carry = $vector->decrement();\ninc\n$overflow = $vec2->inc($vec1);\ndec\n$overflow = $vec2->dec($vec1);\nadd\n$carry = $vec3->add($vec1,$vec2,$carry);\n($carry,$overflow) = $vec3->add($vec1,$vec2,$carry);\nsubtract\n$carry = $vec3->subtract($vec1,$vec2,$carry);\n($carry,$overflow) = $vec3->subtract($vec1,$vec2,$carry);\nNeg\nNegate\n$vec2->Neg($vec1);\n$vec2->Negate($vec1);\nAbs\nAbsolute\n$vec2->Abs($vec1);\n$vec2->Absolute($vec1);\nSign\nif ($vector->Sign() == 0)\nif ($vector->Sign() != 0)\nif ($vector->Sign() <  0)\nif ($vector->Sign() <= 0)\nif ($vector->Sign() >  0)\nif ($vector->Sign() >= 0)\nMultiply\n$vec3->Multiply($vec1,$vec2);\nDivide\n$quot->Divide($vec1,$vec2,$rest);\nGCD (Greatest Common Divisor)\n$vecgcd->GCD($veca,$vecb);\n$vecgcd->GCD($vecx,$vecy,$veca,$vecb);\nPower\n$vec3->Power($vec1,$vec2);\nBlockStore\n$vector->BlockStore($buffer);\nBlockRead\n$buffer = $vector->BlockRead();\nWordSize\n$size = $vector->WordSize();  #  number of words in \"$vector\"\nWordStore\n$vector->WordStore($offset,$word);\nWordRead\n$word = $vector->WordRead($offset);\nWordListStore\n$vector->WordListStore(@words);\nWordListRead\n@words = $vector->WordListRead();\nWordInsert\n$vector->WordInsert($offset,$count);\nWordDelete\n$vector->WordDelete($offset,$count);\nChunkStore\n$vector->ChunkStore($chunksize,$offset,$chunk);\nChunkRead\n$chunk = $vector->ChunkRead($chunksize,$offset);\nChunkListStore\n$vector->ChunkListStore($chunksize,@chunks);\nChunkListRead\n@chunks = $vector->ChunkListRead($chunksize);\nIndexListRemove\n$vector->IndexListRemove(@indices);\nIndexListStore\n$vector->IndexListStore(@indices);\nIndexListRead\n@indices = $vector->IndexListRead();\nOr\nUnion\n$vec3->Or($vec1,$vec2);\n$set3->Union($set1,$set2);\nAnd\nIntersection\n$vec3->And($vec1,$vec2);\n$set3->Intersection($set1,$set2);\nAndNot\nDifference\n$vec3->AndNot($vec1,$vec2);\n$set3->Difference($set1,$set2);\nXor\nExclusiveOr\n$vec3->Xor($vec1,$vec2);\n$set3->ExclusiveOr($set1,$set2);\nNot\nComplement\n$vec2->Not($vec1);\n$set2->Complement($set1);\nsubset\nif ($set1->subset($set2))  #  true if $set1 is subset of $set2\nNorm\n$norm = $set->Norm();\n$norm = $set->Norm2();\n$norm = $set->Norm3();\nMin\n$min = $set->Min();\nMax\n$max = $set->Max();\nMultiplication\n$matrix3->Multiplication($rows3,$cols3,\n$matrix1,$rows1,$cols1,\n$matrix2,$rows2,$cols2);\nProduct\n$matrix3->Product($rows3,$cols3,\n$matrix1,$rows1,$cols1,\n$matrix2,$rows2,$cols2);\nClosure\n$matrix->Closure($rows,$cols);\nTranspose\n$matrix2->Transpose($rows2,$cols2,$matrix1,$rows1,$cols1);\n\n## DESCRIPTION\n\nOVERLOADED OPERATORS\nSee Bit::Vector::Overload(3).\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **IMPORTANT NOTES**\n- **DESCRIPTION**\n- **SEE ALSO**\n- **VERSION**\n- **AUTHOR**\n- **COPYRIGHT**\n- **LICENSE**\n- **DISCLAIMER**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Bit::Vector",
        "section": "",
        "mode": "perldoc",
        "summary": "Bit::Vector - Efficient bit vector, set of integers and \"big int\" math library",
        "synopsis": "OVERLOADED OPERATORS\nSee Bit::Vector::Overload(3).\nMORE STRING IMPORT/EXPORT\nSee Bit::Vector::String(3).\nCLASS METHODS\nVersion\n$version = Bit::Vector->Version();\nWordBits\n$bits = Bit::Vector->WordBits();  #  bits in a machine word\nLongBits\n$bits = Bit::Vector->LongBits();  #  bits in an unsigned long\nnew\n$vector = Bit::Vector->new($bits);  #  bit vector constructor\n@veclist = Bit::Vector->new($bits,$count);\nnewHex\n$vector = Bit::Vector->newHex($bits,$string);\nnewBin\n$vector = Bit::Vector->newBin($bits,$string);\nnewDec\n$vector = Bit::Vector->newDec($bits,$string);\nnewEnum\n$vector = Bit::Vector->newEnum($bits,$string);\nConcatList\n$vector = Bit::Vector->ConcatList(@vectors);\nOBJECT METHODS\nnew\n$vec2 = $vec1->new($bits);  #  alternative call of constructor\n@veclist = $vec->new($bits,$count);\nShadow\n$vec2 = $vec1->Shadow();  #  new vector, same size but empty\nClone\n$vec2 = $vec1->Clone();  #  new vector, exact duplicate\nConcat\n$vector = $vec1->Concat($vec2);\nConcatList\n$vector = $vec1->ConcatList($vec2,$vec3,...);\nSize\n$bits = $vector->Size();\nResize\n$vector->Resize($bits);\n$vector->Resize($vector->Size()+5);\n$vector->Resize($vector->Size()-5);\nCopy\n$vec2->Copy($vec1);\nEmpty\n$vector->Empty();\nFill\n$vector->Fill();\nFlip\n$vector->Flip();\nPrimes\n$vector->Primes();  #  Sieve of Erathostenes\nReverse\n$vec2->Reverse($vec1);\nIntervalEmpty\n$vector->IntervalEmpty($min,$max);\nIntervalFill\n$vector->IntervalFill($min,$max);\nIntervalFlip\n$vector->IntervalFlip($min,$max);\nIntervalReverse\n$vector->IntervalReverse($min,$max);\nIntervalScaninc\nif (($min,$max) = $vector->IntervalScaninc($start))\nIntervalScandec\nif (($min,$max) = $vector->IntervalScandec($start))\nIntervalCopy\n$vec2->IntervalCopy($vec1,$offset2,$offset1,$length);\nIntervalSubstitute\n$vec2->IntervalSubstitute($vec1,$off2,$len2,$off1,$len1);\nisempty\nif ($vector->isempty())\nisfull\nif ($vector->isfull())\nequal\nif ($vec1->equal($vec2))\nLexicompare (unsigned)\nif ($vec1->Lexicompare($vec2) == 0)\nif ($vec1->Lexicompare($vec2) != 0)\nif ($vec1->Lexicompare($vec2) <  0)\nif ($vec1->Lexicompare($vec2) <= 0)\nif ($vec1->Lexicompare($vec2) >  0)\nif ($vec1->Lexicompare($vec2) >= 0)\nCompare (signed)\nif ($vec1->Compare($vec2) == 0)\nif ($vec1->Compare($vec2) != 0)\nif ($vec1->Compare($vec2) <  0)\nif ($vec1->Compare($vec2) <= 0)\nif ($vec1->Compare($vec2) >  0)\nif ($vec1->Compare($vec2) >= 0)\ntoHex\n$string = $vector->toHex();\nfromHex\n$vector->fromHex($string);\ntoBin\n$string = $vector->toBin();\nfromBin\n$vector->fromBin($string);\ntoDec\n$string = $vector->toDec();\nfromDec\n$vector->fromDec($string);\ntoEnum\n$string = $vector->toEnum();  #  e.g. \"2,3,5-7,11,13-19\"\nfromEnum\n$vector->fromEnum($string);\nBitOff\n$vector->BitOff($index);\nBitOn\n$vector->BitOn($index);\nbitflip\n$bit = $vector->bitflip($index);\nbittest\ncontains\n$bit = $vector->bittest($index);\n$bit = $vector->contains($index);\nif ($vector->bittest($index))\nif ($vector->contains($index))\nBitCopy\n$vector->BitCopy($index,$bit);\nLSB (least significant bit)\n$vector->LSB($bit);\nMSB (most significant bit)\n$vector->MSB($bit);\nlsb (least significant bit)\n$bit = $vector->lsb();\nmsb (most significant bit)\n$bit = $vector->msb();\nrotateleft\n$carry = $vector->rotateleft();\nrotateright\n$carry = $vector->rotateright();\nshiftleft\n$carry = $vector->shiftleft($carry);\nshiftright\n$carry = $vector->shiftright($carry);\nMoveLeft\n$vector->MoveLeft($bits);  #  shift left \"$bits\" positions\nMoveRight\n$vector->MoveRight($bits);  #  shift right \"$bits\" positions\nInsert\n$vector->Insert($offset,$bits);\nDelete\n$vector->Delete($offset,$bits);\nincrement\n$carry = $vector->increment();\ndecrement\n$carry = $vector->decrement();\ninc\n$overflow = $vec2->inc($vec1);\ndec\n$overflow = $vec2->dec($vec1);\nadd\n$carry = $vec3->add($vec1,$vec2,$carry);\n($carry,$overflow) = $vec3->add($vec1,$vec2,$carry);\nsubtract\n$carry = $vec3->subtract($vec1,$vec2,$carry);\n($carry,$overflow) = $vec3->subtract($vec1,$vec2,$carry);\nNeg\nNegate\n$vec2->Neg($vec1);\n$vec2->Negate($vec1);\nAbs\nAbsolute\n$vec2->Abs($vec1);\n$vec2->Absolute($vec1);\nSign\nif ($vector->Sign() == 0)\nif ($vector->Sign() != 0)\nif ($vector->Sign() <  0)\nif ($vector->Sign() <= 0)\nif ($vector->Sign() >  0)\nif ($vector->Sign() >= 0)\nMultiply\n$vec3->Multiply($vec1,$vec2);\nDivide\n$quot->Divide($vec1,$vec2,$rest);\nGCD (Greatest Common Divisor)\n$vecgcd->GCD($veca,$vecb);\n$vecgcd->GCD($vecx,$vecy,$veca,$vecb);\nPower\n$vec3->Power($vec1,$vec2);\nBlockStore\n$vector->BlockStore($buffer);\nBlockRead\n$buffer = $vector->BlockRead();\nWordSize\n$size = $vector->WordSize();  #  number of words in \"$vector\"\nWordStore\n$vector->WordStore($offset,$word);\nWordRead\n$word = $vector->WordRead($offset);\nWordListStore\n$vector->WordListStore(@words);\nWordListRead\n@words = $vector->WordListRead();\nWordInsert\n$vector->WordInsert($offset,$count);\nWordDelete\n$vector->WordDelete($offset,$count);\nChunkStore\n$vector->ChunkStore($chunksize,$offset,$chunk);\nChunkRead\n$chunk = $vector->ChunkRead($chunksize,$offset);\nChunkListStore\n$vector->ChunkListStore($chunksize,@chunks);\nChunkListRead\n@chunks = $vector->ChunkListRead($chunksize);\nIndexListRemove\n$vector->IndexListRemove(@indices);\nIndexListStore\n$vector->IndexListStore(@indices);\nIndexListRead\n@indices = $vector->IndexListRead();\nOr\nUnion\n$vec3->Or($vec1,$vec2);\n$set3->Union($set1,$set2);\nAnd\nIntersection\n$vec3->And($vec1,$vec2);\n$set3->Intersection($set1,$set2);\nAndNot\nDifference\n$vec3->AndNot($vec1,$vec2);\n$set3->Difference($set1,$set2);\nXor\nExclusiveOr\n$vec3->Xor($vec1,$vec2);\n$set3->ExclusiveOr($set1,$set2);\nNot\nComplement\n$vec2->Not($vec1);\n$set2->Complement($set1);\nsubset\nif ($set1->subset($set2))  #  true if $set1 is subset of $set2\nNorm\n$norm = $set->Norm();\n$norm = $set->Norm2();\n$norm = $set->Norm3();\nMin\n$min = $set->Min();\nMax\n$max = $set->Max();\nMultiplication\n$matrix3->Multiplication($rows3,$cols3,\n$matrix1,$rows1,$cols1,\n$matrix2,$rows2,$cols2);\nProduct\n$matrix3->Product($rows3,$cols3,\n$matrix1,$rows1,$cols1,\n$matrix2,$rows2,$cols2);\nClosure\n$matrix->Closure($rows,$cols);\nTranspose\n$matrix2->Transpose($rows2,$cols2,$matrix1,$rows1,$cols1);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "Overload",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/Overload/3/json"
            },
            {
                "name": "String",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/String/3/json"
            },
            {
                "name": "Storable",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/Storable/3/json"
            },
            {
                "name": "IntRange",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/IntRange/3/json"
            },
            {
                "name": "MatrixBool",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/MatrixBool/3/json"
            },
            {
                "name": "MatrixReal",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/MatrixReal/3/json"
            },
            {
                "name": "Kleene",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/Kleene/3/json"
            },
            {
                "name": "Kleene",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/Kleene/3/json"
            },
            {
                "name": "Kruskal",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/Kruskal/3/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 362,
                "subsections": []
            },
            {
                "name": "IMPORTANT NOTES",
                "lines": 110,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2090,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "DISCLAIMER",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Bit::Vector - Efficient bit vector, set of integers and \"big int\" math library\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "OVERLOADED OPERATORS\nSee Bit::Vector::Overload(3).\n\nMORE STRING IMPORT/EXPORT\nSee Bit::Vector::String(3).\n\nCLASS METHODS\nVersion\n$version = Bit::Vector->Version();\n\nWordBits\n$bits = Bit::Vector->WordBits();  #  bits in a machine word\n\nLongBits\n$bits = Bit::Vector->LongBits();  #  bits in an unsigned long\n\nnew\n$vector = Bit::Vector->new($bits);  #  bit vector constructor\n\n@veclist = Bit::Vector->new($bits,$count);\n\nnewHex\n$vector = Bit::Vector->newHex($bits,$string);\n\nnewBin\n$vector = Bit::Vector->newBin($bits,$string);\n\nnewDec\n$vector = Bit::Vector->newDec($bits,$string);\n\nnewEnum\n$vector = Bit::Vector->newEnum($bits,$string);\n\nConcatList\n$vector = Bit::Vector->ConcatList(@vectors);\n\nOBJECT METHODS\nnew\n$vec2 = $vec1->new($bits);  #  alternative call of constructor\n\n@veclist = $vec->new($bits,$count);\n\nShadow\n$vec2 = $vec1->Shadow();  #  new vector, same size but empty\n\nClone\n$vec2 = $vec1->Clone();  #  new vector, exact duplicate\n\nConcat\n$vector = $vec1->Concat($vec2);\n\nConcatList\n$vector = $vec1->ConcatList($vec2,$vec3,...);\n\nSize\n$bits = $vector->Size();\n\nResize\n$vector->Resize($bits);\n$vector->Resize($vector->Size()+5);\n$vector->Resize($vector->Size()-5);\n\nCopy\n$vec2->Copy($vec1);\n\nEmpty\n$vector->Empty();\n\nFill\n$vector->Fill();\n\nFlip\n$vector->Flip();\n\nPrimes\n$vector->Primes();  #  Sieve of Erathostenes\n\nReverse\n$vec2->Reverse($vec1);\n\nIntervalEmpty\n$vector->IntervalEmpty($min,$max);\n\nIntervalFill\n$vector->IntervalFill($min,$max);\n\nIntervalFlip\n$vector->IntervalFlip($min,$max);\n\nIntervalReverse\n$vector->IntervalReverse($min,$max);\n\nIntervalScaninc\nif (($min,$max) = $vector->IntervalScaninc($start))\n\nIntervalScandec\nif (($min,$max) = $vector->IntervalScandec($start))\n\nIntervalCopy\n$vec2->IntervalCopy($vec1,$offset2,$offset1,$length);\n\nIntervalSubstitute\n$vec2->IntervalSubstitute($vec1,$off2,$len2,$off1,$len1);\n\nisempty\nif ($vector->isempty())\n\nisfull\nif ($vector->isfull())\n\nequal\nif ($vec1->equal($vec2))\n\nLexicompare (unsigned)\nif ($vec1->Lexicompare($vec2) == 0)\nif ($vec1->Lexicompare($vec2) != 0)\nif ($vec1->Lexicompare($vec2) <  0)\nif ($vec1->Lexicompare($vec2) <= 0)\nif ($vec1->Lexicompare($vec2) >  0)\nif ($vec1->Lexicompare($vec2) >= 0)\n\nCompare (signed)\nif ($vec1->Compare($vec2) == 0)\nif ($vec1->Compare($vec2) != 0)\nif ($vec1->Compare($vec2) <  0)\nif ($vec1->Compare($vec2) <= 0)\nif ($vec1->Compare($vec2) >  0)\nif ($vec1->Compare($vec2) >= 0)\n\ntoHex\n$string = $vector->toHex();\n\nfromHex\n$vector->fromHex($string);\n\ntoBin\n$string = $vector->toBin();\n\nfromBin\n$vector->fromBin($string);\n\ntoDec\n$string = $vector->toDec();\n\nfromDec\n$vector->fromDec($string);\n\ntoEnum\n$string = $vector->toEnum();  #  e.g. \"2,3,5-7,11,13-19\"\n\nfromEnum\n$vector->fromEnum($string);\n\nBitOff\n$vector->BitOff($index);\n\nBitOn\n$vector->BitOn($index);\n\nbitflip\n$bit = $vector->bitflip($index);\n\nbittest\ncontains\n$bit = $vector->bittest($index);\n$bit = $vector->contains($index);\nif ($vector->bittest($index))\nif ($vector->contains($index))\n\nBitCopy\n$vector->BitCopy($index,$bit);\n\nLSB (least significant bit)\n$vector->LSB($bit);\n\nMSB (most significant bit)\n$vector->MSB($bit);\n\nlsb (least significant bit)\n$bit = $vector->lsb();\n\nmsb (most significant bit)\n$bit = $vector->msb();\n\nrotateleft\n$carry = $vector->rotateleft();\n\nrotateright\n$carry = $vector->rotateright();\n\nshiftleft\n$carry = $vector->shiftleft($carry);\n\nshiftright\n$carry = $vector->shiftright($carry);\n\nMoveLeft\n$vector->MoveLeft($bits);  #  shift left \"$bits\" positions\n\nMoveRight\n$vector->MoveRight($bits);  #  shift right \"$bits\" positions\n\nInsert\n$vector->Insert($offset,$bits);\n\nDelete\n$vector->Delete($offset,$bits);\n\nincrement\n$carry = $vector->increment();\n\ndecrement\n$carry = $vector->decrement();\n\ninc\n$overflow = $vec2->inc($vec1);\n\ndec\n$overflow = $vec2->dec($vec1);\n\nadd\n$carry = $vec3->add($vec1,$vec2,$carry);\n($carry,$overflow) = $vec3->add($vec1,$vec2,$carry);\n\nsubtract\n$carry = $vec3->subtract($vec1,$vec2,$carry);\n($carry,$overflow) = $vec3->subtract($vec1,$vec2,$carry);\n\nNeg\nNegate\n$vec2->Neg($vec1);\n$vec2->Negate($vec1);\n\nAbs\nAbsolute\n$vec2->Abs($vec1);\n$vec2->Absolute($vec1);\n\nSign\nif ($vector->Sign() == 0)\nif ($vector->Sign() != 0)\nif ($vector->Sign() <  0)\nif ($vector->Sign() <= 0)\nif ($vector->Sign() >  0)\nif ($vector->Sign() >= 0)\n\nMultiply\n$vec3->Multiply($vec1,$vec2);\n\nDivide\n$quot->Divide($vec1,$vec2,$rest);\n\nGCD (Greatest Common Divisor)\n$vecgcd->GCD($veca,$vecb);\n$vecgcd->GCD($vecx,$vecy,$veca,$vecb);\n\nPower\n$vec3->Power($vec1,$vec2);\n\nBlockStore\n$vector->BlockStore($buffer);\n\nBlockRead\n$buffer = $vector->BlockRead();\n\nWordSize\n$size = $vector->WordSize();  #  number of words in \"$vector\"\n\nWordStore\n$vector->WordStore($offset,$word);\n\nWordRead\n$word = $vector->WordRead($offset);\n\nWordListStore\n$vector->WordListStore(@words);\n\nWordListRead\n@words = $vector->WordListRead();\n\nWordInsert\n$vector->WordInsert($offset,$count);\n\nWordDelete\n$vector->WordDelete($offset,$count);\n\nChunkStore\n$vector->ChunkStore($chunksize,$offset,$chunk);\n\nChunkRead\n$chunk = $vector->ChunkRead($chunksize,$offset);\n\nChunkListStore\n$vector->ChunkListStore($chunksize,@chunks);\n\nChunkListRead\n@chunks = $vector->ChunkListRead($chunksize);\n\nIndexListRemove\n$vector->IndexListRemove(@indices);\n\nIndexListStore\n$vector->IndexListStore(@indices);\n\nIndexListRead\n@indices = $vector->IndexListRead();\n\nOr\nUnion\n$vec3->Or($vec1,$vec2);\n$set3->Union($set1,$set2);\n\nAnd\nIntersection\n$vec3->And($vec1,$vec2);\n$set3->Intersection($set1,$set2);\n\nAndNot\nDifference\n$vec3->AndNot($vec1,$vec2);\n$set3->Difference($set1,$set2);\n\nXor\nExclusiveOr\n$vec3->Xor($vec1,$vec2);\n$set3->ExclusiveOr($set1,$set2);\n\nNot\nComplement\n$vec2->Not($vec1);\n$set2->Complement($set1);\n\nsubset\nif ($set1->subset($set2))  #  true if $set1 is subset of $set2\n\nNorm\n$norm = $set->Norm();\n$norm = $set->Norm2();\n$norm = $set->Norm3();\n\nMin\n$min = $set->Min();\n\nMax\n$max = $set->Max();\n\nMultiplication\n$matrix3->Multiplication($rows3,$cols3,\n$matrix1,$rows1,$cols1,\n$matrix2,$rows2,$cols2);\n\nProduct\n$matrix3->Product($rows3,$cols3,\n$matrix1,$rows1,$cols1,\n$matrix2,$rows2,$cols2);\n\nClosure\n$matrix->Closure($rows,$cols);\n\nTranspose\n$matrix2->Transpose($rows2,$cols2,$matrix1,$rows1,$cols1);\n",
                "subsections": []
            },
            "IMPORTANT NOTES": {
                "content": "* Method naming conventions\n\nMethod names completely in lower case indicate a boolean return value.\n\n(Except for the bit vector constructor method \"\"new()\"\", of course.)\n\n* Boolean values\n\nBoolean values in this module are always a numeric zero (\"0\") for \"false\" and a numeric one\n(\"1\") for \"true\".\n\n* Negative numbers\n\nAll numeric input parameters passed to any of the methods in this module are regarded as being\nUNSIGNED (as opposed to the contents of the bit vectors themselves, which are usually\nconsidered to be SIGNED).\n\nAs a consequence, whenever you pass a negative number as an argument to some method of this\nmodule, it will be treated as a (usually very large) positive number due to its internal two's\ncomplement binary representation, usually resulting in an \"index out of range\" error message\nand program abortion.\n\n* Bit order\n\nNote that bit vectors are stored least order bit and least order word first internally.\n\nI.e., bit #0 of any given bit vector corresponds to bit #0 of word #0 in the array of machine\nwords representing the bit vector.\n\n(Where word #0 comes first in memory, i.e., it is stored at the least memory address in the\nallocated block of memory holding the given bit vector.)\n\nNote however that machine words can be stored least order byte first or last, depending on\nyour system's implementation.\n\nWhen you are exporting or importing a whole bit vector at once using the methods\n\"\"BlockRead()\"\" and \"\"BlockStore()\"\" (the only time in this module where this could make any\ndifference), however, a conversion to and from \"least order byte first\" order is automatically\nsupplied.\n\nIn other words, what \"\"BlockRead()\"\" provides and what \"\"BlockStore()\"\" expects is always in\n\"least order byte first\" order, regardless of the order in which words are stored internally\non your machine.\n\nThis is to make sure that what you export on one machine using \"\"BlockRead()\"\" can always be\nread in correctly with \"\"BlockStore()\"\" on a different machine.\n\nNote further that whenever bit vectors are converted to and from (binary or hexadecimal)\nstrings, the RIGHTMOST bit is always the LEAST SIGNIFICANT one, and the LEFTMOST bit is always\nthe MOST SIGNIFICANT bit.\n\nThis is because in our western culture, numbers are always represented in this way (least\nsignificant to most significant digits go from right to left).\n\nOf course this requires an internal reversion of order, which the corresponding conversion\nmethods perform automatically (without any additional overhead, it's just a matter of starting\nthe internal loop at the bottom or the top end).\n\n* \"Word\" related methods\n\nNote that all methods whose names begin with \"\"Word\"\" are MACHINE-DEPENDENT!\n\nThey depend on the size (number of bits) of an \"unsigned int\" (C type) on your machine.\n\nTherefore, you should only use these methods if you are ABSOLUTELY CERTAIN that portability of\nyour code is not an issue!\n\nNote that you can use arbitrarily large chunks (i.e., fragments of bit vectors) of up to 32\nbits IN A PORTABLE WAY using the methods whose names begin with \"\"Chunk\"\".\n\n* Chunk sizes\n\nNote that legal chunk sizes for all methods whose names begin with \"\"Chunk\"\" range from \"1\"\nto \"\"Bit::Vector->LongBits();\"\" bits (\"0\" is NOT allowed!).\n\nIn order to make your programs portable, however, you shouldn't use chunk sizes larger than 32\nbits, since this is the minimum size of an \"unsigned long\" (C type) on all systems, as\nprescribed by ANSI C.\n\n* Matching sizes\n\nIn general, for methods involving several bit vectors at the same time, all bit vector\narguments must have identical sizes (number of bits), or a fatal \"size mismatch\" error will\noccur.\n\nExceptions from this rule are the methods \"\"Concat()\"\", \"\"ConcatList()\"\", \"\"Copy()\"\",\n\"\"IntervalCopy()\"\" and \"\"IntervalSubstitute()\"\", where no conditions at all are imposed on\nthe size of their bit vector arguments.\n\nIn method \"\"Multiply()\"\", all three bit vector arguments must in principle obey the rule of\nmatching sizes, but the bit vector in which the result of the multiplication is to be stored\nmay be larger than the two bit vector arguments containing the factors for the multiplication.\n\nIn method \"\"Power()\"\", the bit vector for the result must be the same size or greater than the\nbase of the exponentiation term. The exponent can be any size.\n\n* Index ranges\n\nAll indices for any given bits must lie between \"0\" and \"\"$vector->Size()-1\"\", or a fatal\n\"index out of range\" error will occur.\n\n* Object persistence\n\nSince version 6.5, \"Bit::Vector\" objects can be serialized and de-serialized automatically\nwith \"Storable\", out-of-the-box, without requiring any further user action for this to work.\n\nThis is also true for nested data structures (since version 6.8).\n\nSee the Storable(3) documentation for more details.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "OVERLOADED OPERATORS\nSee Bit::Vector::Overload(3).\n\nMORE STRING IMPORT/EXPORT\nSee Bit::Vector::String(3).\n\nCLASS METHODS\n* \"$version = Bit::Vector->Version();\"\n\nReturns the current version number of this module.\n\n* \"$bits = Bit::Vector->WordBits();\"\n\nReturns the number of bits of an \"unsigned int\" (C type) on your machine.\n\n(An \"unsigned int\" is also called a \"machine word\", hence the name of this method.)\n\n* \"$bits = Bit::Vector->LongBits();\"\n\nReturns the number of bits of an \"unsigned long\" (C type) on your machine.\n\n* \"$vector = Bit::Vector->new($bits);\"\n\nThis is the bit vector constructor method.\n\nCall this method to create a new bit vector containing \"$bits\" bits (with indices ranging from\n\"0\" to \"\"$bits-1\"\").\n\nNote that - in contrast to previous versions - bit vectors of length zero (i.e., with \"$bits =\n0\") are permitted now.\n\nThe method returns a reference to the newly created bit vector.\n\nA new bit vector is always initialized so that all bits are cleared (turned off).\n\nAn exception will be raised if the method is unable to allocate the necessary memory.\n\nNote that if you specify a negative number for \"$bits\" it will be interpreted as a large\npositive number due to its internal two's complement binary representation.\n\nIn such a case, the bit vector constructor method will obediently attempt to create a bit\nvector of that size, probably resulting in an exception, as explained above.\n\n* \"@veclist = Bit::Vector->new($bits,$count);\"\n\nYou can also create more than one bit vector at a time if you specify the optional second\nparameter \"$count\".\n\nThe method returns a list of \"$count\" bit vectors which all have the same number of bits\n\"$bits\" (and which are all initialized, i.e., all bits are cleared).\n\nIf \"$count\" is zero, an empty list is returned.\n\nIf \"$bits\" is zero, a list of null-sized bit vectors is returned.\n\nNote again that if you specify a negative number for \"$count\" it will be interpreted as a\nlarge positive number due to its internal two's complement binary representation.\n\nIn such a case, the bit vector constructor method will obediently attempt to create that many\nbit vectors, probably resulting in an exception (\"out of memory\").\n\n* \"$vector = Bit::Vector->newHex($bits,$string);\"\n\nThis method is an alternative constructor which allows you to create a new bit vector object\n(with \"$bits\" bits) and to initialize it all in one go.\n\nThe method internally first calls the bit vector constructor method \"\"new()\"\" and then passes\nthe given string to the method \"\"fromHex()\"\".\n\nHowever, this method is more efficient than performing these two steps separately: First\nbecause in this method, the memory area occupied by the new bit vector is not initialized to\nzeros (which is pointless in this case), and second because it saves you from the associated\noverhead of one additional method invocation.\n\nAn exception will be raised if the necessary memory cannot be allocated (see the description\nof the method \"\"new()\"\" immediately above for possible causes) or if the given string cannot\nbe converted successfully (see the description of the method \"\"fromHex()\"\" further below for\ndetails).\n\nIn the latter case, the memory occupied by the new bit vector is released first (i.e.,\n\"free\"d) before the exception is actually raised.\n\n* \"$vector = Bit::Vector->newBin($bits,$string);\"\n\nThis method is an alternative constructor which allows you to create a new bit vector object\n(with \"$bits\" bits) and to initialize it all in one go.\n\nThe method internally first calls the bit vector constructor method \"\"new()\"\" and then passes\nthe given string to the method \"\"fromBin()\"\".\n\nHowever, this method is more efficient than performing these two steps separately: First\nbecause in this method, the memory area occupied by the new bit vector is not initialized to\nzeros (which is pointless in this case), and second because it saves you from the associated\noverhead of one additional method invocation.\n\nAn exception will be raised if the necessary memory cannot be allocated (see the description\nof the method \"\"new()\"\" above for possible causes) or if the given string cannot be converted\nsuccessfully (see the description of the method \"\"fromBin()\"\" further below for details).\n\nIn the latter case, the memory occupied by the new bit vector is released first (i.e.,\n\"free\"d) before the exception is actually raised.\n\n* \"$vector = Bit::Vector->newDec($bits,$string);\"\n\nThis method is an alternative constructor which allows you to create a new bit vector object\n(with \"$bits\" bits) and to initialize it all in one go.\n\nThe method internally first calls the bit vector constructor method \"\"new()\"\" and then passes\nthe given string to the method \"\"fromDec()\"\".\n\nHowever, this method is more efficient than performing these two steps separately: First\nbecause in this method, \"\"new()\"\" does not initialize the memory area occupied by the new bit\nvector with zeros (which is pointless in this case, because \"\"fromDec()\"\" will do it anyway),\nand second because it saves you from the associated overhead of one additional method\ninvocation.\n\nAn exception will be raised if the necessary memory cannot be allocated (see the description\nof the method \"\"new()\"\" above for possible causes) or if the given string cannot be converted\nsuccessfully (see the description of the method \"\"fromDec()\"\" further below for details).\n\nIn the latter case, the memory occupied by the new bit vector is released first (i.e.,\n\"free\"d) before the exception is actually raised.\n\n* \"$vector = Bit::Vector->newEnum($bits,$string);\"\n\nThis method is an alternative constructor which allows you to create a new bit vector object\n(with \"$bits\" bits) and to initialize it all in one go.\n\nThe method internally first calls the bit vector constructor method \"\"new()\"\" and then passes\nthe given string to the method \"\"fromEnum()\"\".\n\nHowever, this method is more efficient than performing these two steps separately: First\nbecause in this method, \"\"new()\"\" does not initialize the memory area occupied by the new bit\nvector with zeros (which is pointless in this case, because \"\"fromEnum()\"\" will do it\nanyway), and second because it saves you from the associated overhead of one additional method\ninvocation.\n\nAn exception will be raised if the necessary memory cannot be allocated (see the description\nof the method \"\"new()\"\" above for possible causes) or if the given string cannot be converted\nsuccessfully (see the description of the method \"\"fromEnum()\"\" further below for details).\n\nIn the latter case, the memory occupied by the new bit vector is released first (i.e.,\n\"free\"d) before the exception is actually raised.\n\n* \"$vector = Bit::Vector->ConcatList(@vectors);\"\n\nThis method creates a new vector containing all bit vectors from the argument list in\nconcatenated form.\n\nThe argument list may contain any number of arguments (including zero); the only condition is\nthat all arguments must be bit vectors.\n\nThere is no condition concerning the length (in number of bits) of these arguments.\n\nThe vectors from the argument list are not changed in any way.\n\nIf the argument list is empty or if all arguments have length zero, the resulting bit vector\nwill also have length zero.\n\nNote that the RIGHTMOST bit vector from the argument list will become the LEAST significant\npart of the resulting bit vector, and the LEFTMOST bit vector from the argument list will\nbecome the MOST significant part of the resulting bit vector.\n\nOBJECT METHODS\n* \"$vec2 = $vec1->new($bits);\"\n\n\"@veclist = $vec->new($bits);\"\n\nThis is an alternative way of calling the bit vector constructor method.\n\nVector \"$vec1\" (or \"$vec\") is not affected by this, it just serves as an anchor for the method\ninvocation mechanism.\n\nIn fact ALL class methods in this module can be called this way, even though this is probably\nconsidered to be \"politically incorrect\" by OO (\"object-orientation\") aficionados. ;-)\n\nSo even if you are too lazy to type \"\"Bit::Vector->\"\" instead of \"\"$vec1->\"\" (and even though\nlaziness is - allegedly - a programmer's virtue \":-)\"), maybe it is better not to use this\nfeature if you don't want to get booed at. ;-)\n\n* \"$vec2 = $vec1->Shadow();\"\n\nCreates a NEW bit vector \"$vec2\" of the SAME SIZE as \"$vec1\" but which is EMPTY.\n\nJust like a shadow that has the same shape as the object it originates from, but is flat and\nhas no volume, i.e., contains nothing.\n\n* \"$vec2 = $vec1->Clone();\"\n\nCreates a NEW bit vector \"$vec2\" of the SAME SIZE as \"$vec1\" which is an EXACT COPY of\n\"$vec1\".\n\n* \"$vector = $vec1->Concat($vec2);\"\n\nThis method returns a new bit vector object which is the result of the concatenation of the\ncontents of \"$vec1\" and \"$vec2\".\n\nNote that the contents of \"$vec1\" become the MOST significant part of the resulting bit\nvector, and \"$vec2\" the LEAST significant part.\n\nIf both bit vector arguments have length zero, the resulting bit vector will also have length\nzero.\n\n* \"$vector = $vec1->ConcatList($vec2,$vec3,...);\"\n\nThis is an alternative way of calling this (class) method as an object method.\n\nThe method returns a new bit vector object which is the result of the concatenation of the\ncontents of \"$vec1 . $vec2 . $vec3 . ...\"\n\nSee the section \"class methods\" above for a detailed description of this method.\n\nNote that the argument list may be empty and that all arguments must be bit vectors if it\nisn't.\n\n* \"$bits = $vector->Size();\"\n\nReturns the size (number of bits) the given vector was created with (or \"\"Resize()\"\"d to).\n\n* \"$vector->Resize($bits);\"\n\nChanges the size of the given vector to the specified number of bits.\n\nThis method allows you to change the size of an existing bit vector, preserving as many bits\nfrom the old vector as will fit into the new one (i.e., all bits with indices smaller than the\nminimum of the sizes of both vectors, old and new).\n\nIf the number of machine words needed to store the new vector is smaller than or equal to the\nnumber of words needed to store the old vector, the memory allocated for the old vector is\nreused for the new one, and only the relevant book-keeping information is adjusted\naccordingly.\n\nThis means that even if the number of bits increases, new memory is not necessarily being\nallocated (i.e., if the old and the new number of bits fit into the same number of machine\nwords).\n\nIf the number of machine words needed to store the new vector is greater than the number of\nwords needed to store the old vector, new memory is allocated for the new vector, the old\nvector is copied to the new one, the remaining bits in the new vector are cleared (turned off)\nand the old vector is deleted, i.e., the memory that was allocated for it is released.\n\n(An exception will be raised if the method is unable to allocate the necessary memory for the\nnew vector.)\n\nAs a consequence, if you decrease the size of a given vector so that it will use fewer machine\nwords, and increase it again later so that it will use more words than immediately before but\nstill less than the original vector, new memory will be allocated anyway because the\ninformation about the size of the original vector is lost whenever you resize it.\n\nNote also that if you specify a negative number for \"$bits\" it will be interpreted as a large\npositive number due to its internal two's complement binary representation.\n\nIn such a case, \"Resize()\" will obediently attempt to create a bit vector of that size,\nprobably resulting in an exception, as explained above.\n\nFinally, note that - in contrast to previous versions - resizing a bit vector to a size of\nzero bits (length zero) is now permitted.\n\n* \"$vec2->Copy($vec1);\"\n\nCopies the contents of bit vector \"$vec1\" to bit vector \"$vec2\".\n\nThe previous contents of bit vector \"$vec2\" get overwritten, i.e., are lost.\n\nBoth vectors must exist beforehand, i.e., this method does not CREATE any new bit vector\nobject.\n\nThe two vectors may be of any size.\n\nIf the source bit vector is larger than the target, this method will copy as much of the least\nsignificant bits of the source vector as will fit into the target vector, thereby discarding\nany extraneous most significant bits.\n\nBEWARE that this causes a brutal cutoff in the middle of your data, and it will also leave you\nwith an almost unpredictable sign if subsequently the number in the target vector is going to\nbe interpreted as a number! (You have been warned!)\n\nIf the target bit vector is larger than the source, this method fills up the remaining most\nsignificant bits in the target bit vector with either 0's or 1's, depending on the sign (= the\nmost significant bit) of the source bit vector. This is also known as \"sign extension\".\n\nThis makes it possible to copy numbers from a smaller bit vector into a larger one while\npreserving the number's absolute value as well as its sign (due to the two's complement binary\nrepresentation of numbers).\n\n* \"$vector->Empty();\"\n\nClears all bits in the given vector.\n\n* \"$vector->Fill();\"\n\nSets all bits in the given vector.\n\n* \"$vector->Flip();\"\n\nFlips (i.e., complements) all bits in the given vector.\n\n* \"$vector->Primes();\"\n\nClears the given bit vector and sets all bits whose indices are prime numbers.\n\nThis method uses the algorithm known as the \"Sieve of Erathostenes\" internally.\n\n* \"$vec2->Reverse($vec1);\"\n\nThis method copies the given vector \"$vec1\" to the vector \"$vec2\", thereby reversing the order\nof all bits.\n\nI.e., the least significant bit of \"$vec1\" becomes the most significant bit of \"$vec2\",\nwhereas the most significant bit of \"$vec1\" becomes the least significant bit of \"$vec2\", and\nso forth for all bits in between.\n\nNote that in-place processing is also possible, i.e., \"$vec1\" and \"$vec2\" may be identical.\n\n(Internally, this is the same as \"$vec1->IntervalReverse(0,$vec1->Size()-1);\".)\n\n* \"$vector->IntervalEmpty($min,$max);\"\n\nClears all bits in the interval \"[$min..$max]\" (including both limits) in the given vector.\n\n\"$min\" and \"$max\" may have the same value; this is the same as clearing a single bit with\n\"\"BitOff()\"\" (but less efficient).\n\nNote that \"$vector->IntervalEmpty(0,$vector->Size()-1);\" is the same as \"$vector->Empty();\"\n(but less efficient).\n\n* \"$vector->IntervalFill($min,$max);\"\n\nSets all bits in the interval \"[$min..$max]\" (including both limits) in the given vector.\n\n\"$min\" and \"$max\" may have the same value; this is the same as setting a single bit with\n\"\"BitOn()\"\" (but less efficient).\n\nNote that \"$vector->IntervalFill(0,$vector->Size()-1);\" is the same as \"$vector->Fill();\"\n(but less efficient).\n\n* \"$vector->IntervalFlip($min,$max);\"\n\nFlips (i.e., complements) all bits in the interval \"[$min..$max]\" (including both limits) in\nthe given vector.\n\n\"$min\" and \"$max\" may have the same value; this is the same as flipping a single bit with\n\"\"bitflip()\"\" (but less efficient).\n\nNote that \"$vector->IntervalFlip(0,$vector->Size()-1);\" is the same as \"$vector->Flip();\" and\n\"$vector->Complement($vector);\" (but less efficient).\n\n* \"$vector->IntervalReverse($min,$max);\"\n\nReverses the order of all bits in the interval \"[$min..$max]\" (including both limits) in the\ngiven vector.\n\nI.e., bits \"$min\" and \"$max\" swap places, and so forth for all bits in between.\n\n\"$min\" and \"$max\" may have the same value; this has no effect whatsoever, though.\n\n* \"if (($min,$max) = $vector->IntervalScaninc($start))\"\n\nReturns the minimum and maximum indices of the next contiguous block of set bits (i.e., bits\nin the \"on\" state).\n\nThe search starts at index \"$start\" (i.e., \"$min\" >= \"$start\") and proceeds upwards (i.e.,\n\"$max\" >= \"$min\"), thus repeatedly increments the search pointer \"$start\" (internally).\n\nNote though that the contents of the variable (or scalar literal value) \"$start\" is NOT\naltered. I.e., you have to set it to the desired value yourself prior to each call to\n\"\"IntervalScaninc()\"\" (see also the example given below).\n\nActually, the bit vector is not searched bit by bit, but one machine word at a time, in order\nto speed up execution (which means that this method is quite efficient).\n\nAn empty list is returned if no such block can be found.\n\nNote that a single set bit (surrounded by cleared bits) is a valid block by this definition.\nIn that case the return values for \"$min\" and \"$max\" are the same.\n\nTypical use:\n\n$start = 0;\nwhile (($start < $vector->Size()) &&\n(($min,$max) = $vector->IntervalScaninc($start)))\n{\n$start = $max + 2;\n\n# do something with $min and $max\n}\n\n* \"if (($min,$max) = $vector->IntervalScandec($start))\"\n\nReturns the minimum and maximum indices of the next contiguous block of set bits (i.e., bits\nin the \"on\" state).\n\nThe search starts at index \"$start\" (i.e., \"$max\" <= \"$start\") and proceeds downwards (i.e.,\n\"$min\" <= \"$max\"), thus repeatedly decrements the search pointer \"$start\" (internally).\n\nNote though that the contents of the variable (or scalar literal value) \"$start\" is NOT\naltered. I.e., you have to set it to the desired value yourself prior to each call to\n\"\"IntervalScandec()\"\" (see also the example given below).\n\nActually, the bit vector is not searched bit by bit, but one machine word at a time, in order\nto speed up execution (which means that this method is quite efficient).\n\nAn empty list is returned if no such block can be found.\n\nNote that a single set bit (surrounded by cleared bits) is a valid block by this definition.\nIn that case the return values for \"$min\" and \"$max\" are the same.\n\nTypical use:\n\n$start = $vector->Size() - 1;\nwhile (($start >= 0) &&\n(($min,$max) = $vector->IntervalScandec($start)))\n{\n$start = $min - 2;\n\n# do something with $min and $max\n}\n\n* \"$vec2->IntervalCopy($vec1,$offset2,$offset1,$length);\"\n\nThis method allows you to copy a stretch of contiguous bits (starting at any position\n\"$offset1\" you choose, with a length of \"$length\" bits) from a given \"source\" bit vector\n\"$vec1\" to another position \"$offset2\" in a \"target\" bit vector \"$vec2\".\n\nNote that the two bit vectors \"$vec1\" and \"$vec2\" do NOT need to have the same (matching)\nsize!\n\nConsequently, any of the two terms \"\"$offset1 + $length\"\" and \"\"$offset2 + $length\"\" (or both)\nmay exceed the actual length of its corresponding bit vector (\"\"$vec1->Size()\"\" and\n\"\"$vec2->Size()\"\", respectively).\n\nIn such a case, the \"$length\" parameter is automatically reduced internally so that both terms\nabove are bounded by the number of bits of their corresponding bit vector.\n\nThis may even result in a length of zero, in which case nothing is copied at all.\n\n(Of course the value of the \"$length\" parameter, supplied by you in the initial method call,\nmay also be zero right from the start!)\n\nNote also that \"$offset1\" and \"$offset2\" must lie within the range \"0\" and, respectively,\n\"\"$vec1->Size()-1\"\" or \"\"$vec2->Size()-1\"\", or a fatal \"offset out of range\" error will occur.\n\nNote further that \"$vec1\" and \"$vec2\" may be identical, i.e., you may copy a stretch of\ncontiguous bits from one part of a given bit vector to another part.\n\nThe source and the target interval may even overlap, in which case the copying is\nautomatically performed in ascending or descending order (depending on the direction of the\ncopy - downwards or upwards in the bit vector, respectively) to handle this situation\ncorrectly, i.e., so that no bits are being overwritten before they have been copied\nthemselves.\n\n* \"$vec2->IntervalSubstitute($vec1,$off2,$len2,$off1,$len1);\"\n\nThis method is (roughly) the same for bit vectors (i.e., arrays of booleans) as what the\n\"splice\" function in Perl is for lists (i.e., arrays of scalars).\n\n(See \"splice\" in perlfunc for more details about this function.)\n\nThe method allows you to substitute a stretch of contiguous bits (defined by a position\n(offset) \"$off1\" and a length of \"$len1\" bits) from a given \"source\" bit vector \"$vec1\" for a\ndifferent stretch of contiguous bits (defined by a position (offset) \"$off2\" and a length of\n\"$len2\" bits) in another, \"target\" bit vector \"$vec2\".\n\nNote that the two bit vectors \"$vec1\" and \"$vec2\" do NOT need to have the same (matching)\nsize!\n\nNote further that \"$off1\" and \"$off2\" must lie within the range \"0\" and, respectively,\n\"\"$vec1->Size()\"\" or \"\"$vec2->Size()\"\", or a fatal \"offset out of range\" error will occur.\n\nAlert readers will have noticed that these upper limits are NOT \"\"$vec1->Size()-1\"\" and\n\"\"$vec2->Size()-1\"\", as they would be for any other method in this module, but that these\noffsets may actually point to one position PAST THE END of the corresponding bit vector.\n\nThis is necessary in order to make it possible to APPEND a given stretch of bits to the target\nbit vector instead of REPLACING something in it.\n\nFor reasons of symmetry and generality, the same applies to the offset in the source bit\nvector, even though such an offset (one position past the end of the bit vector) does not\nserve any practical purpose there (but does not cause any harm either).\n\n(Actually this saves you from the need of testing for this special case, in certain\ncircumstances.)\n\nNote that whenever the term \"\"$off1 + $len1\"\" exceeds the size \"\"$vec1->Size()\"\" of bit vector\n\"$vec1\" (or if \"\"$off2 + $len2\"\" exceeds \"\"$vec2->Size()\"\"), the corresponding length (\"$len1\"\nor \"$len2\", respectively) is automatically reduced internally so that \"\"$off1 + $len1 <=\n$vec1->Size()\"\" (and \"\"$off2 + $len2 <= $vec2->Size()\"\") holds.\n\n(Note that this does NOT alter the intended result, even though this may seem\ncounter-intuitive at first!)\n\nThis may even result in a length (\"$len1\" or \"$len2\") of zero.\n\nA length of zero for the interval in the SOURCE bit vector (\"\"$len1 == 0\"\") means that the\nindicated stretch of bits in the target bit vector (starting at position \"$off2\") is to be\nreplaced by NOTHING, i.e., is to be DELETED.\n\nA length of zero for the interval in the TARGET bit vector (\"$len2 == 0\") means that NOTHING\nis replaced, and that the stretch of bits from the source bit vector is simply INSERTED into\nthe target bit vector at the indicated position (\"$off2\").\n\nIf both length parameters are zero, nothing is done at all.\n\nNote that in contrast to any other method in this module (especially \"\"IntervalCopy()\"\",\n\"\"Insert()\"\" and \"\"Delete()\"\"), this method IMPLICITLY and AUTOMATICALLY adapts the length of\nthe resulting bit vector as needed, as given by\n\n$size = $vec2->Size();   #  before\n$size += $len1 - $len2;  #  after\n\n(The only other method in this module that changes the size of a bit vector is the method\n\"\"Resize()\"\".)\n\nIn other words, replacing a given interval of bits in the target bit vector with a longer or\nshorter stretch of bits from the source bit vector, or simply inserting (\"\"$len2 == 0\"\") a\nstretch of bits into or deleting (\"\"$len1 == 0\"\") an interval of bits from the target bit\nvector will automatically increase or decrease, respectively, the size of the target bit\nvector accordingly.\n\nFor the sake of generality, this may even result in a bit vector with a size of zero\n(containing no bits at all).\n\nThis is also the reason why bit vectors of length zero are permitted in this module in the\nfirst place, starting with version 5.0.\n\nFinally, note that \"$vec1\" and \"$vec2\" may be identical, i.e., in-place processing is\npossible.\n\n(If you think about that for a while or if you look at the code, you will see that this is far\nfrom trivial!)\n\n* \"if ($vector->isempty())\"\n\nTests whether the given bit vector is empty, i.e., whether ALL of its bits are cleared (in the\n\"off\" state).\n\nIn \"big integer\" arithmetic, this is equivalent to testing whether the number stored in the\nbit vector is zero (\"0\").\n\nReturns \"true\" (\"1\") if the bit vector is empty and \"false\" (\"0\") otherwise.\n\nNote that this method also returns \"true\" (\"1\") if the given bit vector has a length of zero,\ni.e., if it contains no bits at all.\n\n* \"if ($vector->isfull())\"\n\nTests whether the given bit vector is full, i.e., whether ALL of its bits are set (in the \"on\"\nstate).\n\nIn \"big integer\" arithmetic, this is equivalent to testing whether the number stored in the\nbit vector is minus one (\"-1\").\n\nReturns \"true\" (\"1\") if the bit vector is full and \"false\" (\"0\") otherwise.\n\nIf the given bit vector has a length of zero (i.e., if it contains no bits at all), this\nmethod returns \"false\" (\"0\").\n\n* \"if ($vec1->equal($vec2))\"\n\nTests the two given bit vectors for equality.\n\nReturns \"true\" (\"1\") if the two bit vectors are exact copies of one another and \"false\" (\"0\")\notherwise.\n\n* \"$cmp = $vec1->Lexicompare($vec2);\"\n\nCompares the two given bit vectors, which are regarded as UNSIGNED numbers in binary\nrepresentation.\n\nThe method returns \"-1\" if the first bit vector is smaller than the second bit vector, \"0\" if\nthe two bit vectors are exact copies of one another and \"1\" if the first bit vector is greater\nthan the second bit vector.\n\n* \"$cmp = $vec1->Compare($vec2);\"\n\nCompares the two given bit vectors, which are regarded as SIGNED numbers in binary\nrepresentation.\n\nThe method returns \"-1\" if the first bit vector is smaller than the second bit vector, \"0\" if\nthe two bit vectors are exact copies of one another and \"1\" if the first bit vector is greater\nthan the second bit vector.\n\n* \"$string = $vector->toHex();\"\n\nReturns a hexadecimal string representing the given bit vector.\n\nNote that this representation is quite compact, in that it only needs at most twice the number\nof bytes needed to store the bit vector itself, internally.\n\nNote also that since a hexadecimal digit is always worth four bits, the length of the\nresulting string is always a multiple of four bits, regardless of the true length (in bits) of\nthe given bit vector.\n\nFinally, note that the LEAST significant hexadecimal digit is located at the RIGHT end of the\nresulting string, and the MOST significant digit at the LEFT end.\n\n* \"$vector->fromHex($string);\"\n\nAllows one to read in the contents of a bit vector from a hexadecimal string, such as returned\nby the method \"\"toHex()\"\" (see above).\n\nRemember that the least significant bits are always to the right of a hexadecimal string, and\nthe most significant bits to the left. Therefore, the string is actually read in from right to\nleft while the bit vector is filled accordingly, 4 bits at a time, starting with the least\nsignificant bits and going upward to the most significant bits.\n\nIf the given string contains less hexadecimal digits than are needed to completely fill the\ngiven bit vector, the remaining (most significant) bits are all cleared.\n\nThis also means that, even if the given string does not contain enough digits to completely\nfill the given bit vector, the previous contents of the bit vector are erased completely.\n\nIf the given string is longer than it needs to fill the given bit vector, the superfluous\ncharacters are simply ignored.\n\n(In fact they are ignored completely - they are not even checked for proper syntax. See also\nbelow for more about that.)\n\nThis behaviour is intentional so that you may read in the string representing one bit vector\ninto another bit vector of different size, i.e., as much of it as will fit.\n\nIf during the process of reading the given string any character is encountered which is not a\nhexadecimal digit, a fatal syntax error ensues (\"input string syntax error\").\n\n* \"$string = $vector->toBin();\"\n\nReturns a binary string representing the given bit vector.\n\nExample:\n\n$vector = Bit::Vector->new(8);\n$vector->Primes();\n$string = $vector->toBin();\nprint \"'$string'\\n\";\n\nThis prints:\n\n'10101100'\n\n(Bits #7, #5, #3 and #2 are set.)\n\nNote that the LEAST significant bit is located at the RIGHT end of the resulting string, and\nthe MOST significant bit at the LEFT end.\n\n* \"$vector->fromBin($string);\"\n\nThis method allows you to read in the contents of a bit vector from a binary string, such as\nreturned by the method \"\"toBin()\"\" (see above).\n\nNote that this method assumes that the LEAST significant bit is located at the RIGHT end of\nthe binary string, and the MOST significant bit at the LEFT end. Therefore, the string is\nactually read in from right to left while the bit vector is filled accordingly, one bit at a\ntime, starting with the least significant bit and going upward to the most significant bit.\n\nIf the given string contains less binary digits (\"0\" and \"1\") than are needed to completely\nfill the given bit vector, the remaining (most significant) bits are all cleared.\n\nThis also means that, even if the given string does not contain enough digits to completely\nfill the given bit vector, the previous contents of the bit vector are erased completely.\n\nIf the given string is longer than it needs to fill the given bit vector, the superfluous\ncharacters are simply ignored.\n\n(In fact they are ignored completely - they are not even checked for proper syntax. See also\nbelow for more about that.)\n\nThis behaviour is intentional so that you may read in the string representing one bit vector\ninto another bit vector of different size, i.e., as much of it as will fit.\n\nIf during the process of reading the given string any character is encountered which is not\neither \"0\" or \"1\", a fatal syntax error ensues (\"input string syntax error\").\n\n* \"$string = $vector->toDec();\"\n\nThis method returns a string representing the contents of the given bit vector converted to\ndecimal (base 10).\n\nNote that this method assumes the given bit vector to be SIGNED (and to contain a number in\ntwo's complement binary representation).\n\nConsequently, whenever the most significant bit of the given bit vector is set, the number\nstored in it is regarded as being NEGATIVE.\n\nThe resulting string can be fed into \"\"fromDec()\"\" (see below) in order to copy the contents\nof this bit vector to another one (or to restore the contents of this one). This is not\nadvisable, though, since this would be very inefficient (there are much more efficient methods\nfor storing and copying bit vectors in this module).\n\nNote that such conversion from binary to decimal is inherently slow since the bit vector has\nto be repeatedly divided by 10 with remainder until the quotient becomes 0 (each remainder in\nturn represents a single decimal digit of the resulting string).\n\nThis is also true for the implementation of this method in this module, even though a\nconsiderable effort has been made to speed it up: instead of repeatedly dividing by 10, the\nbit vector is repeatedly divided by the largest power of 10 that will fit into a machine word.\nThe remainder is then repeatedly divided by 10 using only machine word arithmetics, which is\nmuch faster than dividing the whole bit vector (\"divide and rule\" principle).\n\nAccording to my own measurements, this resulted in an 8-fold speed increase over the\nstraightforward approach.\n\nStill, conversion to decimal should be used only where absolutely necessary.\n\nKeep the resulting string stored in some variable if you need it again, instead of converting\nthe bit vector all over again.\n\nBeware that if you set the configuration for overloaded operators to \"output=decimal\", this\nmethod will be called for every bit vector enclosed in double quotes!\n\n* \"$vector->fromDec($string);\"\n\nThis method allows you to convert a given decimal number, which may be positive or negative,\ninto two's complement binary representation, which is then stored in the given bit vector.\n\nThe decimal number should always be provided as a string, to avoid possible truncation (due to\nthe limited precision of integers in Perl) or formatting (due to Perl's use of scientific\nnotation for large numbers), which would lead to errors.\n\nIf the binary representation of the given decimal number is too big to fit into the given bit\nvector (if the given bit vector does not contain enough bits to hold it), a fatal \"numeric\noverflow error\" occurs.\n\nIf the input string contains other characters than decimal digits (\"0-9\") and an optional\nleading sign (\"\"+\"\" or \"\"-\"\"), a fatal \"input string syntax error\" occurs.\n\nBeware that large positive numbers which cause the most significant bit to be set (e.g. \"255\"\nin a bit vector with 8 bits) will be printed as negative numbers when converted back to\ndecimal using the method \"toDec()\" (e.g. \"-1\", in our example), because numbers with the most\nsignificant bit set are considered to be negative in two's complement binary representation.\n\nNote also that while it is possible to thusly enter negative numbers as large positive numbers\n(e.g. \"255\" for \"-1\" in a bit vector with 8 bits), the contrary isn't, i.e., you cannot enter\n\"-255\" for \"+1\", in our example. A fatal \"numeric overflow error\" will occur if you try to do\nso.\n\nIf possible program abortion is unwanted or intolerable, use \"\"eval\"\", like this:\n\neval { $vector->fromDec(\"1152921504606846976\"); };\nif ($@)\n{\n# an error occurred\n}\n\nThere are four possible error messages:\n\nif ($@ =~ /item is not a string/)\n\nif ($@ =~ /input string syntax error/)\n\nif ($@ =~ /numeric overflow error/)\n\nif ($@ =~ /unable to allocate memory/)\n\nNote that the conversion from decimal to binary is costly in terms of processing time, since a\nlot of multiplications have to be carried out (in principle, each decimal digit must be\nmultiplied with the binary representation of the power of 10 corresponding to its position in\nthe decimal number, i.e., 1, 10, 100, 1000, 10000 and so on).\n\nThis is not as time consuming as the opposite conversion, from binary to decimal (where\nsuccessive divisions have to be carried out, which are even more expensive than\nmultiplications), but still noticeable.\n\nAgain (as in the case of \"\"toDec()\"\"), the implementation of this method in this module uses\nthe principle of \"divide and rule\" in order to speed up the conversion, i.e., as many decimal\ndigits as possible are first accumulated (converted) in a machine word and only then stored in\nthe given bit vector.\n\nEven so, use this method only where absolutely necessary if speed is an important\nconsideration in your application.\n\nBeware that if you set the configuration for overloaded operators to \"input=decimal\", this\nmethod will be called for every scalar operand you use!\n\n* \"$string = $vector->toEnum();\"\n\nConverts the given bit vector or set into an enumeration of single indices and ranges of\nindices (\".newsrc\" style), representing the bits that are set (\"1\") in the bit vector.\n\nExample:\n\n$vector = Bit::Vector->new(20);\n$vector->BitOn(2);\n$vector->BitOn(3);\n$vector->BitOn(11);\n$vector->IntervalFill(5,7);\n$vector->IntervalFill(13,19);\nprint \"'\", $vector->toEnum(), \"'\\n\";\n\nwhich prints\n\n'2,3,5-7,11,13-19'\n\nIf the given bit vector is empty, the resulting string will also be empty.\n\nNote, by the way, that the above example can also be written a little handier, perhaps, as\nfollows:\n\nBit::Vector->Configuration(\"out=enum\");\n$vector = Bit::Vector->new(20);\n$vector->IndexListStore(2,3,5,6,7,11,13,14,15,16,17,18,19);\nprint \"'$vector'\\n\";\n\n* \"$vector->fromEnum($string);\"\n\nThis method first empties the given bit vector and then tries to set the bits and ranges of\nbits specified in the given string.\n\nThe string \"$string\" must only contain unsigned integers or ranges of integers (two unsigned\nintegers separated by a dash \"-\"), separated by commas (\",\").\n\nAll other characters are disallowed (including white space!) and will lead to a fatal \"input\nstring syntax error\".\n\nIn each range, the first integer (the lower limit of the range) must always be less than or\nequal to the second integer (the upper limit), or a fatal \"minimum > maximum index\" error\noccurs.\n\nAll integers must lie in the permitted range for the given bit vector, i.e., they must lie\nbetween \"0\" and \"\"$vector->Size()-1\"\".\n\nIf this condition is not met, a fatal \"index out of range\" error occurs.\n\nIf possible program abortion is unwanted or intolerable, use \"\"eval\"\", like this:\n\neval { $vector->fromEnum(\"2,3,5-7,11,13-19\"); };\nif ($@)\n{\n# an error occurred\n}\n\nThere are four possible error messages:\n\nif ($@ =~ /item is not a string/)\n\nif ($@ =~ /input string syntax error/)\n\nif ($@ =~ /index out of range/)\n\nif ($@ =~ /minimum > maximum index/)\n\nNote that the order of the indices and ranges is irrelevant, i.e.,\n\neval { $vector->fromEnum(\"11,5-7,3,13-19,2\"); };\n\nresults in the same vector as in the example above.\n\nRanges and indices may also overlap.\n\nThis is because each (single) index in the string is passed to the method \"\"BitOn()\"\",\ninternally, and each range to the method \"\"IntervalFill()\"\".\n\nThis means that the resulting bit vector is just the union of all the indices and ranges\nspecified in the given string.\n\n* \"$vector->BitOff($index);\"\n\nClears the bit with index \"$index\" in the given vector.\n\n* \"$vector->BitOn($index);\"\n\nSets the bit with index \"$index\" in the given vector.\n\n* \"$vector->bitflip($index)\"\n\nFlips (i.e., complements) the bit with index \"$index\" in the given vector.\n\nMoreover, this method returns the NEW state of the bit in question, i.e., it returns \"0\" if\nthe bit is cleared or \"1\" if the bit is set (AFTER flipping it).\n\n* \"if ($vector->bittest($index))\"\n\n\"if ($vector->contains($index))\"\n\nReturns the current state of the bit with index \"$index\" in the given vector, i.e., returns\n\"0\" if it is cleared (in the \"off\" state) or \"1\" if it is set (in the \"on\" state).\n\n* \"$vector->BitCopy($index,$bit);\"\n\nSets the bit with index \"$index\" in the given vector either to \"0\" or \"1\" depending on the\nboolean value \"$bit\".\n\n* \"$vector->LSB($bit);\"\n\nAllows you to set the least significant bit in the given bit vector to the value given by the\nboolean parameter \"$bit\".\n\nThis is a (faster) shortcut for \"\"$vector->BitCopy(0,$bit);\"\".\n\n* \"$vector->MSB($bit);\"\n\nAllows you to set the most significant bit in the given bit vector to the value given by the\nboolean parameter \"$bit\".\n\nThis is a (faster) shortcut for \"\"$vector->BitCopy($vector->Size()-1,$bit);\"\".\n\n* \"$bit = $vector->lsb();\"\n\nReturns the least significant bit of the given bit vector.\n\nThis is a (faster) shortcut for \"\"$bit = $vector->bittest(0);\"\".\n\n* \"$bit = $vector->msb();\"\n\nReturns the most significant bit of the given bit vector.\n\nThis is a (faster) shortcut for \"\"$bit = $vector->bittest($vector->Size()-1);\"\".\n\n* \"$carryout = $vector->rotateleft();\"\n\ncarry             MSB           vector:           LSB\nout:\n+---+            +---+---+---+---     ---+---+---+---+\n|   |  <---+---  |   |   |   |    ...    |   |   |   |  <---+\n+---+      |     +---+---+---+---     ---+---+---+---+      |\n|                                                |\n+------------------------------------------------+\n\nThe least significant bit (LSB) is the bit with index \"0\", the most significant bit (MSB) is\nthe bit with index \"\"$vector->Size()-1\"\".\n\n* \"$carryout = $vector->rotateright();\"\n\nMSB           vector:           LSB            carry\nout:\n+---+---+---+---     ---+---+---+---+           +---+\n+--->  |   |   |   |    ...    |   |   |   |  ---+---> |   |\n|      +---+---+---+---     ---+---+---+---+     |     +---+\n|                                                |\n+------------------------------------------------+\n\nThe least significant bit (LSB) is the bit with index \"0\", the most significant bit (MSB) is\nthe bit with index \"\"$vector->Size()-1\"\".\n\n* \"$carryout = $vector->shiftleft($carryin);\"\n\ncarry         MSB           vector:           LSB         carry\nout:                                                      in:\n+---+        +---+---+---+---     ---+---+---+---+        +---+\n|   |  <---  |   |   |   |    ...    |   |   |   |  <---  |   |\n+---+        +---+---+---+---     ---+---+---+---+        +---+\n\nThe least significant bit (LSB) is the bit with index \"0\", the most significant bit (MSB) is\nthe bit with index \"\"$vector->Size()-1\"\".\n\n* \"$carryout = $vector->shiftright($carryin);\"\n\ncarry         MSB           vector:           LSB         carry\nin:                                                       out:\n+---+        +---+---+---+---     ---+---+---+---+        +---+\n|   |  --->  |   |   |   |    ...    |   |   |   |  --->  |   |\n+---+        +---+---+---+---     ---+---+---+---+        +---+\n\nThe least significant bit (LSB) is the bit with index \"0\", the most significant bit (MSB) is\nthe bit with index \"\"$vector->Size()-1\"\".\n\n* \"$vector->MoveLeft($bits);\"\n\nShifts the given bit vector left by \"$bits\" bits, i.e., inserts \"$bits\" new bits at the lower\nend (least significant bit) of the bit vector, moving all other bits up by \"$bits\" places,\nthereby losing the \"$bits\" most significant bits.\n\nThe inserted new bits are all cleared (set to the \"off\" state).\n\nThis method does nothing if \"$bits\" is equal to zero.\n\nBeware that the whole bit vector is cleared WITHOUT WARNING if \"$bits\" is greater than or\nequal to the size of the given bit vector!\n\nIn fact this method is equivalent to\n\nfor ( $i = 0; $i < $bits; $i++ ) { $vector->shiftleft(0); }\n\nexcept that it is much more efficient (for \"$bits\" greater than or equal to the number of bits\nin a machine word on your system) than this straightforward approach.\n\n* \"$vector->MoveRight($bits);\"\n\nShifts the given bit vector right by \"$bits\" bits, i.e., deletes the \"$bits\" least significant\nbits of the bit vector, moving all other bits down by \"$bits\" places, thereby creating \"$bits\"\nnew bits at the upper end (most significant bit) of the bit vector.\n\nThese new bits are all cleared (set to the \"off\" state).\n\nThis method does nothing if \"$bits\" is equal to zero.\n\nBeware that the whole bit vector is cleared WITHOUT WARNING if \"$bits\" is greater than or\nequal to the size of the given bit vector!\n\nIn fact this method is equivalent to\n\nfor ( $i = 0; $i < $bits; $i++ ) { $vector->shiftright(0); }\n\nexcept that it is much more efficient (for \"$bits\" greater than or equal to the number of bits\nin a machine word on your system) than this straightforward approach.\n\n* \"$vector->Insert($offset,$bits);\"\n\nThis method inserts \"$bits\" fresh new bits at position \"$offset\" in the given bit vector.\n\nThe \"$bits\" most significant bits are lost, and all bits starting with bit number \"$offset\" up\nto and including bit number \"\"$vector->Size()-$bits-1\"\" are moved up by \"$bits\" places.\n\nThe now vacant \"$bits\" bits starting at bit number \"$offset\" (up to and including bit number\n\"\"$offset+$bits-1\"\") are then set to zero (cleared).\n\nNote that this method does NOT increase the size of the given bit vector, i.e., the bit vector\nis NOT extended at its upper end to \"rescue\" the \"$bits\" uppermost (most significant) bits -\ninstead, these bits are lost forever.\n\nIf you don't want this to happen, you have to increase the size of the given bit vector\nEXPLICITLY and BEFORE you perform the \"Insert\" operation, with a statement such as the\nfollowing:\n\n$vector->Resize($vector->Size() + $bits);\n\nOr use the method \"\"IntervalSubstitute()\"\" instead of \"\"Insert()\"\", which performs automatic\ngrowing and shrinking of its target bit vector.\n\nNote also that \"$offset\" must lie in the permitted range between \"0\" and\n\"\"$vector->Size()-1\"\", or a fatal \"offset out of range\" error will occur.\n\nIf the term \"\"$offset + $bits\"\" exceeds \"\"$vector->Size()-1\"\", all the bits starting with bit\nnumber \"$offset\" up to bit number \"\"$vector->Size()-1\"\" are simply cleared.\n\n* \"$vector->Delete($offset,$bits);\"\n\nThis method deletes, i.e., removes the bits starting at position \"$offset\" up to and including\nbit number \"\"$offset+$bits-1\"\" from the given bit vector.\n\nThe remaining uppermost bits (starting at position \"\"$offset+$bits\"\" up to and including bit\nnumber \"\"$vector->Size()-1\"\") are moved down by \"$bits\" places.\n\nThe now vacant uppermost (most significant) \"$bits\" bits are then set to zero (cleared).\n\nNote that this method does NOT decrease the size of the given bit vector, i.e., the bit vector\nis NOT clipped at its upper end to \"get rid of\" the vacant \"$bits\" uppermost bits.\n\nIf you don't want this, i.e., if you want the bit vector to shrink accordingly, you have to do\nso EXPLICITLY and AFTER the \"Delete\" operation, with a couple of statements such as these:\n\n$size = $vector->Size();\nif ($bits > $size) { $bits = $size; }\n$vector->Resize($size - $bits);\n\nOr use the method \"\"IntervalSubstitute()\"\" instead of \"\"Delete()\"\", which performs automatic\ngrowing and shrinking of its target bit vector.\n\nNote also that \"$offset\" must lie in the permitted range between \"0\" and\n\"\"$vector->Size()-1\"\", or a fatal \"offset out of range\" error will occur.\n\nIf the term \"\"$offset + $bits\"\" exceeds \"\"$vector->Size()-1\"\", all the bits starting with bit\nnumber \"$offset\" up to bit number \"\"$vector->Size()-1\"\" are simply cleared.\n\n* \"$carry = $vector->increment();\"\n\nThis method increments the given bit vector.\n\nNote that this method regards bit vectors as being unsigned, i.e., the largest possible\npositive number is directly followed by the smallest possible (or greatest possible, speaking\nin absolute terms) negative number:\n\nbefore:  2 ^ (b-1) - 1    (= \"0111...1111\")\nafter:   2 ^ (b-1)        (= \"1000...0000\")\n\nwhere \"\"b\"\" is the number of bits of the given bit vector.\n\nThe method returns \"false\" (\"0\") in all cases except when a carry over occurs (in which case\nit returns \"true\", i.e., \"1\"), which happens when the number \"1111...1111\" is incremented,\nwhich gives \"0000...0000\" plus a carry over to the next higher (binary) digit.\n\nThis can be used for the terminating condition of a \"while\" loop, for instance, in order to\ncycle through all possible values the bit vector can assume.\n\n* \"$carry = $vector->decrement();\"\n\nThis method decrements the given bit vector.\n\nNote that this method regards bit vectors as being unsigned, i.e., the smallest possible (or\ngreatest possible, speaking in absolute terms) negative number is directly followed by the\nlargest possible positive number:\n\nbefore:  2 ^ (b-1)        (= \"1000...0000\")\nafter:   2 ^ (b-1) - 1    (= \"0111...1111\")\n\nwhere \"\"b\"\" is the number of bits of the given bit vector.\n\nThe method returns \"false\" (\"0\") in all cases except when a carry over occurs (in which case\nit returns \"true\", i.e., \"1\"), which happens when the number \"0000...0000\" is decremented,\nwhich gives \"1111...1111\" minus a carry over to the next higher (binary) digit.\n\nThis can be used for the terminating condition of a \"while\" loop, for instance, in order to\ncycle through all possible values the bit vector can assume.\n\n* \"$overflow = $vec2->inc($vec1);\"\n\nThis method copies the contents of bit vector \"$vec1\" to bit vector \"$vec2\" and increments the\ncopy (not the original).\n\nIf by incrementing the number its sign becomes invalid, the return value (\"overflow\" flag)\nwill be true (\"1\"), or false (\"0\") if not. (See the description of the method \"add()\" below\nfor a more in-depth explanation of what \"overflow\" means).\n\nNote that in-place operation is also possible, i.e., \"$vec1\" and \"$vec2\" may be identical.\n\n* \"$overflow = $vec2->dec($vec1);\"\n\nThis method copies the contents of bit vector \"$vec1\" to bit vector \"$vec2\" and decrements the\ncopy (not the original).\n\nIf by decrementing the number its sign becomes invalid, the return value (\"overflow\" flag)\nwill be true (\"1\"), or false (\"0\") if not. (See the description of the method \"subtract()\"\nbelow for a more in-depth explanation of what \"overflow\" means).\n\nNote that in-place operation is also possible, i.e., \"$vec1\" and \"$vec2\" may be identical.\n\n* \"$carry = $vec3->add($vec1,$vec2,$carry);\"\n\n\"($carry,$overflow) = $vec3->add($vec1,$vec2,$carry);\"\n\nThis method adds the two numbers contained in bit vector \"$vec1\" and \"$vec2\" with carry\n\"$carry\" and stores the result in bit vector \"$vec3\".\n\nI.e., $vec3 = $vec1 + $vec2 + $carry\n\nNote that the \"$carry\" parameter is a boolean value, i.e., only its least significant bit is\ntaken into account. (Think of it as though \"\"$carry &= 1;\"\" was always executed internally.)\n\nIn scalar context, the method returns a boolean value which indicates if a carry over (to the\nnext higher bit position) has occured. In list context, the method returns the carry and the\noverflow flag (in this order).\n\nThe overflow flag is true (\"1\") if the sign (i.e., the most significant bit) of the result is\nwrong. This can happen when adding two very large positive numbers or when adding two (by\ntheir absolute value) very large negative numbers. See also further below.\n\nThe carry in- and output is needed mainly for cascading, i.e., to add numbers that are\nfragmented into several pieces.\n\nExample:\n\n# initialize\n\nfor ( $i = 0; $i < $n; $i++ )\n{\n$a[$i] = Bit::Vector->new($bits);\n$b[$i] = Bit::Vector->new($bits);\n$c[$i] = Bit::Vector->new($bits);\n}\n\n# fill @a and @b\n\n# $a[  0 ] is low order part,\n# $a[$n-1] is high order part,\n# and same for @b\n\n# add\n\n$carry = 0;\nfor ( $i = 0; $i < $n; $i++ )\n{\n$carry = $c[$i]->add($a[$i],$b[$i],$carry);\n}\n\nNote that it makes no difference to this method whether the numbers in \"$vec1\" and \"$vec2\" are\nunsigned or signed (i.e., in two's complement binary representation).\n\nNote however that the return value (carry flag) is not meaningful when the numbers are SIGNED.\n\nMoreover, when the numbers are signed, a special type of error can occur which is commonly\ncalled an \"overflow error\".\n\nAn overflow error occurs when the sign of the result (its most significant bit) is flipped\n(i.e., falsified) by a carry over from the next-lower bit position (\"MSB-1\").\n\nIn fact matters are a bit more complicated than that: the overflow flag is set to \"true\"\nwhenever there is a carry over from bit position MSB-1 to the most significant bit (MSB) but\nno carry over from the MSB to the output carry flag, or vice-versa, i.e., when there is no\ncarry over from bit position MSB-1 to the most significant bit (MSB) but a carry over to the\noutput carry flag.\n\nThus the overflow flag is the result of an exclusive-or operation between incoming and\noutgoing carry over at the most significant bit position.\n\n* \"$carry = $vec3->subtract($vec1,$vec2,$carry);\"\n\n\"($carry,$overflow) = $vec3->subtract($vec1,$vec2,$carry);\"\n\nThis method subtracts the two numbers contained in bit vector \"$vec1\" and \"$vec2\" with carry\n\"$carry\" and stores the result in bit vector \"$vec3\".\n\nI.e., $vec3 = $vec1 - $vec2 - $carry\n\nNote that the \"$carry\" parameter is a boolean value, i.e., only its least significant bit is\ntaken into account. (Think of it as though \"\"$carry &= 1;\"\" was always executed internally.)\n\nIn scalar context, the method returns a boolean value which indicates if a carry over (to the\nnext higher bit position) has occured. In list context, the method returns the carry and the\noverflow flag (in this order).\n\nThe overflow flag is true (\"1\") if the sign (i.e., the most significant bit) of the result is\nwrong. This can happen when subtracting a very large negative number from a very large\npositive number or vice-versa. See also further below.\n\nThe carry in- and output is needed mainly for cascading, i.e., to subtract numbers that are\nfragmented into several pieces.\n\nExample:\n\n# initialize\n\nfor ( $i = 0; $i < $n; $i++ )\n{\n$a[$i] = Bit::Vector->new($bits);\n$b[$i] = Bit::Vector->new($bits);\n$c[$i] = Bit::Vector->new($bits);\n}\n\n# fill @a and @b\n\n# $a[  0 ] is low order part,\n# $a[$n-1] is high order part,\n# and same for @b\n\n# subtract\n\n$carry = 0;\nfor ( $i = 0; $i < $n; $i++ )\n{\n$carry = $c[$i]->subtract($a[$i],$b[$i],$carry);\n}\n\nNote that it makes no difference to this method whether the numbers in \"$vec1\" and \"$vec2\" are\nunsigned or signed (i.e., in two's complement binary representation).\n\nNote however that the return value (carry flag) is not meaningful when the numbers are SIGNED.\n\nMoreover, when the numbers are signed, a special type of error can occur which is commonly\ncalled an \"overflow error\".\n\nAn overflow error occurs when the sign of the result (its most significant bit) is flipped\n(i.e., falsified) by a carry over from the next-lower bit position (\"MSB-1\").\n\nIn fact matters are a bit more complicated than that: the overflow flag is set to \"true\"\nwhenever there is a carry over from bit position MSB-1 to the most significant bit (MSB) but\nno carry over from the MSB to the output carry flag, or vice-versa, i.e., when there is no\ncarry over from bit position MSB-1 to the most significant bit (MSB) but a carry over to the\noutput carry flag.\n\nThus the overflow flag is the result of an exclusive-or operation between incoming and\noutgoing carry over at the most significant bit position.\n\n* \"$vec2->Neg($vec1);\"\n\n\"$vec2->Negate($vec1);\"\n\nThis method calculates the two's complement of the number in bit vector \"$vec1\" and stores the\nresult in bit vector \"$vec2\".\n\nCalculating the two's complement of a given number in binary representation consists of\ninverting all bits and incrementing the result by one.\n\nThis is the same as changing the sign of the given number from \"\"+\"\" to \"\"-\"\" or vice-versa.\nIn other words, applying this method twice on a given number yields the original number again.\n\nNote that in-place processing is also possible, i.e., \"$vec1\" and \"$vec2\" may be identical.\n\nMost importantly, beware that this method produces a counter-intuitive result if the number\ncontained in bit vector \"$vec1\" is \"2 ^ (n-1)\" (i.e., \"1000...0000\"), where \"\"n\"\" is the\nnumber of bits the given bit vector contains: The negated value of this number is the number\nitself!\n\n* \"$vec2->Abs($vec1);\"\n\n\"$vec2->Absolute($vec1);\"\n\nDepending on the sign (i.e., the most significant bit) of the number in bit vector \"$vec1\",\nthe contents of bit vector \"$vec1\" are copied to bit vector \"$vec2\" either with the method\n\"\"Copy()\"\" (if the number in bit vector \"$vec1\" is positive), or with \"\"Negate()\"\" (if the\nnumber in bit vector \"$vec1\" is negative).\n\nIn other words, this method calculates the absolute value of the number in bit vector \"$vec1\"\nand stores the result in bit vector \"$vec2\".\n\nNote that in-place processing is also possible, i.e., \"$vec1\" and \"$vec2\" may be identical.\n\nMost importantly, beware that this method produces a counter-intuitive result if the number\ncontained in bit vector \"$vec1\" is \"2 ^ (n-1)\" (i.e., \"1000...0000\"), where \"\"n\"\" is the\nnumber of bits the given bit vector contains: The absolute value of this number is the number\nitself, even though this number is still negative by definition (the most significant bit is\nstill set)!\n\n* \"$sign = $vector->Sign();\"\n\nThis method returns \"0\" if all bits in the given bit vector are cleared, i.e., if the given\nbit vector contains the number \"0\", or if the given bit vector has a length of zero (contains\nno bits at all).\n\nIf not all bits are cleared, this method returns \"-1\" if the most significant bit is set\n(i.e., if the bit vector contains a negative number), or \"1\" otherwise (i.e., if the bit\nvector contains a positive number).\n\n* \"$vec3->Multiply($vec1,$vec2);\"\n\nThis method multiplies the two numbers contained in bit vector \"$vec1\" and \"$vec2\" and stores\nthe result in bit vector \"$vec3\".\n\nNote that this method regards its arguments as SIGNED.\n\nIf you want to make sure that a large number can never be treated as being negative by\nmistake, make your bit vectors at least one bit longer than the largest number you wish to\nrepresent, right from the start, or proceed as follows:\n\n$msb1 = $vec1->msb();\n$msb2 = $vec2->msb();\n$vec1->Resize($vec1->Size()+1);\n$vec2->Resize($vec2->Size()+1);\n$vec3->Resize($vec3->Size()+1);\n$vec1->MSB($msb1);\n$vec2->MSB($msb2);\n$vec3->Multiply($vec1,$vec2);\n\nNote also that all three bit vector arguments must in principle obey the rule of matching\nsizes, but that the bit vector \"$vec3\" may be larger than the two factors \"$vec1\" and \"$vec2\".\n\nIn fact multiplying two binary numbers with \"\"n\"\" bits may yield a result which is at most\n\"\"2n\"\" bits long.\n\nTherefore, it is usually a good idea to let bit vector \"$vec3\" have twice the size of bit\nvector \"$vec1\" and \"$vec2\", unless you are absolutely sure that the result will fit into a bit\nvector of the same size as the two factors.\n\nIf you are wrong, a fatal \"numeric overflow error\" will occur.\n\nFinally, note that in-place processing is possible, i.e., \"$vec3\" may be identical with\n\"$vec1\" or \"$vec2\", or both.\n\n* \"$quot->Divide($vec1,$vec2,$rest);\"\n\nThis method divides the two numbers contained in bit vector \"$vec1\" and \"$vec2\" and stores the\nquotient in bit vector \"$quot\" and the remainder in bit vector \"$rest\".\n\nI.e., $quot = $vec1 / $vec2; # div $rest = $vec1 % $vec2; # mod\n\nTherefore, \"$quot\" and \"$rest\" must be two DISTINCT bit vectors, or a fatal \"result vector(s)\nmust be distinct\" error will occur.\n\nNote also that a fatal \"division by zero error\" will occur if \"$vec2\" is equal to zero.\n\nNote further that this method regards its arguments as SIGNED.\n\nIf you want to make sure that a large number can never be treated as being negative by\nmistake, make your bit vectors at least one bit longer than the largest number you wish to\nrepresent, right from the start, or proceed as follows:\n\n$msb1 = $vec1->msb();\n$msb2 = $vec2->msb();\n$vec1->Resize($vec1->Size()+1);\n$vec2->Resize($vec2->Size()+1);\n$quot->Resize($quot->Size()+1);\n$rest->Resize($rest->Size()+1);\n$vec1->MSB($msb1);\n$vec2->MSB($msb2);\n$quot->Divide($vec1,$vec2,$rest);\n\nFinally, note that in-place processing is possible, i.e., \"$quot\" may be identical with\n\"$vec1\" or \"$vec2\" or both, and \"$rest\" may also be identical with \"$vec1\" or \"$vec2\" or both,\nas long as \"$quot\" and \"$rest\" are distinct. (!)\n\n* \"$vecgcd->GCD($veca,$vecb);\"\n\nThis method calculates the \"Greatest Common Divisor\" of the two numbers contained in bit\nvector \"$veca\" and \"$vecb\" and stores the result in bit vector \"$vecgcd\".\n\nThe method uses Euklid's algorithm internally:\n\nint GCD(int a, int b)\n{\nint t;\n\nwhile (b != 0)\n{\nt = a % b; /* = remainder of (a div b) */\na = b;\nb = t;\n}\nreturn(a);\n}\n\nNote that \"GCD(z,0) == GCD(0,z) == z\".\n\n* \"$vecgcd->GCD($vecx,$vecy,$veca,$vecb);\"\n\nThis variant of the \"GCD\" method calculates the \"Greatest Common Divisor\" of the two numbers\ncontained in bit vector \"$veca\" and \"$vecb\" and stores the result in bit vector \"$vecgcd\".\n\nMoreover, it determines the two factors which are necessary in order to represent the greatest\ncommon divisor as a linear combination of its two arguments, i.e., the two factors \"x\" and \"y\"\nso that \"GCD(a,b) == x * a + y * b\", and stores them in bit vector \"$vecx\" and \"$vecy\",\nrespectively.\n\nFor example:\n\na = 2322\nb =  654\n\nGCD( 2322, 654 ) == 6\n\nx =  20\ny = -71\n\n20 * 2322 - 71 * 654 == 6\n\nPlease see http://www.cut-the-knot.org/blue/extension.shtml for an explanation of how this\nextension of Euklid's algorithm works.\n\n* \"$vec3->Power($vec1,$vec2);\"\n\nThis method calculates the exponentiation of base \"$vec1\" elevated to the \"$vec2\" power, i.e.,\n\"\"$vec1  $vec2\"\", and stores the result in bit vector \"$vec3\".\n\nThe method uses an efficient divide-and-conquer algorithm:\n\nSuppose the exponent is (decimal) 13, for example. The binary representation of this exponent\nis \"1101\".\n\nThis means we want to calculate\n\n$vec1 * $vec1 * $vec1 * $vec1 * $vec1 * $vec1 * $vec1 * $vec1 *\n$vec1 * $vec1 * $vec1 * $vec1 *\n$vec1\n\nThat is, \"$vec1\" multiplied with itself 13 times. The grouping into lines above is no\ncoincidence. The first line comprises 8 factors, the second contains 4, and the last line just\none. This just happens to be the binary representation of 13. \";-)\"\n\nWe then calculate a series of squares (of squares of squares...) of the base, i.e.,\n\n$power[0] = $vec1;\n$power[1] = $vec1 * $vec1;\n$power[2] = $power[1] * $power[1];\n$power[3] = $power[2] * $power[2];\netc.\n\nTo calculate the power of our example, we simply initialize our result with 1 and\nconsecutively multiply it with the items of the series of powers we just calculated, if the\ncorresponding bit of the binary representation of the exponent is set:\n\n$result = 1;\n$result *= $power[0] if ($vec2 & 1);\n$result *= $power[1] if ($vec2 & 2);\n$result *= $power[2] if ($vec2 & 4);\n$result *= $power[3] if ($vec2 & 8);\netc.\n\nThe bit vector \"$vec3\" must be of the same size as the base \"$vec1\" or greater. \"$vec3\" and\n\"$vec1\" may be the same vector (i.e., in-place calculation as in \"\"$vec1 = $vec2;\"\" is\npossible), but \"$vec3\" and \"$vec2\" must be distinct. Finally, the exponent \"$vec2\" must be\npositive. A fatal error occurs if any of these conditions is not met.\n\n* \"$vector->BlockStore($buffer);\"\n\nThis method allows you to load the contents of a given bit vector in one go.\n\nThis is useful when you store the contents of a bit vector in a file, for instance (using\nmethod \"\"BlockRead()\"\"), and when you want to restore the previously saved bit vector.\n\nFor this, \"$buffer\" MUST be a string (NO automatic conversion from numeric to string is\nprovided here as would normally in Perl!) containing the bit vector in \"low order byte first\"\norder.\n\nIf the given string is shorter than what is needed to completely fill the given bit vector,\nthe remaining (most significant) bytes of the bit vector are filled with zeros, i.e., the\nprevious contents of the bit vector are always erased completely.\n\nIf the given string is longer than what is needed to completely fill the given bit vector, the\nsuperfluous bytes are simply ignored.\n\nSee \"sysread\" in perlfunc for how to read in the contents of \"$buffer\" from a file prior to\npassing it to this method.\n\n* \"$buffer = $vector->BlockRead();\"\n\nThis method allows you to export the contents of a given bit vector in one block.\n\nThis is useful when you want to save the contents of a bit vector for later, for instance in a\nfile.\n\nThe advantage of this method is that it allows you to do so in the compactest possible format,\nin binary.\n\nThe method returns a Perl string which contains an exact copy of the contents of the given bit\nvector in \"low order byte first\" order.\n\nSee \"syswrite\" in perlfunc for how to write the data from this string to a file.\n\n* \"$size = $vector->WordSize();\"\n\nEach bit vector is internally organized as an array of machine words.\n\nThe methods whose names begin with \"Word\" allow you to access this internal array of machine\nwords.\n\nNote that because the size of a machine word may vary from system to system, these methods are\ninherently MACHINE-DEPENDENT!\n\nTherefore, DO NOT USE these methods unless you are absolutely certain that portability of your\ncode is not an issue!\n\nYou have been warned!\n\nTo be machine-independent, use the methods whose names begin with \"\"Chunk\"\" instead, with\nchunk sizes no greater than 32 bits.\n\nThe method \"\"WordSize()\"\" returns the number of machine words that the internal array of\nwords of the given bit vector contains.\n\nThis is similar in function to the term \"\"scalar(@array)\"\" for a Perl array.\n\n* \"$vector->WordStore($offset,$word);\"\n\nThis method allows you to store a given value \"$word\" at a given position \"$offset\" in the\ninternal array of words of the given bit vector.\n\nNote that \"$offset\" must lie in the permitted range between \"0\" and\n\"\"$vector->WordSize()-1\"\", or a fatal \"offset out of range\" error will occur.\n\nThis method is similar in function to the expression \"\"$array[$offset] = $word;\"\" for a Perl\narray.\n\n* \"$word = $vector->WordRead($offset);\"\n\nThis method allows you to access the value of a given machine word at position \"$offset\" in\nthe internal array of words of the given bit vector.\n\nNote that \"$offset\" must lie in the permitted range between \"0\" and\n\"\"$vector->WordSize()-1\"\", or a fatal \"offset out of range\" error will occur.\n\nThis method is similar in function to the expression \"\"$word = $array[$offset];\"\" for a Perl\narray.\n\n* \"$vector->WordListStore(@words);\"\n\nThis method allows you to store a list of values \"@words\" in the internal array of machine\nwords of the given bit vector.\n\nThereby the LEFTMOST value in the list (\"$words[0]\") is stored in the LEAST significant word\nof the internal array of words (the one with offset \"0\"), the next value from the list\n(\"$words[1]\") is stored in the word with offset \"1\", and so on, as intuitively expected.\n\nIf the list \"@words\" contains fewer elements than the internal array of words of the given bit\nvector contains machine words, the remaining (most significant) words are filled with zeros.\n\nIf the list \"@words\" contains more elements than the internal array of words of the given bit\nvector contains machine words, the superfluous values are simply ignored.\n\nThis method is comparable in function to the expression \"\"@array = @words;\"\" for a Perl array.\n\n* \"@words = $vector->WordListRead();\"\n\nThis method allows you to retrieve the internal array of machine words of the given bit vector\nall at once.\n\nThereby the LEFTMOST value in the returned list (\"$words[0]\") is the LEAST significant word\nfrom the given bit vector, and the RIGHTMOST value in the returned list (\"$words[$#words]\") is\nthe MOST significant word of the given bit vector.\n\nThis method is similar in function to the expression \"\"@words = @array;\"\" for a Perl array.\n\n* \"$vector->WordInsert($offset,$count);\"\n\nThis method inserts \"$count\" empty new machine words at position \"$offset\" in the internal\narray of words of the given bit vector.\n\nThe \"$count\" most significant words are lost, and all words starting with word number\n\"$offset\" up to and including word number \"\"$vector->WordSize()-$count-1\"\" are moved up by\n\"$count\" places.\n\nThe now vacant \"$count\" words starting at word number \"$offset\" (up to and including word\nnumber \"\"$offset+$count-1\"\") are then set to zero (cleared).\n\nNote that this method does NOT increase the size of the given bit vector, i.e., the bit vector\nis NOT extended at its upper end to \"rescue\" the \"$count\" uppermost (most significant) words -\ninstead, these words are lost forever.\n\nIf you don't want this to happen, you have to increase the size of the given bit vector\nEXPLICITLY and BEFORE you perform the \"Insert\" operation, with a statement such as the\nfollowing:\n\n$vector->Resize($vector->Size() + $count * Bit::Vector->WordBits());\n\nNote also that \"$offset\" must lie in the permitted range between \"0\" and\n\"\"$vector->WordSize()-1\"\", or a fatal \"offset out of range\" error will occur.\n\nIf the term \"\"$offset + $count\"\" exceeds \"\"$vector->WordSize()-1\"\", all the words starting\nwith word number \"$offset\" up to word number \"\"$vector->WordSize()-1\"\" are simply cleared.\n\n* \"$vector->WordDelete($offset,$count);\"\n\nThis method deletes, i.e., removes the words starting at position \"$offset\" up to and\nincluding word number \"\"$offset+$count-1\"\" from the internal array of machine words of the\ngiven bit vector.\n\nThe remaining uppermost words (starting at position \"\"$offset+$count\"\" up to and including\nword number \"\"$vector->WordSize()-1\"\") are moved down by \"$count\" places.\n\nThe now vacant uppermost (most significant) \"$count\" words are then set to zero (cleared).\n\nNote that this method does NOT decrease the size of the given bit vector, i.e., the bit vector\nis NOT clipped at its upper end to \"get rid of\" the vacant \"$count\" uppermost words.\n\nIf you don't want this, i.e., if you want the bit vector to shrink accordingly, you have to do\nso EXPLICITLY and AFTER the \"Delete\" operation, with a couple of statements such as these:\n\n$bits = $vector->Size();\n$count *= Bit::Vector->WordBits();\nif ($count > $bits) { $count = $bits; }\n$vector->Resize($bits - $count);\n\nNote also that \"$offset\" must lie in the permitted range between \"0\" and\n\"\"$vector->WordSize()-1\"\", or a fatal \"offset out of range\" error will occur.\n\nIf the term \"\"$offset + $count\"\" exceeds \"\"$vector->WordSize()-1\"\", all the words starting\nwith word number \"$offset\" up to word number \"\"$vector->WordSize()-1\"\" are simply cleared.\n\n* \"$vector->ChunkStore($chunksize,$offset,$chunk);\"\n\nThis method allows you to set more than one bit at a time with different values.\n\nYou can access chunks (i.e., ranges of contiguous bits) between one and at most\n\"\"Bit::Vector->LongBits()\"\" bits wide.\n\nIn order to be portable, though, you should never use chunk sizes larger than 32 bits.\n\nIf the given \"$chunksize\" does not lie between \"1\" and \"\"Bit::Vector->LongBits()\"\", a fatal\n\"chunk size out of range\" error will occur.\n\nThe method copies the \"$chunksize\" least significant bits from the value \"$chunk\" to the given\nbit vector, starting at bit position \"$offset\" and proceeding upwards until bit number\n\"\"$offset+$chunksize-1\"\".\n\n(I.e., bit number \"0\" of \"$chunk\" becomes bit number \"$offset\" in the given bit vector, and\nbit number \"\"$chunksize-1\"\" becomes bit number \"\"$offset+$chunksize-1\"\".)\n\nIf the term \"\"$offset+$chunksize-1\"\" exceeds \"\"$vector->Size()-1\"\", the corresponding\nsuperfluous (most significant) bits from \"$chunk\" are simply ignored.\n\nNote that \"$offset\" itself must lie in the permitted range between \"0\" and\n\"\"$vector->Size()-1\"\", or a fatal \"offset out of range\" error will occur.\n\nThis method (as well as the other \"\"Chunk\"\" methods) is useful, for example, when you are\nreading in data in chunks of, say, 8 bits, which you need to access later, say, using 16 bits\nat a time (like audio CD wave files, for instance).\n\n* \"$chunk = $vector->ChunkRead($chunksize,$offset);\"\n\nThis method allows you to read the values of more than one bit at a time.\n\nYou can read chunks (i.e., ranges of contiguous bits) between one and at most\n\"\"Bit::Vector->LongBits()\"\" bits wide.\n\nIn order to be portable, though, you should never use chunk sizes larger than 32 bits.\n\nIf the given \"$chunksize\" does not lie between \"1\" and \"\"Bit::Vector->LongBits()\"\", a fatal\n\"chunk size out of range\" error will occur.\n\nThe method returns the \"$chunksize\" bits from the given bit vector starting at bit position\n\"$offset\" and proceeding upwards until bit number \"\"$offset+$chunksize-1\"\".\n\n(I.e., bit number \"$offset\" of the given bit vector becomes bit number \"0\" of the returned\nvalue, and bit number \"\"$offset+$chunksize-1\"\" becomes bit number \"\"$chunksize-1\"\".)\n\nIf the term \"\"$offset+$chunksize-1\"\" exceeds \"\"$vector->Size()-1\"\", the non-existent bits are\nsimply not returned.\n\nNote that \"$offset\" itself must lie in the permitted range between \"0\" and\n\"\"$vector->Size()-1\"\", or a fatal \"offset out of range\" error will occur.\n\n* \"$vector->ChunkListStore($chunksize,@chunks);\"\n\nThis method allows you to fill the given bit vector with a list of data packets (\"chunks\") of\nany size (\"$chunksize\") you like (within certain limits).\n\nIn fact the given \"$chunksize\" must lie in the range between \"1\" and\n\"\"Bit::Vector->LongBits()\"\", or a fatal \"chunk size out of range\" error will occur.\n\nIn order to be portable, though, you should never use chunk sizes larger than 32 bits.\n\nThe given bit vector is thereby filled in ascending order: The first chunk from the list\n(i.e., \"$chunks[0]\") fills the \"$chunksize\" least significant bits, the next chunk from the\nlist (\"$chunks[1]\") fills the bits number \"$chunksize\" to number \"\"2*$chunksize-1\"\", the third\nchunk (\"$chunks[2]\") fills the bits number \"\"2*$chunksize\"\", to number \"\"3*$chunksize-1\"\", and\nso on.\n\nIf there a less chunks in the list than are needed to fill the entire bit vector, the\nremaining (most significant) bits are cleared, i.e., the previous contents of the given bit\nvector are always erased completely.\n\nIf there are more chunks in the list than are needed to fill the entire bit vector, and/or if\na chunk extends beyond \"\"$vector->Size()-1\"\" (which happens whenever \"\"$vector->Size()\"\" is\nnot a multiple of \"$chunksize\"), the superfluous chunks and/or bits are simply ignored.\n\nThe method is useful, for example (and among many other applications), for the conversion of\npacket sizes in a data stream.\n\nThis method can also be used to store an octal string in a given bit vector:\n\n$vector->ChunkListStore(3, split(//, reverse $string));\n\nNote however that unlike the conversion methods \"\"fromHex()\"\", \"\"fromBin()\"\", \"\"fromDec()\"\"\nand \"\"fromEnum()\"\", this statement does not include any syntax checking, i.e., it may fail\nsilently, without warning.\n\nTo perform syntax checking, add the following statements:\n\nif ($string =~ /^[0-7]+$/)\n{\n# okay, go ahead with conversion as shown above\n}\nelse\n{\n# error, string contains other than octal characters\n}\n\nAnother application is to store a repetitive pattern in a given bit vector:\n\n$pattern = 0xDEADBEEF;\n$length = 32;            # = length of $pattern in bits\n$size = $vector->Size();\n$factor = int($size / $length);\nif ($size % $length) { $factor++; }\n$vector->ChunkListStore($length, ($pattern) x $factor);\n\n* \"@chunks = $vector->ChunkListRead($chunksize);\"\n\nThis method allows you to access the contents of the given bit vector in form of a list of\ndata packets (\"chunks\") of a size (\"$chunksize\") of your choosing (within certain limits).\n\nIn fact the given \"$chunksize\" must lie in the range between \"1\" and\n\"\"Bit::Vector->LongBits()\"\", or a fatal \"chunk size out of range\" error will occur.\n\nIn order to be portable, though, you should never use chunk sizes larger than 32 bits.\n\nThe given bit vector is thereby read in ascending order: The \"$chunksize\" least significant\nbits (bits number \"0\" to \"\"$chunksize-1\"\") become the first chunk in the returned list (i.e.,\n\"$chunks[0]\"). The bits number \"$chunksize\" to \"\"2*$chunksize-1\"\" become the next chunk in the\nlist (\"$chunks[1]\"), and so on.\n\nIf \"\"$vector->Size()\"\" is not a multiple of \"$chunksize\", the last chunk in the list will\ncontain fewer bits than \"$chunksize\".\n\nBEWARE that for large bit vectors and/or small values of \"$chunksize\", the number of returned\nlist elements can be extremely large! BE CAREFUL!\n\nYou could blow up your application with lack of memory (each list element is a full-grown Perl\nscalar, internally, with an associated memory overhead for its administration!) or at least\ncause a noticeable, more or less long-lasting \"freeze\" of your application!\n\nPossible applications:\n\nThe method is especially useful in the conversion of packet sizes in a data stream.\n\nThis method can also be used to convert a given bit vector to a string of octal numbers:\n\n$string = reverse join('', $vector->ChunkListRead(3));\n\n* \"$vector->IndexListRemove(@indices);\"\n\nThis method allows you to specify a list of indices of bits which should be turned off in the\ngiven bit vector.\n\nIn fact this method is a shortcut for\n\nforeach $index (@indices)\n{\n$vector->BitOff($index);\n}\n\nIn contrast to all other import methods in this module, this method does NOT clear the given\nbit vector before processing its list of arguments.\n\nInstead, this method allows you to accumulate the results of various consecutive calls.\n\n(The same holds for the method \"\"IndexListStore()\"\". As a consequence, you can \"wipe out\"\nwhat you did using the method \"\"IndexListRemove()\"\" by passing the identical argument list\nto the method \"\"IndexListStore()\"\".)\n\n* \"$vector->IndexListStore(@indices);\"\n\nThis method allows you to specify a list of indices of bits which should be turned on in the\ngiven bit vector.\n\nIn fact this method is a shortcut for\n\nforeach $index (@indices)\n{\n$vector->BitOn($index);\n}\n\nIn contrast to all other import methods in this module, this method does NOT clear the given\nbit vector before processing its list of arguments.\n\nInstead, this method allows you to accumulate the results of various consecutive calls.\n\n(The same holds for the method \"\"IndexListRemove()\"\". As a consequence, you can \"wipe out\"\nwhat you did using the method \"\"IndexListStore()\"\" by passing the identical argument list to\nthe method \"\"IndexListRemove()\"\".)\n\n* \"@indices = $vector->IndexListRead();\"\n\nThis method returns a list of Perl scalars.\n\nThe list contains one scalar for each set bit in the given bit vector.\n\nBEWARE that for large bit vectors, this can result in a literally overwhelming number of list\nelements! BE CAREFUL! You could run out of memory or slow down your application considerably!\n\nEach scalar contains the number of the index corresponding to the bit in question.\n\nThese indices are always returned in ascending order.\n\nIf the given bit vector is empty (contains only cleared bits) or if it has a length of zero\n(if it contains no bits at all), the method returns an empty list.\n\nThis method can be useful, for instance, to obtain a list of prime numbers:\n\n$limit = 1000; # or whatever\n$vector = Bit::Vector->new($limit+1);\n$vector->Primes();\n@primes = $vector->IndexListRead();\n\n* \"$vec3->Or($vec1,$vec2);\"\n\n\"$set3->Union($set1,$set2);\"\n\nThis method calculates the union of \"$set1\" and \"$set2\" and stores the result in \"$set3\".\n\nThis is usually written as \"\"$set3 = $set1 u $set2\"\" in set theory (where \"u\" is the \"cup\"\noperator).\n\n(On systems where the \"cup\" character is unavailable this operator is often denoted by a plus\nsign \"+\".)\n\nIn-place calculation is also possible, i.e., \"$set3\" may be identical with \"$set1\" or \"$set2\"\nor both.\n\n* \"$vec3->And($vec1,$vec2);\"\n\n\"$set3->Intersection($set1,$set2);\"\n\nThis method calculates the intersection of \"$set1\" and \"$set2\" and stores the result in\n\"$set3\".\n\nThis is usually written as \"\"$set3 = $set1 n $set2\"\" in set theory (where \"n\" is the \"cap\"\noperator).\n\n(On systems where the \"cap\" character is unavailable this operator is often denoted by an\nasterisk \"*\".)\n\nIn-place calculation is also possible, i.e., \"$set3\" may be identical with \"$set1\" or \"$set2\"\nor both.\n\n* \"$vec3->AndNot($vec1,$vec2);\"\n\n\"$set3->Difference($set1,$set2);\"\n\nThis method calculates the difference of \"$set1\" less \"$set2\" and stores the result in\n\"$set3\".\n\nThis is usually written as \"\"$set3 = $set1 \\ $set2\"\" in set theory (where \"\\\" is the \"less\"\noperator).\n\nIn-place calculation is also possible, i.e., \"$set3\" may be identical with \"$set1\" or \"$set2\"\nor both.\n\n* \"$vec3->Xor($vec1,$vec2);\"\n\n\"$set3->ExclusiveOr($set1,$set2);\"\n\nThis method calculates the symmetric difference of \"$set1\" and \"$set2\" and stores the result\nin \"$set3\".\n\nThis can be written as \"\"$set3 = ($set1 u $set2) \\ ($set1 n $set2)\"\" in set theory (the union\nof the two sets less their intersection).\n\nWhen sets are implemented as bit vectors then the above formula is equivalent to the\nexclusive-or between corresponding bits of the two bit vectors (hence the name of this\nmethod).\n\nNote that this method is also much more efficient than evaluating the above formula explicitly\nsince it uses a built-in machine language instruction internally.\n\nIn-place calculation is also possible, i.e., \"$set3\" may be identical with \"$set1\" or \"$set2\"\nor both.\n\n* \"$vec2->Not($vec1);\"\n\n\"$set2->Complement($set1);\"\n\nThis method calculates the complement of \"$set1\" and stores the result in \"$set2\".\n\nIn \"big integer\" arithmetic, this is equivalent to calculating the one's complement of the\nnumber stored in the bit vector \"$set1\" in binary representation.\n\nIn-place calculation is also possible, i.e., \"$set2\" may be identical with \"$set1\".\n\n* \"if ($set1->subset($set2))\"\n\nReturns \"true\" (\"1\") if \"$set1\" is a subset of \"$set2\" (i.e., completely contained in \"$set2\")\nand \"false\" (\"0\") otherwise.\n\nThis means that any bit which is set (\"1\") in \"$set1\" must also be set in \"$set2\", but \"$set2\"\nmay contain set bits which are not set in \"$set1\", in order for the condition of subset\nrelationship to be true between these two sets.\n\nNote that by definition, if two sets are identical, they are also subsets (and also supersets)\nof each other.\n\n* \"$norm = $set->Norm();\"\n\nReturns the norm (number of bits which are set) of the given vector.\n\nThis is equivalent to the number of elements contained in the given set.\n\nUses a byte lookup table for calculating the number of set bits per byte, and thus needs a\ntime for evaluation (and a number of loops) linearly proportional to the length of the given\nbit vector (in bytes).\n\nThis should be the fastest algorithm on average.\n\n* \"$norm = $set->Norm2();\"\n\nReturns the norm (number of bits which are set) of the given vector.\n\nThis is equivalent to the number of elements contained in the given set.\n\nThis does the same as the method \"\"Norm()\"\" above, only with a different algorithm:\n\nThis method counts the number of set and cleared bits at the same time and will stop when\neither of them has been exhausted, thus needing at most half as many loops per machine word as\nthe total number of bits in a machine word - in fact it will need a number of loops equal to\nthe minimum of the number of set bits and the number of cleared bits.\n\nThis might be a faster algorithm than of the method \"\"Norm()\"\" above on some systems,\ndepending on the system's architecture and the compiler and optimisation used, for bit vectors\nwith sparse set bits and for bit vectors with sparse cleared bits (i.e., predominantly set\nbits).\n\n* \"$norm = $set->Norm3();\"\n\nReturns the norm (number of bits which are set) of the given vector.\n\nThis is equivalent to the number of elements contained in the given set.\n\nThis does the same as the two methods \"\"Norm()\"\" and \"\"Norm2()\"\" above, however with a\ndifferent algorithm.\n\nIn fact this is the implementation of the method \"\"Norm()\"\" used in previous versions of this\nmodule.\n\nThe method needs a number of loops per machine word equal to the number of set bits in that\nmachine word.\n\nOnly for bit vectors with sparse set bits will this method be fast; it will depend on a\nsystem's architecture and compiler whether the method will be faster than any of the two\nmethods above in such cases.\n\nOn average however, this is probably the slowest method of the three.\n\n* \"$min = $set->Min();\"\n\nReturns the minimum of the given set, i.e., the minimum of all indices of all set bits in the\ngiven bit vector \"$set\".\n\nIf the set is empty (no set bits), plus infinity (represented by the constant \"MAXLONG\" on\nyour system) is returned.\n\n(This constant is usually 2 ^ (n-1) - 1, where \"\"n\"\" is the number of bits of an unsigned long\non your machine.)\n\n* \"$max = $set->Max();\"\n\nReturns the maximum of the given set, i.e., the maximum of all indices of all set bits in the\ngiven bit vector \"$set\".\n\nIf the set is empty (no set bits), minus infinity (represented by the constant \"MINLONG\" on\nyour system) is returned.\n\n(This constant is usually -(2 ^ (n-1) - 1) or -(2 ^ (n-1)), where \"\"n\"\" is the number of bits\nof an unsigned long on your machine.)\n\n* \"$m3->Multiplication($r3,$c3,$m1,$r1,$c1,$m2,$r2,$c2);\"\n\nThis method multiplies two boolean matrices (stored as bit vectors) \"$m1\" and \"$m2\" and stores\nthe result in matrix \"$m3\".\n\nThe method uses the binary \"xor\" operation (\"\"^\"\") as the boolean addition operator (\"\"+\"\").\n\nAn exception is raised if the product of the number of rows and columns of any of the three\nmatrices differs from the actual size of their underlying bit vector.\n\nAn exception is also raised if the numbers of rows and columns of the three matrices do not\nharmonize in the required manner:\n\nrows3 == rows1\ncols3 == cols2\ncols1 == rows2\n\nThis method is used by the module \"Math::MatrixBool\".\n\nSee Math::MatrixBool(3) for details.\n\n* \"$m3->Product($r3,$c3,$m1,$r1,$c1,$m2,$r2,$c2);\"\n\nThis method multiplies two boolean matrices (stored as bit vectors) \"$m1\" and \"$m2\" and stores\nthe result in matrix \"$m3\".\n\nThis special method uses the binary \"or\" operation (\"\"|\"\") as the boolean addition operator\n(\"\"+\"\").\n\nAn exception is raised if the product of the number of rows and columns of any of the three\nmatrices differs from the actual size of their underlying bit vector.\n\nAn exception is also raised if the numbers of rows and columns of the three matrices do not\nharmonize in the required manner:\n\nrows3 == rows1\ncols3 == cols2\ncols1 == rows2\n\nThis method is used by the module \"Math::MatrixBool\".\n\nSee Math::MatrixBool(3) for details.\n\n* \"$matrix->Closure($rows,$cols);\"\n\nThis method calculates the reflexive transitive closure of the given boolean matrix (stored as\na bit vector) using Kleene's algorithm.\n\n(See Math::Kleene(3) for a brief introduction into the theory behind Kleene's algorithm.)\n\nThe reflexive transitive closure answers the question whether a path exists between any two\nvertices of a graph whose edges are given as a matrix:\n\nIf a (directed) edge exists going from vertex \"i\" to vertex \"j\", then the element in the\nmatrix with coordinates (i,j) is set to \"1\" (otherwise it remains set to \"0\").\n\nIf the edges are undirected, the resulting matrix is symmetric, i.e., elements (i,j) and (j,i)\nalways contain the same value.\n\nThe matrix representing the edges of the graph only answers the question whether an EDGE\nexists between any two vertices of the graph or not, whereas the reflexive transitive closure\nanswers the question whether a PATH (a series of adjacent edges) exists between any two\nvertices of the graph!\n\nNote that the contents of the given matrix are modified by this method, so make a copy of the\ninitial matrix in time if you are going to need it again later.\n\nAn exception is raised if the given matrix is not quadratic, i.e., if the number of rows and\ncolumns of the given matrix is not identical.\n\nAn exception is also raised if the product of the number of rows and columns of the given\nmatrix differs from the actual size of its underlying bit vector.\n\nThis method is used by the module \"Math::MatrixBool\".\n\nSee Math::MatrixBool(3) for details.\n\n* \"$matrix2->Transpose($rows2,$cols2,$matrix1,$rows1,$cols1);\"\n\nThis method calculates the transpose of a boolean matrix \"$matrix1\" (stored as a bit vector)\nand stores the result in matrix \"$matrix2\".\n\nThe transpose of a boolean matrix, representing the edges of a graph, can be used for finding\nthe strongly connected components of that graph.\n\nAn exception is raised if the product of the number of rows and columns of any of the two\nmatrices differs from the actual size of its underlying bit vector.\n\nAn exception is also raised if the following conditions are not met:\n\nrows2 == cols1\ncols2 == rows1\n\nNote that in-place processing (\"$matrix1\" and \"$matrix2\" are identical) is only possible if\nthe matrix is quadratic. Otherwise, a fatal \"matrix is not quadratic\" error will occur.\n\nThis method is used by the module \"Math::MatrixBool\".\n\nSee Math::MatrixBool(3) for details.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Bit::Vector::Overload(3), Bit::Vector::String(3), Storable(3).\n\nSet::IntRange(3), Math::MatrixBool(3), Math::MatrixReal(3), DFA::Kleene(3), Math::Kleene(3),\nGraph::Kruskal(3).\n",
                "subsections": []
            },
            "VERSION": {
                "content": "This man page documents \"Bit::Vector\" version 7.4.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Steffen Beyer\nmailto:STBEY@cpan.org\nhttp://www.engelschall.com/u/sb/download/\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (c) 1995 - 2013 by Steffen Beyer. All rights reserved.\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "This package is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself, i.e., under the terms of the \"Artistic License\" or the \"GNU General Public\nLicense\".\n\nThe C library at the core of this Perl module can additionally be redistributed and/or modified\nunder the terms of the \"GNU Library General Public License\".\n\nPlease refer to the files \"Artistic.txt\", \"GNUGPL.txt\" and \"GNULGPL.txt\" in this distribution\nfor details!\n",
                "subsections": []
            },
            "DISCLAIMER": {
                "content": "This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;\nwithout even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\nSee the \"GNU General Public License\" for more details.\n",
                "subsections": []
            }
        }
    }
}