Op_trig

Classes

class  op_cos
class  op_acos
class  op_cosh
class  op_acosh
class  op_sin
class  op_asin
class  op_sinh
class  op_asinh
class  op_tan
class  op_atan
class  op_tanh
class  op_atanh

Functions

template<typename T1 >
static void op_cos::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_cos > &in)
template<typename T1 >
static void op_cos::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_cos > &in)
template<typename T1 >
static void op_acos::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_acos > &in)
template<typename T1 >
static void op_acos::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_acos > &in)
template<typename T , typename T1 >
static void op_acos::apply (Mat< std::complex< T > > &out, const Op< T1, op_acos > &in)
template<typename T , typename T1 >
static void op_acos::apply (Cube< std::complex< T > > &out, const OpCube< T1, op_acos > &in)
template<typename T1 >
static void op_cosh::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_cosh > &in)
template<typename T1 >
static void op_cosh::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_cosh > &in)
template<typename T1 >
static void op_acosh::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_acosh > &in)
template<typename T1 >
static void op_acosh::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_acosh > &in)
template<typename T1 >
static void op_sin::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_sin > &in)
template<typename T1 >
static void op_sin::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_sin > &in)
template<typename T1 >
static void op_asin::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_asin > &in)
template<typename T1 >
static void op_asin::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_asin > &in)
template<typename T , typename T1 >
static void op_asin::apply (Mat< std::complex< T > > &out, const Op< T1, op_asin > &in)
template<typename T , typename T1 >
static void op_asin::apply (Cube< std::complex< T > > &out, const OpCube< T1, op_asin > &in)
template<typename T1 >
static void op_sinh::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_sinh > &in)
template<typename T1 >
static void op_sinh::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_sinh > &in)
template<typename T1 >
static void op_asinh::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_asinh > &in)
template<typename T1 >
static void op_asinh::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_asinh > &in)
template<typename T1 >
static void op_tan::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_tan > &in)
template<typename T1 >
static void op_tan::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_tan > &in)
template<typename T1 >
static void op_atan::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_atan > &in)
template<typename T1 >
static void op_atan::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_atan > &in)
template<typename T , typename T1 >
static void op_atan::apply (Mat< std::complex< T > > &out, const Op< T1, op_atan > &in)
template<typename T , typename T1 >
static void op_atan::apply (Cube< std::complex< T > > &out, const OpCube< T1, op_atan > &in)
template<typename T1 >
static void op_tanh::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_tanh > &in)
template<typename T1 >
static void op_tanh::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_tanh > &in)
template<typename T1 >
static void op_atanh::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_atanh > &in)
template<typename T1 >
static void op_atanh::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_atanh > &in)

Function Documentation

template<typename T1 >
void op_cos::apply ( Mat< typename T1::elem_type > &  out,
const Op< T1, op_cos > &  in 
) [inline, static, inherited]

Definition at line 32 of file op_trig_meat.hpp.

References Mat< eT >::copy_size(), cos(), Op< T1, op_type >::m, Mat< eT >::mem, Mat< eT >::memptr(), and Mat< eT >::n_elem.

00033   {
00034   arma_extra_debug_sigprint();
00035   
00036   typedef typename T1::elem_type eT;
00037   
00038   const unwrap<T1> tmp(in.m);
00039   
00040   const Mat<eT>& A = tmp.M;
00041   const u32 n_elem = A.n_elem;
00042   
00043   //out.set_size(A.n_rows, A.n_cols);
00044   out.copy_size(A);
00045 
00046   eT* out_ptr = out.memptr();
00047   
00048   for(u32 i=0; i<n_elem; ++i)
00049     {
00050     out_ptr[i] = std::cos(A.mem[i]);
00051     }
00052   
00053   }

template<typename T1 >
void op_cos::apply ( Cube< typename T1::elem_type > &  out,
const OpCube< T1, op_cos > &  in 
) [inline, static, inherited]

Definition at line 60 of file op_trig_meat.hpp.

References Cube< eT >::copy_size(), cos(), OpCube< T1, op_type >::m, Cube< eT >::mem, Cube< eT >::memptr(), and Cube< eT >::n_elem.

00061   {
00062   arma_extra_debug_sigprint();
00063   
00064   typedef typename T1::elem_type eT;
00065   
00066   const unwrap_cube<T1> tmp(in.m);
00067   
00068   const Cube<eT>& A = tmp.M;
00069   const u32 n_elem  = A.n_elem;
00070   
00071   //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00072   out.copy_size(A);
00073 
00074   eT* out_ptr = out.memptr();
00075   
00076   for(u32 i=0; i<n_elem; ++i)
00077     {
00078     out_ptr[i] = std::cos(A.mem[i]);
00079     }
00080   
00081   }

