toon-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Toon-members] TooN optimization/downhill_simplex.h regression...


From: Edward Rosten
Subject: [Toon-members] TooN optimization/downhill_simplex.h regression...
Date: Wed, 21 Oct 2009 12:39:42 +0000

CVSROOT:        /cvsroot/toon
Module name:    TooN
Changes by:     Edward Rosten <edrosten>        09/10/21 12:39:42

Modified files:
        optimization   : downhill_simplex.h 
        regressions    : simplex.cc 

Log message:
        Fuix bug in variable sized downhill simplex (and regression test).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/optimization/downhill_simplex.h?cvsroot=toon&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/TooN/regressions/simplex.cc?cvsroot=toon&r1=1.1&r2=1.2

Patches:
Index: optimization/downhill_simplex.h
===================================================================
RCS file: /cvsroot/toon/TooN/optimization/downhill_simplex.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- optimization/downhill_simplex.h     21 Oct 2009 11:20:38 -0000      1.7
+++ optimization/downhill_simplex.h     21 Oct 2009 12:39:42 -0000      1.8
@@ -90,7 +90,7 @@
                ///                  is used to determine the dimension of the 
run-time sized version.
                ///@param spread     Size of the initial simplex.
                template<class Function> DownhillSimplex(const Function& func, 
const Vector<N>& c, Precision spread=1)
-               :simplex(c.size()+1, c.size()),values(c.size())
+               :simplex(c.size()+1, c.size()),values(c.size()+1)
                {
                        alpha = 1.0;
                        rho = 2.0;

Index: regressions/simplex.cc
===================================================================
RCS file: /cvsroot/toon/TooN/regressions/simplex.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- regressions/simplex.cc      21 Oct 2009 12:35:07 -0000      1.1
+++ regressions/simplex.cc      21 Oct 2009 12:39:42 -0000      1.2
@@ -46,7 +46,7 @@
 
        DownhillSimplex<> dh_variable(Spiral, starting_point, .001);
 
-       while(dh_variable.iterate(Spiral))
+       while(dh_variable.iterate(Spiral));
 
        cout << dh_variable.get_simplex()[dh_variable.get_best()] << endl
             << dh_variable.get_values()[dh_variable.get_best()] << endl;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]