Fn_conv_to

Classes

class  conv_to< out_eT >
class  conv_to< Mat< out_eT > >
class  conv_to< Row< out_eT > >
class  conv_to< Col< out_eT > >
class  conv_to< Cube< out_eT > >
class  conv_to< itpp::Mat< out_eT > >
class  conv_to< itpp::Vec< out_eT > >

Functions

template<typename out_eT , typename in_eT >
arma_inline void copy_complex_elem (out_eT &out, const in_eT &in)
template<typename out_eT , typename in_T >
arma_inline void copy_complex_elem (out_eT &out, const std::complex< in_T > &in)
template<typename out_T , typename in_T >
arma_inline void copy_complex_elem (std::complex< out_T > &out, const std::complex< in_T > &in)
static out_eT conv_to::from (const Mat< out_eT > &in)
template<typename in_eT >
static out_eT conv_to::from (const Mat< in_eT > &in)
template<typename in_eT , typename T1 >
static out_eT conv_to::from (const Base< in_eT, T1 > &in)
static out_eT conv_to::from (const Cube< out_eT > &in)
template<typename in_eT >
static out_eT conv_to::from (const Cube< in_eT > &in)
template<typename in_eT , typename T1 >
static out_eT conv_to::from (const BaseCube< in_eT, T1 > &in)
template<typename in_eT >
static Mat< out_eT > conv_to< Mat< out_eT > >::from (const Mat< in_eT > &in)
template<typename in_T >
static Mat< out_eT > conv_to< Mat< out_eT > >::from (const Mat< std::complex< in_T > > &in)
template<typename in_eT , typename T1 >
static Mat< out_eT > conv_to< Mat< out_eT > >::from (const Base< in_eT, T1 > &in)
template<typename in_eT >
static Mat< out_eT > conv_to< Mat< out_eT > >::from (const itpp::Mat< in_eT > &in)
template<typename in_T >
static Mat< out_eT > conv_to< Mat< out_eT > >::from (const itpp::Mat< std::complex< in_T > > &in)
static Row< out_eT > conv_to< Row< out_eT > >::from (const Mat< out_eT > &in)
template<typename in_eT >
static Row< out_eT > conv_to< Row< out_eT > >::from (const Mat< in_eT > &in)
template<typename in_T >
static Row< out_eT > conv_to< Row< out_eT > >::from (const Mat< std::complex< in_T > > &in)
template<typename in_eT , typename T1 >
static Row< out_eT > conv_to< Row< out_eT > >::from (const Base< in_eT, T1 > &in)
template<typename in_eT >
static Row< out_eT > conv_to< Row< out_eT > >::from (const itpp::Vec< in_eT > &in)
template<typename in_T >
static Row< out_eT > conv_to< Row< out_eT > >::from (const itpp::Vec< std::complex< in_T > > &in)
static Col< out_eT > conv_to< Col< out_eT > >::from (const Mat< out_eT > &in)
template<typename in_eT >
static Col< out_eT > conv_to< Col< out_eT > >::from (const Mat< in_eT > &in)
template<typename in_T >
static Col< out_eT > conv_to< Col< out_eT > >::from (const Mat< std::complex< in_T > > &in)
template<typename in_eT , typename T1 >
static Col< out_eT > conv_to< Col< out_eT > >::from (const Base< in_eT, T1 > &in)
template<typename in_eT >
static Col< out_eT > conv_to< Col< out_eT > >::from (const itpp::Vec< in_eT > &in)
template<typename in_T >
static Col< out_eT > conv_to< Col< out_eT > >::from (const itpp::Vec< std::complex< in_T > > &in)
template<typename in_eT >
static Cube< out_eT > conv_to< Cube< out_eT > >::from (const Cube< in_eT > &in)
template<typename in_T >
static Cube< out_eT > conv_to< Cube< out_eT > >::from (const Cube< std::complex< in_T > > &in)
template<typename in_eT , typename T1 >
static Cube< out_eT > conv_to< Cube< out_eT > >::from (const BaseCube< in_eT, T1 > &in)
static itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from (const Mat< out_eT > &in)
static itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from (const Col< out_eT > &in)
static itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from (const Row< out_eT > &in)
template<typename in_eT >
static itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from (const Mat< in_eT > &in)
template<typename in_eT >
static itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from (const Col< in_eT > &in)
template<typename in_eT >
static itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from (const Row< in_eT > &in)
template<typename in_T >
static itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from (const Mat< std::complex< in_T > > &in)
template<typename in_T >
static itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from (const Col< std::complex< in_T > > &in)
template<typename in_T >
static itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from (const Row< std::complex< in_T > > &in)
template<typename in_eT , typename T1 >
static itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from (const Base< in_eT, T1 > &in)
static itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from (const Mat< out_eT > &in)
template<typename in_eT >
static itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from (const Mat< in_eT > &in)
template<typename in_T >
static itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from (const Mat< std::complex< in_T > > &in)
template<typename in_eT >
static itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from (const Col< in_eT > &in)
template<typename in_T >
static itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from (const Col< std::complex< in_T > > &in)
template<typename in_eT >
static itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from (const Row< in_eT > &in)
template<typename in_T >
static itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from (const Row< std::complex< in_T > > &in)
template<typename in_eT , typename T1 >
static itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from (const Base< in_eT, T1 > &in)

