Fn_misc

Functions

template<typename vec_type >
vec_type linspace (const typename vec_type::pod_type start, const typename vec_type::pod_type end, const u32 num, const u32 dim=0)
 Generate a vector with 'num' elements. The values of the elements linearly increase from 'start' upto (and including) 'end'.
mat linspace (const double start, const double end, const u32 num, const u32 dim=0)
template<typename T1 >
arma_inline const T1 & real (const Base< typename T1::pod_type, T1 > &X)
template<typename T1 >
arma_inline const T1 & real (const BaseCube< typename T1::pod_type, T1 > &X)
template<typename T1 >
Mat< typename T1::pod_type > real (const Base< std::complex< typename T1::pod_type >, T1 > &X)
template<typename T1 >
Cube< typename T1::pod_type > real (const BaseCube< std::complex< typename T1::pod_type >, T1 > &X)
template<typename T1 >
const eOp< Mat< typename
T1::pod_type >, eop_zeros
imag (const Base< typename T1::pod_type, T1 > &X)
template<typename T1 >
const eOpCube< Cube< typename
T1::pod_type >, eop_cube_zeros
imag (const BaseCube< typename T1::pod_type, T1 > &X)
template<typename T1 >
Mat< typename T1::pod_type > imag (const Base< std::complex< typename T1::pod_type >, T1 > &X)
template<typename T1 >
Cube< typename T1::pod_type > imag (const BaseCube< std::complex< typename T1::pod_type >, T1 > &X)
template<typename eT >
eT log_add (eT log_a, eT log_b)
template<typename T1 >
arma_inline const eOp< T1,
eop_log
log (const Base< typename T1::elem_type, T1 > &A)
template<typename T1 >
arma_inline const eOpCube< T1,
eop_cube_log
log (const BaseCube< typename T1::elem_type, T1 > &A)
template<typename T1 >
arma_inline const eOp< T1,
eop_trunc_log
trunc_log (const Base< typename T1::elem_type, T1 > &A)
template<typename T1 >
arma_inline const eOpCube< T1,
eop_cube_trunc_log
trunc_log (const BaseCube< typename T1::elem_type, T1 > &A)
template<typename T1 >
arma_inline const eOp< T1,
eop_log10
log10 (const Base< typename T1::elem_type, T1 > &A)
template<typename T1 >
arma_inline const eOpCube< T1,
eop_cube_log10
log10 (const BaseCube< typename T1::elem_type, T1 > &A)
template<typename T1 >
arma_inline const eOp< T1,
eop_exp
exp (const Base< typename T1::elem_type, T1 > &A)
template<typename T1 >
arma_inline const eOpCube< T1,
eop_cube_exp
exp (const BaseCube< typename T1::elem_type, T1 > &A)
template<typename T1 >
arma_inline const eOp< T1,
eop_trunc_exp
trunc_exp (const Base< typename T1::elem_type, T1 > &A)
template<typename T1 >
arma_inline const eOpCube< T1,
eop_cube_trunc_exp
trunc_exp (const BaseCube< typename T1::elem_type, T1 > &A)
template<typename T1 >
arma_inline const eOp< T1,
eop_abs
abs (const Base< typename T1::elem_type, T1 > &X)
template<typename T1 >
arma_inline const eOpCube< T1,
eop_cube_abs
abs (const BaseCube< typename T1::elem_type, T1 > &X)
template<typename T1 >
Mat< typename T1::pod_type > abs (const Base< std::complex< typename T1::pod_type >, T1 > &X)
template<typename T1 >
Mat< typename T1::pod_type > abs (const BaseCube< std::complex< typename T1::pod_type >, T1 > &X)
template<typename T1 >
arma_inline const eOp< T1,
eop_abs
fabs (const Base< typename T1::pod_type, T1 > &X)
template<typename T1 >
arma_inline const eOpCube< T1,
eop_cube_abs
fabs (const BaseCube< typename T1::pod_type, T1 > &X)
template<typename T1 >
arma_inline Mat< typename
T1::pod_type > 
fabs (const Base< std::complex< typename T1::pod_type >, T1 > &X)
template<typename T1 >
arma_inline Mat< typename
T1::pod_type > 
fabs (const BaseCube< std::complex< typename T1::pod_type >, T1 > &X)
template<typename T1 >
arma_inline const eOp< T1,
eop_square
square (const Base< typename T1::elem_type, T1 > &A)
template<typename T1 >
arma_inline const eOpCube< T1,
eop_cube_square
square (const BaseCube< typename T1::elem_type, T1 > &A)
template<typename T1 >
arma_inline const eOp< T1,
eop_sqrt
sqrt (const Base< typename T1::elem_type, T1 > &A)
template<typename T1 >
arma_inline const eOpCube< T1,
eop_cube_sqrt
sqrt (const BaseCube< typename T1::elem_type, T1 > &A)
template<typename T1 >
arma_inline const T1 & conj (const Base< typename T1::pod_type, T1 > &A)
template<typename T1 >
arma_inline const T1 & conj (const BaseCube< typename T1::pod_type, T1 > &A)
template<typename T1 >
arma_inline const eOp< T1,
eop_conj
conj (const Base< std::complex< typename T1::pod_type >, T1 > &A)
template<typename T1 >
arma_inline const eOpCube< T1,
eop_cube_conj
conj (const BaseCube< std::complex< typename T1::pod_type >, T1 > &A)
template<typename T1 >
arma_inline const T1 & conj (const eOp< T1, eop_conj > &A)
template<typename T1 >
arma_inline const T1 & conj (const eOpCube< T1, eop_cube_conj > &A)
template<typename T1 >
arma_inline const eOp< T1,
eop_pow
pow (const Base< typename T1::elem_type, T1 > &A, const typename T1::elem_type exponent)
template<typename T1 >
arma_inline const eOpCube< T1,
eop_cube_pow
pow (const BaseCube< typename T1::elem_type, T1 > &A, const typename T1::elem_type exponent)
template<typename T1 >
arma_inline const eOp< T1,
eop_pow
pow (const Base< typename T1::elem_type, T1 > &A, const typename T1::elem_type::value_type exponent)
template<typename T1 >
arma_inline const eOpCube< T1,
eop_cube_pow
pow (const BaseCube< typename T1::elem_type, T1 > &A, const typename T1::elem_type::value_type exponent)
template<typename T1 >
arma_inline const eOp< T1,
eop_pow_int
pow (const Base< typename T1::elem_type, T1 > &A, const int exponent)
template<typename T1 >
arma_inline const eOpCube< T1,
eop_cube_pow_int
pow (const BaseCube< typename T1::elem_type, T1 > &A, const int exponent)

