package tester;

import edu.neu.ccs.satsolver.*;

public class TestPolynomial implements PolynomialI {
  public double[] m_coeffs;
  public TestPolynomial(double[] coeffs) {
    m_coeffs = coeffs;
  }
  public double getCoefficient(int degree) {
    if (degree < 0 || degree > 3) {
      throw new IllegalArgumentException("degree out of range.");
    }
    // this is a little weird, but we're re-mapping the indexes to
    // 3, 2, 1, 0.
    return m_coeffs[3-degree];
  }

  public double eval(double eval) {
    return 0.0d;
  }

  public String toString() {
    return getCoefficient(3) + "x^3 + " + 
      getCoefficient(2) + "x^2 + " +
      getCoefficient(1) + "x + " +
      getCoefficient(0);
  }
}