亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? qrj2d.m

?? 矩陣實驗室的內容
?? M
字號:
function [Y,B,varargout]=QRJ2D(X,varargin)
%QR based Jacbi-like JD; This function minimizes the cost 
%J_{2}=\sum{i=1}^{N} \|C_{i}-B^{-1}diag(BC_{i}B^{T})B^{-T}\|_{F}^{2}
%where \{C_{i}\}_{i=1}^{N} is a set of N, n\times n symmetric matrices 
%and B the joint diagonalizer sought.
%
%
%Standard usage: [Y,B]=QRJ2D(X), 
%Here X is a large matrix of size n\times nN which contains the 
%matrices to be jointly diagonalized such that X=[C1,C2,...,CN], 
%Y contains the jointly diagonalized version of the input 
%matrices, and B is the found diagonalizer.
%
%
%More controlled usage:[X,B,S,BB]=QRJ2D(X,'mode',ERR or ITER,RBALANCE): 
%
%'mode'='B' or 'E' or 'N':  In the 'B' mode the stopping criteria at each 
%                           step is max(max(abs(LU-I))) which measures 
%                           how much the diagonalizer B has changed
%                           after a sweep. In the 'E' mode 
%                           the stopping criterion is the difference between 
%                           the values of the cost function J2 in two consequtive 
%                           updates.In the 'N' mode the stopping criterion is 
%                           the number of sweeps over L and U phases. 
%
%ERR: In the 'B' mode it specifies the stopping value for the change in B i.e. max(max(abs(LU-I))).
%The default value for ERR in this mode and other modes including standard usage 
%is ERR=10^-5. In implementation of the algorithm in order to account 
%for dpendence of accuracy on the dimension n ERR is multiplied 
%by n the size of matrices for JD. In the 'E' mode ERR specifies the stopping value
%for the relative change of J_{2} in two consequetive sweeps. 
%In the 'B' or 'E' mode or the standard mode
%if the change in B or relative change in J2 does not reach ERR after the default number of 
%iterations (=200) then the program aborts and itreturns the current computed variables.
%
%ITER: Number of iterations in the 'N' mode  
%
%%RBALANCE: if given it is the period for row balancing after each sweep.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Outputs:
%Y= the diagonalized set of matrices
%B=the found joint diagonalizer
%S=a structure containing some information about the run program:
%          S.Iterations: number of iterations
%          S.LUerror: the LU error after each sweep
%          S.J2error: the J2 error after each sweep
%          S.J2RelativeError:the relative J2 error after each sweep
%BB=a three dimensional array containing the joint diagonalizer after each sweep
%Note: S and BB are not required as output in the function call
%
%This algorithm is based on a paper presented in ICA2006 conference and published in Springer LNCS
%Bijan Afsari, ''Simple LU and QR based Non-Orthogonal Matrix Joint Diagonalization''
%%Coded by Bijan Afsari. Please forward any questions and problem to bijan@glue.umd.edu
%v.1.1
%Acknowledgements: Some data structures and implementation ideas in this code are inspired from the code for JADE
%written by J.F. Cardoso and from the code FFDIAG written by Andreas Ziehe and Pavel Laskov
%Disclaimer: This code is to be used only for non-commercial research purposes and the author does not
%accept any reponsibility about its performance or fauilure

[n,m]=size(X);N=m/n;

BB=[];
%defaulat values
ERR=1*10^-5;RBALANCE=3;ITER=200;
%%%
MODE='B';
if nargin==0, display('you must enter the data'); B=eye(n); return; end;
if nargin==1, Err=ERR;Rbalance=RBALANCE;end;
if nargin> 1, MODE=upper(varargin{1});
   switch MODE
   case {'B'} 
      ERR=varargin{2}; mflag='D'; if ERR >= 1, disp('Error value should be much smaller than unity');B=[];S=[]; return; end;
   case ('E')
      ERR=varargin{2};mflag='E'; if ERR >=1, disp('Error value should be much smaller than unity'); B=[];S=[];return;end;
   case ('N');mflag='N'; ITER=varargin{2}; ERR=0; if ITER <= 1, disp('Number of itternations should be higher than one');B=[];S=[];return;end;
   end