Function Documentation

template<typename out_eT , typename in_eT >
arma_inline void copy_complex_elem ( out_eT &  out,
const in_eT &  in 
) [inline]
template<typename out_eT , typename in_T >
arma_inline void copy_complex_elem ( out_eT &  out,
const std::complex< in_T > &  in 
) [inline]

Definition at line 40 of file fn_conv_to.hpp.

00041   {
00042   //arma_extra_debug_sigprint();
00043   
00044   out = out_eT( in.real() );
00045   }

template<typename out_T , typename in_T >
arma_inline void copy_complex_elem ( std::complex< out_T > &  out,
const std::complex< in_T > &  in 
) [inline]

Definition at line 52 of file fn_conv_to.hpp.

00053   {
00054   //arma_extra_debug_sigprint();
00055   
00056   typedef std::complex<out_T> out_eT;
00057   out = out_eT(in);
00058   }

template<typename out_eT >
out_eT conv_to< out_eT >::from ( const Mat< out_eT > &  in  )  [inline, static, inherited]

Definition at line 95 of file fn_conv_to.hpp.

References Mat< eT >::mem, and Mat< eT >::n_elem.

Referenced by conv_to< out_eT >::from().

00096   {
00097   arma_extra_debug_sigprint();
00098   
00099   arma_debug_check( (in.n_elem != 1), "conv_to<>: matrix doesn't have exactly one element" );
00100   
00101   return in.mem[0];
00102   }

template<typename out_eT >
template<typename in_eT >
out_eT conv_to< out_eT >::from ( const Mat< in_eT > &  in  )  [inline, static, inherited]

Definition at line 110 of file fn_conv_to.hpp.

References copy_complex_elem(), Mat< eT >::mem, and Mat< eT >::n_elem.

00111   {
00112   arma_extra_debug_sigprint();
00113   
00114   arma_type_check< is_supported_elem_type<out_eT>::value == false >::apply();
00115   
00116   arma_debug_check( (in.n_elem != 1), "conv_to<>: matrix doesn't have exactly one element" );
00117   
00118   out_eT out;
00119   copy_complex_elem(out, in.mem[0]);
00120   
00121   return out;
00122   }

template<typename out_eT >
template<typename in_eT , typename T1 >
out_eT conv_to< out_eT >::from ( const Base< in_eT, T1 > &  in  )  [inline, static, inherited]

Definition at line 130 of file fn_conv_to.hpp.

References conv_to< out_eT >::from(), and Base< elem_type, derived >::get_ref().

00131   {
00132   arma_extra_debug_sigprint();
00133   
00134   arma_type_check< is_supported_elem_type<out_eT>::value == false >::apply();
00135   
00136   const unwrap<T1> tmp(in.get_ref());
00137 
00138   return conv_to<out_eT>::from( tmp.M );
00139   }

template<typename out_eT >
out_eT conv_to< out_eT >::from ( const Cube< out_eT > &  in  )  [inline, static, inherited]

Definition at line 146 of file fn_conv_to.hpp.

References Cube< eT >::mem, and Cube< eT >::n_elem.

00147   {
00148   arma_extra_debug_sigprint();
00149   
00150   arma_debug_check( (in.n_elem != 1), "conv_to<>: cube doesn't have exactly one element" );
00151   
00152   return in.mem[0];
00153   }

template<typename out_eT >
template<typename in_eT >
out_eT conv_to< out_eT >::from ( const Cube< in_eT > &  in  )  [inline, static, inherited]

Definition at line 161 of file fn_conv_to.hpp.

References copy_complex_elem(), Cube< eT >::mem, and Cube< eT >::n_elem.

