Lines Matching refs:BITS
14 # number of bits / long
15 Readonly my $BITS => 64;
16 sub BITS { return $BITS }
26 Readonly my $MOD_MASK => BITS - 1;
30 has 'bits' => (
46 my $bits;
48 # Construct a bitset of size one word (64 bits)
49 $bits = '0' x BITS;
51 elsif (exists $args->{bits}) {
52 $bits = $args->{bits};
55 $bits = reverse unpack('B*', pack('N', $args->{number}));
66 $bits = '';
68 $bits .= reverse substr(unpack('B*', pack('h', hex $h)), 4);
76 $bits = '0' x $args->{size};
82 $self->bits($bits);
111 my $bits = $self->bits;
112 substr($bits, $el, 1, '1');
113 $self->bits($bits);
121 if ($bit > length $self->bits) {
122 $self->bits .= '0' x ($bit - (length $self->bits) + 1);
132 foreach my $b (split //xms, $a->bits) {
146 return ANTLR::Runtime::BitSet->new(bits => $self->bits);
152 return scalar $self->bits =~ /1/xms;
158 return $self->bits eq $other->bits;
164 return (substr $self->bits, $el, 1) eq '1';
170 my $bits = $self->bits;
171 substr($bits, $el, 1, '0');
172 $self->bits($bits);
180 return $self->bits =~ /1/xms ? 1 : 0;
185 return length $self->bits;
190 return $self->num_bits() / $self->BITS;
198 while ($self->bits =~ /1/gxms) {
209 $self->bits =~ /.{BITS}/gxms
229 foreach my $b (split //xms, $self->bits) {
288 Grows the set to a larger number of bits.
300 Return how much space is being used by the bits array not how many actually
301 have member bits on.