extension/src/main/java/org/justinnk/masonssa/extension/graphs/ErdosRenyiGraphCreator.java
/**
   * Iterate over all possible edges, adding a potential edge to the graph with the uniform
   * probability specified in the constructor. Edges connecting nodes to themselves are not
   * considered. <br>
   * <b>Important Note 1</b>: This is for use with an undirected graph, where the direction of edges
   * does not matter. <br>
   * <b>Important Note 2</b>: All weights are set to 1.0
   *
   * @param network The network to build the graph with. Has to already contain the nodes.
   */
Iterate over all possible edges, adding a potential edge to the graph with the uniform
probability specified in the constructor. Edges connecting nodes to themselves are not
considered. 
Important Note 1: This is for use with an undirected graph, where the direction of edges
does not matter. 
Important Note 2: All weights are set to 1.0

@param network The network to build the graph with. Has to already contain the nodes.
Iterate over all possible edges adding a potential edge to the graph with the uniform probability specified in the constructor . Edges connecting nodes to themselves are not considered . Important Note 1 : This is for use with an undirected graph where the direction of edges does not matter . Important Note 2 : All weights are set to 1 . 0 @param network The network to build the graph with . Has to already contain the nodes .
@Override
  public void create(Network network) {
    random.setSeed(this.seed);
    Bag nodes = network.getAllNodes();
    int size = nodes.size();
    for (int i = 0; i < size; i++) {
      for (int j = i; j < size; j++) {
        if (i != j && random.nextDouble() <= this.probability) {
          Object nodeA = nodes.get(i);
          Object nodeB = nodes.get(j);
          network.addEdge(nodeA, nodeB, 1.0);
        }
      }
    }
  }
@ Override public void create ( Network network ) { random . setSeed ( this . seed ) ; Bag nodes = network . getAllNodes ( ) ; int size = nodes . size ( ) ; for ( int i = 0 ; i < size ; i ++ ) { for ( int j = i ; j < size ; j ++ ) { if ( i != j && random . nextDouble ( ) <= this . probability ) { Object nodeA = nodes . get ( i ) ; Object nodeB = nodes . get ( j ) ; network . addEdge ( nodeA , nodeB , 1.0 ) ; } } } }
Iterate over all possible edges, adding a potential edge to the graph with the uniform
 probability specified in the constructor.
Iterate over all possible edges adding a potential edge to the graph with the uniform probability specified in the constructor .