fn_princomp.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
00029 template<typename T1>
00030 inline
00031 void
00032 princomp
00033 (
00034 Mat<typename T1::elem_type>& coeff_out,
00035 Mat<typename T1::elem_type>& score_out,
00036 Col<typename T1::pod_type>& latent_out,
00037 Col<typename T1::elem_type>& tsquared_out,
00038 const Base<typename T1::elem_type,T1>& X
00039 )
00040 {
00041 arma_extra_debug_sigprint();
00042
00043 typedef typename T1::elem_type eT;
00044
00045 const unwrap<T1> tmp(X.get_ref());
00046 const Mat<eT>& A = tmp.M;
00047
00048 op_princomp::direct_princomp(coeff_out, score_out, latent_out, tsquared_out, A);
00049 }
00050
00051
00052
00053
00054
00055
00056
00057
00058 template<typename T1>
00059 inline
00060 void
00061 princomp
00062 (
00063 Mat<typename T1::elem_type>& coeff_out,
00064 Mat<typename T1::elem_type>& score_out,
00065 Col<typename T1::pod_type>& latent_out,
00066 const Base<typename T1::elem_type,T1>& X
00067 )
00068 {
00069 arma_extra_debug_sigprint();
00070
00071 typedef typename T1::elem_type eT;
00072
00073 const unwrap<T1> tmp(X.get_ref());
00074 const Mat<eT>& A = tmp.M;
00075
00076 op_princomp::direct_princomp(coeff_out, score_out, latent_out, A);
00077 }
00078
00079
00080
00081
00082
00083
00084
00085 template<typename T1>
00086 inline
00087 void
00088 princomp
00089 (
00090 Mat<typename T1::elem_type>& coeff_out,
00091 Mat<typename T1::elem_type>& score_out,
00092 const Base<typename T1::elem_type,T1>& X
00093 )
00094 {
00095 arma_extra_debug_sigprint();
00096
00097 typedef typename T1::elem_type eT;
00098
00099 const unwrap<T1> tmp(X.get_ref());
00100 const Mat<eT>& A = tmp.M;
00101
00102 op_princomp::direct_princomp(coeff_out, score_out, A);
00103 }
00104
00105
00106
00107
00108
00109
00110 template<typename T1>
00111 inline
00112 const Op<T1, op_princomp>
00113 princomp(const Base<typename T1::elem_type,T1>& X)
00114 {
00115 arma_extra_debug_sigprint();
00116
00117 return Op<T1, op_princomp>(X.get_ref());
00118 }
00119
00120
00121
00122