001/*
002 * $Id$
003 */
004
005package edu.jas.structure;
006
007
008/**
009 * Abelian group element interface. Defines the additive methods.
010 * @param <C> element type
011 * @author Heinz Kredel
012 */
013
014public interface AbelianGroupElem<C extends AbelianGroupElem<C>> extends Element<C> {
015
016
017    /**
018     * Test if this is zero.
019     * @return true if this is 0, else false.
020     */
021    public boolean isZERO();
022
023
024    /**
025     * Signum.
026     * @return the sign of this.
027     */
028    public int signum();
029
030
031    /**
032     * Sum of this and S.
033     * @param S
034     * @return this + S.
035     */
036    public C sum(C S);
037
038
039    //public <T extends C> T sum(T S);
040
041
042    /**
043     * Subtract S from this.
044     * @param S
045     * @return this - S.
046     */
047    public C subtract(C S);
048
049
050    /**
051     * Negate this.
052     * @return - this.
053     */
054    public C negate();
055
056
057    /**
058     * Absolute value of this.
059     * @return |this|.
060     */
061    public C abs();
062
063}