template<typename T1 >
void op_acos::apply ( Mat< typename T1::elem_type > &  out,
const Op< T1, op_acos > &  in 
) [inline, static, inherited]

Definition at line 88 of file op_trig_meat.hpp.

References acos(), Mat< eT >::copy_size(), Op< T1, op_type >::m, Mat< eT >::mem, Mat< eT >::memptr(), and Mat< eT >::n_elem.

00089   {
00090   arma_extra_debug_sigprint();
00091   
00092   typedef typename T1::elem_type eT;
00093   
00094   const unwrap<T1> tmp(in.m);
00095   
00096   const Mat<eT>& A = tmp.M;
00097   const u32 n_elem = A.n_elem;
00098   
00099   //out.set_size(A.n_rows, A.n_cols);
00100   out.copy_size(A);
00101 
00102   eT* out_ptr = out.memptr();
00103   
00104   for(u32 i=0; i<n_elem; ++i)
00105     {
00106     out_ptr[i] = std::acos(A.mem[i]);
00107     }
00108   
00109   }

template<typename T1 >
void op_acos::apply ( Cube< typename T1::elem_type > &  out,
const OpCube< T1, op_acos > &  in 
) [inline, static, inherited]

Definition at line 116 of file op_trig_meat.hpp.

References acos(), Cube< eT >::copy_size(), OpCube< T1, op_type >::m, Cube< eT >::mem, Cube< eT >::memptr(), and Cube< eT >::n_elem.

00117   {
00118   arma_extra_debug_sigprint();
00119   
00120   typedef typename T1::elem_type eT;
00121   
00122   const unwrap_cube<T1> tmp(in.m);
00123   
00124   const Cube<eT>& A = tmp.M;
00125   const u32 n_elem  = A.n_elem;
00126   
00127   //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00128   out.copy_size(A);
00129 
00130   eT* out_ptr = out.memptr();
00131   
00132   for(u32 i=0; i<n_elem; ++i)
00133     {
00134     out_ptr[i] = std::acos(A.mem[i]);
00135     }
00136   
00137   }

template<typename T , typename T1 >
void op_acos::apply ( Mat< std::complex< T > > &  out,
const Op< T1, op_acos > &  in 
) [inline, static, inherited]

Definition at line 144 of file op_trig_meat.hpp.

References acos(), arma_stop(), Op< T1, op_type >::m, Mat< eT >::mem, and Mat< eT >::n_elem.

00145   {
00146   arma_extra_debug_sigprint();
00147   
00148   #if defined(ARMA_USE_BOOST)
00149     {
00150     typedef typename std::complex<T> eT;
00151     isnt_same_type<eT, typename T1::elem_type>::check();
00152     
00153     const unwrap<T1> tmp(in.m);
00154     
00155     const Mat<eT>& A = tmp.M;
00156     const u32 n_elem = A.n_elem;
00157     
00158     //out.set_size(A.n_rows, A.n_cols);
00159     out.copy_size(A);
00160 
00161     eT* out_ptr = out.memptr();
00162     
00163     for(u32 i=0; i<n_elem; ++i)
00164       {
00165       out_ptr[i] = boost::math::acos(A.mem[i]);
00166       }
00167     }
00168   #else
00169     {
00170     arma_stop("acos(): need Boost libraries");
00171     }
00172   #endif
00173   }

template<typename T , typename T1 >
void op_acos::apply ( Cube< std::complex< T > > &  out,
const OpCube< T1, op_acos > &  in 
) [inline, static, inherited]

Definition at line 180 of file op_trig_meat.hpp.

References acos(), arma_stop(), OpCube< T1, op_type >::m, Cube< eT >::mem, and Cube< eT >::n_elem.

00181   {
00182   arma_extra_debug_sigprint();
00183   
00184   #if defined(ARMA_USE_BOOST)
00185     {
00186     typedef typename std::complex<T> eT;
00187     isnt_same_type<eT, typename T1::elem_type>::check();
00188     
00189     const unwrap_cube<T1> tmp(in.m);
00190     
00191     const Cube<eT>& A = tmp.M;
00192     const u32 n_elem  = A.n_elem;
00193     
00194     //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00195     out.copy_size(A);
00196     
00197     eT* out_ptr = out.memptr();
00198     
00199     for(u32 i=0; i<n_elem; ++i)
00200       {
00201       out_ptr[i] = boost::math::acos(A.mem[i]);
00202       }
00203     }
00204   #else
00205     {
00206     arma_stop("acos(): need Boost libraries");
00207     }
00208   #endif
00209   }

