Classes | Functions

Op_misc

//! More...

Classes

class  op_real
class  op_imag
class  op_abs

Functions

template<typename T1 >
static void op_real::apply (Mat< typename T1::pod_type > &out, const mtOp< typename T1::pod_type, T1, op_real > &X)
template<typename T1 >
static void op_imag::apply (Mat< typename T1::pod_type > &out, const mtOp< typename T1::pod_type, T1, op_imag > &X)
template<typename T1 >
static void op_abs::apply (Mat< typename T1::pod_type > &out, const mtOp< typename T1::pod_type, T1, op_abs > &X)

Detailed Description

//!


Function Documentation

template<typename T1 >
void op_real::apply ( Mat< typename T1::pod_type > &  out,
const mtOp< typename T1::pod_type, T1, op_real > &  X 
) [inline, static, inherited]

Definition at line 24 of file op_misc_meat.hpp.

References mtOp< out_eT, T1, op_type >::m, Mat< eT >::memptr(), real(), and Mat< eT >::set_size().

  {
  arma_extra_debug_sigprint();
  
  typedef typename T1::pod_type T;
  
  const Proxy<T1> A(X.m);
  
  out.set_size(A.n_rows, A.n_cols);
  
  const u32 n_elem  = A.n_elem;
        T*  out_mem = out.memptr();
  
  for(u32 i=0; i<n_elem; ++i)
    {
    out_mem[i] = std::real(A[i]);
    }
  }

template<typename T1 >
void op_imag::apply ( Mat< typename T1::pod_type > &  out,
const mtOp< typename T1::pod_type, T1, op_imag > &  X 
) [inline, static, inherited]

Definition at line 47 of file op_misc_meat.hpp.

References imag(), mtOp< out_eT, T1, op_type >::m, Mat< eT >::memptr(), and Mat< eT >::set_size().

  {
  arma_extra_debug_sigprint();
  
  typedef typename T1::pod_type T;
  
  const Proxy<T1> A(X.m);
  
  out.set_size(A.n_rows, A.n_cols);
  
  const u32 n_elem  = A.n_elem;
        T*  out_mem = out.memptr();
  
  for(u32 i=0; i<n_elem; ++i)
    {
    out_mem[i] = std::imag(A[i]);
    }
  }

template<typename T1 >
void op_abs::apply ( Mat< typename T1::pod_type > &  out,
const mtOp< typename T1::pod_type, T1, op_abs > &  X 
) [inline, static, inherited]

Definition at line 70 of file op_misc_meat.hpp.

References abs(), mtOp< out_eT, T1, op_type >::m, Mat< eT >::memptr(), and Mat< eT >::set_size().

  {
  arma_extra_debug_sigprint();
  
  typedef typename T1::pod_type T;
  
  const Proxy<T1> A(X.m);
  
  out.set_size(A.n_rows, A.n_cols);
  
  const u32 n_elem  = A.n_elem;
        T*  out_mem = out.memptr();
  
  for(u32 i=0; i<n_elem; ++i)
    {
    out_mem[i] = std::abs(A[i]);
    }
  }