Function Documentation

template<typename vec_type >
vec_type linspace ( const typename vec_type::pod_type  start,
const typename vec_type::pod_type  end,
const u32  num,
const u32  dim = 0 
) [inline]

Generate a vector with 'num' elements. The values of the elements linearly increase from 'start' upto (and including) 'end'.

Definition at line 30 of file fn_misc.hpp.

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

00036   {
00037   arma_extra_debug_sigprint();
00038   
00039   arma_type_check< (is_Mat<vec_type>::value == false) >::apply();
00040   
00041   arma_debug_check( (num < 2), "linspace(): num must be >= 2");
00042   
00043   arma_warn( (dim != 0), "linspace(): the 'dim' argument is deprecated -- please use template based specification instead" );
00044   
00045   typedef typename vec_type::elem_type eT;
00046   typedef typename vec_type::pod_type   T;
00047   
00048   // // this will be the default in the future:
00049   // const u32 n_rows = (is_Row<vec_type>::value == true) ? 1   : num;
00050   // const u32 n_cols = (is_Row<vec_type>::value == true) ? num : 1;
00051   
00052   // for temporary compatibility with old user code:
00053   const u32 n_rows = (is_Row<vec_type>::value == true) ? 1   : ( (dim == 0) ? num : 1   );
00054   const u32 n_cols = (is_Row<vec_type>::value == true) ? num : ( (dim == 0) ? 1   : num );
00055   
00056   const eT delta = (end-start)/T(num-1);
00057   
00058   Mat<eT> x(n_rows, n_cols);
00059   eT* x_mem = x.memptr();
00060   
00061   x_mem[0] = start;
00062   
00063   for(u32 i=1; i<num; ++i)
00064     {
00065     x_mem[i] = x_mem[i-1] + delta;
00066     }
00067   
00068   return x;
00069   }

