def find_max_residual(self):
    'Find max residual.'
    max_r = (- np.inf)
    best_edge = None
    for i in range(self.nrVars):
        for _I in range(len(self.nbV[i])):
            if (self._edges[i][_I].residual > max_r):
                max_r = self._edges[i][_I].residual
                best_edge = (i, _I)
    return best_edge
Find max residual.
def find_max_residual(self):
    
    max_r = (- np.inf)
    best_edge = None
    for i in range(self.nrVars):
        for _I in range(len(self.nbV[i])):
            if (self._edges[i][_I].residual > max_r):
                max_r = self._edges[i][_I].residual
                best_edge = (i, _I)
    return best_edge