/** * computes and returns the depth of the tree from the * root to the passed vertex * * @param v the node who's depth is computed * @return the depth to the passed node. */ public int getDepth(V v) { return getPath(v).size(); }
/** * computes and returns the depth of the tree from the root to the passed * vertex * * @param v * the node who's depth is computed * @return the depth to the passed node. */ public int getDepth(V v) { return getPath(v).size(); }