e(S)
% Additionally, one can pass a permutation array of number of components of
% S. In this case the components are arranged according to the permutation.
arrange(S,[2 1])
%% Computing the score of the match between two symktensors
% The function |score| provides a measure of similarity between two symktensors.
% Given two symktensors $R1$ and $R2$, we denote by $\lambda_{R1}$ and
% $\lambda_{R2}$ their respective weight vectors and |X| and |Y| their respective 
% factor matrices. The function |score(R1,R