public Node<N> join(Node<N> x, Node<N> y) {
        // TODO this.majorants should return an iterator
        SortedSet<Node<N>> xMajorants = new TreeSet<Node<N>>(this.majorants(x));
        xMajorants.add(x);
        SortedSet<Node<N>> yMajorants = new TreeSet<Node<N>>(this.majorants(y));
        yMajorants.add(y);
        xMajorants.retainAll(yMajorants);
        DAGraph<N, E> graph = this.getSubgraphByNodes(xMajorants);
        TreeSet<Node> join = new TreeSet<Node>(graph.min());
        if (join.size() == 1) {
            return join.first();
        }
        return null;
    }
public Node<N> join(Node<N> x, Node<N> y) {
       
        SortedSet<Node<N>> xMajorants = new TreeSet<Node<N>>(this.majorants(x));
        xMajorants.add(x);
        SortedSet<Node<N>> yMajorants = new TreeSet<Node<N>>(this.majorants(y));
        yMajorants.add(y);
        xMajorants.retainAll(yMajorants);
        DAGraph<N, E> graph = this.getSubgraphByNodes(xMajorants);
        TreeSet<Node> join = new TreeSet<Node>(graph.min());
        if (join.size() == 1) {
            return join.first();
        }
        return null;
    }
public node<n> join(node<n> x, node<n> y) { sortedset<node<n>> xmajorants = new treeset<node<n>>(this.majorants(x)); xmajorants.add(x); sortedset<node<n>> ymajorants = new treeset<node<n>>(this.majorants(y)); ymajorants.add(y); xmajorants.retainall(ymajorants); dagraph<n, e> graph = this.getsubgraphbynodes(xmajorants); treeset<node> join = new treeset<node>(graph.min()); if (join.size() == 1) { return join.first(); } return null; }