# Interface Field<F>

Type Parameters:
F - a field
All Superinterfaces:
AbelianGroup<F>, Monoid<F>, Ring<F>
All Known Implementing Classes:
Complex, Real, VariancebtX

public interface Field<F> extends Ring<F>
As an algebraic structure, every field is a ring, but not every ring is a field. That is, it has the notion of addition, subtraction, multiplication, satisfying certain axioms. The most important difference is that a field allows for division (though not division by zero), while a ring may not possess a multiplicative inverse. In addition, the multiplication operation in a field is required to be commutative.
• ## Nested Class Summary

Nested Classes
Modifier and Type
Interface
Description
static class
Field.InverseNonExistent
This is the exception thrown when the inverse of a field element does not exist.
• ## Method Summary

Modifier and Type
Method
Description
F
divide(F that)
/ : F × F → F
F
inverse()
For each a in F, there exists an element b in F such that a × b = b × a = 1.

### Methods inherited from interface dev.nm.algebra.structure.AbelianGroup

add, minus, opposite, ZERO

### Methods inherited from interface dev.nm.algebra.structure.Monoid

multiply, ONE
• ## Method Details

• ### inverse

F inverse() throws Field.InverseNonExistent
For each a in F, there exists an element b in F such that a × b = b × a = 1. That is, it is the object such as
this.multiply(this.inverse()) == this.ONE
Returns:
1 / this if it exists
Throws:
Field.InverseNonExistent - if the inverse does not exist
• ### divide

F divide(F that) throws Field.InverseNonExistent
/ : F × F → F

That is the same as

this.multiply(that.inverse())
Parameters:
that - the denominator
Returns:
this / that
Throws:
Field.InverseNonExistent - if the inverse does not exist