Skip to content

Commit 0ba53e0

Browse files
committed
Format else statements
1 parent a8b8444 commit 0ba53e0

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

highs/mip/HighsCutGeneration.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,7 @@ bool HighsCutGeneration::cmirCutGenerationHeuristic(double minEfficacy,
545545
maxabsdelta = max(maxabsdelta, delta);
546546
deltas.push_back(delta);
547547
}
548-
}
549-
else if (vals[i] < 0) {
548+
} else if (vals[i] < 0) {
550549
// Positive coefficient values later set to 0 so have no contribution
551550
updateViolationAndNorm(i, vals[i], continuouscontribution,
552551
continuoussqrnorm);
@@ -717,8 +716,7 @@ bool HighsCutGeneration::cmirCutGenerationHeuristic(double minEfficacy,
717716
if (fj <= f0 + 1e-5) {
718717
double aj = downaj;
719718
updateViolationAndNorm(j, aj, viol, sqrnorm);
720-
}
721-
else {
719+
} else {
722720
double pj = fast_ceil(k * (fj - f0) * oneoveroneminusf0 - kHighsTiny);
723721
double aj = downaj + (pj / (k + 1));
724722
updateViolationAndNorm(j, aj, viol, sqrnorm);
@@ -728,8 +726,7 @@ bool HighsCutGeneration::cmirCutGenerationHeuristic(double minEfficacy,
728726
// Use the strong CG cut instead of the CMIR if efficacy is larger
729727
if (efficacy < bestefficacy + 1e-5) {
730728
strongcg = false;
731-
}
732-
else {
729+
} else {
733730
bestefficacy = efficacy;
734731
}
735732
}
@@ -766,8 +763,7 @@ bool HighsCutGeneration::cmirCutGenerationHeuristic(double minEfficacy,
766763
HighsCDouble pj = ceil(k * (fj - f0) * oneoveroneminusf0);
767764
aj += pj / (k + 1);
768765
}
769-
}
770-
else {
766+
} else {
771767
aj += (fj - f0) * oneoveroneminusf0;
772768
}
773769
}
@@ -789,8 +785,7 @@ bool HighsCutGeneration::cmirCutGenerationHeuristic(double minEfficacy,
789785
if (!strongcg) {
790786
assert(fabs(checkefficacy - bestefficacy) < 0.001 ||
791787
fabs(checkefficacy) >= 1e30);
792-
}
793-
else {
788+
} else {
794789
// Rounded conservatively for scoring => strongcg cut can be stronger
795790
assert(bestefficacy - checkefficacy < 0.001 ||
796791
fabs(checkefficacy) >= 1e30);

0 commit comments

Comments
 (0)