commons-math3-3.6.1-org.apache.commons.math3.analysis.function-包下的类(二)-中英对照文档及源码赏析

commons-math3-3.6.1-org.apache.commons.math3.analysis.function-包下的类(二)-中英对照文档及源码赏析

摘要:中英对照文档、源码赏析、org.apache.commons.math3.analysis.function、Divide、Exp、Expm1、Floor、Gaussian、HarmonicOscillator、Identity、Inverse、Log、Log1p、Log10、Logistic、Logit、Max

完整中文文档、中英对照文档下载请移步:commons-math3-中文文档、中英对照文档-CSDN下载

1. 开源组件说明

commonsmath.gif

commonslogo.png

jar包名称:commons-math3-3.6.1.jar

Maven 依赖:

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-math3</artifactId>
    <version>3.6.1</version>
</dependency>

完整中文文档、中英对照文档下载请移步:commons-math3-中文文档、中英对照文档-CSDN下载

程序包 org.apache.commons.math3.analysis.function

The function package contains function objects that wrap the methods contained in Math, as well as common mathematical functions such as the gaussian and sinc functions.

函数包包含运算对象,该功能将包含在数学中包含的方法,以及诸如高斯和SINC功能的常见数学函数。

See: 说明

  • 类 Summary  
    说明
    Abs
    Absolute value function.

    绝对值函数。

    Acos
    Arc-cosine function.

    arc-canine功能。

    Acosh
    Hyperbolic arc-cosine function.

    双曲线弧余弦功能。

    Add
    Add the two operands.

    添加两个操作数。

    Asin
    Arc-sine function.

    arc-sine函数。

    Asinh
    Hyperbolic arc-sine function.

    双曲线弧形函数。

    Atan
    Arc-tangent function.

    弧形功能。

    Atan2
    Arc-tangent function.

    弧形功能。

    Atanh
    Hyperbolic arc-tangent function.

    双曲线弧形功能。

    Cbrt
    Cube root function.

    立方根函数。

    Ceil
    ceil function.

    CEIL功能。

    Constant
    Constant function.

    常量功能。

    Cos
    Cosine function.

    余弦功能。

    Cosh
    Hyperbolic cosine function.

    双曲余弦功能。

    Divide
    Divide the first operand by the second.

    将第一个操作数划分为第二个操作数。

    Exp
    Exponential function.

    指数函数。

    Expm1
    ex-1 function.

    前1个功能。

    Floor
    floor function.

    地板功能。

    Gaussian
    Gaussian function.

    高斯功能。

    Gaussian.Parametric
    Parametric function where the input array contains the parameters of the Gaussian, ordered as follows: Norm Mean Standard deviation

    参数功能,输入阵列包含高斯的参数,如下所述:标准平均标准偏差

    HarmonicOscillator
    simple harmonic oscillator function.

    简单的谐波振荡器功能。

    HarmonicOscillator.Parametric
    Parametric function where the input array contains the parameters of the harmonic oscillator function, ordered as follows: Amplitude Angular frequency Phase

    参数功能,其中输入阵列包含谐振子功能的参数,如下所述:幅度角频率阶段

    Identity
    Identity function.

    身份函数。

    Inverse
    Inverse function.

    逆功能。

    Log
    Natural logarithm function.

    自然对数函数。

    Log10
    Base 10 logarithm function.

    基数10对数函数。

    Log1p
    log(1 + p) function.

    log(1 + p)函数。

    Logistic
    Generalised logistic function.

    广义物流功能。

    Logistic.Parametric
    Parametric function where the input array contains the parameters of the logistic function, ordered as follows: k m b q a n

    参数功能,输入阵列包含逻辑函数的参数,如下所述:k m b q a n

    Logit
    Logit function.

    Logit函数。

    Logit.Parametric
    Parametric function where the input array contains the parameters of the logit function, ordered as follows: Lower bound Higher bound

    参数函数,其中输入阵列包含Logit函数的参数,如下所述:下限更高界限

    Max
    Maximum function.

    最大功能。

    Min
    Minimum function.

    最小功能。

    Minus
    Minus function.

    减去功能。

    Multiply
    Multiply the two operands.

    乘以两个操作数。

    Pow
    Power function.

    功率函数。

    Power
    Power function.

    功率函数。

    Rint
    rint function.

    rint函数。

    Sigmoid
    Sigmoid function.

    s形函数。

    Sigmoid.Parametric
    Parametric function where the input array contains the parameters of the sigmoid function, ordered as follows: Lower asymptote Higher asymptote

    参数函数,其中输入阵列包含Sigmoid函数的参数,如下所述:较低的渐近较高的渐近渐近渐近

    Signum
    signum function.

    signum函数。

    Sin
    Sine function.

    正弦函数。

    Sinc
    Sinc function, defined by

    SINC功能,由...定义

    Sinh
    Hyperbolic sine function.

    双曲线正弦功能。

    Sqrt
    Square-root function.

    方形功能。

    StepFunction
    Step function.

    步函数。

    Subtract
    Subtract the second operand from the first.

    从第一个减去第二个操作数。

    Tan
    Tangent function.

    切线功能。

    Tanh
    Hyperbolic tangent function.

    双曲线切线功能。

    Ulp
    ulp function.

    ULP功能。

程序包 org.apache.commons.math3.analysis.function 的说明

The function package contains function objects that wrap the methods contained in Math, as well as common mathematical functions such as the gaussian and sinc functions.


函数包包含运算对象,该功能将包含在数学中包含的方法,以及诸如高斯和SINC功能的常见数学函数。

16. 类 org.apache.commons.math3.analysis.function.Divide

16.1. Divide 中英对照文档

org.apache.commons.math3.analysis.function
类 Divide
  • All Implemented Interfaces:
    BivariateFunction

    生物驾驶功能



    public class Divide
    extends Object
    implements BivariateFunction
    Divide the first operand by the second.

    将第一个操作数划分为第二个操作数。

    从以下版本开始:
    3.0

    3.0

    • 构造器详细说明
      • Divide
        public Divide()
    • 方法详细说明
      • value
        public double value(double x,
                   double y)
        Compute the value for the function.

        计算函数的值。

        指定者:
        value in interface  BivariateFunction

        界面二手功能中的值

        参数:
        x - Abscissa for which the function value should be computed.

        应计算函数值的X - 横坐标。

        y - Ordinate for which the function value should be computed.

        Y型纵坐标应计算函数值。

        返回:
        the value.

        价值。

16.2. Divide 源码赏析

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math3.analysis.function;

import org.apache.commons.math3.analysis.BivariateFunction;

/**
 * Divide the first operand by the second.
 *
 * @since 3.0
 */
public class Divide implements BivariateFunction {
    /** {@inheritDoc} */
    public double value(double x, double y) {
        return x / y;
    }
}

17. 类 org.apache.commons.math3.analysis.function.Exp

17.1. Exp 中英对照文档

org.apache.commons.math3.analysis.function
类 Exp
    • 构造器详细说明
      • Exp
        public Exp()
    • 方法详细说明
      • value
        public double value(double x)
        Compute the value of the function.

        计算函数的值。

        指定者:
        value in interface  UnivariateFunction

        界面非凡因子功能中的值

        参数:
        x - Point at which the function value should be computed.

        应计算函数值的X点。

        返回:
        the value of the function.

        函数的值。

      • derivative
        @Deprecated
        public UnivariateFunction derivative()
        Deprecated.  as of 3.1, replaced by value(DerivativeStructure)

        弃用。截至3.1,取而代之(衍生)

        Returns the derivative of the function

        返回函数的衍生物

        指定者:
        derivative in interface  DifferentiableUnivariateFunction

        界面中的衍生物不同的单位功能

        返回:
        the derivative function

        衍生功能

      • value
        public DerivativeStructure value(DerivativeStructure t)
        Simple mathematical function.

        UnivariateDifferentiableFunction classes compute both the value and the first derivative of the function.


        简单的数学函数。单变化的功能功能计算函数的值和第一个导数。

        指定者:
        value in interface  UnivariateDifferentiableFunction

        界面中的值单识别异导功能

        参数:
        t - function input value

        T - 功能输入值

        返回:
        function result

        功能结果

        从以下版本开始:
        3.1

        3.1

