001/* 002 * $Id: RingElem.java 4056 2012-07-26 17:44:13Z kredel $ 003 */ 004 005package edu.jas.structure; 006 007 008/** 009 * Ring element interface. Combines additive and multiplicative methods. Adds 010 * also gcd because of polynomials. 011 * @param <C> ring element type 012 * @author Heinz Kredel 013 */ 014 015public interface RingElem<C extends RingElem<C>> extends AbelianGroupElem<C>, MonoidElem<C> { 016 017 018 // /** Quotient and remainder. 019 // * @param b other element. 020 // * @return C[] { q, r } with this = q b + r and 0 ≤ r < |b|. 021 // */ 022 // public C[] quotientRemainder(C b); 023 024 025 /** 026 * Greatest common divisor. 027 * @param b other element. 028 * @return gcd(this,b). 029 */ 030 public C gcd(C b); 031 032 033 /** 034 * Extended greatest common divisor. 035 * @param b other element. 036 * @return [ gcd(this,b), c1, c2 ] with c1*this + c2*b = gcd(this,b). 037 */ 038 public C[] egcd(C b); 039 040}