SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.mathstructure
Interface Field<F>

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

public interface Field<F>
extends Ring<F>

This interface represents a field.

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.

See Also:
Wikipedia: Field (mathematics)

Nested Class Summary
static class Field.InverseNonExistent
          RuntimeException thrown when the inverse of a field element does not exist.
 
Method Summary
 F divide(F that)
          / : F × F → F That is the same as this.multiply(that.inverse())
 F inverse()
          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
 
Methods inherited from interface com.numericalmethod.suanshu.mathstructure.AbelianGroup
add, minus, opposite, ZERO
 
Methods inherited from interface com.numericalmethod.suanshu.mathstructure.Monoid
multiply, ONE
 

Method Detail

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
See Also:
Wikipedia: Multiplicative inverse

divide

F divide(F that)
/ : F × F → F

That is the same as

this.multiply(that.inverse())

Parameters:
that - the denominator
Returns:
this / that

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.