https://github.com/kperros/SPARTan
Raw File
Tip revision: 1d2d8742adf1030feb08ebc71f60491ea41ebe94 authored by Ioakeim (Kimis) Perros on 26 May 2017, 02:32:31 UTC
Delete README.txt
Tip revision: 1d2d874
mttkrp_for_parafac2.m
function mttkrp1 = mttkrp_for_parafac2(YY, K, U, n, PARFOR_FLAG)
% SPARTan entry point computing the MTTKRP specifically for the CP-ALS in
% the PARAFAC2 fitting algorithm.

if (n == 1)
    R = size(U{2},2);
else
    R = size(U{1},2);
end

if (n==1)
    mttkrp1 = mttkrp_mode1(YY, K, U, R, PARFOR_FLAG);
elseif (n==2)
    mttkrp1 =  mttkrp_mode2(YY, K, U, R, PARFOR_FLAG);
elseif (n==3)
    mttkrp1 = mttkrp_mode3(YY, K, U, R, PARFOR_FLAG);
end
    
back to top