This commit is contained in:
Gilles Sadowski 2021-07-17 01:25:08 +02:00
parent fb283c85e3
commit d13aec9b34
1 changed files with 3 additions and 6 deletions

View File

@ -64,14 +64,12 @@ public class MultiDirectionalTransform
final PointValuePair best = original.get(0);
// Perform a reflection step.
final Simplex reflectedSimplex = transform(original,
1);
final Simplex reflectedSimplex = transform(original, 1);
final PointValuePair reflectedBest = reflectedSimplex.get(0);
if (comparator.compare(reflectedBest, best) < 0) {
// Compute the expanded simplex.
final Simplex expandedSimplex = transform(original,
gamma);
final Simplex expandedSimplex = transform(original, gamma);
final PointValuePair expandedBest = expandedSimplex.get(0);
return comparator.compare(reflectedBest, expandedBest) <= 0 ?
@ -79,8 +77,7 @@ public class MultiDirectionalTransform
expandedSimplex;
} else {
// Compute the contracted simplex.
return transform(original,
rho);
return transform(original, rho);
}
};
}