def objective_dominance(pop_obj, i, j):
    """
    Computes objective-wise dominance between elements i and j of the population.
    :param pop_obj: the value of the populations' objectives
    :param i, j: the elems being compared

    :returns: dominator: the index of the dominator, None if i and j are non-dominated
              dominated: the index of the dominated, None if i and j are non-dominated
    """
    _,M = pop_obj.shape
    
    i_dominates_j = False
    j_dominates_i = False
                                
    for obj_idx in range(M):
        if pop_obj[i,obj_idx] < pop_obj[j,obj_idx] :
            i_dominates_j = True
        elif pop_obj[i,obj_idx] > pop_obj[j,obj_idx] :
            j_dominates_i = True
   
    if i_dominates_j and (not j_dominates_i):
        return i, j
    if (not i_dominates_j) and j_dominates_i: 
        return j, i  

    return None, None