def in_cell_neighborhood(tau,cycle,cycle_eq):
    """
    Returns True if cycle_eq_val lies in the neighborhood of loop characteristic 
    cell tau projected onto the cycle directions and False otherwise.

    :param tau: Cell object
    :param cycle: tuple defining a cycle. The cycle is defined by cycle[0]->cycle[1] ->...->cycle[n]->cycle[0]
    :param cycle_eq: tuple of the form (eq_val,stable)
    :return: bool
    """
    eq_val = cycle_eq[0]
    for j in range(len(cycle)):
        if j < len(cycle) - 1:
            jplus1 = j + 1
        else: 
            jplus1 = 0
        left = tau.theta_rho_minus(cycle[j])
        right = tau.theta_rho_plus(cycle[j])
        if eq_val[j] < left or eq_val[j] > right:
            return False
    return True