KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > JSci > maths > polynomials > Polynomial


1 package JSci.maths.polynomials;
2
3 import JSci.maths.fields.Field;
4
5
6 /** A Polynomial as a <code>Ring.Member</code> over a <code>Field</code>
7  * @author b.dietrich
8  * @jsci.planetmath Polynomial
9  */

10 public interface Polynomial extends JSci.maths.fields.Ring.Member {
11     /** Get the coefficient of degree k, i.e. <I>a_k</I> if
12      * <I>P(x)</I> := sum_{k=0}^n <I>a_k x^k</I>
13      * @param k degree
14      * @return coefficient as described above
15      */

16     public Field.Member getCoefficient( int k );
17
18     /** Get the coefficients as an array
19      * @return the coefficients as an array
20      */

21     public Field.Member[] getCoefficients();
22
23     /** The degree.
24      * @return the degree
25      */

26     public int degree();
27
28     /** Return a new Polynomial with coefficients divided by <I>a</I>
29      * @param a divisor
30      * @return new Polynomial with coefficients /= <I>a</I>
31      */

32     public Polynomial scalarDivide( Field.Member a );
33
34     /** Return a new Polynomial with coefficients multiplied by <I>a</I>
35     * @param a factor
36     * @return new Polynomial with coefficients *= <I>a</I>
37     */

38     public Polynomial scalarMultiply( Field.Member a );
39 }
40
Popular Tags