computeDepths3 method

int computeDepths3(
  1. int startIndex,
  2. int endIndex,
  3. int startDepth
)

Compute the DirectedEdge depths for a subsequence of the edge array.

@return the last depth assigned (from the R side of the last edge visited)

Implementation

int computeDepths3(int startIndex, int endIndex, int startDepth) {
  int currDepth = startDepth;
  for (int i = startIndex; i < endIndex; i++) {
    DirectedEdge nextDe = edgeList![i] as DirectedEdge;
    nextDe.setEdgeDepths(Position.RIGHT, currDepth);
    currDepth = nextDe.getDepth(Position.LEFT);
  }
  return currDepth;
}