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 
18 package org.apache.commons.math.optimization.general;
19 
20 /**
21  * Available choices of update formulas for the β parameter
22  * in {@link NonLinearConjugateGradientOptimizer}.
23  * <p>
24  * The &beta; parameter is used to compute the successive conjugate
25  * search directions. For non-linear conjugate gradients, there are
26  * two formulas to compute &beta;:
27  * <ul>
28  *   <li>Fletcher-Reeves formula</li>
29  *   <li>Polak-Ribi&egrave;re formula</li>
30  * </ul>
31  * On the one hand, the Fletcher-Reeves formula is guaranteed to converge
32  * if the start point is close enough of the optimum whether the
33  * Polak-Ribi&egrave;re formula may not converge in rare cases. On the
34  * other hand, the Polak-Ribi&egrave;re formula is often faster when it
35  * does converge. Polak-Ribi&egrave;re is often used.
36  * <p>
37  * @see NonLinearConjugateGradientOptimizer
38  * @version $Revision: 758059 $ $Date: 2009-03-24 23:16:21 +0100 (mar. 24 mars 2009) $
39  * @since 2.0
40  */
41 public enum ConjugateGradientFormula {
42 
43     /** Fletcher-Reeves formula. */
44     FLETCHER_REEVES,
45 
46     /** Polak-Ribi&egrave;re formula. */
47     POLAK_RIBIERE
48 
49 }
50