protected void insertUniqueEdge(Edge e){
  Edge existingEdge=edgeList.findEqualEdge(e);
  if (existingEdge != null) {
    Label existingLabel=existingEdge.getLabel();
    Label labelToMerge=e.getLabel();
    if (!existingEdge.isPointwiseEqual(e)) {
      labelToMerge=new Label(e.getLabel());
      labelToMerge.flip();
    }
    existingLabel.merge(labelToMerge);
    int mergeDelta=depthDelta(labelToMerge);
    int existingDelta=existingEdge.getDepthDelta();
    int newDelta=existingDelta + mergeDelta;
    existingEdge.setDepthDelta(newDelta);
  }
 else {
    edgeList.add(e);
    e.setDepthDelta(depthDelta(e.getLabel()));
  }
}

protected void insertUniqueEdge ( Edge e ) { Edge existingEdge = edgeList . findEqualEdge ( e ) ; if ( existingEdge != null ) { Label existingLabel = existingEdge . getLabel ( ) ; Label labelToMerge = e . getLabel ( ) ; if ( ! existingEdge . isPointwiseEqual ( e ) ) { labelToMerge = new Label ( e . getLabel ( ) ) ; labelToMerge . flip ( ) ; } existingLabel . merge ( labelToMerge ) ; int mergeDelta = depthDelta ( labelToMerge ) ; int existingDelta = existingEdge . getDepthDelta ( ) ; int newDelta = existingDelta + mergeDelta ; existingEdge . setDepthDelta ( newDelta ) ; } else { edgeList . add ( e ) ; e . setDepthDelta ( depthDelta ( e . getLabel ( ) ) ) ; } }
inserted edges are checked to see if an identical edge already exists . if so , the edge is not inserted , but its label is merged with the existing edge .
