Home > tt2 > exp > wtt.m

wtt

PURPOSE ^

Inverse WTT transform with previously computed filters

SYNOPSIS ^

function [w]=wtt(v,wtt_transform)

DESCRIPTION ^

Inverse WTT transform with previously computed filters
   W=IWTT(V,WTT_TRANSFORM) computes the forward 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]=wtt(v,wtt_transform)
0002 %Inverse WTT transform with previously computed filters
0003 %   W=IWTT(V,WTT_TRANSFORM) computes the forward 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 u=wtt_transform.u;
0017 r=wtt_transform.rks;
0018 sz=wtt_transform.sz;
0019 
0020 w=wtt_loc(v,u,r,sz);
0021 
0022 return
0023 end
0024 
0025 function [w]=wtt_loc(v,u,r,sz)
0026 if ( nargin == 1 )
0027   sz=size(v); %d=numel(sz);
0028 else
0029   %d=numel(sz);
0030 end
0031   N=numel(v);
0032   v=reshape(v,[r(1)*sz(1),N/(r(1)*sz(1))]);
0033 if ( numel(u) == 1 )
0034     w=u{1}'*v;
0035     w=reshape(w,[r(1),N/(r(1))]);
0036 else
0037   %Simplest one is recursion
0038   w=u{1}'*v;
0039   w0=w(1:r(2),:);
0040   unew=u(2:numel(u)); rnew=r(2:numel(r)); sznew=[sz(2),sz(3:numel(sz))];
0041   w0=wtt_loc(w0,unew,rnew,sznew);
0042   w(1:r(2),:)=w0;
0043   w=reshape(w,[r(1),N/r(1)]);
0044 end
0045 return
0046 end

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