001 /* 002 * $Id: GcdRingElem.java 1708 2008-02-24 17:28:36Z kredel $ 003 */ 004 005 package edu.jas.structure; 006 007 008 /** 009 * Gcd ring element interface. 010 * Adds greatest common divisor and extended greatest common divisor. 011 * Empty interface since gcd and egcd is now in RingElem. 012 * @param <C> gcd element type 013 * @author Heinz Kredel 014 */ 015 016 public interface GcdRingElem<C extends GcdRingElem<C>> 017 extends RingElem<C> { 018 019 /** 020 * Greatest common divisor. 021 * @param b other element. 022 * @return gcd(this,b). 023 public C gcd(C b); 024 */ 025 026 027 /** 028 * Extended greatest common divisor. 029 * @param b other element. 030 * @return [ gcd(this,b), c1, c2 ] with c1*this + c2*b = gcd(this,b). 031 public C[] egcd(C b); 032 */ 033 034 }