@staticmethod
def _next_point(cur_val, grad, n):
    proj_grad = (grad - (np.sum(grad) / n))
    tm1 = (((- 1.0) * cur_val[(proj_grad < 0)]) / proj_grad[(proj_grad < 0)])
    tm2 = ((1.0 - cur_val[(proj_grad > 0)]) / proj_grad[(proj_grad > 0)])
    skippers = (np.sum((tm1 < 1e-07)) + np.sum((tm2 < 1e-07)))
    t = 1
    if (len(tm1[(tm1 > 1e-07)]) > 0):
        t = np.min(tm1[(tm1 > 1e-07)])
    if (len(tm2[(tm2 > 1e-07)]) > 0):
        t = min(t, np.min(tm2[(tm2 > 1e-07)]))
    next_point = ((proj_grad * t) + cur_val)
    next_point = MGDASolver._projection2simplex(next_point)
    return next_point
@staticmethod
def _next_point(cur_val, grad, n):
    proj_grad = (grad - (np.sum(grad) / n))
    tm1 = (((- 1.0) * cur_val[(proj_grad < 0)]) / proj_grad[(proj_grad < 0)])
    tm2 = ((1.0 - cur_val[(proj_grad > 0)]) / proj_grad[(proj_grad > 0)])
    skippers = (np.sum((tm1 < 1e-07)) + np.sum((tm2 < 1e-07)))
    t = 1
    if (len(tm1[(tm1 > 1e-07)]) > 0):
        t = np.min(tm1[(tm1 > 1e-07)])
    if (len(tm2[(tm2 > 1e-07)]) > 0):
        t = min(t, np.min(tm2[(tm2 > 1e-07)]))
    next_point = ((proj_grad * t) + cur_val)
    next_point = MGDASolver._projection2simplex(next_point)
    return next_point