00001 package commandline.Distributions; 00002 00003 import junit.framework.Assert; 00004 00005 import commandline.ImageStuff.GeometricObjects.GenericEdge; 00006 00007 public class NormalIndicesDistribution_2B extends NormalIndicesDistribution { 00008 VerticalDistribution verticalDistribution_discr; 00009 public NormalIndicesDistribution_2B(VerticalDistribution verticalDistribution_discr) { 00010 super(); 00011 // TODO Auto-generated constructor stub 00012 this.verticalDistribution_discr=verticalDistribution_discr; 00013 00014 } 00015 00016 @Override 00017 protected double evaluatePDF(double x, float A_0, float A_1,GenericEdge edge) { 00018 float H=edge.getHoogte(); 00019 float length=edge.getEuclidischeLengte(); 00020 Assert.assertTrue(H>=length); 00021 length=length/H; 00022 x=x/H; 00023 float lambda=verticalDistribution_discr.getSchatter()*H; 00024 H=1; // H=H/H 00025 x=Math.abs(x-length/2); // symmetrie 00026 00027 // x vervangen door (x+H*H/(2*length)-length/2) 00028 double eersteterm=lambda * (length - 2 * (x+H*H/(2*length)-length/2)) * Math.exp(-(lambda / H * Math.abs(2 * length * (x+H*H/(2*length)-length/2) - Math.pow(H,2))) / 2) / length / 4; 00029 return (float)eersteterm; 00030 } 00031 00032 }
1.5.5