commons-math3-3.6.1-org.apache.commons.math3.Field<T>中英对照文档及源码赏析
完整中文文档、中英对照文档下载请移步:commons-math3-中文文档、中英对照文档-CSDN下载
1. 开源组件说明
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.Field<T>
2. Field<T>
中文-英语对照文档
接口 Field<T>
-
-
Type Parameters:
-
T
- the type of the field elements
t - 现场元素的类型
-
All Known Implementing Classes:
-
BigFractionField,
BigRealField,
ComplexField,
Decimal64Field,
DfpField,
FractionField
BigFractionField,Bigrealfield,Complexfield,Defimal64field,DFPFIELD,Fractionfield
public interface Field<T>
Interface representing a field.Classes implementing this interface will often be singletons.
表示字段的界面。实现此界面的类通常是单例。
-
从以下版本开始:
-
2.0
2.0
另请参阅:
-
FieldElement
FieldElement.
-
-
-
方法概要
Methods 限定符和类型 方法和说明 T
getOne()
Get the multiplicative identity of the field.
获取该字段的乘法身份。
类<? extends FieldElement<T>>
getRuntimeClass()
Returns the runtime class of the FieldElement.
返回FieldElement的运行时类。
T
getZero()
Get the additive identity of the field.
获得现场的添加剂标识。
-
-
-
方法详细说明
getZero
T getZero()
Get the additive identity of the field.The additive identity is the element e0 of the field such that for all elements a of the field, the equalities a + e0 = e0 + a = a hold.
获得现场的添加剂标识。添加剂标识是该字段的元素E0,使得对于场的所有元素A,平等A + E0 = E0 + A =保持。
-
返回:
-
additive identity of the field
该领域的添加剂标识
-
additive identity of the field
getOne
T getOne()
Get the multiplicative identity of the field.The multiplicative identity is the element e1 of the field such that for all elements a of the field, the equalities a × e1 = e1 × a = a hold.
获取该字段的乘法身份。乘法标识是该字段的元素E1,使得对于场的所有元素A,平等A×e1 = e1×a =保持。
-
返回:
-
multiplicative identity of the field
该领域的乘法身份
-
multiplicative identity of the field
getRuntimeClass
类<? extends FieldElement<T>> getRuntimeClass()
Returns the runtime class of the FieldElement.
返回FieldElement的运行时类。
-
返回:
-
The
类
object that represents the runtime class of this object.
表示此对象的运行时类的类对象。
-
The
-
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;
/**
* Interface representing a <a href="http://mathworld.wolfram.com/Field.html">field</a>.
* <p>
* Classes implementing this interface will often be singletons.
* </p>
* @param <T> the type of the field elements
* @see FieldElement
* @since 2.0
*/
public interface Field<T> {
/** Get the additive identity of the field.
* <p>
* The additive identity is the element e<sub>0</sub> of the field such that
* for all elements a of the field, the equalities a + e<sub>0</sub> =
* e<sub>0</sub> + a = a hold.
* </p>
* @return additive identity of the field
*/
T getZero();
/** Get the multiplicative identity of the field.
* <p>
* The multiplicative identity is the element e<sub>1</sub> of the field such that
* for all elements a of the field, the equalities a × e<sub>1</sub> =
* e<sub>1</sub> × a = a hold.
* </p>
* @return multiplicative identity of the field
*/
T getOne();
/**
* Returns the runtime class of the FieldElement.
*
* @return The {@code Class} object that represents the runtime
* class of this object.
*/
Class<? extends FieldElement<T>> getRuntimeClass();
}