simplifications

This commit is contained in:
conrad
2025-07-25 16:26:29 +10:00
parent 13e400d50e
commit 4af55d5abb
85 changed files with 157 additions and 470 deletions
+1 -4
View File
@@ -22,12 +22,9 @@
class op_all
struct op_all
: public traits_op_xvec
{
public:
template<typename T1>
static inline bool
all_vec_helper(const Base<typename T1::elem_type, T1>& X);
+1 -4
View File
@@ -22,12 +22,9 @@
class op_any
struct op_any
: public traits_op_xvec
{
public:
template<typename T1>
static inline bool
any_vec_helper(const Base<typename T1::elem_type, T1>& X);
+2 -6
View File
@@ -20,11 +20,9 @@
//! @{
class op_chi2rnd
struct op_chi2rnd
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_chi2rnd>& in);
@@ -38,10 +36,8 @@ class op_chi2rnd
template<typename eT>
class op_chi2rnd_varying_df
struct op_chi2rnd_varying_df
{
public:
arma_aligned std::mt19937_64 motor;
inline ~op_chi2rnd_varying_df();
+1 -3
View File
@@ -21,11 +21,9 @@
class op_chol
struct op_chol
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_chol>& X);
@@ -22,21 +22,17 @@
class op_circshift_vec
struct op_circshift_vec
: public traits_op_passthru
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_circshift_vec>& in);
};
class op_circshift
struct op_circshift
: public traits_op_default
{
public:
template<typename eT> inline static void apply_noalias(Mat<eT>& out, const Mat<eT>& X, const uword len, const uword neg, const uword dim);
};
+2 -6
View File
@@ -22,11 +22,9 @@
class op_clamp
struct op_clamp
: public traits_op_passthru
{
public:
// matrices
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const mtOp<typename T1::elem_type, T1, op_clamp>& in);
@@ -46,11 +44,9 @@ class op_clamp
class op_clamp_cx
struct op_clamp_cx
: public traits_op_passthru
{
public:
// matrices
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const mtOp<typename T1::elem_type, T1, op_clamp_cx>& in);
@@ -20,11 +20,9 @@
//! @{
class op_col_as_mat
struct op_col_as_mat
: public traits_op_default
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const CubeToMatOp<T1, op_col_as_mat>& expr);
};
+1 -3
View File
@@ -20,11 +20,9 @@
//! @{
class op_cond
struct op_cond
: public traits_op_default
{
public:
template<typename T1> static inline typename T1::pod_type apply(const Base<typename T1::elem_type, T1>& X);
template<typename eT> static inline typename get_pod_type<eT>::result apply_diag(const Mat<eT>& A);
+1 -3
View File
@@ -22,11 +22,9 @@
class op_cor
struct op_cor
: public traits_op_default
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op< T1, op_cor>& in);
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op< Op<T1,op_htrans>, op_cor>& in);
};
+1 -3
View File
@@ -22,11 +22,9 @@
class op_cov
struct op_cov
: public traits_op_default
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op< T1, op_cov>& in);
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op< Op<T1,op_htrans>, op_cov>& in);
};
+2 -6
View File
@@ -21,11 +21,9 @@
class op_cumprod
struct op_cumprod
: public traits_op_default
{
public:
template<typename eT>
inline static void apply_noalias(Mat<eT>& out, const Mat<eT>& X, const uword dim);
@@ -35,11 +33,9 @@ class op_cumprod
class op_cumprod_vec
struct op_cumprod_vec
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_cumprod_vec>& in);
};
+2 -6
View File
@@ -21,11 +21,9 @@
class op_cumsum
struct op_cumsum
: public traits_op_default
{
public:
template<typename eT>
inline static void apply_noalias(Mat<eT>& out, const Mat<eT>& X, const uword dim);
@@ -35,11 +33,9 @@ class op_cumsum
class op_cumsum_vec
struct op_cumsum_vec
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_cumsum_vec>& in);
};
+6 -18
View File
@@ -21,11 +21,9 @@
class op_cx_scalar_times
struct op_cx_scalar_times
: public traits_op_passthru
{
public:
template<typename T1>
inline static void
apply
@@ -45,11 +43,9 @@ class op_cx_scalar_times
class op_cx_scalar_plus
struct op_cx_scalar_plus
: public traits_op_passthru
{
public:
template<typename T1>
inline static void
apply
@@ -69,11 +65,9 @@ class op_cx_scalar_plus
class op_cx_scalar_minus_pre
struct op_cx_scalar_minus_pre
: public traits_op_passthru
{
public:
template<typename T1>
inline static void
apply
@@ -93,11 +87,9 @@ class op_cx_scalar_minus_pre
class op_cx_scalar_minus_post
struct op_cx_scalar_minus_post
: public traits_op_passthru
{
public:
template<typename T1>
inline static void
apply
@@ -117,11 +109,9 @@ class op_cx_scalar_minus_post
class op_cx_scalar_div_pre
struct op_cx_scalar_div_pre
: public traits_op_passthru
{
public:
template<typename T1>
inline static void
apply
@@ -141,11 +131,9 @@ class op_cx_scalar_div_pre
class op_cx_scalar_div_post
struct op_cx_scalar_div_post
: public traits_op_passthru
{
public:
template<typename T1>
inline static void
apply
+1 -3
View File
@@ -21,11 +21,9 @@
class op_det
struct op_det
: public traits_op_default
{
public:
template<const uword row, const uword col>
struct pos
{
+2 -6
View File
@@ -21,11 +21,9 @@
class op_diagmat
struct op_diagmat
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_diagmat>& X);
@@ -44,11 +42,9 @@ class op_diagmat
class op_diagmat2
struct op_diagmat2
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_diagmat2>& X);
+2 -6
View File
@@ -21,11 +21,9 @@
class op_diagvec
struct op_diagvec
: public traits_op_col
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_diagvec>& X);
@@ -41,11 +39,9 @@ class op_diagvec
class op_diagvec2
struct op_diagvec2
: public traits_op_col
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_diagvec2>& X);
+2 -6
View File
@@ -21,11 +21,9 @@
class op_diff
struct op_diff
: public traits_op_default
{
public:
template<typename eT>
inline static void apply_noalias(Mat<eT>& out, const Mat<eT>& X, const uword k, const uword dim);
@@ -35,11 +33,9 @@ class op_diff
class op_diff_vec
struct op_diff_vec
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_diff_vec>& in);
};
+4 -12
View File
@@ -22,11 +22,9 @@
//! \brief
//! dot product operation
class op_dot
struct op_dot
: public traits_op_default
{
public:
template<typename eT>
arma_hot inline static
typename arma_not_cx<eT>::result
@@ -81,11 +79,9 @@ class op_dot
//! \brief
//! normalised dot product operation
class op_norm_dot
struct op_norm_dot
: public traits_op_default
{
public:
template<typename T1, typename T2>
arma_hot inline static typename T1::elem_type apply(const T1& X, const T2& Y);
};
@@ -95,11 +91,9 @@ class op_norm_dot
//! \brief
//! complex conjugate dot product operation
class op_cdot
struct op_cdot
: public traits_op_default
{
public:
template<typename eT>
arma_hot inline static eT direct_cdot_generic(const uword n_elem, const eT* const A, const eT* const B);
@@ -121,11 +115,9 @@ class op_cdot
class op_dot_mixed
struct op_dot_mixed
: public traits_op_default
{
public:
template<typename T1, typename T2>
arma_hot inline static
typename promote_type<typename T1::elem_type, typename T2::elem_type>::result
+1 -4
View File
@@ -21,12 +21,9 @@
class op_dotext
struct op_dotext
: public traits_op_default
{
public:
template<typename eT>
inline static eT direct_rowvec_mat_colvec (const eT* A_mem, const Mat<eT>& B, const eT* C_mem);
+2 -6
View File
@@ -22,11 +22,9 @@
class op_expmat
struct op_expmat
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_expmat>& expr);
@@ -36,11 +34,9 @@ class op_expmat
class op_expmat_sym
struct op_expmat_sym
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_expmat_sym>& in);
+3 -9
View File
@@ -22,22 +22,18 @@
class op_fft_real
struct op_fft_real
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply( Mat< std::complex<typename T1::pod_type> >& out, const mtOp<std::complex<typename T1::pod_type>,T1,op_fft_real>& in );
};
class op_fft_cx
struct op_fft_cx
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply( Mat<typename T1::elem_type>& out, const Op<T1,op_fft_cx>& in );
@@ -47,11 +43,9 @@ class op_fft_cx
class op_ifft_cx
struct op_ifft_cx
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply( Mat<typename T1::elem_type>& out, const Op<T1,op_ifft_cx>& in );
};
+6 -18
View File
@@ -22,11 +22,9 @@
class op_find
struct op_find
: public traits_op_col
{
public:
template<typename T1>
inline static uword
helper
@@ -83,55 +81,45 @@ class op_find
class op_find_simple
struct op_find_simple
: public traits_op_col
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_find_simple>& X);
};
class op_find_finite
struct op_find_finite
: public traits_op_col
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_find_finite>& X);
};
class op_find_nonfinite
struct op_find_nonfinite
: public traits_op_col
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_find_nonfinite>& X);
};
class op_find_nan
struct op_find_nan
: public traits_op_col
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_find_nan>& X);
};
class op_find_nonnan
struct op_find_nonnan
: public traits_op_col
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_find_nonnan>& X);
};
@@ -21,11 +21,9 @@
class op_find_unique
struct op_find_unique
: public traits_op_col
{
public:
template<typename T1>
static inline bool apply_helper(Mat<uword>& out, const Proxy<T1>& P, const bool ascending_indices);
+2 -6
View File
@@ -21,11 +21,9 @@
class op_flipud
struct op_flipud
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_flipud>& in);
@@ -39,11 +37,9 @@ class op_flipud
class op_fliplr
struct op_fliplr
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_fliplr>& in);
+1 -3
View File
@@ -22,11 +22,9 @@
class op_hist
struct op_hist
: public traits_op_passthru
{
public:
template<typename eT>
inline static void apply_noalias(Mat<uword>& out, const Mat<eT>& A, const uword n_bins, const uword dim);
+2 -6
View File
@@ -22,10 +22,8 @@
//! 'hermitian transpose' operation
class op_htrans
struct op_htrans
{
public:
template<typename T1>
struct traits
{
@@ -83,10 +81,8 @@ class op_htrans
class op_htrans2
struct op_htrans2
{
public:
template<typename T1>
struct traits
{
@@ -20,11 +20,9 @@
//! @{
class op_index_max
struct op_index_max
: public traits_op_xvec
{
public:
// dense matrices
template<typename T1>
@@ -20,11 +20,9 @@
//! @{
class op_index_min
struct op_index_min
: public traits_op_xvec
{
public:
// dense matrices
template<typename T1>
+3 -9
View File
@@ -21,11 +21,9 @@
class op_inv_gen_default
struct op_inv_gen_default
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_inv_gen_default>& in);
@@ -35,11 +33,9 @@ class op_inv_gen_default
class op_inv_gen_full
struct op_inv_gen_full
: public traits_op_default
{
public:
template<const uword row, const uword col>
struct pos
{
@@ -73,11 +69,9 @@ struct op_inv_gen_state
class op_inv_gen_rcond
struct op_inv_gen_rcond
: public traits_op_default
{
public:
template<typename T1>
inline static bool apply_direct(Mat<typename T1::elem_type>& out_inv, op_inv_gen_state<typename T1::pod_type>& out_state, const Base<typename T1::elem_type,T1>& expr);
};
+3 -9
View File
@@ -21,11 +21,9 @@
class op_inv_spd_default
struct op_inv_spd_default
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_inv_spd_default>& in);
@@ -35,11 +33,9 @@ class op_inv_spd_default
class op_inv_spd_full
struct op_inv_spd_full
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_inv_spd_full>& in);
@@ -62,11 +58,9 @@ struct op_inv_spd_state
class op_inv_spd_rcond
struct op_inv_spd_rcond
: public traits_op_default
{
public:
template<typename T1>
inline static bool apply_direct(Mat<typename T1::elem_type>& out_inv, op_inv_spd_state<typename T1::pod_type>& out_state, const Base<typename T1::elem_type,T1>& expr);
};
+2 -6
View File
@@ -21,11 +21,9 @@
class op_log_det
struct op_log_det
: public traits_op_default
{
public:
template<typename T1>
inline static bool apply_direct(typename T1::elem_type& out_val, typename T1::pod_type& out_sign, const Base<typename T1::elem_type,T1>& expr);
@@ -38,11 +36,9 @@ class op_log_det
class op_log_det_sympd
struct op_log_det_sympd
: public traits_op_default
{
public:
template<typename T1>
inline static bool apply_direct(typename T1::pod_type& out_val, const Base<typename T1::elem_type,T1>& expr);
};
+3 -9
View File
@@ -21,11 +21,9 @@
class op_logmat
struct op_logmat
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat< std::complex<typename T1::elem_type> >& out, const mtOp<std::complex<typename T1::elem_type>,T1,op_logmat>& in);
@@ -38,11 +36,9 @@ class op_logmat
class op_logmat_cx
struct op_logmat_cx
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_logmat_cx>& in);
@@ -65,11 +61,9 @@ class op_logmat_cx
class op_logmat_sympd
struct op_logmat_sympd
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_logmat_sympd>& in);
+1 -3
View File
@@ -20,11 +20,9 @@
//! @{
class op_max
struct op_max
: public traits_op_xvec
{
public:
//
// dense matrices
+1 -3
View File
@@ -21,11 +21,9 @@
//! Class for finding mean values of a matrix
class op_mean
struct op_mean
: public traits_op_xvec
{
public:
// dense matrices
template<typename T1>
+1 -3
View File
@@ -39,11 +39,9 @@ operator< (const arma_cx_median_packet<T>& A, const arma_cx_median_packet<T>& B)
class op_median
struct op_median
: public traits_op_xvec
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_median>& expr);
+1 -3
View File
@@ -20,11 +20,9 @@
//! @{
class op_min
struct op_min
: public traits_op_xvec
{
public:
//
// dense matrices
+5 -15
View File
@@ -21,11 +21,9 @@
class op_real
struct op_real
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply( Mat<typename T1::pod_type>& out, const mtOp<typename T1::pod_type, T1, op_real>& X);
@@ -35,11 +33,9 @@ class op_real
class op_imag
struct op_imag
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply( Mat<typename T1::pod_type>& out, const mtOp<typename T1::pod_type, T1, op_imag>& X);
@@ -49,11 +45,9 @@ class op_imag
class op_abs
struct op_abs
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply( Mat<typename T1::pod_type>& out, const mtOp<typename T1::pod_type, T1, op_abs>& X);
@@ -63,11 +57,9 @@ class op_abs
class op_arg
struct op_arg
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply( Mat<typename T1::pod_type>& out, const mtOp<typename T1::pod_type, T1, op_arg>& X);
@@ -77,11 +69,9 @@ class op_arg
class op_replace
struct op_replace
: public traits_op_passthru
{
public:
template<typename eT, typename T1> inline static void apply(Mat<eT>& out, const mtOp<eT,T1,op_replace>& in);
template<typename eT, typename T1> inline static void apply(Cube<eT>& out, const mtOpCube<eT,T1,op_replace>& in);
+1 -3
View File
@@ -22,11 +22,9 @@
class op_nonzeros
struct op_nonzeros
: public traits_op_col
{
public:
// for dense matrices
template<typename T1>
+1 -3
View File
@@ -50,11 +50,9 @@ struct norm2est_randu_filler< std::complex<T> >
class op_norm2est
struct op_norm2est
: public traits_op_default
{
public:
template<typename T1> inline static typename T1::pod_type norm2est(const Base<typename T1::elem_type, T1>& X, const typename T1::pod_type tolerance, const uword max_iter);
template<typename T1> inline static typename T1::pod_type norm2est(const SpBase<typename T1::elem_type, T1>& X, const typename T1::pod_type tolerance, const uword max_iter);
};
+1 -3
View File
@@ -20,11 +20,9 @@
//! @{
class op_norm
struct op_norm
: public traits_op_default
{
public:
template<typename T1> arma_hot inline static typename T1::pod_type vec_norm_1(const Proxy<T1>& P, const typename arma_not_cx<typename T1::elem_type>::result* junk = nullptr);
template<typename T1> arma_hot inline static typename T1::pod_type vec_norm_1(const Proxy<T1>& P, const typename arma_cx_only<typename T1::elem_type>::result* junk = nullptr);
@@ -22,21 +22,17 @@
class op_normalise_vec
struct op_normalise_vec
: public traits_op_passthru
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_normalise_vec>& in);
};
class op_normalise_mat
struct op_normalise_mat
: public traits_op_default
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_normalise_mat>& in);
template<typename eT> inline static void apply(Mat<eT>& out, const Mat<eT>& A, const uword p, const uword dim);
+2 -6
View File
@@ -20,11 +20,9 @@
//! @{
class op_omit
struct op_omit
: public traits_op_col
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_omit>& in);
@@ -34,11 +32,9 @@ class op_omit
class op_omit_cube
struct op_omit_cube
: public traits_op_col
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const CubeToMatOp<T1, op_omit_cube>& in);
template<typename T1, typename functor>
@@ -22,11 +22,9 @@
class op_orth
struct op_orth
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1, op_orth>& expr);
@@ -36,11 +34,9 @@ class op_orth
class op_null
struct op_null
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1, op_null>& expr);
+2 -6
View File
@@ -22,11 +22,9 @@
class op_pinv_default
struct op_pinv_default
: public traits_op_default
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_pinv_default>& in);
template<typename T1> inline static bool apply_direct(Mat<typename T1::elem_type>& out, const Base<typename T1::elem_type,T1>& expr);
@@ -34,11 +32,9 @@ class op_pinv_default
class op_pinv
struct op_pinv
: public traits_op_default
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_pinv>& in);
template<typename T1> inline static bool apply_direct(Mat<typename T1::elem_type>& out, const Base<typename T1::elem_type,T1>& expr, typename T1::pod_type tol, const uword method_id);
+2 -6
View File
@@ -22,11 +22,9 @@
class op_powmat
struct op_powmat
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_powmat>& expr);
@@ -39,11 +37,9 @@ class op_powmat
class op_powmat_cx
struct op_powmat_cx
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat< std::complex<typename T1::pod_type> >& out, const mtOp<std::complex<typename T1::pod_type>,T1,op_powmat_cx>& expr);
+1 -3
View File
@@ -21,11 +21,9 @@
class op_princomp
struct op_princomp
: public traits_op_default
{
public:
template<typename T1>
inline static bool
direct_princomp
+1 -3
View File
@@ -20,11 +20,9 @@
//! @{
class op_prod
struct op_prod
: public traits_op_xvec
{
public:
template<typename eT>
inline static void apply_noalias(Mat<eT>& out, const Mat<eT>& X, const uword dim);
+1 -3
View File
@@ -20,11 +20,9 @@
//! @{
class op_range
struct op_range
: public traits_op_xvec
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_range>& in);
+1 -3
View File
@@ -22,11 +22,9 @@
class op_rank
struct op_rank
: public traits_op_default
{
public:
template<typename T1> inline static bool apply(uword& out, const Base<typename T1::elem_type,T1>& expr, const typename T1::pod_type tol);
template<typename eT> inline static bool apply_gen(uword& out, Mat<eT>& A, typename get_pod_type<eT>::result tol);
+1 -3
View File
@@ -20,11 +20,9 @@
//! @{
class op_rcond
struct op_rcond
: public traits_op_default
{
public:
template<typename T1> static inline typename T1::pod_type apply(const Base<typename T1::elem_type, T1>& X);
};
+10 -30
View File
@@ -21,11 +21,9 @@
class op_rel_lt_pre
struct op_rel_lt_pre
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_lt_pre>& X);
@@ -35,11 +33,9 @@ class op_rel_lt_pre
class op_rel_lt_post
struct op_rel_lt_post
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_lt_post>& X);
@@ -49,11 +45,9 @@ class op_rel_lt_post
class op_rel_gt_pre
struct op_rel_gt_pre
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_gt_pre>& X);
@@ -63,11 +57,9 @@ class op_rel_gt_pre
class op_rel_gt_post
struct op_rel_gt_post
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_gt_post>& X);
@@ -77,11 +69,9 @@ class op_rel_gt_post
class op_rel_lteq_pre
struct op_rel_lteq_pre
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_lteq_pre>& X);
@@ -91,11 +81,9 @@ class op_rel_lteq_pre
class op_rel_lteq_post
struct op_rel_lteq_post
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_lteq_post>& X);
@@ -105,11 +93,9 @@ class op_rel_lteq_post
class op_rel_gteq_pre
struct op_rel_gteq_pre
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_gteq_pre>& X);
@@ -119,11 +105,9 @@ class op_rel_gteq_pre
class op_rel_gteq_post
struct op_rel_gteq_post
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_gteq_post>& X);
@@ -133,11 +117,9 @@ class op_rel_gteq_post
class op_rel_eq
struct op_rel_eq
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_eq>& X);
@@ -147,11 +129,9 @@ class op_rel_eq
class op_rel_noteq
struct op_rel_noteq
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_rel_noteq>& X);
+1 -3
View File
@@ -22,11 +22,9 @@
class op_repelem
struct op_repelem
: public traits_op_default
{
public:
template<typename obj> inline static void apply_noalias(Mat<typename obj::elem_type>& out, const obj& X, const uword copies_per_row, const uword copies_per_col);
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_repelem>& in);
+1 -3
View File
@@ -22,11 +22,9 @@
class op_repmat
struct op_repmat
: public traits_op_default
{
public:
template<typename obj> inline static void apply_noalias(Mat<typename obj::elem_type>& out, const obj& X, const uword copies_per_row, const uword copies_per_col);
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_repmat>& in);
+1 -3
View File
@@ -22,11 +22,9 @@
class op_reshape
struct op_reshape
: public traits_op_default
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_reshape>& in);
template<typename eT> inline static void apply_mat_inplace(Mat<eT>& A, const uword new_n_rows, const uword new_n_cols);
+1 -3
View File
@@ -22,11 +22,9 @@
class op_resize
struct op_resize
: public traits_op_default
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_resize>& in);
template<typename eT> inline static void apply_mat_inplace(Mat<eT>& A, const uword new_n_rows, const uword new_n_cols);
+2 -6
View File
@@ -21,22 +21,18 @@
class op_reverse
struct op_reverse
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_reverse>& in);
};
class op_reverse_vec
struct op_reverse_vec
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_reverse_vec>& in);
};
+1 -3
View File
@@ -21,11 +21,9 @@
class op_roots
struct op_roots
: public traits_op_col
{
public:
template<typename T1>
inline static void apply(Mat< std::complex<typename T1::pod_type> >& out, const mtOp<std::complex<typename T1::pod_type>, T1, op_roots>& expr);
@@ -20,11 +20,9 @@
//! @{
class op_row_as_mat
struct op_row_as_mat
: public traits_op_default
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const CubeToMatOp<T1, op_row_as_mat>& expr);
};
+2 -6
View File
@@ -22,11 +22,9 @@
class op_shuffle
struct op_shuffle
: public traits_op_default
{
public:
template<typename eT> inline static void apply_direct(Mat<eT>& out, const Mat<eT>& X, const uword dim);
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_shuffle>& in);
@@ -34,11 +32,9 @@ class op_shuffle
class op_shuffle_vec
struct op_shuffle_vec
: public traits_op_passthru
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_shuffle_vec>& in);
};
+2 -6
View File
@@ -21,11 +21,9 @@
class op_sort
struct op_sort
: public traits_op_default
{
public:
template<typename eT>
inline static void direct_sort(eT* X, const uword N, const uword sort_mode = 0);
@@ -41,11 +39,9 @@ class op_sort
class op_sort_vec
struct op_sort_vec
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_sort_vec>& in);
};
@@ -21,11 +21,9 @@
class op_sort_index
struct op_sort_index
: public traits_op_col
{
public:
template<typename T1>
static inline bool apply_helper(Mat<uword>& out, const Proxy<T1>& P, const uword sort_mode);
@@ -20,11 +20,9 @@
//! @{
class op_sp_as_dense
struct op_sp_as_dense
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1, op_sp_as_dense>& expr);
};
@@ -21,11 +21,9 @@
class op_sp_diagvec
struct op_sp_diagvec
: public traits_op_col
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const mtSpReduceOp<typename T1::elem_type, T1, op_sp_diagvec>& in);
};
+1 -3
View File
@@ -19,11 +19,9 @@
//! \addtogroup op_sp_max
//! @{
class op_sp_max
struct op_sp_max
: public traits_op_xvec
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const mtSpReduceOp<typename T1::elem_type, T1, op_sp_max>& in);
+1 -3
View File
@@ -21,11 +21,9 @@
//! Class for finding mean values of a sparse matrix
class op_sp_mean
struct op_sp_mean
: public traits_op_xvec
{
public:
// Apply mean into an output sparse matrix (or vector).
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const mtSpReduceOp<typename T1::elem_type, T1, op_sp_mean>& in);
+1 -3
View File
@@ -19,11 +19,9 @@
//! \addtogroup op_sp_min
//! @{
class op_sp_min
struct op_sp_min
: public traits_op_xvec
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const mtSpReduceOp<typename T1::elem_type, T1, op_sp_min>& in);
+2 -6
View File
@@ -22,11 +22,9 @@
// Subtract a sparse object from a scalar; the output will be a dense object.
class op_sp_minus_pre
struct op_sp_minus_pre
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1,op_sp_minus_pre>& in);
@@ -42,11 +40,9 @@ class op_sp_minus_pre
// Subtract a scalar from a sparse object; the output will be a dense object.
class op_sp_minus_post
struct op_sp_minus_post
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1,op_sp_minus_post>& in);
@@ -22,11 +22,9 @@
class op_sp_nonzeros
struct op_sp_nonzeros
: public traits_op_col
{
public:
template<typename T1>
static inline void apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1, op_sp_nonzeros>& X);
};
+1 -3
View File
@@ -22,11 +22,9 @@
// Add a scalar to a sparse matrix; this will return a dense matrix.
class op_sp_plus
struct op_sp_plus
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const SpToDOp<T1,op_sp_plus>& in);
@@ -21,11 +21,9 @@
class op_sp_stddev
struct op_sp_stddev
: public traits_op_xvec
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::pod_type>& out, const mtSpReduceOp<typename T1::pod_type, T1, op_sp_stddev>& in);
+1 -3
View File
@@ -20,11 +20,9 @@
//! @{
class op_sp_sum
struct op_sp_sum
: public traits_op_xvec
{
public:
template<typename eT, typename T1>
inline static void apply(Mat<eT>& out, const mtSpReduceOp<eT, T1, op_sp_sum>& in);
+1 -3
View File
@@ -22,11 +22,9 @@
//! Class for finding variance values of a sparse matrix
class op_sp_var
struct op_sp_var
: public traits_op_xvec
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::pod_type>& out, const mtSpReduceOp<typename T1::pod_type, T1, op_sp_var>& in);
@@ -20,11 +20,9 @@
//! @{
class op_sp_vecnorm
struct op_sp_vecnorm
: public traits_op_xvec
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::pod_type>& out, const mtSpReduceOp<typename T1::pod_type, T1, op_sp_vecnorm>& expr);
@@ -36,11 +34,9 @@ class op_sp_vecnorm
//
class op_sp_vecnorm_ext
struct op_sp_vecnorm_ext
: public traits_op_xvec
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::pod_type>& out, const mtSpReduceOp<typename T1::pod_type, T1, op_sp_vecnorm_ext>& expr);
+3 -9
View File
@@ -21,11 +21,9 @@
class op_sqrtmat
struct op_sqrtmat
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat< std::complex<typename T1::elem_type> >& out, const mtOp<std::complex<typename T1::elem_type>,T1,op_sqrtmat>& in);
@@ -38,11 +36,9 @@ class op_sqrtmat
class op_sqrtmat_cx
struct op_sqrtmat_cx
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_sqrtmat_cx>& in);
@@ -61,11 +57,9 @@ class op_sqrtmat_cx
class op_sqrtmat_sympd
struct op_sqrtmat_sympd
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_sqrtmat_sympd>& in);
+1 -3
View File
@@ -21,11 +21,9 @@
class op_stddev
struct op_stddev
: public traits_op_xvec
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::pod_type>& out, const mtOp<typename T1::pod_type, T1, op_stddev>& in);
+2 -6
View File
@@ -22,10 +22,8 @@
//! 'matrix transpose' operation (simple transpose, ie. without taking the conjugate of the elements)
class op_strans
struct op_strans
{
public:
template<typename T1>
struct traits
{
@@ -72,10 +70,8 @@ class op_strans
class op_strans_cube
struct op_strans_cube
{
public:
template<typename eT>
inline static void apply_noalias(Cube<eT>& out, const Cube<eT>& X);
};
+1 -3
View File
@@ -20,11 +20,9 @@
//! @{
class op_sum
struct op_sum
: public traits_op_xvec
{
public:
// dense matrices
template<typename T1>
+4 -12
View File
@@ -21,44 +21,36 @@
class op_symmatu
struct op_symmatu
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_symmatu>& in);
};
class op_symmatl
struct op_symmatl
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_symmatl>& in);
};
class op_symmatu_cx
struct op_symmatu_cx
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_symmatu_cx>& in);
};
class op_symmatl_cx
struct op_symmatl_cx
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_symmatl_cx>& in);
};
+2 -6
View File
@@ -21,22 +21,18 @@
class op_toeplitz
struct op_toeplitz
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_toeplitz>& in);
};
class op_toeplitz_c
struct op_toeplitz_c
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_toeplitz_c>& in);
};
+3 -9
View File
@@ -23,11 +23,9 @@
// NOTE: don't split op_trimat into separate op_trimatu and op_trimatl classes,
// NOTE: as several instances elsewhere rely on trimatu() and trimatl() producing the same type
class op_trimat
struct op_trimat
: public traits_op_default
{
public:
template<typename eT>
inline static void fill_zeros(Mat<eT>& A, const bool upper);
@@ -45,11 +43,9 @@ class op_trimat
class op_trimatu_ext
struct op_trimatu_ext
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_trimatu_ext>& in);
@@ -59,11 +55,9 @@ class op_trimatu_ext
class op_trimatl_ext
struct op_trimatl_ext
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_trimatl_ext>& in);
+3 -5
View File
@@ -22,11 +22,9 @@
class op_unique
struct op_unique
: public traits_op_col
{
public:
template<typename T1>
inline static bool apply_helper(Mat<typename T1::elem_type>& out, const Proxy<T1>& P, const bool P_is_row);
@@ -36,10 +34,10 @@ class op_unique
class op_unique_vec
struct op_unique_vec
: public traits_op_passthru
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_unique_vec>& in);
+1 -3
View File
@@ -21,11 +21,9 @@
class op_var
struct op_var
: public traits_op_xvec
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::pod_type>& out, const mtOp<typename T1::pod_type, T1, op_var>& in);
+2 -6
View File
@@ -20,11 +20,9 @@
//! @{
class op_vecnorm
struct op_vecnorm
: public traits_op_xvec
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::pod_type>& out, const mtOp<typename T1::pod_type, T1, op_vecnorm>& in);
@@ -36,11 +34,9 @@ class op_vecnorm
};
class op_vecnorm_ext
struct op_vecnorm_ext
: public traits_op_xvec
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::pod_type>& out, const mtOp<typename T1::pod_type, T1, op_vecnorm_ext>& in);
+4 -12
View File
@@ -22,11 +22,9 @@
class op_vectorise_col
struct op_vectorise_col
: public traits_op_col
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_vectorise_col>& in);
template<typename T1> inline static void apply_direct(Mat<typename T1::elem_type>& out, const T1& expr);
@@ -38,11 +36,9 @@ class op_vectorise_col
class op_vectorise_row
struct op_vectorise_row
: public traits_op_row
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_vectorise_row>& in);
template<typename T1> inline static void apply_direct(Mat<typename T1::elem_type>& out, const T1& expr);
@@ -52,21 +48,17 @@ class op_vectorise_row
class op_vectorise_all
struct op_vectorise_all
: public traits_op_xvec
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_vectorise_all>& in);
};
class op_vectorise_cube_col
struct op_vectorise_cube_col
: public traits_op_col
{
public:
template<typename T1> inline static void apply(Mat<typename T1::elem_type>& out, const CubeToMatOp<T1, op_vectorise_cube_col>& in);
template<typename eT> inline static void apply_subview(Mat<eT>& out, const subview_cube<eT>& sv);
+2 -6
View File
@@ -20,11 +20,9 @@
//! @{
class op_wishrnd
struct op_wishrnd
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_wishrnd>& expr);
@@ -40,11 +38,9 @@ class op_wishrnd
class op_iwishrnd
struct op_iwishrnd
: public traits_op_default
{
public:
template<typename T1>
inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_iwishrnd>& expr);