commons-math3-3.6.1-org.apache.commons.math3.FieldElement<T>-中英对照文档及源码赏析

commons-math3-3.6.1-org.apache.commons.math3.FieldElement<T>-中英对照文档及源码赏析

完整中文文档、中英对照文档下载请移步: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.FieldElement<T>

2. FieldElement<T> 中文-英语对照文档

org.apache.commons.math3

接口 FieldElement<T>

    • 方法概要

      Methods  
      限定符和类型方法和说明
      Tadd(T a)
      Compute this + a.

      计算这个+ a。

      Tdivide(T a)
      Compute this ÷ a.

      计算此÷A。

      Field<T>getField()
      Get the Field to which the instance belongs.

      获取实例所属的字段。

      Tmultiply(int n)
      Compute n × this.

      计算n×它。

      Tmultiply(T a)
      Compute this × a.

      计算此×a。

      Tnegate()
      Returns the additive inverse of this element.

      返回此元素的附加逆。

      Treciprocal()
      Returns the multiplicative inverse of this element.

      返回此元素的乘法倒数。

      Tsubtract(T a)
      Compute this - a.

      计算这个 - a。

    • 方法详细说明

      • add
        T add(T a)
              throws NullArgumentException
        Compute this + a.

        计算这个+ a。

        参数:
        a - element to add

        a - 要添加的元素

        返回:
        a new element representing this + a

        代表这个+ a的新元素

        抛出:
        NullArgumentException - if a is null.

        nullargumentException - 如果a为null。

      • subtract
        T subtract(T a)
                   throws NullArgumentException
        Compute this - a.

        计算这个 - a。

        参数:
        a - element to subtract

        a - 要减去的元素

        返回:
        a new element representing this - a

        代表这个的新元素 - a

        抛出:
        NullArgumentException - if a is null.

        nullargumentException - 如果a为null。

      • negate
        T negate()
        Returns the additive inverse of this element.

        返回此元素的附加逆。

        返回:
        the opposite of this.

        与此相反。

      • multiply
        T multiply(int n)
        Compute n × this. Multiplication by an integer number is defined as the following sum
        n × this = ∑ i=1 n this.

        计算n×它。通过整数数乘法定义为以下和n×这个=Σi= 1n。

        参数:
        n - Number of times this must be added to itself.

        n - 必须添加到自身的次数。

        返回:
        A new element representing n × this.

        一个表示n×的新元素。

      • multiply
        T multiply(T a)
                   throws NullArgumentException
        Compute this × a.

        计算此×a。

        参数:
        a - element to multiply

        一个 - 要乘法的元素

        返回:
        a new element representing this × a

        一个代表这个×a的新元素

        抛出:
        NullArgumentException - if a is null.

        nullargumentException - 如果a为null。

      • reciprocal
        T reciprocal()
                     throws MathArithmeticException
        Returns the multiplicative inverse of this element.

        返回此元素的乘法倒数。

        返回:
        the inverse of this.

        这方面的反向。

        抛出:
        MathArithmeticException - if this is zero

        数学算术例外 - 如果这是零

      • getField
        Field<T> getField()
        Get the Field to which the instance belongs.

        获取实例所属的字段。

        返回:
        Field to which the instance belongs

        实例所属的字段

3. 源码赏析

/*
 * 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;

import org.apache.commons.math3.exception.MathArithmeticException;
import org.apache.commons.math3.exception.NullArgumentException;


/**
 * Interface representing <a href="http://mathworld.wolfram.com/Field.html">field</a> elements.
 * @param <T> the type of the field elements
 * @see Field
 * @since 2.0
 */
public interface FieldElement<T> {

    /** Compute this + a.
     * @param a element to add
     * @return a new element representing this + a
     * @throws NullArgumentException if {@code a} is {@code null}.
     */
    T add(T a) throws NullArgumentException;

    /** Compute this - a.
     * @param a element to subtract
     * @return a new element representing this - a
     * @throws NullArgumentException if {@code a} is {@code null}.
     */
    T subtract(T a) throws NullArgumentException;

    /**
     * Returns the additive inverse of {@code this} element.
     * @return the opposite of {@code this}.
     */
    T negate();

    /** Compute n &times; this. Multiplication by an integer number is defined
     * as the following sum
     * <center>
     * n &times; this = &sum;<sub>i=1</sub><sup>n</sup> this.
     * </center>
     * @param n Number of times {@code this} must be added to itself.
     * @return A new element representing n &times; this.
     */
    T multiply(int n);

    /** Compute this &times; a.
     * @param a element to multiply
     * @return a new element representing this &times; a
     * @throws NullArgumentException if {@code a} is {@code null}.
     */
    T multiply(T a) throws NullArgumentException;

    /** Compute this &divide; a.
     * @param a element to divide by
     * @return a new element representing this &divide; a
     * @throws NullArgumentException if {@code a} is {@code null}.
     * @throws MathArithmeticException if {@code a} is zero
     */
    T divide(T a) throws NullArgumentException, MathArithmeticException;

    /**
     * Returns the multiplicative inverse of {@code this} element.
     * @return the inverse of {@code this}.
     * @throws MathArithmeticException if {@code this} is zero
     */
    T reciprocal() throws MathArithmeticException;

    /** Get the {@link Field} to which the instance belongs.
     * @return {@link Field} to which the instance belongs
     */
    Field<T> getField();
}
### 回答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、付费专栏及课程。

余额充值