src/main/java/de/dfki/lt/loot/digraph/DiGraph.java
public void compact() {
    int[] newNumber = new int[_outEdges.size()];
    for (int i = 0; i < newNumber.length; ++i) {
      newNumber[i] = i;
    }

    // get the lowest deleted and the highest non-deleted vertex
    int targetIndex = _deletedVertices.nextSetBit(0);
    int sourceIndex = newNumber.length - 1;
    while (targetIndex >= 0 && targetIndex < sourceIndex) {
      while (isDeletedVertex(sourceIndex)) {
        newNumber[sourceIndex] = -1;
        --sourceIndex;
      }
      if (targetIndex < sourceIndex) {
        newNumber[sourceIndex] = targetIndex;
        moveEdgeContainer(sourceIndex, targetIndex);
        newNumber[targetIndex] = -1;
      }
      targetIndex = _deletedVertices.nextSetBit(targetIndex + 1);
      --sourceIndex;
    }
    compactRenumber(newNumber);
  }
/** Compact this graph, i.e., fill the deleted vertices (holes) through
   *  renumbering the vertices so that a minimal number of nodes is changed.
   */
Compact this graph, i.e., fill the deleted vertices (holes) through
renumbering the vertices so that a minimal number of nodes is changed.
Compact this graph i . e . fill the deleted vertices ( holes ) through renumbering the vertices so that a minimal number of nodes is changed .
public void compact() {
    int[] newNumber = new int[_outEdges.size()];
    for (int i = 0; i < newNumber.length; ++i) {
      newNumber[i] = i;
    }
    int targetIndex = _deletedVertices.nextSetBit(0);
    int sourceIndex = newNumber.length - 1;
    while (targetIndex >= 0 && targetIndex < sourceIndex) {
      while (isDeletedVertex(sourceIndex)) {
        newNumber[sourceIndex] = -1;
        --sourceIndex;
      }
      if (targetIndex < sourceIndex) {
        newNumber[sourceIndex] = targetIndex;
        moveEdgeContainer(sourceIndex, targetIndex);
        newNumber[targetIndex] = -1;
      }
      targetIndex = _deletedVertices.nextSetBit(targetIndex + 1);
      --sourceIndex;
    }
    compactRenumber(newNumber);
  }
public void compact ( ) { int [ ] newNumber = new int [ _outEdges . size ( ) ] ; for ( int i = 0 ; i < newNumber . length ; ++ i ) { newNumber [ i ] = i ; } int targetIndex = _deletedVertices . nextSetBit ( 0 ) ; int sourceIndex = newNumber . length - 1 ; while ( targetIndex >= 0 && targetIndex < sourceIndex ) { while ( isDeletedVertex ( sourceIndex ) ) { newNumber [ sourceIndex ] = - 1 ; -- sourceIndex ; } if ( targetIndex < sourceIndex ) { newNumber [ sourceIndex ] = targetIndex ; moveEdgeContainer ( sourceIndex , targetIndex ) ; newNumber [ targetIndex ] = - 1 ; } targetIndex = _deletedVertices . nextSetBit ( targetIndex + 1 ) ; -- sourceIndex ; } compactRenumber ( newNumber ) ; }
Compact this graph, i.e., fill the deleted vertices (holes) through
  renumbering the vertices so that a minimal number of nodes is changed.
Compact this graph i . e . fill the deleted vertices ( holes ) through renumbering the vertices so that a minimal number of nodes is changed .
// get the lowest deleted and the highest non-deleted vertex