17.2. Exp 源码赏析

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math3.analysis.function;

import org.apache.commons.math3.analysis.FunctionUtils;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction;
import org.apache.commons.math3.util.FastMath;

/**
 * Exponential function.
 *
 * @since 3.0
 */
public class Exp implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction {
    /** {@inheritDoc} */
    public double value(double x) {
        return FastMath.exp(x);
    }

    /** {@inheritDoc}
     * @deprecated as of 3.1, replaced by {@link #value(DerivativeStructure)}
     */
    @Deprecated
    public UnivariateFunction derivative() {
        return FunctionUtils.toDifferentiableUnivariateFunction(this).derivative();
    }

    /** {@inheritDoc}
     * @since 3.1
     */
    public DerivativeStructure value(final DerivativeStructure t) {
        return t.exp();
    }

}

18. 类 org.apache.commons.math3.analysis.function.Expm1

18.1. Expm1 中英对照文档

org.apache.commons.math3.analysis.function
类 Expm1
    • 构造器详细说明
      • Expm1
        public Expm1()
    • 方法详细说明
      • value
        public double value(double x)
        Compute the value of the function.

        计算函数的值。

        指定者:
        value in interface  UnivariateFunction

        界面非凡因子功能中的值

        参数:
        x - Point at which the function value should be computed.

        应计算函数值的X点。

        返回:
        the value of the function.

        函数的值。

      • derivative
        @Deprecated
        public UnivariateFunction derivative()
        Deprecated.  as of 3.1, replaced by value(DerivativeStructure)

        弃用。截至3.1,取而代之(衍生)

        Returns the derivative of the function

        返回函数的衍生物

        指定者:
        derivative in interface  DifferentiableUnivariateFunction

        界面中的衍生物不同的单位功能

        返回:
        the derivative function

        衍生功能

      • value
        public DerivativeStructure value(DerivativeStructure t)
        Simple mathematical function.

        UnivariateDifferentiableFunction classes compute both the value and the first derivative of the function.


        简单的数学函数。单变化的功能功能计算函数的值和第一个导数。

        指定者:
        value in interface  UnivariateDifferentiableFunction

        界面中的值单识别异导功能

        参数:
        t - function input value

        T - 功能输入值

        返回:
        function result

        功能结果

        从以下版本开始:
        3.1

        3.1

18.2. Expm1 源码赏析

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math3.analysis.function;

import org.apache.commons.math3.analysis.FunctionUtils;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction;
import org.apache.commons.math3.util.FastMath;

/**
 * <code>e<sup>x</sup>-1</code> function.
 *
 * @since 3.0
 */
public class Expm1 implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction {
    /** {@inheritDoc} */
    public double value(double x) {
        return FastMath.expm1(x);
    }

    /** {@inheritDoc}
     * @deprecated as of 3.1, replaced by {@link #value(DerivativeStructure)}
     */
    @Deprecated
    public UnivariateFunction derivative() {
        return FunctionUtils.toDifferentiableUnivariateFunction(this).derivative();
    }

    /** {@inheritDoc}
     * @since 3.1
     */
    public DerivativeStructure value(final DerivativeStructure t) {
        return t.expm1();
    }

}

19. 类 org.apache.commons.math3.analysis.function.Floor

19.1. Floor 中英对照文档

org.apache.commons.math3.analysis.function
类 Floor
    • 构造器详细说明
      • Floor
        public Floor()
    • 方法详细说明
      • value
        public double value(double x)
        Compute the value of the function.

        计算函数的值。

        指定者:
        value in interface  UnivariateFunction

        界面非凡因子功能中的值

        参数:
        x - Point at which the function value should be computed.

        应计算函数值的X点。

        返回:
        the value of the function.

        函数的值。

19.2. Floor 源码赏析

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math3.analysis.function;

import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.util.FastMath;

/**
 * {@code floor} function.
 *
 * @since 3.0
 */
public class Floor implements UnivariateFunction {
    /** {@inheritDoc} */
    public double value(double x) {
        return FastMath.floor(x);
    }
}

20. 类 org.apache.commons.math3.analysis.function.Gaussian

20.1. Gaussian 中英对照文档

org.apache.commons.math3.analysis.function
类 Gaussian
    • Nested Class Summary
      Nested Classes  
      限定符和类型类 and 的说明
      static class Gaussian.Parametric
      Parametric function where the input array contains the parameters of the Gaussian, ordered as follows: Norm Mean Standard deviation

      参数功能,输入阵列包含高斯的参数,如下所述:标准平均标准偏差

    • 构造器概要
      构造器  
      构造器和说明
      Gaussian()
      Normalized gaussian with zero mean and unit standard deviation.

      标准化高斯具有零平均值和单位标准偏差。

      Gaussian(double mean, double sigma)
      Normalized gaussian with given mean and standard deviation.

      标准化高斯具有含义和标准偏差。

      Gaussian(double norm, double mean, double sigma)
      Gaussian with given normalization factor, mean and standard deviation.

      高斯具有给定归一化因子,平均值和标准偏差。

    • 构造器详细说明
      • Gaussian
        public Gaussian(double norm,
                double mean,
                double sigma)
                 throws NotStrictlyPositiveException
        Gaussian with given normalization factor, mean and standard deviation.

        高斯具有给定归一化因子,平均值和标准偏差。

        参数:
        norm - Normalization factor.

        规范 - 归一化因子。

        mean - Mean.

        意思 - 意思。

        sigma - Standard deviation.

        Sigma - 标准偏差。

        抛出:
        NotStrictlyPositiveException - if sigma <= 0.

        notstrictypositiveexception - 如果sigma <= 0。

      • Gaussian
        public Gaussian(double mean,
                double sigma)
                 throws NotStrictlyPositiveException
        Normalized gaussian with given mean and standard deviation.

        标准化高斯具有含义和标准偏差。

        参数:
        mean - Mean.

        意思 - 意思。

        sigma - Standard deviation.

        Sigma - 标准偏差。

        抛出:
        NotStrictlyPositiveException - if sigma <= 0.

        notstrictypositiveexception - 如果sigma <= 0。

      • Gaussian
        public Gaussian()
        Normalized gaussian with zero mean and unit standard deviation.

        标准化高斯具有零平均值和单位标准偏差。

    • 方法详细说明
      • value
        public double value(double x)
        Compute the value of the function.

        计算函数的值。

        指定者:
        value in interface  UnivariateFunction

        界面非凡因子功能中的值

        参数:
        x - Point at which the function value should be computed.

        应计算函数值的X点。

        返回:
        the value of the function.

        函数的值。

      • derivative
        @Deprecated
        public UnivariateFunction derivative()
        Deprecated.  as of 3.1, replaced by value(DerivativeStructure)

        弃用。截至3.1,取而代之(衍生)

        Returns the derivative of the function

        返回函数的衍生物

        指定者:
        derivative in interface  DifferentiableUnivariateFunction

        界面中的衍生物不同的单位功能

        返回:
        the derivative function

        衍生功能

20.2. Gaussian 源码赏析

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math3.analysis.function;

import java.util.Arrays;

import org.apache.commons.math3.analysis.FunctionUtils;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction;
import org.apache.commons.math3.analysis.ParametricUnivariateFunction;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction;
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
import org.apache.commons.math3.exception.NullArgumentException;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.util.Precision;

/**
 * <a href="http://en.wikipedia.org/wiki/Gaussian_function">
 *  Gaussian</a> function.
 *
 * @since 3.0
 */