00162   {
00163   arma_extra_debug_sigprint();
00164   
00165   arma_type_check< is_supported_elem_type<out_eT>::value == false >::apply();
00166   
00167   arma_debug_check( (in.n_elem != 1), "conv_to<>: cube doesn't have exactly one element" );
00168   
00169   out_eT out;
00170   copy_complex_elem(out, in.mem[0]);
00171   
00172   return out;
00173   }

template<typename out_eT >
template<typename in_eT , typename T1 >
out_eT conv_to< out_eT >::from ( const BaseCube< in_eT, T1 > &  in  )  [inline, static, inherited]

Definition at line 181 of file fn_conv_to.hpp.

References conv_to< out_eT >::from(), and BaseCube< elem_type, derived >::get_ref().

00182   {
00183   arma_extra_debug_sigprint();
00184   
00185   arma_type_check< is_supported_elem_type<out_eT>::value == false >::apply();
00186   
00187   const unwrap_cube<T1> tmp(in.get_ref());
00188 
00189   return conv_to<out_eT>::from( tmp.M );
00190   }

template<typename out_eT >
template<typename in_eT >
Mat< out_eT > conv_to< Mat< out_eT > >::from ( const Mat< in_eT > &  in  )  [inline, static, inherited]

Definition at line 234 of file fn_conv_to.hpp.

References Mat< eT >::memptr(), and Mat< eT >::n_elem.

00235   {
00236   arma_extra_debug_sigprint();
00237   
00238   Mat<out_eT> out(in.n_rows, in.n_cols);
00239   
00240   const in_eT*  in_mem = in.mem;
00241   out_eT*      out_mem = out.memptr();
00242   
00243   for(u32 i=0; i<out.n_elem; ++i)
00244     {
00245     out_mem[i] = out_eT( in_mem[i] );
00246     }
00247   
00248   return out;
00249   }

template<typename out_eT >
template<typename in_T >
Mat< out_eT > conv_to< Mat< out_eT > >::from ( const Mat< std::complex< in_T > > &  in  )  [inline, static, inherited]

Definition at line 257 of file fn_conv_to.hpp.

References copy_complex_elem(), Mat< eT >::memptr(), and Mat< eT >::n_elem.

00258   {
00259   arma_extra_debug_sigprint();
00260   
00261   typedef std::complex<in_T> in_eT; 
00262   
00263   Mat<out_eT> out(in.n_rows, in.n_cols);
00264   
00265   const in_eT*  in_mem = in.mem;
00266   out_eT*      out_mem = out.memptr();
00267   
00268   for(u32 i=0; i<out.n_elem; ++i)
00269     {
00270     copy_complex_elem(out_mem[i], in_mem[i]);
00271     }
00272   
00273   return out;
00274   }

template<typename out_eT >
template<typename in_eT , typename T1 >
Mat< out_eT > conv_to< Mat< out_eT > >::from ( const Base< in_eT, T1 > &  in  )  [inline, static, inherited]

Definition at line 282 of file fn_conv_to.hpp.

00283   {
00284   arma_extra_debug_sigprint();
00285   
00286   const unwrap<T1> tmp(in.get_ref());
00287 
00288   return conv_to< Mat<out_eT> >::from( tmp.M );
00289   }

template<typename out_eT >
template<typename in_eT >
Mat< out_eT > conv_to< Mat< out_eT > >::from ( const itpp::Mat< in_eT > &  in  )  [inline, static, inherited]

Definition at line 297 of file fn_conv_to.hpp.

00298   {
00299   arma_extra_debug_sigprint();
00300   
00301   Mat<out_eT> out(in.rows(), in.cols());
00302   
00303   const in_eT*  in_mem = in._data();
00304   out_eT*      out_mem = out.memptr();
00305   
00306   for(u32 i=0; i<out.n_elem; ++i)
00307     {
00308     out_mem[i] = out_eT( in_mem[i] );
00309     }
00310   
00311   return out;
00312   }

template<typename out_eT >
template<typename in_T >
Mat< out_eT > conv_to< Mat< out_eT > >::from ( const itpp::Mat< std::complex< in_T > > &  in  )  [inline, static, inherited]

Definition at line 320 of file fn_conv_to.hpp.

References copy_complex_elem().

