package edu.neu.ccs.satsolver; /** * 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. */ public interface PolynomialI { /** * Return the coefficient constant used in the polynomial for the degree * specified. *
* The valid request values are 0 <= degree <= 3. * * @param degree Coefficient constant degree to return * * @return Coefficient constant * * @throws IllegalArgumentException if the degree greater than 3 * or degree less than 0. */ public double getCoefficient(int degree); /** * Returns the result of the polynomial calculated with the given x. * * @param x The x to plug into the equation. * @return the result of the polynomial computed with x */ public double eval(double x); }