Given a collection of MTS, the function returns the pairwise distance matrix,
where the distance between two MTS \(\boldsymbol X_T\) and \(\boldsymbol Y_T\) is defined as
$$d_{MD}^*(\boldsymbol X_T, \boldsymbol Y_T)=\frac{1}{2}\Big(d_{MD}
(\boldsymbol X_T, \boldsymbol Y_T)+d_{MD}(\boldsymbol Y_T, \boldsymbol X_T)\Big),$$
with $$ d_{MD}(\boldsymbol X_T, \boldsymbol Y_T)=\sqrt{(\overline{\boldsymbol X}_T
-\overline{\boldsymbol Y}_T)\boldsymbol \Sigma_{\boldsymbol X_T}^{*-1}(\overline
{\boldsymbol X}_T-\overline{\boldsymbol Y}_T)^\top},$$
where \(\overline{\boldsymbol X}_T\) and \(\overline{\boldsymbol Y}_T\)
are vectors containing the column-wise means concerning series
\(\boldsymbol X_T\) and \(\boldsymbol Y_T\), respectively,
\(\boldsymbol \Sigma_{\boldsymbol X_T}\) is the covariance matrix of \(\boldsymbol X_T\) and
\(\boldsymbol \Sigma_{\boldsymbol X_T}^{*-1}\) is the pseudo-inverse of \(\boldsymbol
\Sigma_{\boldsymbol X_T}\) calculated using SVD.
In the computation of \(d_{MD}^*\), MTS \(\boldsymbol X_T\) is assumed to be the reference series.