src/io/github/marwlod/word_net/SAP.java
// a common ancestor of v and w that participates in a shortest ancestral path; -1 if no such path
a common ancestor of v and w that participates in a shortest ancestral path; -1 if no such path
a common ancestor of v and w that participates in a shortest ancestral path ; - 1 if no such path
public int ancestor(int v, int w) {
        validateVertex(v);
        validateVertex(w);
        int[] distToV = computeDists(v);
        int[] distToW = computeDists(w);
        return findSapAncestor(distToV, distToW);
    }
public int ancestor ( int v , int w ) { validateVertex ( v ) ; validateVertex ( w ) ; int [ ] distToV = computeDists ( v ) ; int [ ] distToW = computeDists ( w ) ; return findSapAncestor ( distToV , distToW ) ; }
a common ancestor of v and w that participates in a shortest ancestral path; -1 if no such path
a common ancestor of v and w that participates in a shortest ancestral path ; - 1 if no such path