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