1
2
3
4
5
6
7
8
9
10
11 """ #DOC
12
13
14 """
15
16
18 """ used to store a collection of bits and score
19 BitVects (or signatures) against them.
20
21 """
22
24 if bits is not None:
25 self._bits = list(bits)
26 else:
27 self._bits = []
28
30 self._bits = list(bits)
31
33 self._bits.append(bit)
34
36 return tuple(self._bits)
37
39 return len(self._bits)
40
42 """ other must support GetOnBits() """
43 obl = other.GetOnBits()
44 cnt = 0
45 for bit in self.GetBits():
46 if bit in obl:
47 cnt += 1
48 return cnt
49
51 """ other must support __getitem__() """
52 cnt = 0
53 for bit in self.GetBits():
54 if other[bit]:
55 cnt += 1
56 return cnt
57
58
59 if __name__ == '__main__':
60
61 pass
62