package multinomad.tools.cec2013;

import multinomad.config.Configuration;
import multinomad.config.LoadProperties;
import multinomad.tools.ICDFtriangular;

public class BasinsTriangularDistribution extends Basins {

	public BasinsTriangularDistribution(double[] probabilities, double A) {
		super(probabilities, A);
	}
	
	@Override
	public double upperNumberOfSamplesBound(double probability) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public double lowerNumberOfSamplesBound(double probability) {
		// TODO Auto-generated method stub
		return 0;
	}

	public static void main(String[] args) {
		
		LoadProperties lp = new LoadProperties(args,null);
		Configuration.setConfiguration(lp);

		
		double A = ICDFtriangular.calculateA(Configuration.m, Configuration.ratio, Configuration.c);
		double[] probabilities = ICDFtriangular.probabilities(Configuration.m, Configuration.ratio, Configuration.c);
		
		BasinsTriangularDistribution basin = new BasinsTriangularDistribution(probabilities, A);
		
		for(int i=0;i<50000;i++) {
			double upperprobability = basin.upperProbability(i);
			double lowerprobability = basin.lowerProbability(i);
			double estimateProbabilityEq1 = basin.estimateProbabilityEq1(i);
//			double estimateMedian = basin.estimateProbabilityBasedOnMedian(i);
//			double estimatePercentile10 = basin.estimateProbabilityBasedOnPercentile10(i);
//			double estimatePercentile20 = basin.estimateProbabilityBasedOnPercentile20(i);
//			double estimatePercentile30 = basin.estimateProbabilityBasedOnPercentile30(i);
//			double estimatePercentile40 = basin.estimateProbabilityBasedOnPercentile40(i);
			System.out.println(i+" "+lowerprobability+" "+upperprobability+" "+estimateProbabilityEq1);
		}
		

	}

}
