001 /* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018 package org.apache.commons.math.optimization.general; 019 020 /** 021 * Available choices of update formulas for the β parameter 022 * in {@link NonLinearConjugateGradientOptimizer}. 023 * <p> 024 * The β parameter is used to compute the successive conjugate 025 * search directions. For non-linear conjugate gradients, there are 026 * two formulas to compute β: 027 * <ul> 028 * <li>Fletcher-Reeves formula</li> 029 * <li>Polak-Ribière formula</li> 030 * </ul> 031 * On the one hand, the Fletcher-Reeves formula is guaranteed to converge 032 * if the start point is close enough of the optimum whether the 033 * Polak-Ribière formula may not converge in rare cases. On the 034 * other hand, the Polak-Ribière formula is often faster when it 035 * does converge. Polak-Ribière is often used. 036 * <p> 037 * @see NonLinearConjugateGradientOptimizer 038 * @version $Revision: 758059 $ $Date: 2009-03-24 23:16:21 +0100 (mar. 24 mars 2009) $ 039 * @since 2.0 040 */ 041 public enum ConjugateGradientFormula { 042 043 /** Fletcher-Reeves formula. */ 044 FLETCHER_REEVES, 045 046 /** Polak-Ribière formula. */ 047 POLAK_RIBIERE 048 049 }