private List < Pair < Integer , Integer > > doGenerateEdgesWithOmitList ( ) { final int numberOfNodes = getConfiguration ( ) . getNumberOfNodes ( ) ; final int numberOfEdges = getConfiguration ( ) . getNumberOfEdges ( ) ; final long maxEdges = numberOfNodes * ( numberOfNodes - 1 ) / 2 ; final List < Pair < Integer , Integer > > edges = new LinkedList <> ( ) ; for ( Long index : edgeIndices ( numberOfEdges , maxEdges ) ) { edges . add ( indexToEdgeBijection ( index ) ) ; } return edges ; }
Improved implementation of Erdos - Renyi generator based on bijection from edge labels to edge realisations . Works very well for large number of nodes but is slow with increasing number of edges . Best for denser networks with a clear giant component .