Commit 3ad719f9 authored by Fabian Meyer's avatar Fabian Meyer
Browse files

Fix minStep checks for WolfeBacktracking

parent deec8bb1
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -402,6 +402,7 @@ namespace gdc


        /** Set the wolfe constants for Armijo and Wolfe condition (see class
        /** Set the wolfe constants for Armijo and Wolfe condition (see class
          * description).
          * description).
          * Assure that c1 < c2 < 1 and c1 in (0, 0.5).
          * @param c1 armijo constant
          * @param c1 armijo constant
          * @param c2 wolfe constant */
          * @param c2 wolfe constant */
        void setWolfeConstants(const Scalar c1, const Scalar c2)
        void setWolfeConstants(const Scalar c1, const Scalar c2)
@@ -449,7 +450,7 @@ namespace gdc


            Index iterations = 0;
            Index iterations = 0;
            while((maxIt_ == 0 || iterations < maxIt_) &&
            while((maxIt_ == 0 || iterations < maxIt_) &&
                stepSize > minStep_ &&
                stepSize * decrease_ >= minStep_ &&
                !(armijoCondition && wolfeCondition))
                !(armijoCondition && wolfeCondition))
            {
            {
                stepSize = decrease_ * stepSize;
                stepSize = decrease_ * stepSize;