mat linspace ( const double  start,
const double  end,
const u32  num,
const u32  dim = 0 
) [inline]

Definition at line 75 of file fn_misc.hpp.

00076   {
00077   arma_extra_debug_sigprint();
00078   return linspace<mat>(start, end, num, dim);
00079   }

template<typename T1 >
arma_inline const T1& real ( const Base< typename T1::pod_type, T1 > &  X  )  [inline]

Definition at line 89 of file fn_misc.hpp.

References Base< elem_type, derived >::get_ref().

Referenced by real(), and auxlib::svd().

00090   {
00091   arma_extra_debug_sigprint();
00092   
00093   return X.get_ref();
00094   }

template<typename T1 >
arma_inline const T1& real ( const BaseCube< typename T1::pod_type, T1 > &  X  )  [inline]

Definition at line 101 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00102   {
00103   arma_extra_debug_sigprint();
00104   
00105   return X.get_ref();
00106   }

template<typename T1 >
Mat<typename T1::pod_type> real ( const Base< std::complex< typename T1::pod_type >, T1 > &  X  )  [inline]

Definition at line 113 of file fn_misc.hpp.

References real().

00114   {
00115   arma_extra_debug_sigprint();
00116   
00117   typedef typename T1::pod_type T;
00118   
00119   const Proxy<T1> A(X.get_ref());
00120   
00121   Mat<T> out(A.n_rows, A.n_cols);
00122   
00123   T* out_mem = out.memptr();
00124   
00125   for(u32 i=0; i<out.n_elem; ++i)
00126     {
00127     out_mem[i] = std::real(A[i]);
00128     }
00129   
00130   return out;
00131   }

template<typename T1 >
Cube<typename T1::pod_type> real ( const BaseCube< std::complex< typename T1::pod_type >, T1 > &  X  )  [inline]

Definition at line 138 of file fn_misc.hpp.

References real().

00139   {
00140   arma_extra_debug_sigprint();
00141   
00142   typedef typename T1::pod_type T;
00143   
00144   const ProxyCube<T1> A(X.get_ref());
00145   
00146   Cube<T> out(A.n_rows, A.n_cols, A.n_slices);
00147   
00148   T* out_mem = out.memptr();
00149   
00150   for(u32 i=0; i<out.n_elem; ++i)
00151     {
00152     out_mem[i] = std::real(A[i]);
00153     }
00154   
00155   return out;
00156   }

template<typename T1 >
const eOp<Mat<typename T1::pod_type>, eop_zeros> imag ( const Base< typename T1::pod_type, T1 > &  X  )  [inline]

Definition at line 166 of file fn_misc.hpp.

References Base< elem_type, derived >::get_ref().

Referenced by imag().

00167   {
00168   arma_extra_debug_sigprint();
00169   
00170   const Proxy<T1> A(X.get_ref());
00171   
00172   return eOp<Mat<typename T1::pod_type>, eop_zeros>(A.n_rows, A.n_cols);
00173   }

template<typename T1 >
const eOpCube<Cube<typename T1::pod_type>, eop_cube_zeros> imag ( const BaseCube< typename T1::pod_type, T1 > &  X  )  [inline]

Definition at line 180 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00181   {
00182   arma_extra_debug_sigprint();
00183   
00184   const ProxyCube<T1> A(X.get_ref());
00185   
00186   return eOpCube<Cube<typename T1::pod_type>, eop_cube_zeros>(A.n_rows, A.n_cols, A.n_slices);
00187   }

template<typename T1 >
Mat<typename T1::pod_type> imag ( const Base< std::complex< typename T1::pod_type >, T1 > &  X  )  [inline]

Definition at line 194 of file fn_misc.hpp.

References imag().

