Nit.
This commit is contained in:
parent
fb283c85e3
commit
d13aec9b34
|
@ -64,14 +64,12 @@ public class MultiDirectionalTransform
|
||||||
final PointValuePair best = original.get(0);
|
final PointValuePair best = original.get(0);
|
||||||
|
|
||||||
// Perform a reflection step.
|
// Perform a reflection step.
|
||||||
final Simplex reflectedSimplex = transform(original,
|
final Simplex reflectedSimplex = transform(original, 1);
|
||||||
1);
|
|
||||||
final PointValuePair reflectedBest = reflectedSimplex.get(0);
|
final PointValuePair reflectedBest = reflectedSimplex.get(0);
|
||||||
|
|
||||||
if (comparator.compare(reflectedBest, best) < 0) {
|
if (comparator.compare(reflectedBest, best) < 0) {
|
||||||
// Compute the expanded simplex.
|
// Compute the expanded simplex.
|
||||||
final Simplex expandedSimplex = transform(original,
|
final Simplex expandedSimplex = transform(original, gamma);
|
||||||
gamma);
|
|
||||||
final PointValuePair expandedBest = expandedSimplex.get(0);
|
final PointValuePair expandedBest = expandedSimplex.get(0);
|
||||||
|
|
||||||
return comparator.compare(reflectedBest, expandedBest) <= 0 ?
|
return comparator.compare(reflectedBest, expandedBest) <= 0 ?
|
||||||
|
@ -79,8 +77,7 @@ public class MultiDirectionalTransform
|
||||||
expandedSimplex;
|
expandedSimplex;
|
||||||
} else {
|
} else {
|
||||||
// Compute the contracted simplex.
|
// Compute the contracted simplex.
|
||||||
return transform(original,
|
return transform(original, rho);
|
||||||
rho);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue