You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2016/06/11 18:37:58 UTC
[1/4] [math] MATH-1376
Repository: commons-math
Updated Branches:
refs/heads/develop fc9d93db6 -> 821886a96
MATH-1376
Fixed incorrect iteration number (variable was not updated).
Thanks to Thomas Weise for the report and fix.
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/66a775c9
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/66a775c9
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/66a775c9
Branch: refs/heads/develop
Commit: 66a775c9feb7dcf00c28a16b7a365af4372886f8
Parents: fc9d93d
Author: Gilles <er...@apache.org>
Authored: Sat Jun 11 20:08:32 2016 +0200
Committer: Gilles <er...@apache.org>
Committed: Sat Jun 11 20:08:32 2016 +0200
----------------------------------------------------------------------
.../math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/66a775c9/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java
index c5bd08b..cd1ca1d 100644
--- a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java
+++ b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java
@@ -159,7 +159,8 @@ public class SimplexOptimizer extends MultivariateOptimizer {
int iteration = 0;
final ConvergenceChecker<PointValuePair> checker = getConvergenceChecker();
while (true) {
- if (getIterations() > 0) {
+ iteration = getIterations();
+ if (iteration > 0) {
boolean converged = true;
for (int i = 0; i < simplex.getSize(); i++) {
PointValuePair prev = previous[i];
[3/4] [math] Update "changes.xml".
Posted by er...@apache.org.
Update "changes.xml".
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/65efb3d3
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/65efb3d3
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/65efb3d3
Branch: refs/heads/develop
Commit: 65efb3d3dbd6d38ed9cf23ec7a3749d865ec8517
Parents: a6a48cf
Author: Gilles <er...@apache.org>
Authored: Sat Jun 11 20:34:47 2016 +0200
Committer: Gilles <er...@apache.org>
Committed: Sat Jun 11 20:34:47 2016 +0200
----------------------------------------------------------------------
src/changes/changes.xml | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/65efb3d3/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 42ba8d5..e8dfc2b 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -54,6 +54,12 @@ If the output is not quite correct, check for invisible trailing spaces!
</release>
<release version="4.0" date="XXXX-XX-XX" description="">
+ <action dev="erans" type="update" issue="MATH-1377">
+ "SimplexOptimizer": Slight performance improvement.
+ </action>
+ <action dev="erans" type="fix" issue="MATH-1376" due-to="Thomas Weise">
+ "SimplexOptimizer": Wrong value of iteration number was passed to the convergence checker.
+ </action>
<action dev="erans" type="fix" issue="MATH-1319">
Major refactoring of package "o.a.c.m.random".
</action>
[4/4] [math] Merge branch 'fix-MATH-1376_simplex' into develop
Posted by er...@apache.org.
Merge branch 'fix-MATH-1376_simplex' into develop
Completes the following issues (see JIRA):
MATH-1376
MATH-1377
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/821886a9
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/821886a9
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/821886a9
Branch: refs/heads/develop
Commit: 821886a960c76416b0c716e15c17840149021936
Parents: fc9d93d 65efb3d
Author: Gilles <er...@apache.org>
Authored: Sat Jun 11 20:35:48 2016 +0200
Committer: Gilles <er...@apache.org>
Committed: Sat Jun 11 20:35:48 2016 +0200
----------------------------------------------------------------------
src/changes/changes.xml | 6 ++++++
.../optim/nonlinear/scalar/noderiv/SimplexOptimizer.java | 8 +++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
[2/4] [math] MATH-1377
Posted by er...@apache.org.
MATH-1377
Short-circuit unnecessary computations.
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/a6a48cfd
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/a6a48cfd
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/a6a48cfd
Branch: refs/heads/develop
Commit: a6a48cfd370b226955a531e678016db414ebeed9
Parents: 66a775c
Author: Gilles <er...@apache.org>
Authored: Sat Jun 11 20:31:44 2016 +0200
Committer: Gilles <er...@apache.org>
Committed: Sat Jun 11 20:31:44 2016 +0200
----------------------------------------------------------------------
.../math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6a48cfd/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java
index cd1ca1d..9658944 100644
--- a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java
+++ b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/SimplexOptimizer.java
@@ -166,6 +166,11 @@ public class SimplexOptimizer extends MultivariateOptimizer {
PointValuePair prev = previous[i];
converged = converged &&
checker.converged(iteration, prev, simplex.getPoint(i));
+
+ if (!converged) {
+ // Short circuit, since "converged" will stay "false".
+ break;
+ }
}
if (converged) {
// We have found an optimum.