00195   {
00196   arma_extra_debug_sigprint();
00197   
00198   typedef typename T1::pod_type T;
00199   
00200   const Proxy<T1> A(X.get_ref());
00201   
00202   Mat<T> out(A.n_rows, A.n_cols);
00203   
00204   T* out_mem = out.memptr();
00205   
00206   for(u32 i=0; i<out.n_elem; ++i)
00207     {
00208     out_mem[i] = std::imag(A[i]);
00209     }
00210   
00211   return out;
00212   }

template<typename T1 >
Cube<typename T1::pod_type> imag ( const BaseCube< std::complex< typename T1::pod_type >, T1 > &  X  )  [inline]

Definition at line 219 of file fn_misc.hpp.

References imag().

00220   {
00221   arma_extra_debug_sigprint();
00222   
00223   typedef typename T1::pod_type T;
00224   
00225   const ProxyCube<T1> A(X.get_ref());
00226   
00227   Cube<T> out(A.n_rows, A.n_cols, A.n_slices);
00228   
00229   T* out_mem = out.memptr();
00230   
00231   for(u32 i=0; i<out.n_elem; ++i)
00232     {
00233     out_mem[i] = std::imag(A[i]);
00234     }
00235   
00236   return out;
00237   }

template<typename eT >
eT log_add ( eT  log_a,
eT  log_b 
) [inline]

Definition at line 247 of file fn_misc.hpp.

References arma_isfinite(), exp(), and log().

00248   {
00249   if(log_a < log_b)
00250     {
00251     std::swap(log_a, log_b);
00252     }
00253   
00254   const eT negdelta = log_b - log_a;
00255   
00256   if( (negdelta < Math<eT>::log_min()) || (arma_isfinite(negdelta) == false) )
00257     {
00258     return log_a;
00259     }
00260   else
00261     {
00262     #if defined(ARMA_HAVE_LOG1P)
00263       return (log_a + log1p(std::exp(negdelta)));
00264     #else
00265       return (log_a + std::log(1.0 + std::exp(negdelta)));
00266     #endif
00267     }
00268   }

template<typename T1 >
arma_inline const eOp<T1, eop_log> log ( const Base< typename T1::elem_type, T1 > &  A  )  [inline]
template<typename T1 >
arma_inline const eOpCube<T1, eop_cube_log> log ( const BaseCube< typename T1::elem_type, T1 > &  A  )  [inline]

Definition at line 290 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00291   {
00292   arma_extra_debug_sigprint();
00293   
00294   return eOpCube<T1, eop_cube_log>(A.get_ref());
00295   }

template<typename T1 >
arma_inline const eOp<T1, eop_trunc_log> trunc_log ( const Base< typename T1::elem_type, T1 > &  A  )  [inline]

Definition at line 305 of file fn_misc.hpp.

References Base< elem_type, derived >::get_ref().

Referenced by eop_cube_core< eop_cube_type >::process(), and eop_core< eop_type >::process().

00306   {
00307   arma_extra_debug_sigprint();
00308   
00309   return eOp<T1, eop_trunc_log>(A.get_ref());
00310   }

template<typename T1 >
arma_inline const eOpCube<T1, eop_cube_trunc_log> trunc_log ( const BaseCube< typename T1::elem_type, T1 > &  A  )  [inline]

Definition at line 317 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00318   {
00319   arma_extra_debug_sigprint();
00320   
00321   return eOpCube<T1, eop_cube_trunc_log>(A.get_ref());
00322   }

template<typename T1 >
arma_inline const eOp<T1, eop_log10> log10 ( const Base< typename T1::elem_type, T1 > &  A  )  [inline]

Definition at line 332 of file fn_misc.hpp.

References Base< elem_type, derived >::get_ref().

Referenced by eop_aux::direct_eps(), eop_cube_core< eop_cube_type >::process(), and eop_core< eop_type >::process().

00333   {
00334   arma_extra_debug_sigprint();
00335   
00336   return eOp<T1, eop_log10>(A.get_ref());
00337   }

template<typename T1 >
arma_inline const eOpCube<T1, eop_cube_log10> log10 ( const BaseCube< typename T1::elem_type, T1 > &  A  )  [inline]

