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