    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.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     * @version $Id: BaseOptimizer.java 1422230 2012-12-15 12:11:13Z erans $
    034     * @deprecated As of 3.1 (to be removed in 4.0).
    035     * @since 3.0
    036     */
    037    @Deprecated
    038    public interface BaseOptimizer<PAIR> {
    039        /**
    040         * Get the maximal number of function evaluations.
    041         *
    042         * @return the maximal number of function evaluations.
    043         */
    044        int getMaxEvaluations();
    045
    046        /**
    047         * Get the number of evaluations of the objective function.
    048         * The number of evaluations corresponds to the last call to the
    049         * {@code optimize} method. It is 0 if the method has not been
    050         * called yet.
    051         *
    052         * @return the number of evaluations of the objective function.
    053         */
    054        int getEvaluations();
    055
    056        /**
    057         * Get the convergence checker.
    058         *
    059         * @return the object used to check for convergence.
    060         */
    061        ConvergenceChecker<PAIR> getConvergenceChecker();
    062    }