]> gitweb.michael.orlitzky.com - octave.git/blobdiff - optimization/step_length_positive_definite.m
Replace ##-style comments with %-style comments in all non-test code.
[octave.git] / optimization / step_length_positive_definite.m
index f6248f67b1dd40bf22ebdfed0947ddd6edbc47fa..ad63956cfa603c097084d15291962c552d6c9d7a 100644 (file)
@@ -1,36 +1,36 @@
 function alpha = step_length_positive_definite(g, Q, p)
-  ##
-  ## Find the minimizer alpha of,
-  ##
-  ##   phi(alpha) = f(x + alpha*p)
-  ##
-  ## where ``p`` is a descent direction,
-  ##
-  ##   f(x) = (1/2)<Qx,x> - <b,x>
-  ##
-  ## and ``Q`` is positive-definite.
-  ##
-  ## The closed-form solution to this problem is given in Nocedal and
-  ## Wright, (3.55).
-  ##
-  ## INPUT:
-  ##
-  ##   - ``g`` -- The gradient of f at x.
-  ##
-  ##   - ``Q`` -- The positive-definite matrix in the definition of
-  ##     ``f`` above.
-  ##
-  ##   - ``p`` -- The direction in which ``f`` decreases. The line
-  ##     along which we minimize f(x + alpha*p).
-  ##
-  ## OUTPUT:
-  ##
-  ##   - ``alpha`` -- The value which causes ``f`` to decrease the
-  ##     most.
-  ##
-  ## NOTES:
-  ##
-  ## All vectors are assumed to be *column* vectors.
-  ##
+  %
+  % Find the minimizer alpha of,
+  %
+  %   phi(alpha) = f(x + alpha*p)
+  %
+  % where ``p`` is a descent direction,
+  %
+  %   f(x) = (1/2)<Qx,x> - <b,x>
+  %
+  % and ``Q`` is positive-definite.
+  %
+  % The closed-form solution to this problem is given in Nocedal and
+  % Wright, (3.55).
+  %
+  % INPUT:
+  %
+  %   - ``g`` -- The gradient of f at x.
+  %
+  %   - ``Q`` -- The positive-definite matrix in the definition of
+  %     ``f`` above.
+  %
+  %   - ``p`` -- The direction in which ``f`` decreases. The line
+  %     along which we minimize f(x + alpha*p).
+  %
+  % OUTPUT:
+  %
+  %   - ``alpha`` -- The value which causes ``f`` to decrease the
+  %     most.
+  %
+  % NOTES:
+  %
+  % All vectors are assumed to be *column* vectors.
+  %
   alpha = -(g' * p)/(p' * Q * p);
 end