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
018package org.apache.commons.math3.optimization;
019
020/**
021 * This interface is mainly intended to enforce the internal coherence of
022 * Commons-Math. Users of the API are advised to base their code on
023 * the following interfaces:
024 * <ul>
025 *  <li>{@link org.apache.commons.math3.optimization.MultivariateOptimizer}</li>
026 *  <li>{@link org.apache.commons.math3.optimization.MultivariateDifferentiableOptimizer}</li>
027 *  <li>{@link org.apache.commons.math3.optimization.MultivariateDifferentiableVectorOptimizer}</li>
028 *  <li>{@link org.apache.commons.math3.optimization.univariate.UnivariateOptimizer}</li>
029 * </ul>
030 *
031 * @param <PAIR> Type of the point/objective pair.
032 *
033 * @deprecated As of 3.1 (to be removed in 4.0).
034 * @since 3.0
035 */
036@Deprecated
037public interface BaseOptimizer<PAIR> {
038    /**
039     * Get the maximal number of function evaluations.
040     *
041     * @return the maximal number of function evaluations.
042     */
043    int getMaxEvaluations();
044
045    /**
046     * Get the number of evaluations of the objective function.
047     * The number of evaluations corresponds to the last call to the
048     * {@code optimize} method. It is 0 if the method has not been
049     * called yet.
050     *
051     * @return the number of evaluations of the objective function.
052     */
053    int getEvaluations();
054
055    /**
056     * Get the convergence checker.
057     *
058     * @return the object used to check for convergence.
059     */
060    ConvergenceChecker<PAIR> getConvergenceChecker();
061}