00321   {
00322   arma_extra_debug_sigprint();
00323   
00324   typedef std::complex<in_T> in_eT; 
00325   
00326   Mat<out_eT> out(in.rows(), in.cols());
00327   
00328   const in_eT*  in_mem = in._data();
00329   out_eT*      out_mem = out.memptr();
00330   
00331   for(u32 i=0; i<out.n_elem; ++i)
00332     {
00333     copy_complex_elem(out_mem[i], in_mem[i]);
00334     }
00335   
00336   return out;
00337   }

template<typename out_eT >
Row< out_eT > conv_to< Row< out_eT > >::from ( const Mat< out_eT > &  in  )  [inline, static, inherited]

Definition at line 380 of file fn_conv_to.hpp.

References syslib::copy_elem(), Mat< eT >::memptr(), and Mat< eT >::n_elem.

00381   {
00382   arma_extra_debug_sigprint();
00383   
00384   arma_debug_check( (in.n_rows > 1), "conv_to<>: given matrix has more than one row");
00385   Row<out_eT> out(in.n_cols);
00386   
00387   syslib::copy_elem(out.memptr(), in.mem, out.n_elem);
00388   
00389   
00390   return out;
00391   }

template<typename out_eT >
template<typename in_eT >
Row< out_eT > conv_to< Row< out_eT > >::from ( const Mat< in_eT > &  in  )  [inline, static, inherited]

Definition at line 399 of file fn_conv_to.hpp.

References Mat< eT >::memptr(), and Mat< eT >::n_elem.

00400   {
00401   arma_extra_debug_sigprint();
00402   
00403   arma_debug_check( (in.n_rows > 1), "conv_to<>: given matrix has more than one row");
00404   Row<out_eT> out(in.n_cols);
00405   
00406   const in_eT*  in_mem = in.mem;
00407   out_eT*      out_mem = out.memptr();
00408   
00409   for(u32 i=0; i<out.n_elem; ++i)
00410     {
00411     out_mem[i] = out_eT( in_mem[i] );
00412     }
00413   
00414   return out;
00415   }

template<typename out_eT >
template<typename in_T >
Row< out_eT > conv_to< Row< out_eT > >::from ( const Mat< std::complex< in_T > > &  in  )  [inline, static, inherited]

Definition at line 423 of file fn_conv_to.hpp.

References copy_complex_elem(), Mat< eT >::memptr(), and Mat< eT >::n_elem.

00424   {
00425   arma_extra_debug_sigprint();
00426   
00427   typedef std::complex<in_T> in_eT; 
00428   
00429   arma_debug_check( (in.n_rows > 1), "conv_to<>: given matrix has more than one row");
00430   Row<out_eT> out(in.n_cols);
00431   
00432   const in_eT*  in_mem = in.mem;
00433   out_eT*      out_mem = out.memptr();
00434   
00435   for(u32 i=0; i<out.n_elem; ++i)
00436     {
00437     copy_complex_elem(out_mem[i], in_mem[i]);
00438     }
00439   
00440   return out;
00441   }

template<typename out_eT >
template<typename in_eT , typename T1 >
Row< out_eT > conv_to< Row< out_eT > >::from ( const Base< in_eT, T1 > &  in  )  [inline, static, inherited]

Definition at line 449 of file fn_conv_to.hpp.

00450   {
00451   arma_extra_debug_sigprint();
00452 
00453   const unwrap<T1> tmp(in.get_ref());
00454   
00455   return conv_to< Row<out_eT> >::from( tmp.M );
00456   }

template<typename out_eT >
template<typename in_eT >
Row< out_eT > conv_to< Row< out_eT > >::from ( const itpp::Vec< in_eT > &  in  )  [inline, static, inherited]

Definition at line 464 of file fn_conv_to.hpp.

00465   {
00466   arma_extra_debug_sigprint();
00467   
00468   Row<out_eT> out(in.length());
00469   
00470   const in_eT*  in_mem = in._data();
00471   out_eT*      out_mem = out.memptr();
00472   
00473   for(u32 i=0; i<out.n_elem; ++i)
00474     {
00475     out_mem[i] = out_eT( in_mem[i] );
00476     }
00477   
00478   return out;
00479   }

template<typename out_eT >
template<typename in_T >
Row< out_eT > conv_to< Row< out_eT > >::from ( const itpp::Vec< std::complex< in_T > > &  in  )  [inline, static, inherited]

Definition at line 487 of file fn_conv_to.hpp.

References copy_complex_elem().

