edu.neu.ccs.satsolver
Interface PolynomialI


public interface PolynomialI

The PolynomialI interface manages a polynomial.

Example: 4.3x^2 is a polynomial where 4.3 is the coefficient constant and the degree is 2.


Method Summary
 double eval(double x)
          Returns the result of the polynomial calculated with the given x.
 double getCoefficient(int degree)
          Return the coefficient constant used in the polynomial for the degree specified.
 

Method Detail

getCoefficient

double getCoefficient(int degree)
Return the coefficient constant used in the polynomial for the degree specified.

The valid request values are 0 <= degree <= 3.

Parameters:
degree - Coefficient constant degree to return
Returns:
Coefficient constant
Throws:
java.lang.IllegalArgumentException - if the degree greater than 3 or degree less than 0.

eval

double eval(double x)
Returns the result of the polynomial calculated with the given x.

Parameters:
x - The x to plug into the equation.
Returns:
the result of the polynomial computed with x