src/io/github/marwlod/word_net/SAP.java
// a common ancestor that participates in shortest ancestral path; -1 if no such path
a common ancestor that participates in shortest ancestral path; -1 if no such path
a common ancestor that participates in shortest ancestral path ; - 1 if no such path
public int ancestor(Iterable<Integer> vs, Iterable<Integer> ws) {
        if (vs == null || ws == null) throw new IllegalArgumentException("Iterables must not be null");
        validateVertexIterable(vs);
        validateVertexIterable(ws);
        int[] distToV = computeShortestDists(vs);
        int[] distToW = computeShortestDists(ws);
        return findSapAncestor(distToV, distToW);
    }
public int ancestor ( Iterable < Integer > vs , Iterable < Integer > ws ) { if ( vs == null || ws == null ) throw new IllegalArgumentException ( "Iterables must not be null" ) ; validateVertexIterable ( vs ) ; validateVertexIterable ( ws ) ; int [ ] distToV = computeShortestDists ( vs ) ; int [ ] distToW = computeShortestDists ( ws ) ; return findSapAncestor ( distToV , distToW ) ; }
a common ancestor that participates in shortest ancestral path; -1 if no such path
a common ancestor that participates in shortest ancestral path ; - 1 if no such path