00488   {
00489   arma_extra_debug_sigprint();
00490   
00491   typedef std::complex<in_T> in_eT; 
00492   
00493   Row<out_eT> out(in.length());
00494   
00495   const in_eT*  in_mem = in._data();
00496   out_eT*      out_mem = out.memptr();
00497   
00498   for(u32 i=0; i<out.n_elem; ++i)
00499     {
00500     copy_complex_elem(out_mem[i], in_mem[i]);
00501     }
00502   
00503   return out;
00504   }

template<typename out_eT >
Col< out_eT > conv_to< Col< out_eT > >::from ( const Mat< out_eT > &  in  )  [inline, static, inherited]

Definition at line 607 of file fn_conv_to.hpp.

References syslib::copy_elem(), Mat< eT >::memptr(), and Mat< eT >::n_elem.

00608   {
00609   arma_extra_debug_sigprint();
00610   
00611   arma_debug_check( (in.n_cols > 1), "conv_to<>: given matrix has more than one column");
00612   Col<out_eT> out(in.n_rows);
00613   
00614   syslib::copy_elem(out.memptr(), in.mem, out.n_elem);
00615   
00616   return out;
00617   }

template<typename out_eT >
template<typename in_eT >
Col< out_eT > conv_to< Col< out_eT > >::from ( const Mat< in_eT > &  in  )  [inline, static, inherited]

Definition at line 625 of file fn_conv_to.hpp.

References Mat< eT >::memptr(), and Mat< eT >::n_elem.

00626   {
00627   arma_extra_debug_sigprint();
00628   
00629   arma_debug_check( (in.n_cols > 1), "conv_to<>: given matrix has more than one column");
00630   Col<out_eT> out(in.n_rows);
00631   
00632   const in_eT*  in_mem = in.mem;
00633   out_eT*      out_mem = out.memptr();
00634   
00635   for(u32 i=0; i<out.n_elem; ++i)
00636     {
00637     out_mem[i] = out_eT( in_mem[i] );
00638     }
00639   
00640   return out;
00641   }

template<typename out_eT >
template<typename in_T >
Col< out_eT > conv_to< Col< out_eT > >::from ( const Mat< std::complex< in_T > > &  in  )  [inline, static, inherited]

Definition at line 649 of file fn_conv_to.hpp.

References copy_complex_elem(), Mat< eT >::memptr(), and Mat< eT >::n_elem.

00650   {
00651   arma_extra_debug_sigprint();
00652   
00653   typedef std::complex<in_T> in_eT; 
00654   
00655   arma_debug_check( (in.n_cols > 1), "conv_to<>: given matrix has more than one column");
00656   Col<out_eT> out(in.n_rows);
00657   
00658   const in_eT*  in_mem = in.mem;
00659   out_eT*      out_mem = out.memptr();
00660   
00661   for(u32 i=0; i<out.n_elem; ++i)
00662     {
00663     copy_complex_elem(out_mem[i], in_mem[i]);
00664     }
00665   
00666   return out;
00667   }

template<typename out_eT >
template<typename in_eT , typename T1 >
Col< out_eT > conv_to< Col< out_eT > >::from ( const Base< in_eT, T1 > &  in  )  [inline, static, inherited]

Definition at line 675 of file fn_conv_to.hpp.

00676   {
00677   arma_extra_debug_sigprint();
00678   
00679   const unwrap<T1> tmp(in.get_ref());
00680   
00681   return conv_to< Col<out_eT> >::from( tmp.M );
00682   }

template<typename out_eT >
template<typename in_eT >
Col< out_eT > conv_to< Col< out_eT > >::from ( const itpp::Vec< in_eT > &  in  )  [inline, static, inherited]

Definition at line 690 of file fn_conv_to.hpp.

00691   {
00692   arma_extra_debug_sigprint();
00693   
00694   Col<out_eT> out(in.length());
00695   
00696   const in_eT*  in_mem = in._data();
00697   out_eT*      out_mem = out.memptr();
00698   
00699   for(u32 i=0; i<out.n_elem; ++i)
00700     {
00701     out_mem[i] = out_eT( in_mem[i] );
00702     }
00703   
00704   return out;
00705   }

template<typename out_eT >
template<typename in_T >
Col< out_eT > conv_to< Col< out_eT > >::from ( const itpp::Vec< std::complex< in_T > > &  in  )  [inline, static, inherited]

Definition at line 713 of file fn_conv_to.hpp.

References copy_complex_elem().

00714   {
00715   arma_extra_debug_sigprint();
00716   
00717   typedef std::complex<in_T> in_eT; 
00718   
00719   Col<out_eT> out(in.length());
00720   
00721   const in_eT*  in_mem = in._data();
00722   out_eT*      out_mem = out.memptr();
00723   
00724   for(u32 i=0; i<out.n_elem; ++i)
00725     {
00726     copy_complex_elem(out_mem[i], in_mem[i]);
00727     }
00728   
00729   return out;
00730   }

template<typename out_eT >
template<typename in_eT >
Cube< out_eT > conv_to< Cube< out_eT > >::from ( const Cube< in_eT > &  in  )  [inline, static, inherited]

Definition at line 819 of file fn_conv_to.hpp.

References Cube< eT >::memptr(), and Cube< eT >::n_elem.

00820   {
00821   arma_extra_debug_sigprint();
00822   
00823   Cube<out_eT> out(in.n_rows, in.n_cols, in.n_slices);
00824   
00825   const in_eT*  in_mem = in.mem;
00826   out_eT*      out_mem = out.memptr();
00827   
00828   for(u32 i=0; i<out.n_elem; ++i)
00829     {
00830     out_mem[i] = out_eT( in_mem[i] );
00831     }
00832   
00833   return out;
00834   }

template<typename out_eT >
template<typename in_T >
Cube< out_eT > conv_to< Cube< out_eT > >::from ( const Cube< std::complex< in_T > > &  in  )  [inline, static, inherited]

Definition at line 842 of file fn_conv_to.hpp.

References copy_complex_elem(), Cube< eT >::memptr(), and Cube< eT >::n_elem.

00843   {
00844   arma_extra_debug_sigprint();
00845   
00846   typedef std::complex<in_T> in_eT; 
00847   
00848   Cube<out_eT> out(in.n_rows, in.n_cols, in.n_slices);
00849   
00850   const in_eT*  in_mem = in.mem;
00851   out_eT*      out_mem = out.memptr();
00852   
00853   for(u32 i=0; i<out.n_elem; ++i)
00854     {
00855     copy_complex_elem(out_mem[i], in_mem[i]);
00856     }
00857   
00858   return out;
00859   }

template<typename out_eT >
template<typename in_eT , typename T1 >
Cube< out_eT > conv_to< Cube< out_eT > >::from ( const BaseCube< in_eT, T1 > &  in  )  [inline, static, inherited]

Definition at line 867 of file fn_conv_to.hpp.

00868   {
00869   arma_extra_debug_sigprint();
00870   
00871   const unwrap_cube<T1> tmp(in.get_ref());
00872 
00873   return conv_to< Mat<out_eT> >::from( tmp.M );
00874   }

template<typename out_eT >
itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from ( const Mat< out_eT > &  in  )  [inline, static, inherited]

Definition at line 928 of file fn_conv_to.hpp.

References itpp::Mat< eT >::_data(), and syslib::copy_elem().

00929   {
00930   arma_extra_debug_sigprint();
00931   
00932   itpp::Mat<out_eT> out(in.n_rows, in.n_cols);
00933   
00934   syslib::copy_elem(out._data(), in.mem, in.n_elem);
00935   
00936   return out;
00937   }

template<typename out_eT >
itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from ( const Col< out_eT > &  in  )  [inline, static, inherited]

Definition at line 944 of file fn_conv_to.hpp.

00945   {
00946   arma_extra_debug_sigprint();
00947   
00948   return conv_to< itpp::Mat<out_eT> >::from( reinterpret_cast<const Mat<out_eT>& >(in) );
00949   }

template<typename out_eT >
itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from ( const Row< out_eT > &  in  )  [inline, static, inherited]

Definition at line 956 of file fn_conv_to.hpp.

00957   {
00958   arma_extra_debug_sigprint();
00959   
00960   return conv_to< itpp::Mat<out_eT> >::from( reinterpret_cast<const Mat<out_eT>& >(in) );
00961   }

template<typename out_eT >
template<typename in_eT >
itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from ( const Mat< in_eT > &  in  )  [inline, static, inherited]

Definition at line 969 of file fn_conv_to.hpp.

References itpp::Mat< eT >::_data().

00970   {
00971   arma_extra_debug_sigprint();
00972   
00973   itpp::Mat<out_eT> out(in.n_rows, in.n_cols);
00974   
00975   const in_eT* in_mem = in.memptr();
00976   out_eT*     out_mem = out._data();
00977   
00978   for(u32 i=0; i<in.n_elem; ++i)
00979     {
00980     out_mem[i] = out_eT( in_mem[i] );
00981     }
00982   
00983   return out;
00984   }

