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_{SWMD}(\boldsymbol X_T, \boldsymbol Y_T)=\Big[\big(vec
(\boldsymbol Z^{\boldsymbol X_T})-vec(\boldsymbol Z^{\boldsymbol Y_T})\big)\boldsymbol
S\big(vec(\boldsymbol Z^{\boldsymbol X_T})-vec(\boldsymbol Z^{\boldsymbol Y_T})\big)^\top\Big]^{1/2},$$
where \(\boldsymbol Z^{\boldsymbol X_T}\) and \(\boldsymbol Z^{\boldsymbol Y_T}\) are the dimensionality-
reduced MTS samples associated with \(\boldsymbol X_T\) and
\(\boldsymbol Y_T\), respectively, the operator \(vec(\cdot)\)
creates a vector by concatenating the columns of the matrix received as input
and \(\boldsymbol S\) is a matrix integrating the spatial dimensionality
difference between the corresponding elements.