public class Gaussian implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction {
    /** Mean. */
    private final double mean;
    /** Inverse of the standard deviation. */
    private final double is;
    /** Inverse of twice the square of the standard deviation. */
    private final double i2s2;
    /** Normalization factor. */
    private final double norm;

    /**
     * Gaussian with given normalization factor, mean and standard deviation.
     *
     * @param norm Normalization factor.
     * @param mean Mean.
     * @param sigma Standard deviation.
     * @throws NotStrictlyPositiveException if {@code sigma <= 0}.
     */
    public Gaussian(double norm,
                    double mean,
                    double sigma)
        throws NotStrictlyPositiveException {
        if (sigma <= 0) {
            throw new NotStrictlyPositiveException(sigma);
        }

        this.norm = norm;
        this.mean = mean;
        this.is   = 1 / sigma;
        this.i2s2 = 0.5 * is * is;
    }

    /**
     * Normalized gaussian with given mean and standard deviation.
     *
     * @param mean Mean.
     * @param sigma Standard deviation.
     * @throws NotStrictlyPositiveException if {@code sigma <= 0}.
     */
    public Gaussian(double mean,
                    double sigma)
        throws NotStrictlyPositiveException {
        this(1 / (sigma * FastMath.sqrt(2 * Math.PI)), mean, sigma);
    }

    /**
     * Normalized gaussian with zero mean and unit standard deviation.
     */
    public Gaussian() {
        this(0, 1);
    }

    /** {@inheritDoc} */
    public double value(double x) {
        return value(x - mean, norm, i2s2);
    }

    /** {@inheritDoc}
     * @deprecated as of 3.1, replaced by {@link #value(DerivativeStructure)}
     */
    @Deprecated
    public UnivariateFunction derivative() {
        return FunctionUtils.toDifferentiableUnivariateFunction(this).derivative();
    }

    /**
     * Parametric function where the input array contains the parameters of
     * the Gaussian, ordered as follows:
     * <ul>
     *  <li>Norm</li>
     *  <li>Mean</li>
     *  <li>Standard deviation</li>
     * </ul>
     */
    public static class Parametric implements ParametricUnivariateFunction {
        /**
         * Computes the value of the Gaussian at {@code x}.
         *
         * @param x Value for which the function must be computed.
         * @param param Values of norm, mean and standard deviation.
         * @return the value of the function.
         * @throws NullArgumentException if {@code param} is {@code null}.
         * @throws DimensionMismatchException if the size of {@code param} is
         * not 3.
         * @throws NotStrictlyPositiveException if {@code param[2]} is negative.
         */
        public double value(double x, double ... param)
            throws NullArgumentException,
                   DimensionMismatchException,
                   NotStrictlyPositiveException {
            validateParameters(param);

            final double diff = x - param[1];
            final double i2s2 = 1 / (2 * param[2] * param[2]);
            return Gaussian.value(diff, param[0], i2s2);
        }

        /**
         * Computes the value of the gradient at {@code x}.
         * The components of the gradient vector are the partial
         * derivatives of the function with respect to each of the
         * <em>parameters</em> (norm, mean and standard deviation).
         *
         * @param x Value at which the gradient must be computed.
         * @param param Values of norm, mean and standard deviation.
         * @return the gradient vector at {@code x}.
         * @throws NullArgumentException if {@code param} is {@code null}.
         * @throws DimensionMismatchException if the size of {@code param} is
         * not 3.
         * @throws NotStrictlyPositiveException if {@code param[2]} is negative.
         */
        public double[] gradient(double x, double ... param)
            throws NullArgumentException,
                   DimensionMismatchException,
                   NotStrictlyPositiveException {
            validateParameters(param);

            final double norm = param[0];
            final double diff = x - param[1];
            final double sigma = param[2];
            final double i2s2 = 1 / (2 * sigma * sigma);

            final double n = Gaussian.value(diff, 1, i2s2);
            final double m = norm * n * 2 * i2s2 * diff;
            final double s = m * diff / sigma;

            return new double[] { n, m, s };
        }

        /**
         * Validates parameters to ensure they are appropriate for the evaluation of
         * the {@link #value(double,double[])} and {@link #gradient(double,double[])}
         * methods.
         *
         * @param param Values of norm, mean and standard deviation.
         * @throws NullArgumentException if {@code param} is {@code null}.
         * @throws DimensionMismatchException if the size of {@code param} is
         * not 3.
         * @throws NotStrictlyPositiveException if {@code param[2]} is negative.
         */
        private void validateParameters(double[] param)
            throws NullArgumentException,
                   DimensionMismatchException,
                   NotStrictlyPositiveException {
            if (param == null) {
                throw new NullArgumentException();
            }
            if (param.length != 3) {
                throw new DimensionMismatchException(param.length, 3);
            }
            if (param[2] <= 0) {
                throw new NotStrictlyPositiveException(param[2]);
            }
        }
    }

    /**
     * @param xMinusMean {@code x - mean}.
     * @param norm Normalization factor.
     * @param i2s2 Inverse of twice the square of the standard deviation.
     * @return the value of the Gaussian at {@code x}.
     */
    private static double value(double xMinusMean,
                                double norm,
                                double i2s2) {
        return norm * FastMath.exp(-xMinusMean * xMinusMean * i2s2);
    }

    /** {@inheritDoc}
     * @since 3.1
     */
    public DerivativeStructure value(final DerivativeStructure t)
        throws DimensionMismatchException {

        final double u = is * (t.getValue() - mean);
        double[] f = new double[t.getOrder() + 1];

        // the nth order derivative of the Gaussian has the form:
        // dn(g(x)/dxn = (norm / s^n) P_n(u) exp(-u^2/2) with u=(x-m)/s
        // where P_n(u) is a degree n polynomial with same parity as n
        // P_0(u) = 1, P_1(u) = -u, P_2(u) = u^2 - 1, P_3(u) = -u^3 + 3 u...
        // the general recurrence relation for P_n is:
        // P_n(u) = P_(n-1)'(u) - u P_(n-1)(u)
        // as per polynomial parity, we can store coefficients of both P_(n-1) and P_n in the same array
        final double[] p = new double[f.length];
        p[0] = 1;
        final double u2 = u * u;
        double coeff = norm * FastMath.exp(-0.5 * u2);
        if (coeff <= Precision.SAFE_MIN) {
            Arrays.fill(f, 0.0);
        } else {
            f[0] = coeff;
            for (int n = 1; n < f.length; ++n) {

                // update and evaluate polynomial P_n(x)
                double v = 0;
                p[n] = -p[n - 1];
                for (int k = n; k >= 0; k -= 2) {
                    v = v * u2 + p[k];
                    if (k > 2) {
                        p[k - 2] = (k - 1) * p[k - 1] - p[k - 3];
                    } else if (k == 2) {
                        p[0] = p[1];
                    }
                }
                if ((n & 0x1) == 1) {
                    v *= u;
                }

                coeff *= is;
                f[n] = coeff * v;

            }
        }

        return t.compose(f);

    }

}

21. 类 org.apache.commons.math3.analysis.function.HarmonicOscillator

21.1. HarmonicOscillator 中英对照文档

