fn_eps.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 template<typename T1>
00027 inline
00028 const Op<T1, op_eps>
00029 eps(const Base<typename T1::elem_type, T1>& X)
00030 {
00031 arma_extra_debug_sigprint();
00032
00033 typedef typename T1::elem_type eT;
00034
00035 isnt_fltpt<eT>::check();
00036
00037 return Op<T1, op_eps>(X.get_ref());
00038 }
00039
00040
00041
00042
00043
00044 template<typename T1>
00045 inline
00046 Mat< typename T1::pod_type >
00047 eps(const Base< std::complex<typename T1::pod_type>, T1>& X)
00048 {
00049 arma_extra_debug_sigprint();
00050
00051 typedef typename T1::pod_type T;
00052 typedef typename T1::elem_type eT;
00053
00054 isnt_fltpt<T>::check();
00055
00056 const unwrap<T1> tmp(X.get_ref());
00057 const Mat<eT>& A = tmp.M;
00058
00059 Mat<T> out;
00060 op_eps::direct_eps(out, A);
00061
00062 return out;
00063 }
00064
00065
00066
00067
00068
00069 arma_inline
00070 float
00071 eps(const float x)
00072 {
00073 return op_eps::direct_eps(x);
00074 }
00075
00076
00077
00078
00079
00080 arma_inline
00081 double
00082 eps(const double x)
00083 {
00084 return op_eps::direct_eps(x);
00085 }
00086
00087
00088
00089
00090
00091 arma_inline
00092 float
00093 eps(const std::complex<float>& x)
00094 {
00095 return op_eps::direct_eps(x);
00096 }
00097
00098
00099
00100
00101
00102 arma_inline
00103 double
00104 eps(const std::complex<double>& x)
00105 {
00106 return op_eps::direct_eps(x);
00107 }
00108
00109
00110
00111