|
@@ -48,6 +48,8 @@ public class RandomGraphDialog extends JDialog {
|
|
|
GridBagConstraints c = new GridBagConstraints();
|
|
|
c.gridx = 0;
|
|
|
c.gridy = 0;
|
|
|
+
|
|
|
+
|
|
|
add( new JLabel( "P(subgraph exists)"), c );
|
|
|
c = new GridBagConstraints();
|
|
|
c.gridx = 1;
|
|
@@ -73,6 +75,8 @@ public class RandomGraphDialog extends JDialog {
|
|
|
}
|
|
|
});
|
|
|
add( pSubgraph, c );
|
|
|
+
|
|
|
+
|
|
|
c = new GridBagConstraints();
|
|
|
c.gridx = 0;
|
|
|
c.gridy = 1;
|
|
@@ -101,6 +105,8 @@ public class RandomGraphDialog extends JDialog {
|
|
|
}
|
|
|
});
|
|
|
add( pEdge, c );
|
|
|
+
|
|
|
+
|
|
|
c = new GridBagConstraints();
|
|
|
c.gridx = 0;
|
|
|
c.gridy = 2;
|
|
@@ -133,6 +139,8 @@ public class RandomGraphDialog extends JDialog {
|
|
|
}
|
|
|
});
|
|
|
add( minLayers, c );
|
|
|
+
|
|
|
+
|
|
|
c = new GridBagConstraints();
|
|
|
c.gridx = 0;
|
|
|
c.gridy = 3;
|
|
@@ -163,6 +171,8 @@ public class RandomGraphDialog extends JDialog {
|
|
|
}
|
|
|
});
|
|
|
add( maxLayers, c );
|
|
|
+
|
|
|
+
|
|
|
c = new GridBagConstraints();
|
|
|
c.gridx = 0;
|
|
|
c.gridy = 4;
|
|
@@ -196,6 +206,8 @@ public class RandomGraphDialog extends JDialog {
|
|
|
}
|
|
|
});
|
|
|
add( minNodes, c );
|
|
|
+
|
|
|
+
|
|
|
c = new GridBagConstraints();
|
|
|
c.gridx = 0;
|
|
|
c.gridy = 5;
|
|
@@ -227,6 +239,8 @@ public class RandomGraphDialog extends JDialog {
|
|
|
}
|
|
|
});
|
|
|
add( maxNodes, c );
|
|
|
+
|
|
|
+
|
|
|
c = new GridBagConstraints();
|
|
|
c.gridx = 0;
|
|
|
c.gridy = 6;
|
|
@@ -256,6 +270,8 @@ public class RandomGraphDialog extends JDialog {
|
|
|
}
|
|
|
});
|
|
|
add( maxDepth, c );
|
|
|
+
|
|
|
+
|
|
|
c = new GridBagConstraints();
|
|
|
c.gridx = 0;
|
|
|
c.gridy = 7;
|
|
@@ -273,6 +289,7 @@ public class RandomGraphDialog extends JDialog {
|
|
|
int maxNodeI = Integer.parseInt( maxNodes.getText() );
|
|
|
int maxDepthI = Integer.parseInt( maxDepth.getText() );
|
|
|
boolean ok = true;
|
|
|
+
|
|
|
if( pSubGraphD < 0 || pSubGraphD > 1 )
|
|
|
{
|
|
|
pSubgraph.setBackground( Color.RED );
|
|
@@ -309,7 +326,8 @@ public class RandomGraphDialog extends JDialog {
|
|
|
ok = false;
|
|
|
}
|
|
|
if( ok )
|
|
|
- {
|
|
|
+ {
|
|
|
+
|
|
|
RandomGraphGenerator r = new RandomGraphGenerator( pSubGraphD, pEdgeD, minLayerI, maxLayerI, minNodeI, maxNodeI, maxDepthI );
|
|
|
try {
|
|
|
LayeredGraphNode graph = r.createRandomNode( null, 0, true );
|