public void addData(double RT, double RT2) {
this.data.add(new RTs(RT, RT2));
}
private PolynomialFunction getPolynomialFunction() {
Collections.sort(data, new RTs());
PolynomialFitter fitter = new PolynomialFitter(3,
new GaussNewtonOptimizer(true));
for (RTs rt : data) {
fitter.addObservedPoint(1, rt.RT, rt.RT2);
}