Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

template<class ArrayT>
void Impala::Core::Matrix::MatSvdLpp ( ArrayT *  a,
ArrayT *&  u,
ArrayT *&  s,
ArrayT *&  v 
) [inline]

Definition at line 26 of file MatSVDLpp.h.

00027 {
00028     int m = a->H();
00029     int n = a->W();
00030 
00031     /* 
00032      * la::mat(double*v, int m, int n, bool row_ordering=false);->row_ordering is
00033      * true for c type arrays 
00034      * */
00035     
00036     LaGenMatDouble A(a->PB(),m,n,true);
00037     LaGenMatDouble ATmp(A);
00038     LaVectorDouble S(n);
00039     LaGenMatDouble U(m,m);
00040     LaGenMatDouble VT(n,n);
00041     
00042     /*
00043     * void LaSVD_IP(LaGenMatDouble& A, LaVectorDouble &Sigma,
00044     *  LaGenMatDouble& U, LaGenMatDouble& VT );
00045     */
00046     LaSVD_IP(ATmp,S,U,VT);
00047 
00048     //Copy the Results
00049     u=MatCreate<Mat>(m,m);
00050     for(int i=0;i<m;i++)
00051         for(int j=0;j<m;j++)
00052             u->SetValue(U(i,j),j,i);
00053 
00054     s=MatCreate<Mat>(m,n);
00055     for(int i=0;i<m;i++){
00056         for(int j=0;j<n;j++)
00057             s->SetValue(0,j,i);
00058         s->SetValue(S(i),i,i);
00059     }
00060 
00061     v=MatCreate<Mat>(n,n);
00062     for(int i=0;i<n;i++)
00063         for(int j=0;j<n;j++)
00064             v->SetValue(VT(i,j),j,i);
00065 
00066 }


Generated on Thu Jan 13 09:20:16 2011 for ImpalaSrc by  doxygen 1.5.1