Skip to content

Commit

Permalink
added constant C
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjoyo committed Feb 4, 2017
1 parent 3cf476d commit 0bccd62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fdp/src/main/java/fdp/Simulation.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public class Simulation implements Callable<Integer> {
private double criterion;
private double coolingRate;
private int delay;

private static final double C = 0.4;

private int iteration = 0;

Expand Down Expand Up @@ -71,7 +73,7 @@ private int startSimulation() {
equilibriumReached = false;

area = Math.min(frameWidth * frameWidth, frameHeight * frameHeight);
k = Math.sqrt(area / graph.vertexSet().size());
k = C * Math.sqrt(area / graph.vertexSet().size());
t = frameWidth / 10;

// assign random initial positions to all vertices
Expand Down

0 comments on commit 0bccd62

Please sign in to comment.