Function
setBitTo
Set the bit with the given index to the given value.
setBitTo(bitString, pos, bit)
setBitTo(word, index, value)
Include Headers
seqan/index.h, seqan/misc/misc_bit_twiddling.h
Parameters
bitString
The bit string.
pos
Position of the bit.
bit
The value of the bit.
Remarks: Note that values different from 0 are interpreted as 1.
word
The number.
index
The index of the bit in the word.
Types: unsigned
value
The value to set the bit to.
Types: bool
Return Values
void
Examples
String<Dna5> genome = "ACGTACGT";
 
RankSupportBitString<> bitString;
resize(bitString, length(genome));
 
for (unsigned i = 0; i < length(genome); ++i)
    if(genome[i] < Dna5('c'))
        setBitTo(bitString, 1);
 
updateRanks_(bitString);
SeqAn - Sequence Analysis Library - www.seqan.de
 

Page built @2013/07/11 09:12:37