template<typename T1 >
void op_cosh::apply ( Mat< typename T1::elem_type > &  out,
const Op< T1, op_cosh > &  in 
) [inline, static, inherited]

Definition at line 216 of file op_trig_meat.hpp.

References Mat< eT >::copy_size(), cosh(), Op< T1, op_type >::m, Mat< eT >::mem, Mat< eT >::memptr(), and Mat< eT >::n_elem.

00217   {
00218   arma_extra_debug_sigprint();
00219   
00220   typedef typename T1::elem_type eT;
00221   
00222   const unwrap<T1> tmp(in.m);
00223   
00224   const Mat<eT>& A = tmp.M;
00225   const u32 n_elem = A.n_elem;
00226   
00227   //out.set_size(A.n_rows, A.n_cols);
00228   out.copy_size(A);
00229 
00230   eT* out_ptr = out.memptr();
00231   
00232   for(u32 i=0; i<n_elem; ++i)
00233     {
00234     out_ptr[i] = std::cosh(A.mem[i]);
00235     }
00236   
00237   }

template<typename T1 >
void op_cosh::apply ( Cube< typename T1::elem_type > &  out,
const OpCube< T1, op_cosh > &  in 
) [inline, static, inherited]

Definition at line 244 of file op_trig_meat.hpp.

References Cube< eT >::copy_size(), cosh(), OpCube< T1, op_type >::m, Cube< eT >::mem, Cube< eT >::memptr(), and Cube< eT >::n_elem.

00245   {
00246   arma_extra_debug_sigprint();
00247   
00248   typedef typename T1::elem_type eT;
00249   
00250   const unwrap_cube<T1> tmp(in.m);
00251   
00252   const Cube<eT>& A = tmp.M;
00253   const u32 n_elem  = A.n_elem;
00254   
00255   //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00256   out.copy_size(A);
00257 
00258   eT* out_ptr = out.memptr();
00259   
00260   for(u32 i=0; i<n_elem; ++i)
00261     {
00262     out_ptr[i] = std::cosh(A.mem[i]);
00263     }
00264   
00265   }

template<typename T1 >
void op_acosh::apply ( Mat< typename T1::elem_type > &  out,
const Op< T1, op_acosh > &  in 
) [inline, static, inherited]

Definition at line 272 of file op_trig_meat.hpp.

References acosh(), arma_stop(), Mat< eT >::copy_size(), Op< T1, op_type >::m, Mat< eT >::mem, Mat< eT >::memptr(), and Mat< eT >::n_elem.

00273   {
00274   arma_extra_debug_sigprint();
00275   
00276   #if defined(ARMA_USE_BOOST)
00277     {
00278     typedef typename T1::elem_type eT;
00279     
00280     const unwrap<T1> tmp(in.m);
00281     
00282     const Mat<eT>& A = tmp.M;
00283     const u32 n_elem = A.n_elem;
00284     
00285     //out.set_size(A.n_rows, A.n_cols);
00286     out.copy_size(A);
00287 
00288     eT* out_ptr = out.memptr();
00289     
00290     for(u32 i=0; i<n_elem; ++i)
00291       {
00292       out_ptr[i] = boost::math::acosh(A.mem[i]);
00293       }
00294     }
00295   #else
00296     {
00297     arma_stop("acosh(): need Boost libraries");
00298     }
00299   #endif
00300   
00301   }

template<typename T1 >
void op_acosh::apply ( Cube< typename T1::elem_type > &  out,
const OpCube< T1, op_acosh > &  in 
) [inline, static, inherited]

Definition at line 308 of file op_trig_meat.hpp.

References acosh(), arma_stop(), Cube< eT >::copy_size(), OpCube< T1, op_type >::m, Cube< eT >::mem, Cube< eT >::memptr(), and Cube< eT >::n_elem.

00309   {
00310   arma_extra_debug_sigprint();
00311   
00312   #if defined(ARMA_USE_BOOST)
00313     {
00314     typedef typename T1::elem_type eT;
00315     
00316     const unwrap_cube<T1> tmp(in.m);
00317     
00318     const Cube<eT>& A = tmp.M;
00319     const u32 n_elem  = A.n_elem;
00320     
00321     //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00322     out.copy_size(A);
00323 
00324     eT* out_ptr = out.memptr();
00325     
00326     for(u32 i=0; i<n_elem; ++i)
00327       {
00328       out_ptr[i] = boost::math::acosh(A.mem[i]);
00329       }
00330     }
00331   #else
00332     {
00333     arma_stop("acosh(): need Boost libraries");
00334     }
00335   #endif
00336   
00337   }