end;
if nargin==4, RBALANCE=varargin{3}; if ceil(RBALANCE)~=RBALANCE | RBALANCE<1, disp('RBALANCE should be a positive integer');B=[];S=[];return;end;end;
JJ=[];EERR=[]; EERRJ2=[];  
X1=X;
B=eye(n,n);Binv=eye(n);
J=0;

for t=1:N
   J=J+norm(X1(:,(t-1)*n+1:t*n)-diag(diag(X(:,(t-1)*n+1:t*n))),'fro')^2;
end
JJ=[JJ,J];

%err=10^-3;
%the following part implements a sweep 
%%%%%%%%%%%%%%%%%%%%%%%%%%
err=ERR*n+1;
if MODE=='B', ERR=ERR*n;end,
   k=0;
   while err>ERR & k<ITER
      k=k+1;      
      L=eye(n);%Linv=eye(n);
      U=eye(n);%Uinv=eye(n);
      Dinv=eye(n);

      
for i=2:n,
   for j=1:i-1,
      G=[-X(i,[i:n:m])+X(j,[j:n:m]);-2*X(i,[j:n:m])];
      [U1,D1,V1]=svd(G*G');
      v=U1(:,1);
      tetha=1/2*atan(v(2)/v(1));
      c=cos(tetha);
      s=sin(tetha);
      h1=c*X(:,[j:n:m])-s*X(:,[i:n:m]);
      h2=c*X(:,[i:n:m])+s*X(:,[j:n:m]);
      X(:,[j:n:m])=h1;
      X(:,[i:n:m])=h2;
      h1=c*X(j,:)-s*X(i,:);
      h2=s*X(j,:)+c*X(i,:);
      X(j,:)=h1;
      X(i,:)=h2;
      %h1=c*U(:,j)+s*U(:,i);
      %h2=-s*U(:,j)+c*U(:,i);    
      h1=c*U(j,:)-s*U(i,:);
      h2=s*U(j,:)+c*U(i,:);
      U(j,:)=h1;
      U(i,:)=h2;
    
    end;%end for i
 end;%end for j

for j=1:n
   %for j=i+1:n
   for i=j+1:n
      
      xjj=X(j,j:n:m);
      xij=X(i,j:n:m);
      coff=[sum(xjj.^2),sum(xjj.*xij),sum(xij.^2)];
      %r=roots([4*coff(1),2*coff(2),coff(1)+2*coff(3),2*coff(2)]);
      r=roots([4*coff(1),6*coff(2),coff(1)+2*coff(3),1*coff(2)]);
      if ~isreal(r) a=r(find(imag(r)==0)); else coff4=[2*coff(1),4*coff(2),coff(1)+2*coff(3),2*coff(2),coff(3)];
         coff4=repmat(coff4,3,1);
         rr=[r.^4,r.^3,r.^2,r.^1,r.^0];
         [mm,ii]=min(diag(coff4*rr'));a=r(ii);
      end
      
      
      %coorelation quefficient
      %a=-(X(i,cindex)*X(j,cindex)')/(norm(X(i,cindex))*norm(X(j,cindex)));
      %a=tanh(a);
      %if abs(a)>1, a=sign(a)*1; end;
      X(i,:)=a*X(j,:)+X(i,:);
      I=i:n:m;
      J=j:n:m;
      X(:,I)=reshape(X(i,:),n,N);
      X(i,I)=X(i,I)+a*X(i,J);
      L(i,:)=L(i,:)+a*L(j,:);
   end%end loop over j
end

      
      
      B=L*U*B;%Binv=Binv*Uinv*Linv;
      %err=norm(L*U-eye(n,n),'fro');
      err=max(max(abs(L*U-eye(n))));EERR=[EERR,err];
      if rem(k,RBALANCE)==0
         d=sum(abs(X')); 
         D=diag(1./d*N); Dinv=diag(d*N);
         J=0;
         for t=1:N
            X(:,(t-1)*n+1:t*n)=D*X(:,(t-1)*n+1:t*n)*D;
         end;
         B=D*B; %Binv=Binv*Dinv;
      end
      BB(:,:,k)=B;
      J=0;
      Binv=inv(B);
      for t=1:N
         J=J+norm(X1(:,(t-1)*n+1:t*n)-Binv*diag(diag(X(:,(t-1)*n+1:t*n)))*Binv','fro')^2;
      end
      JJ=[JJ,J];
      if MODE=='E', err=abs(JJ(end-1)-JJ(end))/JJ(end-1);EERRJ2=[EERRJ2,err];end
   end
   Y=X;
   S=struct('iterations',k,'LUerror',EERR,'J2error',JJ,'J2RelativeError',EERRJ2);varargout{1}=S;varargout{2}=BB;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品国产a| 粉嫩绯色av一区二区在线观看| 五月天亚洲精品| 另类小说图片综合网| 成人黄页毛片网站| 欧美日韩国产精品成人| 久久精品视频在线免费观看| 樱花影视一区二区| 久久精品二区亚洲w码| 99精品视频在线观看| 91精品国产品国语在线不卡| 欧美激情一区二区三区在线| 亚洲大型综合色站| 国产高清久久久久| 8x8x8国产精品| 中文字幕第一区| 欧美aⅴ一区二区三区视频| 99国内精品久久| 久久久久久久久久久99999| 亚洲国产视频网站| 成人伦理片在线| 欧美电视剧在线看免费| 中文字幕日韩一区二区| 久久av中文字幕片| 欧美日韩精品免费| 亚洲免费三区一区二区| 成人午夜av在线| 日韩精品一区二区三区视频播放 | 国产成人鲁色资源国产91色综| 91福利视频久久久久| 国产人妖乱国产精品人妖| 日韩不卡免费视频| 91官网在线免费观看| 中文字幕中文乱码欧美一区二区| 国内成人精品2018免费看| 欧美精选在线播放| 亚洲图片欧美视频| 色狠狠色狠狠综合| 亚洲天堂久久久久久久| 成人h动漫精品一区二区| 久久久精品国产99久久精品芒果 | 美女高潮久久久| 欧美日韩大陆一区二区| 亚洲另类色综合网站| 99国产一区二区三精品乱码| 国产午夜久久久久| 国产一区二区三区久久久| 欧美成人vr18sexvr| 蜜臀精品一区二区三区在线观看 | 一本久久精品一区二区| 欧美极品xxx| 成人午夜看片网址| 国产精品不卡视频| 99视频超级精品| 亚洲精品高清视频在线观看| 色妹子一区二区| 亚洲日本欧美天堂| 欧美性xxxxxxxx| 婷婷夜色潮精品综合在线| 日韩一区二区视频在线观看| 琪琪久久久久日韩精品| 日韩欧美国产午夜精品| 激情成人综合网| 国产亲近乱来精品视频| 波多野结衣亚洲一区| 亚洲老司机在线| 欧美日韩夫妻久久| 免费高清不卡av| 337p日本欧洲亚洲大胆精品| 国产九色精品成人porny| 国产精品久线观看视频| 色综合久久88色综合天天| 亚洲国产成人91porn| 日韩精品一区二区三区三区免费 | 亚洲欧美电影院| 欧美日韩亚州综合| 免费在线观看视频一区| 久久久久久日产精品| 91香蕉视频黄| 日韩精品免费视频人成| 久久综合色天天久久综合图片| 成人免费毛片高清视频| 亚洲国产三级在线| 精品国产123| 91碰在线视频| 久久国产生活片100| 国产精品乱人伦一区二区| 欧美日韩国产三级| 国产精品亚洲专一区二区三区| 亚洲人妖av一区二区| 91精品国产综合久久久久久 | 这里只有精品电影| 国产精品夜夜爽| 亚洲在线视频网站| 久久精品亚洲麻豆av一区二区| 91色在线porny| 精品一区二区日韩| 亚洲国产va精品久久久不卡综合| 久久亚洲精品国产精品紫薇| 在线国产电影不卡| 国产经典欧美精品| 日本成人在线一区| 日韩理论片在线| 欧美精品一区二区三区蜜桃视频 | 欧美日韩三级视频| 粉嫩在线一区二区三区视频| 亚洲成在人线在线播放| 日本一区二区三级电影在线观看| 欧美绝品在线观看成人午夜影视| www.亚洲色图.com| 激情成人午夜视频| 性感美女久久精品| 亚洲欧洲国产日韩| 久久亚洲春色中文字幕久久久| 欧洲一区二区三区在线| 成人精品在线视频观看| 韩国一区二区在线观看| 亚洲福利视频三区| 亚洲免费av网站| 中文字幕高清一区| 久久久久国产精品免费免费搜索| 欧美精品一级二级三级| 色噜噜狠狠一区二区三区果冻| 丰满放荡岳乱妇91ww| 激情伊人五月天久久综合| 亚洲r级在线视频| 亚洲精品国产第一综合99久久| 中文成人av在线| 亚洲国产精品成人久久综合一区| 精品国内二区三区| 日韩欧美一级二级| 欧美一级欧美三级在线观看| 欧美人伦禁忌dvd放荡欲情| 欧美亚洲国产bt| 在线免费视频一区二区| 色又黄又爽网站www久久| 粉嫩aⅴ一区二区三区四区| 国内精品伊人久久久久av一坑| 美女任你摸久久| 蜜臀久久久久久久| 日本女人一区二区三区| 欧美96一区二区免费视频| 日本成人超碰在线观看| 三级精品在线观看| 日韩影院免费视频| 日韩电影在线一区二区三区| 日本午夜精品视频在线观看 | 看电视剧不卡顿的网站| 日本不卡免费在线视频| 麻豆精品精品国产自在97香蕉| 蜜臀av一区二区三区| 久久99精品国产91久久来源| 国产一区二区免费在线| 国产精品亚洲午夜一区二区三区 | 香蕉成人伊视频在线观看| 婷婷开心激情综合| 另类小说欧美激情| 韩日精品视频一区| 成人综合日日夜夜| 欧美在线综合视频| 91麻豆精品国产91久久久久久| 精品处破学生在线二十三| 久久精品视频网| 亚洲精品久久7777| 日韩制服丝袜av| 国产精品一区在线观看你懂的| fc2成人免费人成在线观看播放 | 正在播放亚洲一区| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 麻豆精品国产传媒mv男同| 国产精品综合二区| 91亚洲国产成人精品一区二区三| 欧美精品久久久久久久多人混战 | 欧美精品1区2区| 久久精品夜色噜噜亚洲a∨| 亚洲欧美激情在线| 老司机精品视频导航| www.亚洲免费av| 日韩一区二区免费在线电影| 国产欧美日韩综合| 亚洲国产视频网站| 国产精品综合二区| 欧美日韩一区二区三区四区五区| 精品少妇一区二区三区日产乱码 | 欧美一区二区三区视频在线| 久久日韩粉嫩一区二区三区 | 亚洲风情在线资源站| 国产麻豆成人精品| 欧美巨大另类极品videosbest | 中文在线免费一区三区高中清不卡| 亚洲中国最大av网站| 国产精品资源在线| 欧美精品欧美精品系列| 国产精品美女一区二区三区 | 久久九九久久九九| 日韩电影在线看| 91理论电影在线观看| 久久久亚洲欧洲日产国码αv| 亚洲国产你懂的| proumb性欧美在线观看|