Definition at line 344 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00345   {
00346   arma_extra_debug_sigprint();
00347   
00348   return eOpCube<T1, eop_cube_log10>(A.get_ref());
00349   }

template<typename T1 >
arma_inline const eOp<T1, eop_exp> exp ( const Base< typename T1::elem_type, T1 > &  A  )  [inline]

Definition at line 359 of file fn_misc.hpp.

References Base< elem_type, derived >::get_ref().

Referenced by log_add(), eop_cube_core< eop_cube_type >::process(), eop_core< eop_type >::process(), and eop_aux::trunc_exp().

00360   {
00361   arma_extra_debug_sigprint();
00362   
00363   return eOp<T1, eop_exp>(A.get_ref());
00364   }

template<typename T1 >
arma_inline const eOpCube<T1, eop_cube_exp> exp ( const BaseCube< typename T1::elem_type, T1 > &  A  )  [inline]

Definition at line 371 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00372   {
00373   arma_extra_debug_sigprint();
00374   
00375   return eOpCube<T1, eop_cube_exp>(A.get_ref());
00376   }

template<typename T1 >
arma_inline const eOp<T1, eop_trunc_exp> trunc_exp ( const Base< typename T1::elem_type, T1 > &  A  )  [inline]

Definition at line 386 of file fn_misc.hpp.

References Base< elem_type, derived >::get_ref().

Referenced by eop_cube_core< eop_cube_type >::process(), and eop_core< eop_type >::process().

00387   {
00388   arma_extra_debug_sigprint();
00389   
00390   return eOp<T1, eop_trunc_exp>(A.get_ref());
00391   }

template<typename T1 >
arma_inline const eOpCube<T1, eop_cube_trunc_exp> trunc_exp ( const BaseCube< typename T1::elem_type, T1 > &  A  )  [inline]

Definition at line 398 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00399   {
00400   arma_extra_debug_sigprint();
00401   
00402   return eOpCube<T1, eop_cube_trunc_exp>(A.get_ref());
00403   }

template<typename T1 >
arma_inline const eOp<T1, eop_abs> abs ( const Base< typename T1::elem_type, T1 > &  X  )  [inline]
template<typename T1 >
arma_inline const eOpCube<T1, eop_cube_abs> abs ( const BaseCube< typename T1::elem_type, T1 > &  X  )  [inline]

Definition at line 426 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00427   {
00428   arma_extra_debug_sigprint();
00429   
00430   return eOpCube<T1, eop_cube_abs>(X.get_ref());
00431   }

template<typename T1 >
Mat<typename T1::pod_type> abs ( const Base< std::complex< typename T1::pod_type >, T1 > &  X  )  [inline]

Definition at line 438 of file fn_misc.hpp.

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

00439   {
00440   arma_extra_debug_sigprint();
00441   
00442   const Proxy<T1> A(X.get_ref());
00443 
00444   // if T1 is a complex matrix,
00445   // pod_type is the underlying type used by std::complex;
00446   // otherwise pod_type is the same as elem_type
00447   
00448   typedef typename T1::elem_type  in_eT;
00449   typedef typename T1::pod_type  out_eT;
00450 
00451   Mat<out_eT> out(A.n_rows, A.n_cols);
00452   
00453   out_eT* out_mem = out.memptr();
00454   
00455   for(u32 i=0; i<out.n_elem; ++i)
00456     {
00457     out_mem[i] = std::abs(A[i]);
00458     }
00459   
00460   return out;
00461   }

template<typename T1 >
Mat<typename T1::pod_type> abs ( const BaseCube< std::complex< typename T1::pod_type >, T1 > &  X  )  [inline]

Definition at line 468 of file fn_misc.hpp.

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

00469   {
00470   arma_extra_debug_sigprint();
00471   
00472   const ProxyCube<T1> A(X.get_ref());
00473 
00474   // if T1 is a complex matrix,
00475   // pod_type is the underlying type used by std::complex;
00476   // otherwise pod_type is the same as elem_type
00477   
00478   typedef typename T1::elem_type  in_eT;
00479   typedef typename T1::pod_type  out_eT;
00480 
00481   Cube<out_eT> out(A.n_rows, A.n_cols, A.n_slices);
00482   
00483   out_eT* out_mem = out.memptr();
00484   
00485   for(u32 i=0; i<out.n_elem; ++i)
00486     {
00487     out_mem[i] = std::abs(A[i]);
00488     }
00489   
00490   return out;
00491   }