template<typename T1 >
void op_sin::apply ( Mat< typename T1::elem_type > &  out,
const Op< T1, op_sin > &  in 
) [inline, static, inherited]

Definition at line 346 of file op_trig_meat.hpp.

References Mat< eT >::copy_size(), Op< T1, op_type >::m, Mat< eT >::mem, Mat< eT >::memptr(), Mat< eT >::n_elem, and sin().

00347   {
00348   arma_extra_debug_sigprint();
00349   
00350   typedef typename T1::elem_type eT;
00351   
00352   const unwrap<T1> tmp(in.m);
00353   
00354   const Mat<eT>& A = tmp.M;
00355   const u32 n_elem = A.n_elem;
00356   
00357   //out.set_size(A.n_rows, A.n_cols);
00358   out.copy_size(A);
00359 
00360   eT* out_ptr = out.memptr();
00361   
00362   for(u32 i=0; i<n_elem; ++i)
00363     {
00364     out_ptr[i] = std::sin(A.mem[i]);
00365     }
00366   
00367   }

template<typename T1 >
void op_sin::apply ( Cube< typename T1::elem_type > &  out,
const OpCube< T1, op_sin > &  in 
) [inline, static, inherited]

Definition at line 374 of file op_trig_meat.hpp.

References Cube< eT >::copy_size(), OpCube< T1, op_type >::m, Cube< eT >::mem, Cube< eT >::memptr(), Cube< eT >::n_elem, and sin().

00375   {
00376   arma_extra_debug_sigprint();
00377   
00378   typedef typename T1::elem_type eT;
00379   
00380   const unwrap_cube<T1> tmp(in.m);
00381   
00382   const Cube<eT>& A = tmp.M;
00383   const u32 n_elem  = A.n_elem;
00384   
00385   //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00386   out.copy_size(A);
00387 
00388   eT* out_ptr = out.memptr();
00389   
00390   for(u32 i=0; i<n_elem; ++i)
00391     {
00392     out_ptr[i] = std::sin(A.mem[i]);
00393     }
00394   
00395   }

template<typename T1 >
void op_asin::apply ( Mat< typename T1::elem_type > &  out,
const Op< T1, op_asin > &  in 
) [inline, static, inherited]

Definition at line 402 of file op_trig_meat.hpp.

References asin(), Mat< eT >::copy_size(), Op< T1, op_type >::m, Mat< eT >::mem, Mat< eT >::memptr(), and Mat< eT >::n_elem.

00403   {
00404   arma_extra_debug_sigprint();
00405   
00406   typedef typename T1::elem_type eT;
00407   
00408   const unwrap<T1> tmp(in.m);
00409   
00410   const Mat<eT>& A = tmp.M;
00411   const u32 n_elem = A.n_elem;
00412   
00413   //out.set_size(A.n_rows, A.n_cols);
00414   out.copy_size(A);
00415 
00416   eT* out_ptr = out.memptr();
00417   
00418   for(u32 i=0; i<n_elem; ++i)
00419     {
00420     out_ptr[i] = std::asin(A.mem[i]);
00421     }
00422   
00423   }

template<typename T1 >
void op_asin::apply ( Cube< typename T1::elem_type > &  out,
const OpCube< T1, op_asin > &  in 
) [inline, static, inherited]

Definition at line 430 of file op_trig_meat.hpp.

References asin(), Cube< eT >::copy_size(), OpCube< T1, op_type >::m, Cube< eT >::mem, Cube< eT >::memptr(), and Cube< eT >::n_elem.

00431   {
00432   arma_extra_debug_sigprint();
00433   
00434   typedef typename T1::elem_type eT;
00435   
00436   const unwrap_cube<T1> tmp(in.m);
00437   
00438   const Cube<eT>& A = tmp.M;
00439   const u32 n_elem  = A.n_elem;
00440   
00441   //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00442   out.copy_size(A);
00443 
00444   eT* out_ptr = out.memptr();
00445   
00446   for(u32 i=0; i<n_elem; ++i)
00447     {
00448     out_ptr[i] = std::asin(A.mem[i]);
00449     }
00450   
00451   }

template<typename T , typename T1 >
void op_asin::apply ( Mat< std::complex< T > > &  out,
const Op< T1, op_asin > &  in 
) [inline, static, inherited]