template<typename out_eT >
template<typename in_eT >
itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from ( const Col< in_eT > &  in  )  [inline, static, inherited]

Definition at line 992 of file fn_conv_to.hpp.

00993   {
00994   arma_extra_debug_sigprint();
00995   
00996   return conv_to< itpp::Mat<out_eT> >::from( reinterpret_cast<const Mat<in_eT>& >(in) );
00997   }

template<typename out_eT >
template<typename in_eT >
itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from ( const Row< in_eT > &  in  )  [inline, static, inherited]

Definition at line 1005 of file fn_conv_to.hpp.

01006   {
01007   arma_extra_debug_sigprint();
01008   
01009   return conv_to< itpp::Mat<out_eT> >::from( reinterpret_cast<const Mat<in_eT>& >(in) );
01010   }

template<typename out_eT >
template<typename in_T >
itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from ( const Mat< std::complex< in_T > > &  in  )  [inline, static, inherited]

Definition at line 1018 of file fn_conv_to.hpp.

References itpp::Mat< eT >::_data(), and copy_complex_elem().

01019   {
01020   arma_extra_debug_sigprint();
01021   
01022   typedef std::complex<in_T> in_eT; 
01023   
01024   itpp::Mat<out_eT> out(in.n_rows, in.n_cols);
01025   
01026   const in_eT* in_mem = in.memptr();
01027   out_eT*     out_mem = out._data();
01028   
01029   for(u32 i=0; i<in.n_elem; ++i)
01030     {
01031     copy_complex_elem(out_mem[i], in_mem[i]);
01032     }
01033   
01034   return out;
01035   }

template<typename out_eT >
template<typename in_T >
itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from ( const Col< std::complex< in_T > > &  in  )  [inline, static, inherited]

Definition at line 1043 of file fn_conv_to.hpp.

01044   {
01045   arma_extra_debug_sigprint();
01046   
01047   return conv_to< itpp::Mat<out_eT> >::from( reinterpret_cast<const Mat< std::complex<in_T> >& >(in) );
01048   }

template<typename out_eT >
template<typename in_T >
itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from ( const Row< std::complex< in_T > > &  in  )  [inline, static, inherited]

Definition at line 1056 of file fn_conv_to.hpp.

01057   {
01058   arma_extra_debug_sigprint();
01059   
01060   return conv_to< itpp::Mat<out_eT> >::from( reinterpret_cast<const Mat< std::complex<in_T> >& >(in) );
01061   }

template<typename out_eT >
template<typename in_eT , typename T1 >
itpp::Mat< out_eT > conv_to< itpp::Mat< out_eT > >::from ( const Base< in_eT, T1 > &  in  )  [inline, static, inherited]

Definition at line 1069 of file fn_conv_to.hpp.

01070   {
01071   arma_extra_debug_sigprint();
01072   
01073   const unwrap<T1> tmp(in.get_ref());
01074 
01075   return conv_to< itpp::Mat<out_eT> >::from( tmp.M );
01076   }

template<typename out_eT >
itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from ( const Mat< out_eT > &  in  )  [inline, static, inherited]

Definition at line 1124 of file fn_conv_to.hpp.

References itpp::Vec< eT >::_data(), and syslib::copy_elem().

01125   {
01126   arma_extra_debug_sigprint();
01127   
01128   arma_debug_check( ( (in.n_cols != 1) && (in.n_rows != 1) ), "conv_to<>: given matrix can't be interpreted as a vector");
01129   
01130   itpp::Vec<out_eT> out(in.n_elem);
01131   
01132   syslib::copy_elem(out._data(), in.mem, in.n_elem);
01133   
01134   return out;
01135   }

template<typename out_eT >
template<typename in_eT >
itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from ( const Mat< in_eT > &  in  )  [inline, static, inherited]

Definition at line 1143 of file fn_conv_to.hpp.

References itpp::Vec< eT >::_data().

01144   {
01145   arma_extra_debug_sigprint();
01146   
01147   arma_debug_check( ( (in.n_cols != 1) && (in.n_rows != 1) ), "conv_to<>: given matrix can't be interpreted as a vector");
01148   itpp::Vec<out_eT> out(in.n_elem);
01149   
01150   const in_eT*  in_mem = in.memptr();
01151   out_eT*      out_mem = out._data();
01152   
01153   for(u32 i=0; i<in.n_elem; ++i)
01154     {
01155     out_mem[i] = out_eT( in_mem[i] );
01156     }
01157   
01158   return out;
01159   }