org.apache.commons.math3.analysis.function
类 HarmonicOscillator
    • Nested Class Summary
      Nested Classes  
      限定符和类型类 and 的说明
      static class HarmonicOscillator.Parametric
      Parametric function where the input array contains the parameters of the harmonic oscillator function, ordered as follows: Amplitude Angular frequency Phase

      参数功能,其中输入阵列包含谐振子功能的参数,如下所述:幅度角频率阶段

    • 构造器概要
      构造器  
      构造器和说明
      HarmonicOscillator(double amplitude, double omega, double phase)
      Harmonic oscillator function.

      谐振子功能。

    • 构造器详细说明
      • HarmonicOscillator
        public HarmonicOscillator(double amplitude,
                          double omega,
                          double phase)
        Harmonic oscillator function.

        谐振子功能。

        参数:
        amplitude - Amplitude.

        幅度幅度。

        omega - Angular frequency.

        Omega - 角频率。

        phase - Phase.

        相位阶段。

    • 方法详细说明
      • value
        public double value(double x)
        Compute the value of the function.

        计算函数的值。

        指定者:
        value in interface  UnivariateFunction

        界面非凡因子功能中的值

        参数:
        x - Point at which the function value should be computed.

        应计算函数值的X点。

        返回:
        the value of the function.

        函数的值。

      • derivative
        @Deprecated
        public UnivariateFunction derivative()
        Deprecated.  as of 3.1, replaced by value(DerivativeStructure)

        弃用。截至3.1,取而代之(衍生)

        Returns the derivative of the function

        返回函数的衍生物

        指定者:
        derivative in interface  DifferentiableUnivariateFunction

        界面中的衍生物不同的单位功能

        返回:
        the derivative function

        衍生功能

21.2. HarmonicOscillator 源码赏析

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math3.analysis.function;

import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction;
import org.apache.commons.math3.analysis.FunctionUtils;
import org.apache.commons.math3.analysis.ParametricUnivariateFunction;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.exception.NullArgumentException;
import org.apache.commons.math3.util.FastMath;

/**
 * <a href="http://en.wikipedia.org/wiki/Harmonic_oscillator">
 *  simple harmonic oscillator</a> function.
 *
 * @since 3.0
 */
public class HarmonicOscillator implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction {
    /** Amplitude. */
    private final double amplitude;
    /** Angular frequency. */
    private final double omega;
    /** Phase. */
    private final double phase;

    /**
     * Harmonic oscillator function.
     *
     * @param amplitude Amplitude.
     * @param omega Angular frequency.
     * @param phase Phase.
     */
    public HarmonicOscillator(double amplitude,
                              double omega,
                              double phase) {
        this.amplitude = amplitude;
        this.omega = omega;
        this.phase = phase;
    }

    /** {@inheritDoc} */
    public double value(double x) {
        return value(omega * x + phase, amplitude);
    }

    /** {@inheritDoc}
     * @deprecated as of 3.1, replaced by {@link #value(DerivativeStructure)}
     */
    @Deprecated
    public UnivariateFunction derivative() {
        return FunctionUtils.toDifferentiableUnivariateFunction(this).derivative();
    }

    /**
     * Parametric function where the input array contains the parameters of
     * the harmonic oscillator function, ordered as follows:
     * <ul>
     *  <li>Amplitude</li>
     *  <li>Angular frequency</li>
     *  <li>Phase</li>
     * </ul>
     */
    public static class Parametric implements ParametricUnivariateFunction {
        /**
         * Computes the value of the harmonic oscillator at {@code x}.
         *
         * @param x Value for which the function must be computed.
         * @param param Values of norm, mean and standard deviation.
         * @return the value of the function.
         * @throws NullArgumentException if {@code param} is {@code null}.
         * @throws DimensionMismatchException if the size of {@code param} is
         * not 3.
         */
        public double value(double x, double ... param)
            throws NullArgumentException,
                   DimensionMismatchException {
            validateParameters(param);
            return HarmonicOscillator.value(x * param[1] + param[2], param[0]);
        }

        /**
         * Computes the value of the gradient at {@code x}.
         * The components of the gradient vector are the partial
         * derivatives of the function with respect to each of the
         * <em>parameters</em> (amplitude, angular frequency and phase).
         *
         * @param x Value at which the gradient must be computed.
         * @param param Values of amplitude, angular frequency and phase.
         * @return the gradient vector at {@code x}.
         * @throws NullArgumentException if {@code param} is {@code null}.
         * @throws DimensionMismatchException if the size of {@code param} is
         * not 3.
         */
        public double[] gradient(double x, double ... param)
            throws NullArgumentException,
                   DimensionMismatchException {
            validateParameters(param);

            final double amplitude = param[0];
            final double omega = param[1];
            final double phase = param[2];

            final double xTimesOmegaPlusPhase = omega * x + phase;
            final double a = HarmonicOscillator.value(xTimesOmegaPlusPhase, 1);
            final double p = -amplitude * FastMath.sin(xTimesOmegaPlusPhase);
            final double w = p * x;

            return new double[] { a, w, p };
        }

        /**
         * Validates parameters to ensure they are appropriate for the evaluation of
         * the {@link #value(double,double[])} and {@link #gradient(double,double[])}
         * methods.
         *
         * @param param Values of norm, mean and standard deviation.
         * @throws NullArgumentException if {@code param} is {@code null}.
         * @throws DimensionMismatchException if the size of {@code param} is
         * not 3.
         */
        private void validateParameters(double[] param)
            throws NullArgumentException,
                   DimensionMismatchException {
            if (param == null) {
                throw new NullArgumentException();
            }
            if (param.length != 3) {
                throw new DimensionMismatchException(param.length, 3);
            }
        }
    }

    /**
     * @param xTimesOmegaPlusPhase {@code omega * x + phase}.
     * @param amplitude Amplitude.
     * @return the value of the harmonic oscillator function at {@code x}.
     */
    private static double value(double xTimesOmegaPlusPhase,
                                double amplitude) {
        return amplitude * FastMath.cos(xTimesOmegaPlusPhase);
    }

    /** {@inheritDoc}
     * @since 3.1
     */
    public DerivativeStructure value(final DerivativeStructure t)
        throws DimensionMismatchException {
        final double x = t.getValue();
        double[] f = new double[t.getOrder() + 1];

        final double alpha = omega * x + phase;
        f[0] = amplitude * FastMath.cos(alpha);
        if (f.length > 1) {
            f[1] = -amplitude * omega * FastMath.sin(alpha);
            final double mo2 = - omega * omega;
            for (int i = 2; i < f.length; ++i) {
                f[i] = mo2 * f[i - 2];
            }
        }

        return t.compose(f);

    }

}

22. 类 org.apache.commons.math3.analysis.function.Identity

22.1. Identity 中英对照文档

org.apache.commons.math3.analysis.function
类 Identity
    • 构造器详细说明
      • Identity
        public Identity()
    • 方法详细说明
      • value
        public double value(double x)
        Compute the value of the function.

        计算函数的值。

        指定者:
        value in interface  UnivariateFunction

        界面非凡因子功能中的值

        参数:
        x - Point at which the function value should be computed.

        应计算函数值的X点。

        返回:
        the value of the function.

        函数的值。

      • derivative
        @Deprecated
        public DifferentiableUnivariateFunction derivative()
        Deprecated.  as of 3.1, replaced by value(DerivativeStructure)

        弃用。截至3.1,取而代之(衍生)

        Returns the derivative of the function

        返回函数的衍生物

        指定者:
        derivative in interface  DifferentiableUnivariateFunction

        界面中的衍生物不同的单位功能

        返回:
        the derivative function

        衍生功能

      • value
        public DerivativeStructure value(DerivativeStructure t)
        Simple mathematical function.

        UnivariateDifferentiableFunction classes compute both the value and the first derivative of the function.


        简单的数学函数。单变化的功能功能计算函数的值和第一个导数。

        指定者:
        value in interface  UnivariateDifferentiableFunction

        界面中的值单识别异导功能

        参数:
        t - function input value

        T - 功能输入值

        返回:
        function result

        功能结果

        从以下版本开始:
        3.1

        3.1

22.2. Identity 源码赏析

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math3.analysis.function;

import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction;

/**
 * Identity function.
 *
 * @since 3.0
 */
public class Identity implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction {
    /** {@inheritDoc} */
    public double value(double x) {
        return x;
    }

