00001 package commandline.Distributions; 00002 00003 import commandline.CodingUtils.DataStructure; 00004 import commandline.NormalMeshAlgorithm.Configuration; 00005 00006 public abstract class VerticalDistribution { 00007 00008 00009 protected Configuration configuration; 00010 protected DataStructure breathFirstDatastructure; 00011 protected float p; 00012 protected float lambda_streep; 00013 public VerticalDistribution(Configuration configuration, DataStructure breathFirstDatastructure) { 00014 00015 this.configuration=configuration; 00016 this.breathFirstDatastructure=breathFirstDatastructure; 00017 } 00018 00019 protected VerticalDistribution(){} 00020 00025 public abstract NormalIndicesDistribution getNormalIndicesDistribution_1A(); 00026 public abstract NormalIndicesDistribution getNormalIndicesDistribution_2A(); 00027 public abstract NormalIndicesDistribution getNormalIndicesDistribution_1B(); 00028 public abstract NormalIndicesDistribution getNormalIndicesDistribution_2B(); 00029 public abstract double getPMF_at(double x, float normalizingFactor,double width); 00030 00038 public double[] getPMF(int ondergrens_v, int bovengrens_v,float normalizingFactor){ 00039 double[] PMF=new double[bovengrens_v-ondergrens_v+1]; 00040 double total=0; 00041 for(int i=ondergrens_v;i<=bovengrens_v;i++){ 00042 PMF[i-ondergrens_v]=getPMF_at(i,normalizingFactor,PMF.length); // PDF sampelen aan een periode van 1/A_i 00043 total+=PMF[i-ondergrens_v]; 00044 } 00045 for(int i=ondergrens_v;i<=bovengrens_v;i++){ 00046 PMF[i-ondergrens_v]/=total; 00047 } 00048 return PMF; 00049 00050 } 00051 00052 public float getSchatter() { 00053 return lambda_streep; 00054 } 00055 00056 00057 public void setLambda_streep(float lambda) { 00058 this.lambda_streep = lambda; 00059 } 00060 00061 00062 00063 //protected abstract float getLambdaEstimator(Configuration configuration,DataStructure breathFirstDatastructure); 00064 00065 public float getP() { 00066 return p; 00067 } 00068 }
1.5.5