src/main/java/de/dfki/lt/loot/digraph/DiGraph.java
public DiGraph<EI> converseLazy() {
    DiGraph<EI> result =
        new DiGraph<EI>(getNumberOfVertices());
    for (EdgeContainer<EI> out : _outEdges) {
      if (out != null) {
        for (Edge<EI> edge : out) {
          int newSource = edge.getTarget();
          EdgeContainer<EI> newOut = result._outEdges.get(newSource);
          if (newOut == null) {
            newOut = newEdgeList();
            result._outEdges.set(newSource, newOut);
          }
          newOut.add(edge);
        }
      }
    }
    return result;
  }
/** Return the lazy converse of this graph, i.e., if (u,v) \in E, then
   *  this edge will be in outEdges of u, in the result of this function, the
   *  edge will be in outEdges of v, which means that source and target are
   *  inverted, i.e., edge.getSource() .getTarget() are the same as in the
   *  original graph, but turned around in the view of the converse, which means
   *  that for the converse, e.getTarget() is the *source* and e.getSoure() is
   *  the *target*, and the same edge objects are in both graphs, so *beware*.
   *
   *  This may save a lot of memory, but it needs careful thinking.
   */


This may save a lot of memory, but it needs careful thinking.
This may save a lot of memory but it needs careful thinking .
public DiGraph<EI> converseLazy() {
    DiGraph<EI> result =
        new DiGraph<EI>(getNumberOfVertices());
    for (EdgeContainer<EI> out : _outEdges) {
      if (out != null) {
        for (Edge<EI> edge : out) {
          int newSource = edge.getTarget();
          EdgeContainer<EI> newOut = result._outEdges.get(newSource);
          if (newOut == null) {
            newOut = newEdgeList();
            result._outEdges.set(newSource, newOut);
          }
          newOut.add(edge);
        }
      }
    }
    return result;
  }
public DiGraph < EI > converseLazy ( ) { DiGraph < EI > result = new DiGraph < EI > ( getNumberOfVertices ( ) ) ; for ( EdgeContainer < EI > out : _outEdges ) { if ( out != null ) { for ( Edge < EI > edge : out ) { int newSource = edge . getTarget ( ) ; EdgeContainer < EI > newOut = result . _outEdges . get ( newSource ) ; if ( newOut == null ) { newOut = newEdgeList ( ) ; result . _outEdges . set ( newSource , newOut ) ; } newOut . add ( edge ) ; } } } return result ; }
Return the lazy converse of this graph, i.e., if (u,v) \in E, then
  this edge will be in outEdges of u, in the result of this function, the
  edge will be in outEdges of v, which means that source and target are
  inverted, i.e., edge.getSource() .getTarget() are the same as in the
  original graph, but turned around in the view of the converse, which means
  that for the converse, e.getTarget() is the *source* and e.getSoure() is
  the *target*, and the same edge objects are in both graphs, so *beware*.
Return the lazy converse of this graph i . e . if ( u v ) \ in E then this edge will be in outEdges of u in the result of this function the edge will be in outEdges of v which means that source and target are inverted i . e . edge . getSource () . getTarget () are the same as in the original graph but turned around in the view of the converse which means that for the converse e . getTarget () is the * source * and e . getSoure () is the * target * and the same edge objects are in both graphs so * beware * .