    /** {@inheritDoc}
     * @deprecated as of 3.1, replaced by {@link #value(DerivativeStructure)}
     */
    @Deprecated
    public DifferentiableUnivariateFunction derivative() {
        return new Constant(1);
    }

    /** {@inheritDoc}
     * @since 3.1
     */
    public DerivativeStructure value(final DerivativeStructure t) {
        return t;
    }

}

23. 类 org.apache.commons.math3.analysis.function.Inverse

23.1. Inverse 中英对照文档

org.apache.commons.math3.analysis.function
类 Inverse
    • 构造器详细说明
      • Inverse
        public Inverse()
    • 方法详细说明
      • value
        public double value(double x)
        Compute the value of the function.

        计算函数的值。

        指定者:
        value in interface  UnivariateFunction

        界面非凡因子功能中的值

        参数:
        x - Point at which the function value should be computed.

        应计算函数值的X点。

        返回:
        the value of the function.

        函数的值。

      • derivative
        @Deprecated
        public UnivariateFunction derivative()
        Deprecated.  as of 3.1, replaced by value(DerivativeStructure)

        弃用。截至3.1,取而代之(衍生)

        Returns the derivative of the function

        返回函数的衍生物

        指定者:
        derivative in interface  DifferentiableUnivariateFunction

        界面中的衍生物不同的单位功能

        返回:
        the derivative function

        衍生功能

      • value
        public DerivativeStructure value(DerivativeStructure t)
        Simple mathematical function.

        UnivariateDifferentiableFunction classes compute both the value and the first derivative of the function.


        简单的数学函数。单变化的功能功能计算函数的值和第一个导数。

        指定者:
        value in interface  UnivariateDifferentiableFunction

        界面中的值单识别异导功能

        参数:
        t - function input value

        T - 功能输入值

        返回:
        function result

        功能结果

        从以下版本开始:
        3.1

        3.1

23.2. Inverse 源码赏析

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math3.analysis.function;

import org.apache.commons.math3.analysis.FunctionUtils;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction;

/**
 * Inverse function.
 *
 * @since 3.0
 */
public class Inverse implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction {
    /** {@inheritDoc} */
    public double value(double x) {
        return 1 / x;
    }

    /** {@inheritDoc}
     * @deprecated as of 3.1, replaced by {@link #value(DerivativeStructure)}
     */
    @Deprecated
    public UnivariateFunction derivative() {
        return FunctionUtils.toDifferentiableUnivariateFunction(this).derivative();
    }

    /** {@inheritDoc}
     * @since 3.1
     */
    public DerivativeStructure value(final DerivativeStructure t) {
        return t.reciprocal();
    }

}

24. 类 org.apache.commons.math3.analysis.function.Log

24.1. Log 中英对照文档

org.apache.commons.math3.analysis.function
类 Log
    • 构造器详细说明
      • Log
        public Log()
    • 方法详细说明
      • value
        public double value(double x)
        Compute the value of the function.

        计算函数的值。

        指定者:
        value in interface  UnivariateFunction

        界面非凡因子功能中的值

        参数:
        x - Point at which the function value should be computed.

        应计算函数值的X点。

        返回:
        the value of the function.

        函数的值。

      • derivative
        @Deprecated
        public UnivariateFunction derivative()
        Deprecated.  as of 3.1, replaced by value(DerivativeStructure)

        弃用。截至3.1,取而代之(衍生)

        Returns the derivative of the function

        返回函数的衍生物

        指定者:
        derivative in interface  DifferentiableUnivariateFunction

        界面中的衍生物不同的单位功能

        返回:
        the derivative function

        衍生功能

      • value
        public DerivativeStructure value(DerivativeStructure t)
        Simple mathematical function.

        UnivariateDifferentiableFunction classes compute both the value and the first derivative of the function.


        简单的数学函数。单变化的功能功能计算函数的值和第一个导数。

        指定者:
        value in interface  UnivariateDifferentiableFunction

        界面中的值单识别异导功能

        参数:
        t - function input value

        T - 功能输入值

        返回:
        function result

        功能结果

        从以下版本开始:
        3.1

        3.1

24.2. Log 源码赏析

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math3.analysis.function;

import org.apache.commons.math3.analysis.FunctionUtils;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction;
import org.apache.commons.math3.util.FastMath;

/**
 * Natural logarithm function.
 *
 * @since 3.0
 */
public class Log implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction {
    /** {@inheritDoc} */
    public double value(double x) {
        return FastMath.log(x);
    }

    /** {@inheritDoc}
     * @deprecated as of 3.1, replaced by {@link #value(DerivativeStructure)}
     */
    @Deprecated
    public UnivariateFunction derivative() {
        return FunctionUtils.toDifferentiableUnivariateFunction(this).derivative();
    }

    /** {@inheritDoc}
     * @since 3.1
     */
    public DerivativeStructure value(final DerivativeStructure t) {
        return t.log();
    }

}

25. 类 org.apache.commons.math3.analysis.function.Log1p

25.1. Log1p 中英对照文档

org.apache.commons.math3.analysis.function
类 Log1p
    • 构造器详细说明
      • Log1p
        public Log1p()
    • 方法详细说明
      • value
        public double value(double x)
        Compute the value of the function.

        计算函数的值。

        指定者:
        value in interface  UnivariateFunction

        界面非凡因子功能中的值

        参数:
        x - Point at which the function value should be computed.

        应计算函数值的X点。

        返回:
        the value of the function.

        函数的值。

      • derivative
        @Deprecated
        public UnivariateFunction derivative()
        Deprecated.  as of 3.1, replaced by value(DerivativeStructure)

        弃用。截至3.1,取而代之(衍生)

        Returns the derivative of the function

        返回函数的衍生物

        指定者:
        derivative in interface  DifferentiableUnivariateFunction

        界面中的衍生物不同的单位功能

        返回:
        the derivative function

        衍生功能

      • value
        public DerivativeStructure value(DerivativeStructure t)
        Simple mathematical function.

        UnivariateDifferentiableFunction classes compute both the value and the first derivative of the function.


        简单的数学函数。单变化的功能功能计算函数的值和第一个导数。

        指定者:
        value in interface  UnivariateDifferentiableFunction

        界面中的值单识别异导功能

        参数:
        t - function input value

        T - 功能输入值

        返回:
        function result

        功能结果

        从以下版本开始:
        3.1

        3.1

25.2. Log1p 源码赏析

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math3.analysis.function;

import org.apache.commons.math3.analysis.FunctionUtils;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction;
import org.apache.commons.math3.util.FastMath;

/**
 * <code>log(1 + p)</code> function.
 *
 * @since 3.0
 */
public class Log1p implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction {
    /** {@inheritDoc} */
    public double value(double x) {
        return FastMath.log1p(x);
    }

    /** {@inheritDoc}
     * @deprecated as of 3.1, replaced by {@link #value(DerivativeStructure)}
     */
    @Deprecated
    public UnivariateFunction derivative() {
        return FunctionUtils.toDifferentiableUnivariateFunction(this).derivative();
    }

    /** {@inheritDoc}
     * @since 3.1
     */
    public DerivativeStructure value(final DerivativeStructure t) {
        return t.log1p();
    }

}

26. 类 org.apache.commons.math3.analysis.function.Log10

26.1. Log10 中英对照文档

