Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/math/LinearFilterFunction.java @ 2256:dd93a8e1377a
First steps to serve the data in cm if we are are gauges only.
flys-artifacts/trunk@3910 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 03 Feb 2012 18:03:26 +0000 |
parents | |
children | 5642a83420f2 |
comparison
equal
deleted
inserted
replaced
2255:eab357067e06 | 2256:dd93a8e1377a |
---|---|
1 package de.intevation.flys.artifacts.math; | |
2 | |
3 public class LinearFilterFunction | |
4 extends FilterFunction | |
5 { | |
6 protected double m; | |
7 protected double b; | |
8 | |
9 public LinearFilterFunction(double m, double b) { | |
10 this(Identity.IDENTITY, m, b); | |
11 } | |
12 | |
13 public LinearFilterFunction(Function parent, double m, double b) { | |
14 super(parent); | |
15 this.m = m; | |
16 this.b = b; | |
17 } | |
18 | |
19 @Override | |
20 public double value(double x) { | |
21 return super.value(x)*m + b; | |
22 } | |
23 } | |
24 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |