    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.analysis;
    019
    020    /**
    021     * Extension of {@link MultivariateRealFunction} representing a differentiable
    022     * multivariate real function.
    023     * @version $Revision: 811685 $ $Date: 2009-09-05 19:36:48 +0200 (sam. 05 sept. 2009) $
    024     * @since 2.0
    025     */
    026    public interface DifferentiableMultivariateRealFunction extends MultivariateRealFunction {
    027
    028        /**
    029         * Returns the partial derivative of the function with respect to a point coordinate.
    030         * <p>
    031         * The partial derivative is defined with respect to point coordinate
    032         * x<sub>k</sub>. If the partial derivatives with respect to all coordinates are
    033         * needed, it may be more efficient to use the {@link #gradient()} method which will
    034         * compute them all at once.
    035         * </p>
    036         * @param k index of the coordinate with respect to which the partial
    037         * derivative is computed
    038         * @return the partial derivative function with respect to k<sup>th</sup> point coordinate
    039         */
    040        MultivariateRealFunction partialDerivative(int k);
    041
    042        /**
    043         * Returns the gradient function.
    044         * <p>If only one partial derivative with respect to a specific coordinate is
    045         * needed, it may be more efficient to use the {@link #partialDerivative(int)} method
    046         * which will compute only the specified component.</p>
    047         * @return the gradient function
    048         */
    049        MultivariateVectorialFunction gradient();
    050
    051    }