computeDepths method

void computeDepths(
  1. DirectedEdge de
)

Implementation

void computeDepths(DirectedEdge de) {
  int edgeIndex = findIndex(de);
  int startDepth = de.getDepth(Position.LEFT);
  int targetLastDepth = de.getDepth(Position.RIGHT);
  // compute the depths from this edge up to the end of the edge array
  int nextDepth = computeDepths3(edgeIndex + 1, edgeList!.length, startDepth);
  // compute the depths for the initial part of the array
  int lastDepth = computeDepths3(0, edgeIndex, nextDepth);
//Debug.print(lastDepth != targetLastDepth, this);
//Debug.print(lastDepth != targetLastDepth, "mismatch: " + lastDepth + " / " + targetLastDepth);
  if (lastDepth != targetLastDepth)
    throw new TopologyException("depth mismatch at ${de.getCoordinate()}");
  //Assert.isTrue(lastDepth == targetLastDepth, "depth mismatch at " + de.getCoordinate());
}