Definition at line 458 of file op_trig_meat.hpp.

References arma_stop(), asin(), Op< T1, op_type >::m, Mat< eT >::mem, and Mat< eT >::n_elem.

00459   {
00460   arma_extra_debug_sigprint();
00461   
00462   #if defined(ARMA_USE_BOOST)
00463     {
00464     typedef typename std::complex<T> eT;
00465     isnt_same_type<eT, typename T1::elem_type>::check();
00466     
00467     const unwrap<T1> tmp(in.m);
00468     
00469     const Mat<eT>& A = tmp.M;
00470     const u32 n_elem = A.n_elem;
00471     
00472     //out.set_size(A.n_rows, A.n_cols);
00473     out.copy_size(A);
00474 
00475     eT* out_ptr = out.memptr();
00476     
00477     for(u32 i=0; i<n_elem; ++i)
00478       {
00479       out_ptr[i] = boost::math::asin(A.mem[i]);
00480       }
00481     }
00482   #else
00483     {
00484     arma_stop("asin(): need Boost libraries");
00485     }
00486   #endif
00487   }

template<typename T , typename T1 >
void op_asin::apply ( Cube< std::complex< T > > &  out,
const OpCube< T1, op_asin > &  in 
) [inline, static, inherited]

Definition at line 494 of file op_trig_meat.hpp.

References arma_stop(), asin(), OpCube< T1, op_type >::m, Cube< eT >::mem, and Cube< eT >::n_elem.

00495   {
00496   arma_extra_debug_sigprint();
00497   
00498   #if defined(ARMA_USE_BOOST)
00499     {
00500     typedef typename std::complex<T> eT;
00501     isnt_same_type<eT, typename T1::elem_type>::check();
00502     
00503     const unwrap_cube<T1> tmp(in.m);
00504     
00505     const Cube<eT>& A = tmp.M;
00506     const u32 n_elem  = A.n_elem;
00507     
00508     //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00509     out.copy_size(A);
00510 
00511     eT* out_ptr = out.memptr();
00512     
00513     for(u32 i=0; i<n_elem; ++i)
00514       {
00515       out_ptr[i] = boost::math::asin(A.mem[i]);
00516       }
00517     }
00518   #else
00519     {
00520     arma_stop("asin(): need Boost libraries");
00521     }
00522   #endif
00523   }

template<typename T1 >
void op_sinh::apply ( Mat< typename T1::elem_type > &  out,
const Op< T1, op_sinh > &  in 
) [inline, static, inherited]

Definition at line 530 of file op_trig_meat.hpp.

References Mat< eT >::copy_size(), Op< T1, op_type >::m, Mat< eT >::mem, Mat< eT >::memptr(), Mat< eT >::n_elem, and sinh().

00531   {
00532   arma_extra_debug_sigprint();
00533   
00534   typedef typename T1::elem_type eT;
00535   
00536   const unwrap<T1> tmp(in.m);
00537   
00538   const Mat<eT>& A = tmp.M;
00539   const u32 n_elem = A.n_elem;
00540   
00541   //out.set_size(A.n_rows, A.n_cols);
00542   out.copy_size(A);
00543 
00544   eT* out_ptr = out.memptr();
00545   
00546   for(u32 i=0; i<n_elem; ++i)
00547     {
00548     out_ptr[i] = std::sinh(A.mem[i]);
00549     }
00550   
00551   }

template<typename T1 >
void op_sinh::apply ( Cube< typename T1::elem_type > &  out,
const OpCube< T1, op_sinh > &  in 
) [inline, static, inherited]

Definition at line 558 of file op_trig_meat.hpp.

References Cube< eT >::copy_size(), OpCube< T1, op_type >::m, Cube< eT >::mem, Cube< eT >::memptr(), Cube< eT >::n_elem, and sinh().

00559   {
00560   arma_extra_debug_sigprint();
00561   
00562   typedef typename T1::elem_type eT;
00563   
00564   const unwrap_cube<T1> tmp(in.m);
00565   
00566   const Cube<eT>& A = tmp.M;
00567   const u32 n_elem  = A.n_elem;
00568   
00569   //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00570   out.copy_size(A);
00571 
00572   eT* out_ptr = out.memptr();
00573   
00574   for(u32 i=0; i<n_elem; ++i)
00575     {
00576     out_ptr[i] = std::sinh(A.mem[i]);
00577     }
00578   
00579   }

template<typename T1 >
void op_asinh::apply ( Mat< typename T1::elem_type > &  out,
const Op< T1, op_asinh > &  in 
) [inline, static, inherited]

