w <- mp_toy_data$sub_len
ref_data <- mp_toy_data$data[, 1]
query_data <- mp_toy_data$data[, 1]
pre <- tsmp:::mass_pre(ref_data, query_data, w)
dp <- list()
for (i in 1:(pre$data_size - w + 1)) {
dp[[i]] <- tsmp:::mass_v2(
query_data[i:(i - 1 + w)], pre$window_size, pre$data_fft, pre$data_size,
pre$data_mean, pre$data_sd, pre$query_mean[i], pre$query_sd[i]
)
}
Run the code above in your browser using DataLab