comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java @ 2186:ec2574eb2d32

Added calculation class for "Bezugslinienverfahren" to created by WINFOArtifact. flys-artifacts/trunk@3792 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 27 Jan 2012 12:42:20 +0000
parents 2898b1ff6013
children e1eaf9c2b5bf
comparison
equal deleted inserted replaced
2185:a9a8df1473fd 2186:ec2574eb2d32
29 implements Serializable 29 implements Serializable
30 { 30 {
31 private static Logger log = Logger.getLogger(WstValueTable.class); 31 private static Logger log = Logger.getLogger(WstValueTable.class);
32 32
33 public static final int DEFAULT_Q_STEPS = 500; 33 public static final int DEFAULT_Q_STEPS = 500;
34
35 public static final int RELATE_WS_SAMPLES = 150;
34 36
35 /** 37 /**
36 * A Column in the table, typically representing one measurement session. 38 * A Column in the table, typically representing one measurement session.
37 */ 39 */
38 public static final class Column 40 public static final class Column
890 892
891 /** 'Bezugslinienverfahren' */ 893 /** 'Bezugslinienverfahren' */
892 public double [][] relateWs( 894 public double [][] relateWs(
893 double km1, 895 double km1,
894 double km2, 896 double km2,
897 Calculation errors
898 ) {
899 return relateWs(km1, km2, RELATE_WS_SAMPLES, errors);
900 }
901
902 /* TODO: Add optimized methods of relateWs to relate one
903 * start km to many end kms. The index generation/spline stuff for
904 * the start km is always the same.
905 */
906
907 public double [][] relateWs(
908 double km1,
909 double km2,
895 int numSamples, 910 int numSamples,
896 Calculation errors 911 Calculation errors
897 ) { 912 ) {
898 SplineFunction sf1 = createSpline(km1, errors); 913 SplineFunction sf1 = createSpline(km1, errors);
899 if (sf1 == null) { 914 if (sf1 == null) {

http://dive4elements.wald.intevation.org