public static LeftIndexedPowerLawMultiSegmentBipartiteGraph buildRandomMultiSegmentBipartiteGraph(int maxNumSegments,int maxNumEdgesPerSegment,int leftSize,int rightSize,double edgeProbability,Random random){
  LeftIndexedPowerLawMultiSegmentBipartiteGraph multiSegmentLeftIndexedPowerLawBipartiteGraph=new LeftIndexedPowerLawMultiSegmentBipartiteGraph(maxNumSegments,maxNumEdgesPerSegment,leftSize / 2,(int)(rightSize * edgeProbability / 2),2.0,rightSize / 2,new IdentityEdgeTypeMask(),new NullStatsReceiver());
  for (int i=0; i < leftSize; i++) {
    for (int j=0; j < rightSize; j++) {
      if (random.nextDouble() < edgeProbability) {
        multiSegmentLeftIndexedPowerLawBipartiteGraph.addEdge(i,j,(byte)0);
      }
    }
  }
  return multiSegmentLeftIndexedPowerLawBipartiteGraph;
}

public static LeftIndexedPowerLawMultiSegmentBipartiteGraph buildRandomMultiSegmentBipartiteGraph ( int maxNumSegments , int maxNumEdgesPerSegment , int leftSize , int rightSize , double edgeProbability , Random random ) { LeftIndexedPowerLawMultiSegmentBipartiteGraph multiSegmentLeftIndexedPowerLawBipartiteGraph = new LeftIndexedPowerLawMultiSegmentBipartiteGraph ( maxNumSegments , maxNumEdgesPerSegment , leftSize / 2 , ( int ) ( rightSize * edgeProbability / 2 ) , 2.0 , rightSize / 2 , new IdentityEdgeTypeMask ( ) , new NullStatsReceiver ( ) ) ; for ( int i = 0 ; i < leftSize ; i ++ ) { for ( int j = 0 ; j < rightSize ; j ++ ) { if ( random . nextDouble ( ) < edgeProbability ) { multiSegmentLeftIndexedPowerLawBipartiteGraph . addEdge ( i , j , ( byte ) 0 ) ; } } } return multiSegmentLeftIndexedPowerLawBipartiteGraph ; }
build a random left - regular bipartite graph of given left and right sizes .