template<typename T1 >
arma_inline const eOp<T1, eop_abs> fabs ( const Base< typename T1::pod_type, T1 > &  X  )  [inline]

Definition at line 501 of file fn_misc.hpp.

References Base< elem_type, derived >::get_ref().

00502   {
00503   arma_extra_debug_sigprint();
00504   
00505   return eOp<T1, eop_abs>(X.get_ref());
00506   }

template<typename T1 >
arma_inline const eOpCube<T1, eop_cube_abs> fabs ( const BaseCube< typename T1::pod_type, T1 > &  X  )  [inline]

Definition at line 513 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00514   {
00515   arma_extra_debug_sigprint();
00516   
00517   return eOpCube<T1, eop_cube_abs>(X.get_ref());
00518   }

template<typename T1 >
arma_inline Mat<typename T1::pod_type> fabs ( const Base< std::complex< typename T1::pod_type >, T1 > &  X  )  [inline]

Definition at line 525 of file fn_misc.hpp.

References abs().

00526   {
00527   arma_extra_debug_sigprint();
00528   
00529   return abs(X);
00530   }

template<typename T1 >
arma_inline Mat<typename T1::pod_type> fabs ( const BaseCube< std::complex< typename T1::pod_type >, T1 > &  X  )  [inline]

Definition at line 537 of file fn_misc.hpp.

References abs().

00538   {
00539   arma_extra_debug_sigprint();
00540   
00541   return abs(X);
00542   }

template<typename T1 >
arma_inline const eOp<T1, eop_square> square ( const Base< typename T1::elem_type, T1 > &  A  )  [inline]

Definition at line 552 of file fn_misc.hpp.

References Base< elem_type, derived >::get_ref().

00553   {
00554   arma_extra_debug_sigprint();
00555   
00556   return eOp<T1, eop_square>(A.get_ref());
00557   }

template<typename T1 >
arma_inline const eOpCube<T1, eop_cube_square> square ( const BaseCube< typename T1::elem_type, T1 > &  A  )  [inline]

Definition at line 564 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00565   {
00566   arma_extra_debug_sigprint();
00567   
00568   return eOpCube<T1, eop_cube_square>(A.get_ref());
00569   }

template<typename T1 >
arma_inline const eOp<T1, eop_sqrt> sqrt ( const Base< typename T1::elem_type, T1 > &  A  )  [inline]
template<typename T1 >
arma_inline const eOpCube<T1, eop_cube_sqrt> sqrt ( const BaseCube< typename T1::elem_type, T1 > &  A  )  [inline]

Definition at line 591 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00592   {
00593   arma_extra_debug_sigprint();
00594   
00595   return eOpCube<T1, eop_cube_sqrt>(A.get_ref());
00596   }

template<typename T1 >
arma_inline const T1& conj ( const Base< typename T1::pod_type, T1 > &  A  )  [inline]
template<typename T1 >
arma_inline const T1& conj ( const BaseCube< typename T1::pod_type, T1 > &  A  )  [inline]

Definition at line 618 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00619   {
00620   arma_extra_debug_sigprint();
00621 
00622   return A.get_ref();
00623   }

template<typename T1 >
arma_inline const eOp<T1, eop_conj> conj ( const Base< std::complex< typename T1::pod_type >, T1 > &  A  )  [inline]

Definition at line 630 of file fn_misc.hpp.

00631   {
00632   arma_extra_debug_sigprint();
00633 
00634   return eOp<T1, eop_conj>(A.get_ref());
00635   }

template<typename T1 >
arma_inline const eOpCube<T1, eop_cube_conj> conj ( const BaseCube< std::complex< typename T1::pod_type >, T1 > &  A  )  [inline]

Definition at line 642 of file fn_misc.hpp.

