static double simSeasonalOLD(Model a, Model b) { Debug.Assert(a.len == -1); Debug.Assert(b.len == -1); Debug.Assert(b.freq == a.freq); double sim_index; double a_scale, a_shift; double b_scale, b_shift; a_scale = 0; a_shift = 0; b_scale = 0; b_shift = 0; Model pa = models[getParent(a)]; Model pb = models[getParent(b)]; double[] aV = new double[pa.len]; double[] bV = new double[pb.len]; for (int i = 0; i < pa.len; i++) { aV[i] = pa.EvalS(i); bV[i] = pb.EvalS(i); } double[] tsa = Utils.normalize(aV, ref a_scale, ref a_shift); double[] tsb = Utils.normalize(bV, ref b_scale, ref b_shift); sim_index = Utils.sim(tsa, tsb); return(sim_index); return(0); }
static double simSeasonal(Model pa, Model pb) { double sim_index; double a_scale, a_shift; double b_scale, b_shift; a_scale = 0; a_shift = 0; b_scale = 0; b_shift = 0; double[] aV = new double[pa.len]; double[] bV = new double[pb.len]; for (int i = 0; i < pa.len; i++) { aV[i] = pa.EvalS(i); bV[i] = pb.EvalS(i); } double[] tsa = Utils.normalize(aV, ref a_scale, ref a_shift); double[] tsb = Utils.normalize(bV, ref b_scale, ref b_shift); sim_index = Utils.sim(tsa, tsb); return(sim_index); }
static double simSeasonal(Model pa, Model pb) { double sim_index; double a_scale, a_shift; double b_scale, b_shift; a_scale = 0; a_shift = 0; b_scale = 0; b_shift = 0; double[] aV = new double[pa.len]; double[] bV = new double[pb.len]; for (int i = 0; i < pa.len; i++) { aV[i] = pa.EvalS(i); bV[i] = pb.EvalS(i); } double[] tsa = Utils.normalize(aV, ref a_scale, ref a_shift); double[] tsb = Utils.normalize(bV, ref b_scale, ref b_shift); sim_index = Utils.sim(tsa, tsb); return sim_index; }