def rank_compar_ord(X):
    """Generate all n choose 2 comparisons."""
    n = len(X)
    order = []
    for j in range(1, n):
        for i in range(j):
            order.append((j, i))

    return order