Definition at line 586 of file op_trig_meat.hpp.

References arma_stop(), asinh(), Mat< eT >::copy_size(), Op< T1, op_type >::m, Mat< eT >::mem, Mat< eT >::memptr(), and Mat< eT >::n_elem.

00587   {
00588   arma_extra_debug_sigprint();
00589   
00590   #if defined(ARMA_USE_BOOST)
00591     {
00592     typedef typename T1::elem_type eT;
00593     
00594     const unwrap<T1> tmp(in.m);
00595   
00596     const Mat<eT>& A = tmp.M;
00597     const u32 n_elem = A.n_elem;
00598     
00599     //out.set_size(A.n_rows, A.n_cols);
00600     out.copy_size(A);
00601 
00602     eT* out_ptr = out.memptr();
00603     
00604     for(u32 i=0; i<n_elem; ++i)
00605       {
00606       out_ptr[i] = boost::math::asinh(A.mem[i]);
00607       }
00608     }
00609   #else
00610     {
00611     arma_stop("asinh(): need Boost libraries");
00612     }
00613   #endif
00614   }

template<typename T1 >
void op_asinh::apply ( Cube< typename T1::elem_type > &  out,
const OpCube< T1, op_asinh > &  in 
) [inline, static, inherited]

Definition at line 621 of file op_trig_meat.hpp.

References arma_stop(), asinh(), Cube< eT >::copy_size(), OpCube< T1, op_type >::m, Cube< eT >::mem, Cube< eT >::memptr(), and Cube< eT >::n_elem.

00622   {
00623   arma_extra_debug_sigprint();
00624   
00625   #if defined(ARMA_USE_BOOST)
00626     {
00627     typedef typename T1::elem_type eT;
00628     
00629     const unwrap_cube<T1> tmp(in.m);
00630   
00631     const Cube<eT>& A = tmp.M;
00632     const u32 n_elem = A.n_elem;
00633     
00634     //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00635     out.copy_size(A);
00636 
00637     eT* out_ptr = out.memptr();
00638     
00639     for(u32 i=0; i<n_elem; ++i)
00640       {
00641       out_ptr[i] = boost::math::asinh(A.mem[i]);
00642       }
00643     }
00644   #else
00645     {
00646     arma_stop("asinh(): need Boost libraries");
00647     }
00648   #endif
00649   }

template<typename T1 >
void op_tan::apply ( Mat< typename T1::elem_type > &  out,
const Op< T1, op_tan > &  in 
) [inline, static, inherited]

Definition at line 658 of file op_trig_meat.hpp.

References Mat< eT >::copy_size(), Op< T1, op_type >::m, Mat< eT >::mem, Mat< eT >::memptr(), Mat< eT >::n_elem, and tan().

00659   {
00660   arma_extra_debug_sigprint();
00661   
00662   typedef typename T1::elem_type eT;
00663   
00664   const unwrap<T1> tmp(in.m);
00665   
00666   const Mat<eT>& A = tmp.M;
00667   const u32 n_elem = A.n_elem;
00668   
00669   //out.set_size(A.n_rows, A.n_cols);
00670   out.copy_size(A);
00671 
00672   eT* out_ptr = out.memptr();
00673   
00674   for(u32 i=0; i<n_elem; ++i)
00675     {
00676     out_ptr[i] = std::tan(A.mem[i]);
00677     }
00678   
00679   }

template<typename T1 >
void op_tan::apply ( Cube< typename T1::elem_type > &  out,
const OpCube< T1, op_tan > &  in 
) [inline, static, inherited]

Definition at line 686 of file op_trig_meat.hpp.

References Cube< eT >::copy_size(), OpCube< T1, op_type >::m, Cube< eT >::mem, Cube< eT >::memptr(), Cube< eT >::n_elem, and tan().

00687   {
00688   arma_extra_debug_sigprint();
00689   
00690   typedef typename T1::elem_type eT;
00691   
00692   const unwrap_cube<T1> tmp(in.m);
00693   
00694   const Cube<eT>& A = tmp.M;
00695   const u32 n_elem  = A.n_elem;
00696   
00697   //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00698   out.copy_size(A);
00699 
00700   eT* out_ptr = out.memptr();
00701   
00702   for(u32 i=0; i<n_elem; ++i)
00703     {
00704     out_ptr[i] = std::tan(A.mem[i]);
00705     }
00706   
00707   }

template<typename T1 >
void op_atan::apply ( Mat< typename T1::elem_type > &  out,
const Op< T1, op_atan > &  in 
) [inline, static, inherited]

