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