template<typename out_eT >
template<typename in_T >
itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from ( const Mat< std::complex< in_T > > &  in  )  [inline, static, inherited]

Definition at line 1167 of file fn_conv_to.hpp.

References itpp::Vec< eT >::_data(), and copy_complex_elem().

01168   {
01169   arma_extra_debug_sigprint();
01170   
01171   typedef std::complex<in_T> in_eT; 
01172   
01173   arma_debug_check( ( (in.n_cols != 1) && (in.n_rows != 1) ), "conv_to<>: given matrix can't be interpreted as a vector");
01174   
01175   itpp::Vec<out_eT> out(in.n_elem);
01176   
01177   const in_eT*  in_mem = in.memptr();
01178   out_eT*      out_mem = out._data();
01179   
01180   for(u32 i=0; i<in.n_elem; ++i)
01181     {
01182     copy_complex_elem(out_mem[i], in_mem[i]);
01183     }
01184   
01185   return out;
01186   }

template<typename out_eT >
template<typename in_eT >
itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from ( const Col< in_eT > &  in  )  [inline, static, inherited]

Definition at line 1194 of file fn_conv_to.hpp.

References itpp::Vec< eT >::_data().

01195   {
01196   arma_extra_debug_sigprint();
01197   
01198   itpp::Vec<out_eT> out(in.n_elem);
01199   
01200   const in_eT*  in_mem = in.memptr();
01201   out_eT*      out_mem = out._data();
01202   
01203   for(u32 i=0; i<in.n_elem; ++i)
01204     {
01205     out_mem[i] = out_eT( in_mem[i] );
01206     }
01207   
01208   return out;
01209   }

template<typename out_eT >
template<typename in_T >
itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from ( const Col< std::complex< in_T > > &  in  )  [inline, static, inherited]

Definition at line 1217 of file fn_conv_to.hpp.

References itpp::Vec< eT >::_data(), and copy_complex_elem().

01218   {
01219   arma_extra_debug_sigprint();
01220   
01221   typedef std::complex<in_T> in_eT; 
01222   
01223   itpp::Vec<out_eT> out(in.n_elem);
01224   
01225   const in_eT*  in_mem = in.memptr();
01226   out_eT*      out_mem = out._data();
01227   
01228   for(u32 i=0; i<in.n_elem; ++i)
01229     {
01230     copy_complex_elem(out_mem[i], in_mem[i]);
01231     }
01232   
01233   return out;
01234   }

template<typename out_eT >
template<typename in_eT >
itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from ( const Row< in_eT > &  in  )  [inline, static, inherited]

Definition at line 1242 of file fn_conv_to.hpp.

References itpp::Vec< eT >::_data().

01243   {
01244   arma_extra_debug_sigprint();
01245   
01246   itpp::Vec<out_eT> out(in.n_elem);
01247   
01248   const in_eT*  in_mem = in.memptr();
01249   out_eT*      out_mem = out._data();
01250   
01251   for(u32 i=0; i<in.n_elem; ++i)
01252     {
01253     out_mem[i] = out_eT( in_mem[i] );
01254     }
01255   
01256   return out;
01257   }

template<typename out_eT >
template<typename in_T >
itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from ( const Row< std::complex< in_T > > &  in  )  [inline, static, inherited]

Definition at line 1265 of file fn_conv_to.hpp.

References itpp::Vec< eT >::_data(), and copy_complex_elem().

01266   {
01267   arma_extra_debug_sigprint();
01268   
01269   typedef std::complex<in_T> in_eT; 
01270   
01271   itpp::Vec<out_eT> out(in.n_elem);
01272   
01273   const in_eT*  in_mem = in.memptr();
01274   out_eT*      out_mem = out._data();
01275   
01276   for(u32 i=0; i<in.n_elem; ++i)
01277     {
01278     copy_complex_elem(out_mem[i], in_mem[i]);
01279     }
01280   
01281   return out;
01282   }

template<typename out_eT >
template<typename in_eT , typename T1 >
itpp::Vec< out_eT > conv_to< itpp::Vec< out_eT > >::from ( const Base< in_eT, T1 > &  in  )  [inline, static, inherited]

Definition at line 1290 of file fn_conv_to.hpp.

01291   {
01292   arma_extra_debug_sigprint();
01293   
01294   const unwrap<T1> tmp(in.get_ref());
01295 
01296   return conv_to< itpp::Vec<out_eT> >::from( tmp.M );
01297   }