org.apache.commons.math3.analysis.function
类 Log10
    • 构造器详细说明
      • Log10
        public Log10()
    • 方法详细说明
      • value
        public double value(double x)
        Compute the value of the function.

        计算函数的值。

        指定者:
        value in interface  UnivariateFunction

        界面非凡因子功能中的值

        参数:
        x - Point at which the function value should be computed.

        应计算函数值的X点。

        返回:
        the value of the function.

        函数的值。

      • derivative
        @Deprecated
        public UnivariateFunction derivative()
        Deprecated.  as of 3.1, replaced by value(DerivativeStructure)

        弃用。截至3.1,取而代之(衍生)

        Returns the derivative of the function

        返回函数的衍生物

        指定者:
        derivative in interface  DifferentiableUnivariateFunction

        界面中的衍生物不同的单位功能

        返回:
        the derivative function

        衍生功能

      • value
        public DerivativeStructure value(DerivativeStructure t)
        Simple mathematical function.

        UnivariateDifferentiableFunction classes compute both the value and the first derivative of the function.


        简单的数学函数。单变化的功能功能计算函数的值和第一个导数。

        指定者:
        value in interface  UnivariateDifferentiableFunction

        界面中的值单识别异导功能

        参数:
        t - function input value

        T - 功能输入值

        返回:
        function result

        功能结果

        从以下版本开始:
        3.1

        3.1

26.2. Log10 源码赏析

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math3.analysis.function;

import org.apache.commons.math3.analysis.FunctionUtils;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction;
import org.apache.commons.math3.util.FastMath;

/**
 * Base 10 logarithm function.
 *
 * @since 3.0
 */
public class Log10 implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction {

    /** {@inheritDoc} */
    public double value(double x) {
        return FastMath.log10(x);
    }

    /** {@inheritDoc}
     * @deprecated as of 3.1, replaced by {@link #value(DerivativeStructure)}
     */
    @Deprecated
    public UnivariateFunction derivative() {
        return FunctionUtils.toDifferentiableUnivariateFunction(this).derivative();
    }

    /** {@inheritDoc}
     * @since 3.1
     */
    public DerivativeStructure value(final DerivativeStructure t) {
        return t.log10();
    }

}

27. 类 org.apache.commons.math3.analysis.function.Logistic

27.1. Logistic 中英对照文档

org.apache.commons.math3.analysis.function
类 Logistic
    • Nested Class Summary
      Nested Classes  
      限定符和类型类 and 的说明
      static class Logistic.Parametric
      Parametric function where the input array contains the parameters of the logistic function, ordered as follows: k m b q a n

      参数功能,输入阵列包含逻辑函数的参数,如下所述:k m b q a n

    • 构造器概要
      构造器  
      构造器和说明
      Logistic(double k, double m, double b, double q, double a, double n) 
    • 构造器详细说明
      • Logistic
        public Logistic(double k,
                double m,
                double b,
                double q,
                double a,
                double n)
                 throws NotStrictlyPositiveException
        参数:
        k - If b > 0, value of the function for x going towards +∞. If b < 0, value of the function for x going towards -∞.

        k - 如果b> 0,则x函数的值朝向+∞。如果b <0,则X的函数的值朝向-‖。

        m - Abscissa of maximum growth.

        M - 最大增长的横坐标。

        b - Growth rate.

        B - 生长速度。

        q - Parameter that affects the position of the curve along the ordinate axis.

        Q - 影响沿纵轴曲线的位置的参数。

        a - If b > 0, value of the function for x going towards -∞. If b < 0, value of the function for x going towards +∞.

        a - if b> 0,X的函数的值朝向-‖。如果b <0,则x函数的函数的值朝向+∞。

        n - Parameter that affects near which asymptote the maximum growth occurs.

        n - 影响渐近增长的附近的参数发生。

        抛出:
        NotStrictlyPositiveException - if n <= 0.

        notstrictypositiveexception - 如果n <= 0。

    • 方法详细说明
      • value
        public double value(double x)
        Compute the value of the function.

        计算函数的值。

        指定者:
        value in interface  UnivariateFunction

        界面非凡因子功能中的值

        参数:
        x - Point at which the function value should be computed.

        应计算函数值的X点。

        返回:
        the value of the function.

        函数的值。

      • derivative
        @Deprecated
        public UnivariateFunction derivative()
        Deprecated.  as of 3.1, replaced by value(DerivativeStructure)

        弃用。截至3.1,取而代之(衍生)

        Returns the derivative of the function

        返回函数的衍生物

        指定者:
        derivative in interface  DifferentiableUnivariateFunction

        界面中的衍生物不同的单位功能

        返回:
        the derivative function

        衍生功能

      • value
        public DerivativeStructure value(DerivativeStructure t)
        Simple mathematical function.

        UnivariateDifferentiableFunction classes compute both the value and the first derivative of the function.


        简单的数学函数。单变化的功能功能计算函数的值和第一个导数。

        指定者:
        value in interface  UnivariateDifferentiableFunction

        界面中的值单识别异导功能

        参数:
        t - function input value

        T - 功能输入值

        返回:
        function result

        功能结果

        从以下版本开始:
        3.1

        3.1

27.2. Logistic 源码赏析

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math3.analysis.function;

import org.apache.commons.math3.analysis.FunctionUtils;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction;
import org.apache.commons.math3.analysis.ParametricUnivariateFunction;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction;
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
import org.apache.commons.math3.exception.NullArgumentException;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.util.FastMath;

/**
 * <a href="http://en.wikipedia.org/wiki/Generalised_logistic_function">
 *  Generalised logistic</a> function.
 *
 * @since 3.0
 */
public class Logistic implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction {
    /** Lower asymptote. */
    private final double a;
    /** Upper asymptote. */
    private final double k;
    /** Growth rate. */
    private final double b;
    /** Parameter that affects near which asymptote maximum growth occurs. */
    private final double oneOverN;
    /** Parameter that affects the position of the curve along the ordinate axis. */
    private final double q;
    /** Abscissa of maximum growth. */
    private final double m;

    /**
     * @param k If {@code b > 0}, value of the function for x going towards +&infin;.
     * If {@code b < 0}, value of the function for x going towards -&infin;.
     * @param m Abscissa of maximum growth.
     * @param b Growth rate.
     * @param q Parameter that affects the position of the curve along the
     * ordinate axis.
     * @param a If {@code b > 0}, value of the function for x going towards -&infin;.
     * If {@code b < 0}, value of the function for x going towards +&infin;.
     * @param n Parameter that affects near which asymptote the maximum
     * growth occurs.
     * @throws NotStrictlyPositiveException if {@code n <= 0}.
     */
    public Logistic(double k,
                    double m,
                    double b,
                    double q,
                    double a,
                    double n)
        throws NotStrictlyPositiveException {
        if (n <= 0) {
            throw new NotStrictlyPositiveException(n);
        }

        this.k = k;
        this.m = m;
        this.b = b;
        this.q = q;
        this.a = a;
        oneOverN = 1 / n;
    }

    /** {@inheritDoc} */
    public double value(double x) {
        return value(m - x, k, b, q, a, oneOverN);
    }

    /** {@inheritDoc}
     * @deprecated as of 3.1, replaced by {@link #value(DerivativeStructure)}
     */
    @Deprecated
    public UnivariateFunction derivative() {
        return FunctionUtils.toDifferentiableUnivariateFunction(this).derivative();
    }

    /**
     * Parametric function where the input array contains the parameters of
     * the {@link Logistic#Logistic(double,double,double,double,double,double)
     * logistic function}, ordered as follows:
     * <ul>
     *  <li>k</li>
     *  <li>m</li>
     *  <li>b</li>
     *  <li>q</li>
     *  <li>a</li>
     *  <li>n</li>
     * </ul>
     */
    public static class Parametric implements ParametricUnivariateFunction {
        /**
         * Computes the value of the sigmoid at {@code x}.
         *
         * @param x Value for which the function must be computed.
         * @param param Values for {@code k}, {@code m}, {@code b}, {@code q},
         * {@code a} and  {@code n}.
         * @return the value of the function.
         * @throws NullArgumentException if {@code param} is {@code null}.
         * @throws DimensionMismatchException if the size of {@code param} is
         * not 6.
         * @throws NotStrictlyPositiveException if {@code param[5] <= 0}.
         */
        public double value(double x, double ... param)
            throws NullArgumentException,
                   DimensionMismatchException,
                   NotStrictlyPositiveException {
            validateParameters(param);
            return Logistic.value(param[1] - x, param[0],
                                  param[2], param[3],
                                  param[4], 1 / param[5]);
        }

