1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 /*
19 * This is not the original file distributed by the Apache Software Foundation
20 * It has been modified by the Hipparchus project
21 */
22 package org.hipparchus;
23
24 /**
25 * Interface representing a <a href="http://mathworld.wolfram.com/Field.html">field</a>.
26 * <p>
27 * Classes implementing this interface will often be singletons.
28 * </p>
29 * @param <T> the type of the field elements
30 * @see FieldElement
31 */
32 public interface Field<T extends FieldElement<T>> {
33
34 /** Get the additive identity of the field.
35 * <p>
36 * The additive identity is the element e<sub>0</sub> of the field such that
37 * for all elements a of the field, the equalities a + e<sub>0</sub> =
38 * e<sub>0</sub> + a = a hold.
39 * </p>
40 * @return additive identity of the field
41 */
42 T getZero();
43
44 /** Get the multiplicative identity of the field.
45 * <p>
46 * The multiplicative identity is the element e<sub>1</sub> of the field such that
47 * for all elements a of the field, the equalities a × e<sub>1</sub> =
48 * e<sub>1</sub> × a = a hold.
49 * </p>
50 * @return multiplicative identity of the field
51 */
52 T getOne();
53
54 /**
55 * Returns the runtime class of the FieldElement.
56 *
57 * @return The {@code Class} object that represents the runtime
58 * class of this object.
59 */
60 Class<T> getRuntimeClass();
61
62 }