def _merge_middles(path): if len(path) == 4: l, m1, m2, r = path lm1, rm1 = m1.split(len(m1) / 2) lm2, rm2 = m2.split(len(m2) / 2) m = Whisker_Seg.join(lm1, rm2) return (l, m, r) else: return path
def _merge_middles( path ): if len(path)==4: l,m1,m2,r = path lm1,rm1 = m1.split( len(m1)/2 ) lm2,rm2 = m2.split( len(m2)/2 ) m = Whisker_Seg.join( lm1,rm2 ) return (l,m,r) else: return path
def iterwhiskers(self): """ Iterates over paths through the WhiskerGroup graph, yielding the whisker for each path """ join = lambda s,t: Whisker_Seg.join(s,t) for p in self.iterpaths(): yield reduce( join, p )
def iterwhiskers(self): """ Iterates over paths, yielding the whisker for each path """ join = lambda s, t: Whisker_Seg.join(s, t) for p in self._paths: yield reduce(join, p)
def iterwhiskers(self): """ Iterates over paths, yielding the whisker for each path """ join = lambda s,t: Whisker_Seg.join(s,t) for p in self._paths: yield reduce( join, p )