src/main/java/de/dfki/lt/loot/digraph/DiGraph.java
@SuppressWarnings({ "rawtypes", "unchecked" })
  protected void compactRenumber(int[] newNumber) {
    // remove the obsolete buckets
    for (int i = 0; i < _deletedVertices.cardinality(); ++i) {
      _outEdges.remove(_outEdges.size() - 1);
    }
    _deletedVertices.clear();

    // now renumber the edge targets
    for (EdgeContainer<EI> out : _outEdges) {
      if (out != null) {
        for (Edge<EI> edge : out) {
          edge.setSource(newNumber[edge.getSource()]);
          edge.setTarget(newNumber[edge.getTarget()]);
        }
      }
    }

    // exchange the entries in the registered property maps
    for (int from = 0; from < newNumber.length; ++from) {
      int to = newNumber[from];
      if (to >= 0 && to != from) {
        for(VertexPropertyMap map : _vertexPropertyMaps.values()) {
          map.put(to, map.get(from));
          map.remove(from);
        }

        for(BitSet map : _vertexBooleanPropertyMaps.values()) {
          map.set(to, map.get(from));
          map.clear(from);
        }
      }
    }
  }
/** Helper method that performs renumbering of edge targets and property
   *  maps based on the renumbering array passed as argument.
   *  @param newNumber an array where in the i'th position the new position is
   *     stored (which may equal to i) for non-deleted edges, and -1 for
   *     deleted edges.
   */
Helper method that performs renumbering of edge targets and property
maps based on the renumbering array passed as argument.
@param newNumber an array where in the i'th position the new position is
stored (which may equal to i) for non-deleted edges, and -1 for
deleted edges.
Helper method that performs renumbering of edge targets and property maps based on the renumbering array passed as argument . @param newNumber an array where in the i ' th position the new position is stored ( which may equal to i ) for non - deleted edges and - 1 for deleted edges .
@SuppressWarnings({ "rawtypes", "unchecked" })
  protected void compactRenumber(int[] newNumber) {
    for (int i = 0; i < _deletedVertices.cardinality(); ++i) {
      _outEdges.remove(_outEdges.size() - 1);
    }
    _deletedVertices.clear();
    for (EdgeContainer<EI> out : _outEdges) {
      if (out != null) {
        for (Edge<EI> edge : out) {
          edge.setSource(newNumber[edge.getSource()]);
          edge.setTarget(newNumber[edge.getTarget()]);
        }
      }
    }
    for (int from = 0; from < newNumber.length; ++from) {
      int to = newNumber[from];
      if (to >= 0 && to != from) {
        for(VertexPropertyMap map : _vertexPropertyMaps.values()) {
          map.put(to, map.get(from));
          map.remove(from);
        }
        for(BitSet map : _vertexBooleanPropertyMaps.values()) {
          map.set(to, map.get(from));
          map.clear(from);
        }
      }
    }
  }
@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) protected void compactRenumber ( int [ ] newNumber ) { for ( int i = 0 ; i < _deletedVertices . cardinality ( ) ; ++ i ) { _outEdges . remove ( _outEdges . size ( ) - 1 ) ; } _deletedVertices . clear ( ) ; for ( EdgeContainer < EI > out : _outEdges ) { if ( out != null ) { for ( Edge < EI > edge : out ) { edge . setSource ( newNumber [ edge . getSource ( ) ] ) ; edge . setTarget ( newNumber [ edge . getTarget ( ) ] ) ; } } } for ( int from = 0 ; from < newNumber . length ; ++ from ) { int to = newNumber [ from ] ; if ( to >= 0 && to != from ) { for ( VertexPropertyMap map : _vertexPropertyMaps . values ( ) ) { map . put ( to , map . get ( from ) ) ; map . remove ( from ) ; } for ( BitSet map : _vertexBooleanPropertyMaps . values ( ) ) { map . set ( to , map . get ( from ) ) ; map . clear ( from ) ; } } } }
Helper method that performs renumbering of edge targets and property
  maps based on the renumbering array passed as argument.
Helper method that performs renumbering of edge targets and property maps based on the renumbering array passed as argument .
// remove the obsolete buckets // now renumber the edge targets // exchange the entries in the registered property maps