Definition at line 714 of file op_trig_meat.hpp.

References atan(), Mat< eT >::copy_size(), Op< T1, op_type >::m, Mat< eT >::mem, Mat< eT >::memptr(), and Mat< eT >::n_elem.

00715   {
00716   arma_extra_debug_sigprint();
00717   
00718   typedef typename T1::elem_type eT;
00719   
00720   const unwrap<T1> tmp(in.m);
00721   
00722   const Mat<eT>& A = tmp.M;
00723   const u32 n_elem = A.n_elem;
00724   
00725   //out.set_size(A.n_rows, A.n_cols);
00726   out.copy_size(A);
00727 
00728   eT* out_ptr = out.memptr();
00729   
00730   for(u32 i=0; i<n_elem; ++i)
00731     {
00732     out_ptr[i] = std::atan(A.mem[i]);
00733     }
00734   
00735   }

template<typename T1 >
void op_atan::apply ( Cube< typename T1::elem_type > &  out,
const OpCube< T1, op_atan > &  in 
) [inline, static, inherited]

Definition at line 742 of file op_trig_meat.hpp.

References atan(), Cube< eT >::copy_size(), OpCube< T1, op_type >::m, Cube< eT >::mem, Cube< eT >::memptr(), and Cube< eT >::n_elem.

00743   {
00744   arma_extra_debug_sigprint();
00745   
00746   typedef typename T1::elem_type eT;
00747   
00748   const unwrap_cube<T1> tmp(in.m);
00749   
00750   const Cube<eT>& A = tmp.M;
00751   const u32 n_elem  = A.n_elem;
00752   
00753   //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00754   out.copy_size(A);
00755 
00756   eT* out_ptr = out.memptr();
00757   
00758   for(u32 i=0; i<n_elem; ++i)
00759     {
00760     out_ptr[i] = std::atan(A.mem[i]);
00761     }
00762   
00763   }

template<typename T , typename T1 >
void op_atan::apply ( Mat< std::complex< T > > &  out,
const Op< T1, op_atan > &  in 
) [inline, static, inherited]

Definition at line 770 of file op_trig_meat.hpp.

References arma_stop(), atan(), Op< T1, op_type >::m, Mat< eT >::mem, and Mat< eT >::n_elem.

00771   {
00772   arma_extra_debug_sigprint();
00773   
00774   #if defined(ARMA_USE_BOOST)
00775     {
00776     typedef typename std::complex<T> eT;
00777     isnt_same_type<eT, typename T1::elem_type>::check();
00778     
00779     const unwrap<T1> tmp(in.m);
00780     
00781     const Mat<eT>& A = tmp.M;
00782     const u32 n_elem = A.n_elem;
00783     
00784     //out.set_size(A.n_rows, A.n_cols);
00785     out.copy_size(A);
00786 
00787     eT* out_ptr = out.memptr();
00788     
00789     for(u32 i=0; i<n_elem; ++i)
00790       {
00791       out_ptr[i] = boost::math::atan(A.mem[i]);
00792       }
00793     }
00794   #else
00795     {
00796     arma_stop("atan(): need Boost libraries");
00797     }
00798   #endif
00799   }

template<typename T , typename T1 >
void op_atan::apply ( Cube< std::complex< T > > &  out,
const OpCube< T1, op_atan > &  in 
) [inline, static, inherited]

Definition at line 806 of file op_trig_meat.hpp.

References arma_stop(), atan(), OpCube< T1, op_type >::m, Cube< eT >::mem, and Cube< eT >::n_elem.

00807   {
00808   arma_extra_debug_sigprint();
00809   
00810   #if defined(ARMA_USE_BOOST)
00811     {
00812     typedef typename std::complex<T> eT;
00813     isnt_same_type<eT, typename T1::elem_type>::check();
00814     
00815     const unwrap_cube<T1> tmp(in.m);
00816     
00817     const Cube<eT>& A = tmp.M;
00818     const u32 n_elem  = A.n_elem;
00819     
00820     //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00821     out.copy_size(A);
00822 
00823     eT* out_ptr = out.memptr();
00824     
00825     for(u32 i=0; i<n_elem; ++i)
00826       {
00827       out_ptr[i] = boost::math::atan(A.mem[i]);
00828       }
00829     }
00830   #else
00831     {
00832     arma_stop("atan(): need Boost libraries");
00833     }
00834   #endif
00835   }

template<typename T1 >
void op_tanh::apply ( Mat< typename T1::elem_type > &  out,
const Op< T1, op_tanh > &  in 
) [inline, static, inherited]