        /**
         * Computes the value of the gradient at {@code x}.
         * The components of the gradient vector are the partial
         * derivatives of the function with respect to each of the
         * <em>parameters</em>.
         *
         * @param x Value at which the gradient must be computed.
         * @param param Values for {@code k}, {@code m}, {@code b}, {@code q},
         * {@code a} and  {@code n}.
         * @return the gradient vector at {@code x}.
         * @throws NullArgumentException if {@code param} is {@code null}.
         * @throws DimensionMismatchException if the size of {@code param} is
         * not 6.
         * @throws NotStrictlyPositiveException if {@code param[5] <= 0}.
         */
        public double[] gradient(double x, double ... param)
            throws NullArgumentException,
                   DimensionMismatchException,
                   NotStrictlyPositiveException {
            validateParameters(param);

            final double b = param[2];
            final double q = param[3];

            final double mMinusX = param[1] - x;
            final double oneOverN = 1 / param[5];
            final double exp = FastMath.exp(b * mMinusX);
            final double qExp = q * exp;
            final double qExp1 = qExp + 1;
            final double factor1 = (param[0] - param[4]) * oneOverN / FastMath.pow(qExp1, oneOverN);
            final double factor2 = -factor1 / qExp1;

            // Components of the gradient.
            final double gk = Logistic.value(mMinusX, 1, b, q, 0, oneOverN);
            final double gm = factor2 * b * qExp;
            final double gb = factor2 * mMinusX * qExp;
            final double gq = factor2 * exp;
            final double ga = Logistic.value(mMinusX, 0, b, q, 1, oneOverN);
            final double gn = factor1 * FastMath.log(qExp1) * oneOverN;

            return new double[] { gk, gm, gb, gq, ga, gn };
        }

        /**
         * Validates parameters to ensure they are appropriate for the evaluation of
         * the {@link #value(double,double[])} and {@link #gradient(double,double[])}
         * methods.
         *
         * @param param Values for {@code k}, {@code m}, {@code b}, {@code q},
         * {@code a} and {@code n}.
         * @throws NullArgumentException if {@code param} is {@code null}.
         * @throws DimensionMismatchException if the size of {@code param} is
         * not 6.
         * @throws NotStrictlyPositiveException if {@code param[5] <= 0}.
         */
        private void validateParameters(double[] param)
            throws NullArgumentException,
                   DimensionMismatchException,
                   NotStrictlyPositiveException {
            if (param == null) {
                throw new NullArgumentException();
            }
            if (param.length != 6) {
                throw new DimensionMismatchException(param.length, 6);
            }
            if (param[5] <= 0) {
                throw new NotStrictlyPositiveException(param[5]);
            }
        }
    }

    /**
     * @param mMinusX {@code m - x}.
     * @param k {@code k}.
     * @param b {@code b}.
     * @param q {@code q}.
     * @param a {@code a}.
     * @param oneOverN {@code 1 / n}.
     * @return the value of the function.
     */
    private static double value(double mMinusX,
                                double k,
                                double b,
                                double q,
                                double a,
                                double oneOverN) {
        return a + (k - a) / FastMath.pow(1 + q * FastMath.exp(b * mMinusX), oneOverN);
    }

    /** {@inheritDoc}
     * @since 3.1
     */
    public DerivativeStructure value(final DerivativeStructure t) {
        return t.negate().add(m).multiply(b).exp().multiply(q).add(1).pow(oneOverN).reciprocal().multiply(k - a).add(a);
    }

}

28. 类 org.apache.commons.math3.analysis.function.Logit

28.1. Logit 中英对照文档

org.apache.commons.math3.analysis.function
类 Logit
    • Nested Class Summary
      Nested Classes  
      限定符和类型类 and 的说明
      static class Logit.Parametric
      Parametric function where the input array contains the parameters of the logit function, ordered as follows: Lower bound Higher bound

      参数函数,其中输入阵列包含Logit函数的参数,如下所述:下限更高界限

    • 构造器概要
      构造器  
      构造器和说明
      Logit()
      Usual logit function, where the lower bound is 0 and the higher bound is 1.

      通常的Logit函数,其中下限为0,更高界限为1。

      Logit(double lo, double hi)
      Logit function.

      Logit函数。

    • 构造器详细说明
      • Logit
        public Logit()
        Usual logit function, where the lower bound is 0 and the higher bound is 1.

        通常的Logit函数,其中下限为0,更高界限为1。

      • Logit
        public Logit(double lo,
             double hi)
        Logit function.

        Logit函数。

        参数:
        lo - Lower bound of the function domain.

        LO - 函数域的下限。

        hi - Higher bound of the function domain.

        函数域的高界限。

    • 方法详细说明
      • value
        public double value(double x)
                     throws OutOfRangeException
        Compute the value of the function.

        计算函数的值。

        指定者:
        value in interface  UnivariateFunction

        界面非凡因子功能中的值

        参数:
        x - Point at which the function value should be computed.

        应计算函数值的X点。

        返回:
        the value of the function.

        函数的值。

        抛出:
        OutOfRangeException

        Outofreanexception.

      • derivative
        @Deprecated
        public UnivariateFunction derivative()
        Deprecated.  as of 3.1, replaced by value(DerivativeStructure)

        弃用。截至3.1,取而代之(衍生)

        Returns the derivative of the function

        返回函数的衍生物

        指定者:
        derivative in interface  DifferentiableUnivariateFunction

        界面中的衍生物不同的单位功能

        返回:
        the derivative function

        衍生功能

28.2. Logit 源码赏析

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math3.analysis.function;

import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction;
import org.apache.commons.math3.analysis.FunctionUtils;
import org.apache.commons.math3.analysis.ParametricUnivariateFunction;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.exception.NullArgumentException;
import org.apache.commons.math3.exception.OutOfRangeException;
import org.apache.commons.math3.util.FastMath;

/**
 * <a href="http://en.wikipedia.org/wiki/Logit">
 *  Logit</a> function.
 * It is the inverse of the {@link Sigmoid sigmoid} function.
 *
 * @since 3.0
 */
public class Logit implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction {
    /** Lower bound. */
    private final double lo;
    /** Higher bound. */
    private final double hi;

    /**
     * Usual logit function, where the lower bound is 0 and the higher
     * bound is 1.
     */
    public Logit() {
        this(0, 1);
    }

    /**
     * Logit function.
     *
     * @param lo Lower bound of the function domain.
     * @param hi Higher bound of the function domain.
     */
    public Logit(double lo,
                 double hi) {
        this.lo = lo;
        this.hi = hi;
    }

    /** {@inheritDoc} */
    public double value(double x)
        throws OutOfRangeException {
        return value(x, lo, hi);
    }

    /** {@inheritDoc}
     * @deprecated as of 3.1, replaced by {@link #value(DerivativeStructure)}
     */
    @Deprecated
    public UnivariateFunction derivative() {
        return FunctionUtils.toDifferentiableUnivariateFunction(this).derivative();
    }

    /**
     * Parametric function where the input array contains the parameters of
     * the logit function, ordered as follows:
     * <ul>
     *  <li>Lower bound</li>
     *  <li>Higher bound</li>
     * </ul>
     */
    public static class Parametric implements ParametricUnivariateFunction {
        /**
         * Computes the value of the logit at {@code x}.
         *
         * @param x Value for which the function must be computed.
         * @param param Values of lower bound and higher bounds.
         * @return the value of the function.
         * @throws NullArgumentException if {@code param} is {@code null}.
         * @throws DimensionMismatchException if the size of {@code param} is
         * not 2.
         */
        public double value(double x, double ... param)
            throws NullArgumentException,
                   DimensionMismatchException {
            validateParameters(param);
            return Logit.value(x, param[0], param[1]);
        }

