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