Orbital library

orbital.math
Interface Euclidean

All Superinterfaces:
Arithmetic, Normed
All Known Subinterfaces:
Integer, UnivariatePolynomial

public interface Euclidean
extends Arithmetic

Euclidean ring interface.

Let R be an integrity domain.
Euclidean ring
R is an Euclidean ring :⇔ ∃δ:R∖{0}→N
∀f∈R∀g∈R∖{0} ∃q,r∈R such that
f = q⋅g + r = (f div g)⋅g + (f mod g)
with δ(r) < δ(g) ∨ r = 0.
δ is called Euclidean degree of R. The Euclidean "quotient" q is denoted by f div g, the Euclidean remainder r is denoted by f mod g.

Author:
André Platzer

Field Summary
 
Fields inherited from interface orbital.math.Arithmetic
numerical
 
Method Summary
 Integer degree()
          Get the Euclidean degree.
 Euclidean modulo(Euclidean g)
          Get the Euclidean remainder, modulo g.
 Euclidean quotient(Euclidean g)
          Get the Euclidean "quotient" by g.
 
Methods inherited from interface orbital.math.Arithmetic
add, divide, equals, inverse, isOne, isZero, minus, multiply, one, power, scale, subtract, toString, valueFactory, zero
 
Methods inherited from interface orbital.math.Normed
norm
 

Method Detail

degree

Integer degree()
Get the Euclidean degree. In case R is a discrete valuation ring, this also is the valuation of Quot(R).

Returns:
the Euclidean degree δ(this) of this value.
Postconditions:
RES=δ(this)

quotient

Euclidean quotient(Euclidean g)
Get the Euclidean "quotient" by g.

Returns:
this div g ∈ R.
Throws:
java.lang.IllegalArgumentException - if the argument type is illegal for this operation. Note: for single type handling it is also allowed to throw a ClassCastException, instead.
Postconditions:
this.equals(RES.multiply(g).add(this.modulo(RES)))
Note:
the Euclidean quotient f div g is distinct from the fractional quotient f/g=f.divide(g).

modulo

Euclidean modulo(Euclidean g)
Get the Euclidean remainder, modulo g.

Returns:
this mod g ∈ R.
Throws:
java.lang.IllegalArgumentException - if the argument type is illegal for this operation. Note: for single type handling it is also allowed to throw a ClassCastException, instead.
Postconditions:
RES.degree() < g.degree() ∨ RES==0 ∧ this.equals(this.quotient(g).multiply(g).add(RES))

Orbital library
1.3.0: 11 Apr 2009

Copyright © 1996-2009 André Platzer
All Rights Reserved.