CmpDriver | 26 def insertMinimumPadding(a, b, dist): 30 been inserted into the shorter list such that sum(map(dist, a', 33 Assumes dist(X, Y) -> int and non-negative. 37 return sum(map(dist, a + [None] * (len(b) - len(a)), b)) 41 b, a = insertMinimumPadding(b, a, dist) 64 def dist(self, a, b): member in class:ZipperDiff 68 a,b = insertMinimumPadding(self.a, self.b, self.dist) 70 if self.dist(aElt, bElt): 80 def dist(self, a, b): member in class:DriverZipperDiff 83 return super(DriverZipperDiff, self).dist(a,b) [all...] |