private DWTData removeHighestFrequency(DWTData input) { DWTData output; double[] hilb = new double[input.size() / 2]; for (int i = 0; i < hilb.length; i++) { hilb[i] = input.value(i); } output = new DWTData(hilb); return output; }
public TimeSeries getFullResolutionDR(DWTData dwt, TimeSeries ref) { TimeSeries drfull = new TimeSeries(); double[] tsHilb = dwt.hilb(); tsHilb = recoverNullHighFrequency(tsHilb, ref.size()); Transform t = new Transform(new FastWaveletTransform(new Haar1())); double[] value = t.reverse(tsHilb); for (int i = 0; i < ref.size(); i++) { drfull.add(new Data(ref.get(i).time(), value[i])); } return drfull; }
public double getDistance(DWTData dwt1, DWTData dwt2, Distance distance) { return distance.calDistance(dwt1.hilb(), dwt2.hilb()); }