public class PolynomialFit extends LinearCoefficientFit {
    int order;

    public PolynomialFit(int nOrder) { 
	super(nOrder+1); 
	term = new double[nOrder+1];
	order = nOrder;
    }

    protected double[] term;

    public double[] getTerms(double x) {
	term[0] = 1.0;
	for(int p=1; p<term.length; p++) term[p] = term[p-1] * x;
	return term;
    }
}
