fn_princomp_cov.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 template<typename T1>
00029 inline
00030 void
00031 princomp_cov
00032 (
00033 Mat<typename T1::elem_type>& coeff_out,
00034 Col<typename T1::pod_type>& latent_out,
00035 Col<typename T1::pod_type>& explained_out,
00036 const Base<typename T1::elem_type,T1>& X
00037 )
00038 {
00039 arma_extra_debug_sigprint();
00040
00041 typedef typename T1::elem_type eT;
00042
00043 const unwrap<T1> tmp(X.get_ref());
00044 const Mat<eT>& A = tmp.M;
00045
00046 op_princomp_cov::direct_princomp_cov(coeff_out, latent_out, explained_out, A);
00047 }
00048
00049
00050
00051
00052
00053
00054
00055 template<typename T1>
00056 inline
00057 void
00058 princomp_cov
00059 (
00060 Mat<typename T1::elem_type>& coeff_out,
00061 Col<typename T1::pod_type>& latent_out,
00062 const Base<typename T1::elem_type,T1>& X
00063 )
00064 {
00065 arma_extra_debug_sigprint();
00066
00067 typedef typename T1::elem_type eT;
00068
00069 const unwrap<T1> tmp(X.get_ref());
00070 const Mat<eT>& A = tmp.M;
00071
00072 op_princomp_cov::direct_princomp_cov(coeff_out, latent_out, A);
00073 }
00074
00075
00076
00077
00078
00079
00080 template<typename T1>
00081 inline
00082 const Op<T1, op_princomp_cov>
00083 princomp_cov(const Base<typename T1::elem_type,T1>& X)
00084 {
00085 arma_extra_debug_sigprint();
00086
00087 return Op<T1, op_princomp_cov>(X.get_ref());
00088 }
00089
00090
00091
00092