Skip to content

Commit ab26f06

Browse files
Fix tests, remove TODO
The TODO was mentionned in the stoppingCriteria interface issue Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
1 parent 7d92621 commit ab26f06

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

diagram-util/src/main/java/com/powsybl/diagram/util/layout/algorithms/Atlas2ForceLayoutAlgorithm.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ public void run(LayoutContext<V, E> layoutContext) {
128128
// reset forces on all points (we create a new vector2D so it won't affect forces in the map of forces)
129129
updateAllPositions(layoutContext, newGraphSpeed, swingMap, previousForces);
130130
if (isStable(newGraphSpeed, stoppingGlobalGraphSpeed)) {
131-
//TODO check impact of not increasing the stopping step by barnesHutTheta / 8, maybe change the stopping condition
132131
break;
133132
}
134133
previousGraphSpeed = newGraphSpeed;
@@ -177,7 +176,6 @@ private void addRepulsionForce(Atlas2Parameters parameters) {
177176
if (parameters.isBarnesHutEnabled()) {
178177
this.forces.add(new RepulsionForceDegreeBasedLinearBarnesHut<>(
179178
parameters.getRepulsionIntensity(),
180-
true,
181179
parameters.getBarnesHutTheta(),
182180
this.quadtreeContainer
183181
));

diagram-util/src/test/java/com/powsybl/diagram/util/layout/forces/RepulsionForceDegreeBasedLinearBarnesHutTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ void apply() {
2828
Ref<Quadtree> quadtreeContainer = new RefObj<>(quadtree);
2929
RepulsionForceDegreeBasedLinearBarnesHut<String, DefaultEdge> repulsionForceDegreeBasedLinearBarnesHut = new RepulsionForceDegreeBasedLinearBarnesHut<>(
3030
1.2,
31-
true,
3231
1.5,
3332
quadtreeContainer
3433
);
@@ -44,7 +43,6 @@ void apply() {
4443

4544
RepulsionForceDegreeBasedLinearBarnesHut<String, DefaultEdge> repulsionForceDegreeBasedLinearBarnesHut2 = new RepulsionForceDegreeBasedLinearBarnesHut<>(
4645
0.7,
47-
true,
4846
1.2,
4947
quadtreeContainer
5048
);

0 commit comments

Comments
 (0)