package com.smppw.core.reta.calc;

import org.apache.commons.math3.analysis.UnivariateFunction;

import java.util.List;

/**
 * @author zhengsongliang
 */
public interface LPM {

	double calculate(double tau, List<Double> dataList);

	public class LPMFunction implements UnivariateFunction {

		private List<Double> dataList;
		private LPM lpm;

		public LPMFunction(List<Double> dataList, LPM lpm) {
			this.dataList = dataList;
			this.lpm = lpm;
		}

		public double value(double tau) {
			return lpm.calculate(tau, dataList);
		}

	}
}