        /**
         * Computes the value of the gradient at {@code x}.
         * The components of the gradient vector are the partial
         * derivatives of the function with respect to each of the
         * <em>parameters</em> (lower bound and higher bound).
         *
         * @param x Value at which the gradient must be computed.
         * @param param Values for lower and higher bounds.
         * @return the gradient vector at {@code x}.
         * @throws NullArgumentException if {@code param} is {@code null}.
         * @throws DimensionMismatchException if the size of {@code param} is
         * not 2.
         */
        public double[] gradient(double x, double ... param)
            throws NullArgumentException,
                   DimensionMismatchException {
            validateParameters(param);

            final double lo = param[0];
            final double hi = param[1];

            return new double[] { 1 / (lo - x), 1 / (hi - x) };
        }

        /**
         * Validates parameters to ensure they are appropriate for the evaluation of
         * the {@link #value(double,double[])} and {@link #gradient(double,double[])}
         * methods.
         *
         * @param param Values for lower and higher bounds.
         * @throws NullArgumentException if {@code param} is {@code null}.
         * @throws DimensionMismatchException if the size of {@code param} is
         * not 2.
         */
        private void validateParameters(double[] param)
            throws NullArgumentException,
                   DimensionMismatchException {
            if (param == null) {
                throw new NullArgumentException();
            }
            if (param.length != 2) {
                throw new DimensionMismatchException(param.length, 2);
            }
        }
    }

    /**
     * @param x Value at which to compute the logit.
     * @param lo Lower bound.
     * @param hi Higher bound.
     * @return the value of the logit function at {@code x}.
     * @throws OutOfRangeException if {@code x < lo} or {@code x > hi}.
     */
    private static double value(double x,
                                double lo,
                                double hi)
        throws OutOfRangeException {
        if (x < lo || x > hi) {
            throw new OutOfRangeException(x, lo, hi);
        }
        return FastMath.log((x - lo) / (hi - x));
    }

    /** {@inheritDoc}
     * @since 3.1
     * @exception OutOfRangeException if parameter is outside of function domain
     */
    public DerivativeStructure value(final DerivativeStructure t)
        throws OutOfRangeException {
        final double x = t.getValue();
        if (x < lo || x > hi) {
            throw new OutOfRangeException(x, lo, hi);
        }
        double[] f = new double[t.getOrder() + 1];

        // function value
        f[0] = FastMath.log((x - lo) / (hi - x));

        if (Double.isInfinite(f[0])) {

            if (f.length > 1) {
                f[1] = Double.POSITIVE_INFINITY;
            }
            // fill the array with infinities
            // (for x close to lo the signs will flip between -inf and +inf,
            //  for x close to hi the signs will always be +inf)
            // this is probably overkill, since the call to compose at the end
            // of the method will transform most infinities into NaN ...
            for (int i = 2; i < f.length; ++i) {
                f[i] = f[i - 2];
            }

        } else {

            // function derivatives
            final double invL = 1.0 / (x - lo);
            double xL = invL;
            final double invH = 1.0 / (hi - x);
            double xH = invH;
            for (int i = 1; i < f.length; ++i) {
                f[i] = xL + xH;
                xL  *= -i * invL;
                xH  *=  i * invH;
            }
        }

        return t.compose(f);
    }
}

29. 类 org.apache.commons.math3.analysis.function.Max

29.1. Max 中英对照文档

org.apache.commons.math3.analysis.function
类 Max
    • 构造器详细说明
      • Max
        public Max()
    • 方法详细说明
      • value
        public double value(double x,
                   double y)
        Compute the value for the function.

        计算函数的值。

        指定者:
        value in interface  BivariateFunction

        界面二手功能中的值

        参数:
        x - Abscissa for which the function value should be computed.

        应计算函数值的X - 横坐标。

        y - Ordinate for which the function value should be computed.

        Y型纵坐标应计算函数值。

        返回:
        the value.

        价值。

29.2. Max 源码赏析

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math3.analysis.function;

import org.apache.commons.math3.analysis.BivariateFunction;
import org.apache.commons.math3.util.FastMath;

/**
 * Maximum function.
 *
 * @since 3.0
 */
public class Max implements BivariateFunction {
    /** {@inheritDoc} */
    public double value(double x, double y) {
        return FastMath.max(x, y);
    }
}
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
### 回答1: commons-math3-3.6.1-api文档-中英对照版.zip是一个包含Commons Math3.6.1版本的API文档的压缩文件。Commons Math是一个Java库,提供了许多数学功能和算法的实现。 API文档是帮助开发人员理解库中可用的、方法和属性的官方文档。它提供了关于每个的详细说明,包括的用途、方法的功能、参数和返回值的说明等。通过阅读API文档,开发人员可以很容易地了解如何正确地使用库的各个部分。 这个特定的API文档版本是中英对照版,这意味着文档提供了中文和英文的对照版本。这将有助于使用英文不太熟练的开发人员更好地理解文档的内容。无论是母语为中文的开发者还是母语为英文的开发者,都可以从这个中英对照的API文档中受益。 要使用这个API文档,你可以下载并解压缩这个.zip文件。解压后,你将获得一个文件夹,里面包含了所有的API文档文件。你可以打开文档并浏览其中的和方法,查找你需要的信息。 总之,commons-math3-3.6.1-api文档-中英对照版.zip是一个包含了Commons Math3.6.1版本的API文档的压缩文件。它是中英对照的,可以帮助开发人员更好地理解和使用这个库的功能和算法。 ### 回答2: commons-math3-3.6.1-api文档-中英对照版.zip是Apache Commons Math库的文档。这个文档提供了Apache Commons Math库中各个和方法的详细说明,包括参数、返回值、异常等方面的信息。它是以中英对照的方式呈现,方便中英文用户理解和使用该库。 Apache Commons Math是一个开源的数学库,提供了一系列的数学算法和工具,旨在帮助开发人员解决各种数学问题。这个库包括了统计、线性代数、函数优化、随机数生成等方面的功能。其中,统计模块可以用于计算均值、方差、相关系数等统计量;线性代数模块提供了矩阵运算、线性方程组求解等功能;函数优化模块可以用来寻找函数的最小值或最大值;随机数模块可以生成各种概率分布的随机数。 通过使用Apache Commons Math库,开发人员可以避免自己实现复杂的数学算法,提高开发效率。而文档则是帮助开发人员理解和使用该库的重要工具。commons-math3-3.6.1-api文档-中英对照版.zip提供了方便用户查找和阅读的中英文对照版本,使得使用该库的过程更加顺畅。 ### 回答3: commons-math3-3.6.1-api文档-中英对照版.zip是一个压缩文件,其中包含了Apache Commons Math库版本3.6.1的API文档。这个库是一个开源的Java数学库,提供了许多数学函数和算法,用于解决常见的数学问题。 这个API文档提供了针对每个和方法的详细说明,包括参数、返回值、异常以及使用示例等。中英对照版意味着文档中同时提供了中文和英文的说明,方便开发人员根据自己的语言习惯进行阅读和理解。 通过查阅这个API文档,开发人员可以了解到Apache Commons Math库中每个和方法的功能和用法,从而可以更加高效地利用这个数学库来完成自己的项目开发任务。此外,API文档还提供了丰富的示例代码,帮助开发人员更快地掌握如何正确地使用这些数学函数和算法。 总之,commons-math3-3.6.1-api文档-中英对照版.zip是一个非常实用的文件,提供了Apache Commons Math库版本3.6.1的API文档,方便开发人员学习和使用这个功能强大的数学库。它对于进行数学计算和处理的项目开发者来说是一个宝贵的资源。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

寒水馨

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值