(self, node_filter, minLength=0, maxLength=sys.maxsize)
return p
Returns a new paths object which contains only paths between nodes in a given 
        filter set. For each of the paths in the current Paths object, the set of maximally 
        contained subpaths between nodes in node_filter is extracted. This method is useful 
        when studying (sub-)paths passing through a subset of nodes.

        @param node_filter: the nodes for which paths with be extracted from the current
            set of paths
        @param minLength: the minimum length of paths to extract (default 0)
        @param maxLength: the maximum length of paths to extract (default sys.maxsize)
Returns a new paths object which contains only paths between nodes in a given 
        filter set. For each of the paths in the current Paths object, the set of maximally 
        contained subpaths between nodes in node_filter is extracted. This method is useful 
        when studying (sub-)paths passing through a subset of nodes.
Returns a new paths object which contains only paths between nodes in a given filter set . For each of the paths in the current Paths object the set of maximally contained subpaths between nodes in node_filter is extracted . This method is useful when studying ( sub - ) paths passing through a subset of nodes .
def filterPaths(self, node_filter, minLength=0, maxLength=sys.maxsize):
        """
        Returns a new paths object which contains only paths between nodes in a given 
        filter set. For each of the paths in the current Paths object, the set of maximally 
        contained subpaths between nodes in node_filter is extracted. This method is useful 
        when studying (sub-)paths passing through a subset of nodes.

        @param node_filter: the nodes for which paths with be extracted from the current
            set of paths
        @param minLength: the minimum length of paths to extract (default 0)
        @param maxLength: the maximum length of paths to extract (default sys.maxsize)
        """                
    
        p = Paths()
        for l in self.paths:
            for x in self.paths[l]:
                if self.paths[l][x][1]>0:                    
                    
                    # determine all contained subpaths which only pass through nodes in node_filter
                    contained = Paths.getContainedPaths(x, node_filter)                    
                    for s in contained:
                        if len(s)-1>=minLength and len(s)-1<=maxLength:
                            p.addPathTuple(s, expandSubPaths=True, frequency=(0, self.paths[l][x][1]))
        return p
def filterPaths ( self , node_filter , minLength = 0 , maxLength = sys . maxsize ) : p = Paths ( ) for l in self . paths : for x in self . paths [ l ] : if self . paths [ l ] [ x ] [ 1 ] > 0 : # determine all contained subpaths which only pass through nodes in node_filter contained = Paths . getContainedPaths ( x , node_filter ) for s in contained : if len ( s ) - 1 >= minLength and len ( s ) - 1 <= maxLength : p . addPathTuple ( s , expandSubPaths = True , frequency = ( 0 , self . paths [ l ] [ x ] [ 1 ] ) ) return p