001/*
002 * $Id$
003 */
004
005package edu.jas.structure;
006
007
008import java.util.List;
009
010
011/**
012 * Module element interface. Defines scalar operations.
013 * @param <M> module type
014 * @param <C> scalar type
015 * @author Heinz Kredel
016 */
017public interface ModulElem<M extends ModulElem<M, C>, C extends RingElem<C>> extends AbelianGroupElem<M> {
018
019
020    /**
021     * Scalar multiplication. Multiply this by a scalar.
022     * @param s scalar
023     * @return this * s.
024     */
025    public M scalarMultiply(C s);
026
027
028    /**
029     * Linear combination.
030     * @param a scalar
031     * @param b module element
032     * @param s scalar
033     * @return a * b + this * s.
034     */
035    public M linearCombination(C a, M b, C s);
036
037
038    /**
039     * Linear combination.
040     * @param b module element
041     * @param s scalar
042     * @return b + this * s.
043     */
044    public M linearCombination(M b, C s);
045
046
047    /**
048     * Scalar product. Multiply two vectors to become a scalar.
049     * @param b module element
050     * @return this * b, a scalar.
051     */
052    public C scalarProduct(M b);
053
054
055    /**
056     * Scalar product. Multiply this vectors by list of vectors to become a
057     * vector.
058     * @param b list of module elements
059     * @return this * b, a list of scalars, a module element.
060     */
061    public M scalarProduct(List<M> b);
062
063}