00643   {
00644   arma_extra_debug_sigprint();
00645 
00646   return eOpCube<T1, eop_cube_conj>(A.get_ref());
00647   }

template<typename T1 >
arma_inline const T1& conj ( const eOp< T1, eop_conj > &  A  )  [inline]

Definition at line 654 of file fn_misc.hpp.

00655   {
00656   arma_extra_debug_sigprint();
00657   
00658   return A.m;
00659   }

template<typename T1 >
arma_inline const T1& conj ( const eOpCube< T1, eop_cube_conj > &  A  )  [inline]

Definition at line 666 of file fn_misc.hpp.

00667   {
00668   arma_extra_debug_sigprint();
00669   
00670   return A.m;
00671   }

template<typename T1 >
arma_inline const eOp<T1, eop_pow> pow ( const Base< typename T1::elem_type, T1 > &  A,
const typename T1::elem_type  exponent 
) [inline]

Definition at line 696 of file fn_misc.hpp.

References Base< elem_type, derived >::get_ref().

Referenced by norm_proxy(), norm_unwrap(), eop_aux::pow(), eop_aux::pow_int(), eop_cube_core< eop_cube_type >::process(), and eop_core< eop_type >::process().

00697   {
00698   arma_extra_debug_sigprint();
00699   
00700   return eOp<T1, eop_pow>(A.get_ref(), exponent);
00701   }

template<typename T1 >
arma_inline const eOpCube<T1, eop_cube_pow> pow ( const BaseCube< typename T1::elem_type, T1 > &  A,
const typename T1::elem_type  exponent 
) [inline]

Definition at line 708 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00709   {
00710   arma_extra_debug_sigprint();
00711   
00712   return eOpCube<T1, eop_cube_pow>(A.get_ref(), exponent);
00713   }

template<typename T1 >
arma_inline const eOp<T1, eop_pow> pow ( const Base< typename T1::elem_type, T1 > &  A,
const typename T1::elem_type::value_type  exponent 
) [inline]

Definition at line 722 of file fn_misc.hpp.

References Base< elem_type, derived >::get_ref().

00723   {
00724   arma_extra_debug_sigprint();
00725   
00726   typedef typename T1::elem_type eT;
00727   
00728   return eOp<T1, eop_pow>(A.get_ref(), eT(exponent));
00729   }

template<typename T1 >
arma_inline const eOpCube<T1, eop_cube_pow> pow ( const BaseCube< typename T1::elem_type, T1 > &  A,
const typename T1::elem_type::value_type  exponent 
) [inline]

Definition at line 736 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00737   {
00738   arma_extra_debug_sigprint();
00739   
00740   typedef typename T1::elem_type eT;
00741   
00742   return eOpCube<T1, eop_cube_pow>(A.get_ref(), eT(exponent));
00743   }

template<typename T1 >
arma_inline const eOp<T1, eop_pow_int> pow ( const Base< typename T1::elem_type, T1 > &  A,
const int  exponent 
) [inline]

Definition at line 755 of file fn_misc.hpp.

References Base< elem_type, derived >::get_ref().

00756   {
00757   arma_extra_debug_sigprint();
00758   
00759   if(exponent >= 0)
00760     {
00761     return eOp<T1, eop_pow_int>(A.get_ref(), exponent, 0);
00762     }
00763   else
00764     {
00765     return eOp<T1, eop_pow_int>(A.get_ref(), -exponent, 1);
00766     }
00767   }

template<typename T1 >
arma_inline const eOpCube<T1, eop_cube_pow_int> pow ( const BaseCube< typename T1::elem_type, T1 > &  A,
const int  exponent 
) [inline]

Definition at line 774 of file fn_misc.hpp.

References BaseCube< elem_type, derived >::get_ref().

00775   {
00776   arma_extra_debug_sigprint();
00777   
00778   if(exponent >= 0)
00779     {
00780     return eOpCube<T1, eop_cube_pow_int>(A.get_ref(),  exponent, 0);
00781     }
00782   else
00783     {
00784     return eOpCube<T1, eop_cube_pow_int>(A.get_ref(), -exponent, 1);
00785     }
00786   }