Definition at line 842 of file op_trig_meat.hpp.

References Mat< eT >::copy_size(), Op< T1, op_type >::m, Mat< eT >::mem, Mat< eT >::memptr(), Mat< eT >::n_elem, and tanh().

00843   {
00844   arma_extra_debug_sigprint();
00845   
00846   typedef typename T1::elem_type eT;
00847   
00848   const unwrap<T1> tmp(in.m);
00849   
00850   const Mat<eT>& A = tmp.M;
00851   const u32 n_elem = A.n_elem;
00852   
00853   //out.set_size(A.n_rows, A.n_cols);
00854   out.copy_size(A);
00855 
00856   eT* out_ptr = out.memptr();
00857   
00858   for(u32 i=0; i<n_elem; ++i)
00859     {
00860     out_ptr[i] = std::tanh(A.mem[i]);
00861     }
00862   
00863   }

template<typename T1 >
void op_tanh::apply ( Cube< typename T1::elem_type > &  out,
const OpCube< T1, op_tanh > &  in 
) [inline, static, inherited]

Definition at line 870 of file op_trig_meat.hpp.

References Cube< eT >::copy_size(), OpCube< T1, op_type >::m, Cube< eT >::mem, Cube< eT >::memptr(), Cube< eT >::n_elem, and tanh().

00871   {
00872   arma_extra_debug_sigprint();
00873   
00874   typedef typename T1::elem_type eT;
00875   
00876   const unwrap_cube<T1> tmp(in.m);
00877   
00878   const Cube<eT>& A = tmp.M;
00879   const u32 n_elem  = A.n_elem;
00880   
00881   //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00882   out.copy_size(A);
00883 
00884   eT* out_ptr = out.memptr();
00885   
00886   for(u32 i=0; i<n_elem; ++i)
00887     {
00888     out_ptr[i] = std::tanh(A.mem[i]);
00889     }
00890   
00891   }

template<typename T1 >
void op_atanh::apply ( Mat< typename T1::elem_type > &  out,
const Op< T1, op_atanh > &  in 
) [inline, static, inherited]

Definition at line 898 of file op_trig_meat.hpp.

References arma_stop(), atanh(), Mat< eT >::copy_size(), Op< T1, op_type >::m, Mat< eT >::mem, Mat< eT >::memptr(), and Mat< eT >::n_elem.

00899   {
00900   arma_extra_debug_sigprint();
00901   
00902   #if defined(ARMA_USE_BOOST)
00903     {
00904     typedef typename T1::elem_type eT;
00905     
00906     const unwrap<T1> tmp(in.m);
00907   
00908     const Mat<eT>& A = tmp.M;
00909     const u32 n_elem = A.n_elem;
00910     
00911     //out.set_size(A.n_rows, A.n_cols);
00912     out.copy_size(A);
00913 
00914     eT* out_ptr = out.memptr();
00915     
00916     for(u32 i=0; i<n_elem; ++i)
00917       {
00918       out_ptr[i] = boost::math::atanh(A.mem[i]);
00919       }
00920     }
00921   #else
00922     {
00923     arma_stop("atanh(): need Boost libraries");
00924     }
00925   #endif
00926   
00927   }

template<typename T1 >
void op_atanh::apply ( Cube< typename T1::elem_type > &  out,
const OpCube< T1, op_atanh > &  in 
) [inline, static, inherited]

Definition at line 934 of file op_trig_meat.hpp.

References arma_stop(), atanh(), Cube< eT >::copy_size(), OpCube< T1, op_type >::m, Cube< eT >::mem, Cube< eT >::memptr(), and Cube< eT >::n_elem.

00935   {
00936   arma_extra_debug_sigprint();
00937   
00938   #if defined(ARMA_USE_BOOST)
00939     {
00940     typedef typename T1::elem_type eT;
00941     
00942     const unwrap_cube<T1> tmp(in.m);
00943   
00944     const Cube<eT>& A = tmp.M;
00945     const u32 n_elem  = A.n_elem;
00946     
00947     //out.set_size(A.n_rows, A.n_cols, A.n_slices);
00948     out.copy_size(A);
00949 
00950     eT* out_ptr = out.memptr();
00951     
00952     for(u32 i=0; i<n_elem; ++i)
00953       {
00954       out_ptr[i] = boost::math::atanh(A.mem[i]);
00955       }
00956     }
00957   #else
00958     {
00959     arma_stop("atanh(): need Boost libraries");
00960     }
00961   #endif
00962   
00963   }