Home > tt2 > exp > iwtt.m

iwtt

PURPOSE ^

Inverse WTT transform with previously computed filters

SYNOPSIS ^

function [w]=iwtt(v,wtt_transform)

DESCRIPTION ^

Inverse WTT transform with previously computed filters
   W=IWTT(V,WTT_TRANSFORM) computes the inverse WTT tranformation of a 
   given tensor with filters, stored in the WTT_TRANSFORM structure.


 TT-Toolbox 2.2, 2009-2012

This is TT Toolbox, written by Ivan Oseledets et al.
Institute of Numerical Mathematics, Moscow, Russia
webpage: http://spring.inm.ras.ru/osel

For all questions, bugs and suggestions please mail
ivan.oseledets@gmail.com
---------------------------

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function [w]=iwtt(v,wtt_transform)
0002 %Inverse WTT transform with previously computed filters
0003 %   W=IWTT(V,WTT_TRANSFORM) computes the inverse WTT tranformation of a
0004 %   given tensor with filters, stored in the WTT_TRANSFORM structure.
0005 %
0006 %
0007 % TT-Toolbox 2.2, 2009-2012
0008 %
0009 %This is TT Toolbox, written by Ivan Oseledets et al.
0010 %Institute of Numerical Mathematics, Moscow, Russia
0011 %webpage: http://spring.inm.ras.ru/osel
0012 %
0013 %For all questions, bugs and suggestions please mail
0014 %ivan.oseledets@gmail.com
0015 %---------------------------
0016 
0017 u=wtt_transform.u;
0018 r=wtt_transform.rks;
0019 sz=wtt_transform.sz;
0020 w=iwtt_loc(v,u,r,sz);
0021 return
0022 end
0023 function [w]=iwtt_loc(v,u,r,sz)
0024 %[W]=IWTT(V,U,R,SZ)
0025 %Applies Inverse WTT transform to vector V with linear filters U
0026 %and ranks R
0027 %SZ is optional
0028 if ( nargin == 1 )
0029   sz=size(v);% d=numel(sz);
0030 else
0031  % d=numel(sz);
0032 end
0033 %Apply one transform back
0034   N=numel(v);
0035   v=reshape(v,[r(1)*sz(1),N/(r(1)*sz(1))]);
0036 if ( numel(u) == 1 )
0037    w=u{1}*v;
0038     w=reshape(w,[r(1),N/(r(1))]);
0039 else
0040   %Simplest one is recursion
0041   w=v;
0042   w0=v(1:r(2),:);
0043   unew=u(2:numel(u)); rnew=r(2:numel(r)); sznew=[sz(2),sz(3:numel(sz))];
0044   w0=iwtt_loc(w0,unew,rnew,sznew);
0045   w(1:r(2),:)=w0;
0046   m=size(u{1},1);
0047   w=reshape(w,[m,N/m]);
0048   w=u{1}*w;
0049   w=reshape(w,[r(1),N/r(1)]);
0050 end
0051   return
0052 end

Generated on Wed 08-Feb-2012 18:20:24 by m2html © 2005