(self, path, k=None)
return nodes
Helper function that transforms a path into a sequence of k-order nodes 
        using the separator character of the HigherOrderNetwork instance 

        Consider an example path (a,b,c,d) with a separator string '-'
        For k=1, the output will be the list of strings ['a', 'b', 'c', 'd']
        For k=2, the output will be the list of strings ['a-b', 'b-c', 'c-d']
        For k=3, the output will be the list of strings ['a-b-c', 'b-c-d']
        etc. 

        @param path: the path tuple to turn into a sequence of higher-order nodes 

        @param k: the order of the representation to use (default: order of the HigherOrderNetwork instance)
Helper function that transforms a path into a sequence of k-order nodes 
        using the separator character of the HigherOrderNetwork instance
Helper function that transforms a path into a sequence of k - order nodes using the separator character of the HigherOrderNetwork instance
def pathToHigherOrderNodes(self, path, k=None):
        """
        Helper function that transforms a path into a sequence of k-order nodes 
        using the separator character of the HigherOrderNetwork instance 

        Consider an example path (a,b,c,d) with a separator string '-'
        For k=1, the output will be the list of strings ['a', 'b', 'c', 'd']
        For k=2, the output will be the list of strings ['a-b', 'b-c', 'c-d']
        For k=3, the output will be the list of strings ['a-b-c', 'b-c-d']
        etc. 

        @param path: the path tuple to turn into a sequence of higher-order nodes 

        @param k: the order of the representation to use (default: order of the HigherOrderNetwork instance)
        """
        if k == None:
            k = self.order
        assert len(path)>k, 'Error: Path must be longer than k'

        if k == 0 and len(path)==1:
            return ['start', path[0]]

        nodes = []
    
        for s in range(0, len(path)-k+1):
            if s>len(path)-1 or s<0:
                print(path)
                print(s)
                print(k)
            v = path[s]
            for l in range(1,k):
                v = v + self.separator + path[s+l]
            nodes.append(v)

        return nodes
def pathToHigherOrderNodes ( self , path , k = None ) : if k == None : k = self . order assert len ( path ) > k , 'Error: Path must be longer than k' if k == 0 and len ( path ) == 1 : return [ 'start' , path [ 0 ] ] nodes = [ ] for s in range ( 0 , len ( path ) - k + 1 ) : if s > len ( path ) - 1 or s < 0 : print ( path ) print ( s ) print ( k ) v = path [ s ] for l in range ( 1 , k ) : v = v + self . separator + path [ s + l ] nodes . append ( v ) return nodes