private void findRightmostEdgeAtNode() { Node node = minDe.getNode(); DirectedEdgeStar star = (DirectedEdgeStar) node.getEdges(); minDe = star.getRightmostEdge(); // the DirectedEdge returned by the previous call is not // necessarily in the forward direction. Use the sym edge if it isn't. if (!minDe.isForward()) { minDe = minDe.getSym(); minIndex = minDe.getEdge().getCoordinates().length - 1; } }