(self, edge_filter)
return TemporalNetwork(tedges=new_t_edges)
Filter time-stamped edges according to a given filter expression. 

        @param edge_filter: an arbitrary filter function of the form filter_func(v, w, time) that 
            returns True for time-stamped edges that shall pass the filter, and False for all edges that 
            shall be filtered out.
Filter time-stamped edges according to a given filter expression.
Filter time - stamped edges according to a given filter expression .
def filterEdges(self, edge_filter):
        """Filter time-stamped edges according to a given filter expression. 

        @param edge_filter: an arbitrary filter function of the form filter_func(v, w, time) that 
            returns True for time-stamped edges that shall pass the filter, and False for all edges that 
            shall be filtered out.
        """

        Log.add('Starting filtering ...', Severity.INFO)
        new_t_edges = []

        for (v,w,t) in self.tedges:
            if edge_filter(v,w,t):
                new_t_edges.append((v,w,t))

        Log.add('finished. Filtered out ' + str(self.ecount() - len(new_t_edges)) + ' time-stamped edges.', Severity.INFO)

        return TemporalNetwork(tedges=new_t_edges)
def filterEdges ( self , edge_filter ) : Log . add ( 'Starting filtering ...' , Severity . INFO ) new_t_edges = [ ] for ( v , w , t ) in self . tedges : if edge_filter ( v , w , t ) : new_t_edges . append ( ( v , w , t ) ) Log . add ( 'finished. Filtered out ' + str ( self . ecount ( ) - len ( new_t_edges ) ) + ' time-stamped edges.' , Severity . INFO ) return TemporalNetwork ( tedges = new_t_edges )