ConjugateGradientFormula.java

  1. /*
  2.  * Licensed to the Apache Software Foundation (ASF) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * The ASF licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *      http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */

  17. package org.apache.commons.math3.optimization.general;

  18. /**
  19.  * Available choices of update formulas for the β parameter
  20.  * in {@link NonLinearConjugateGradientOptimizer}.
  21.  * <p>
  22.  * The &beta; parameter is used to compute the successive conjugate
  23.  * search directions. For non-linear conjugate gradients, there are
  24.  * two formulas to compute &beta;:
  25.  * <ul>
  26.  *   <li>Fletcher-Reeves formula</li>
  27.  *   <li>Polak-Ribi&egrave;re formula</li>
  28.  * </ul>
  29.  * On the one hand, the Fletcher-Reeves formula is guaranteed to converge
  30.  * if the start point is close enough of the optimum whether the
  31.  * Polak-Ribi&egrave;re formula may not converge in rare cases. On the
  32.  * other hand, the Polak-Ribi&egrave;re formula is often faster when it
  33.  * does converge. Polak-Ribi&egrave;re is often used.
  34.  * <p>
  35.  * @see NonLinearConjugateGradientOptimizer
  36.  * @deprecated As of 3.1 (to be removed in 4.0).
  37.  * @since 2.0
  38.  */
  39. @Deprecated
  40. public enum ConjugateGradientFormula {

  41.     /** Fletcher-Reeves formula. */
  42.     FLETCHER_REEVES,

  43.     /** Polak-Ribi&egrave;re formula. */
  44.     POLAK_RIBIERE

  45. }