(self, mapping)
return p
Returns a new path object in which nodes have been mapped to different labels
        given by an arbitrary mapping function. For instance, for the mapping 
        {'a': 'x', 'b': 'x', 'c': 'y', 'd': 'y'} the path (a,b,c,d) is mapped to 
        (x,x,y,y). This is useful, e.g., to map page page click streams to topic 
        click streams, using a mapping from pages to topics.
        
        @param mapping: a dictionary that maps nodes to the new labels
Returns a new path object in which nodes have been mapped to different labels
        given by an arbitrary mapping function. For instance, for the mapping 
        {'a': 'x', 'b': 'x', 'c': 'y', 'd': 'y'} the path (a,b,c,d) is mapped to 
        (x,x,y,y). This is useful, e.g., to map page page click streams to topic 
        click streams, using a mapping from pages to topics.
Returns a new path object in which nodes have been mapped to different labels given by an arbitrary mapping function . For instance for the mapping { a : x b : x c : y d : y } the path ( a b c d ) is mapped to ( x x y y ) . This is useful e . g . to map page page click streams to topic click streams using a mapping from pages to topics .
def projectPaths(self, mapping):
        """
        Returns a new path object in which nodes have been mapped to different labels
        given by an arbitrary mapping function. For instance, for the mapping 
        {'a': 'x', 'b': 'x', 'c': 'y', 'd': 'y'} the path (a,b,c,d) is mapped to 
        (x,x,y,y). This is useful, e.g., to map page page click streams to topic 
        click streams, using a mapping from pages to topics.
        
        @param mapping: a dictionary that maps nodes to the new labels
        """
        p = Paths()
        for l in self.paths:
            for x in self.paths[l]:
                if self.paths[l][x][1]>0:
                    newP = ()
                    for v in x:
                        newP += (mapping[v],)
                    p.addPathTuple(newP, expandSubPaths=True, frequency=(0, self.paths[l][x][1]))
        return p
def projectPaths ( self , mapping ) : p = Paths ( ) for l in self . paths : for x in self . paths [ l ] : if self . paths [ l ] [ x ] [ 1 ] > 0 : newP = ( ) for v in x : newP += ( mapping [ v ] , ) p . addPathTuple ( newP , expandSubPaths = True , frequency = ( 0 , self . paths [ l ] [ x ] [ 1 ] ) ) return p