Home > release > kolda3.m

kolda3

PURPOSE ^

KOLDA3 - Comptues [[C; U1, U2, U3]]

SYNOPSIS ^

function X = kolda3(C, U1, U2, U3)

DESCRIPTION ^

 KOLDA3 - Comptues [[C; U1, U2, U3]]

 Syntax
  function X = kolda3(C, U1, U2, U3)

 Reference
 "On the extension of trace norm to tensors"
 Ryota Tomioka, Kohei Hayashi, and Hisashi Kashima
 arXiv:1010.0789
 http://arxiv.org/abs/1010.0789
 
 Copyright(c) 2010 Ryota Tomioka
 This software is distributed under the MIT license. See license.txt

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % KOLDA3 - Comptues [[C; U1, U2, U3]]
0002 %
0003 % Syntax
0004 %  function X = kolda3(C, U1, U2, U3)
0005 %
0006 % Reference
0007 % "On the extension of trace norm to tensors"
0008 % Ryota Tomioka, Kohei Hayashi, and Hisashi Kashima
0009 % arXiv:1010.0789
0010 % http://arxiv.org/abs/1010.0789
0011 %
0012 % Copyright(c) 2010 Ryota Tomioka
0013 % This software is distributed under the MIT license. See license.txt
0014 
0015 
0016 function X = kolda3(C, U1, U2, U3)
0017 
0018 sz=[size(U1,1), size(U2,1), size(U3,1)];
0019 
0020 dims=size(C);
0021 if ndims(C)<3
0022   dims(3)=1;
0023 end
0024 
0025 U1=U1(:,1:dims(1));
0026 U2=U2(:,1:dims(2));
0027 U3=U3(:,1:dims(3));
0028 
0029 for ii=1:sz(3)
0030   Cii=reshape(reshape(C,[dims(1)*dims(2), dims(3)])*U3(ii,:)',dims(1:2));
0031   X(:,:,ii)=U1*Cii*U2';
0032 end

Generated on Wed 22-Dec-2010 16:09:20 by m2html © 2003