Col_meat.hpp   Col_meat.hpp 
skipping to change at line 420 skipping to change at line 420
//! construct a column vector from Op, i.e. run the previously delayed oper ations; the result of the operations must have exactly one column //! construct a column vector from Op, i.e. run the previously delayed oper ations; the result of the operations must have exactly one column
template<typename eT> template<typename eT>
template<typename T1, typename op_type> template<typename T1, typename op_type>
inline inline
const Col<eT>& const Col<eT>&
Col<eT>::operator=(const Op<T1, op_type>& X) Col<eT>::operator=(const Op<T1, op_type>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
Mat<eT>::operator=(X); Mat<eT>::operator=(X);
arma_debug_check( (Mat<eT>::n_cols > 1), "Col::operator=(): given matrix can't be interpreted as a column vector" ); arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
return *this; return *this;
} }
template<typename eT> template<typename eT>
template<typename T1, typename op_type> template<typename T1, typename op_type>
inline inline
const Col<eT>& const Col<eT>&
Col<eT>::operator*=(const Op<T1, op_type>& X) Col<eT>::operator*=(const Op<T1, op_type>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
Mat<eT>::operator*=(X); Mat<eT>::operator*=(X);
arma_debug_check( (Mat<eT>::n_cols > 1), "Col::operator=(): incompatible dimensions" ); arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
return *this; return *this;
} }
template<typename eT> template<typename eT>
template<typename T1, typename eop_type> template<typename T1, typename eop_type>
inline inline
Col<eT>::Col(const eOp<T1, eop_type>& X) Col<eT>::Col(const eOp<T1, eop_type>& X)
: Mat<eT>(X) : Mat<eT>(X)
{ {
skipping to change at line 459 skipping to change at line 459
template<typename eT> template<typename eT>
template<typename T1, typename eop_type> template<typename T1, typename eop_type>
inline inline
const Col<eT>& const Col<eT>&
Col<eT>::operator=(const eOp<T1, eop_type>& X) Col<eT>::operator=(const eOp<T1, eop_type>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
Mat<eT>::operator=(X); Mat<eT>::operator=(X);
arma_debug_check( (Mat<eT>::n_cols > 1), "Col::operator=(): given matrix can't be interpreted as a column vector" ); arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
return *this; return *this;
} }
template<typename eT> template<typename eT>
template<typename T1, typename eop_type> template<typename T1, typename eop_type>
inline inline
const Col<eT>& const Col<eT>&
Col<eT>::operator*=(const eOp<T1, eop_type>& X) Col<eT>::operator*=(const eOp<T1, eop_type>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
Mat<eT>::operator*=(X); Mat<eT>::operator*=(X);
arma_debug_check( (Mat<eT>::n_cols > 1), "Col::operator=(): incompatible arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions"
dimensions" ); );
return *this;
}
template<typename eT>
template<typename T1, typename op_type>
inline
Col<eT>::Col(const mtOp<eT, T1, op_type>& X)
: Mat<eT>(X)
{
arma_extra_debug_sigprint();
arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions"
);
}
template<typename eT>
template<typename T1, typename op_type>
inline
const Col<eT>&
Col<eT>::operator=(const mtOp<eT, T1, op_type>& X)
{
arma_extra_debug_sigprint();
Mat<eT>::operator=(X);
arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions"
);
return *this;
}
template<typename eT>
template<typename T1, typename op_type>
inline
const Col<eT>&
Col<eT>::operator*=(const mtOp<eT, T1, op_type>& X)
{
arma_extra_debug_sigprint();
Mat<eT>::operator*=(X);
arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions"
);
return *this; return *this;
} }
//! construct a column vector from Glue, i.e. run the previously delayed op erations; the result of the operations must have exactly one column //! construct a column vector from Glue, i.e. run the previously delayed op erations; the result of the operations must have exactly one column
template<typename eT> template<typename eT>
template<typename T1, typename T2, typename glue_type> template<typename T1, typename T2, typename glue_type>
inline inline
Col<eT>::Col(const Glue<T1, T2, glue_type>& X) Col<eT>::Col(const Glue<T1, T2, glue_type>& X)
: Mat<eT>(X) : Mat<eT>(X)
skipping to change at line 562 skipping to change at line 601
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
Mat<eT>::operator*=(X); Mat<eT>::operator*=(X);
arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" ); arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions" );
return *this; return *this;
} }
template<typename eT>
template<typename T1, typename T2, typename glue_type>
inline
Col<eT>::Col(const mtGlue<eT, T1, T2, glue_type>& X)
: Mat<eT>(X)
{
arma_extra_debug_sigprint();
arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions"
);
}
template<typename eT>
template<typename T1, typename T2, typename glue_type>
inline
const Col<eT>&
Col<eT>::operator=(const mtGlue<eT, T1, T2, glue_type>& X)
{
arma_extra_debug_sigprint();
Mat<eT>::operator=(X);
arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions"
);
return *this;
}
template<typename eT>
template<typename T1, typename T2, typename glue_type>
inline
const Col<eT>&
Col<eT>::operator*=(const mtGlue<eT, T1, T2, glue_type>& X)
{
arma_extra_debug_sigprint();
Mat<eT>::operator*=(X);
arma_debug_check( (Mat<eT>::n_cols > 1), "Col(): incompatible dimensions"
);
return *this;
}
//! change the number of rows //! change the number of rows
template<typename eT> template<typename eT>
inline inline
void void
Col<eT>::set_size(const u32 in_n_elem) Col<eT>::set_size(const u32 in_n_elem)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
Mat<eT>::set_size(in_n_elem,1); Mat<eT>::set_size(in_n_elem,1);
} }
 End of changes. 5 change blocks. 
5 lines changed or deleted 91 lines changed or added


 Col_proto.hpp   Col_proto.hpp 
skipping to change at line 81 skipping to change at line 81
arma_inline const subview_col<eT> rows(const u32 in_row1, const u32 in_ro w2) const; arma_inline const subview_col<eT> rows(const u32 in_row1, const u32 in_ro w2) const;
template<typename T1, typename op_type> inline Col(cons t Op<T1, op_type>& X); template<typename T1, typename op_type> inline Col(cons t Op<T1, op_type>& X);
template<typename T1, typename op_type> inline const Col& operator=(cons t Op<T1, op_type>& X); template<typename T1, typename op_type> inline const Col& operator=(cons t Op<T1, op_type>& X);
template<typename T1, typename op_type> inline const Col& operator*=(cons t Op<T1, op_type>& X); template<typename T1, typename op_type> inline const Col& operator*=(cons t Op<T1, op_type>& X);
template<typename T1, typename eop_type> inline Col(con st eOp<T1, eop_type>& X); template<typename T1, typename eop_type> inline Col(con st eOp<T1, eop_type>& X);
template<typename T1, typename eop_type> inline const Col& operator=(con st eOp<T1, eop_type>& X); template<typename T1, typename eop_type> inline const Col& operator=(con st eOp<T1, eop_type>& X);
template<typename T1, typename eop_type> inline const Col& operator*=(con st eOp<T1, eop_type>& X); template<typename T1, typename eop_type> inline const Col& operator*=(con st eOp<T1, eop_type>& X);
template<typename T1, typename op_type> inline Col(cons
t mtOp<eT, T1, op_type>& X);
template<typename T1, typename op_type> inline const Col& operator=(cons
t mtOp<eT, T1, op_type>& X);
template<typename T1, typename op_type> inline const Col& operator*=(cons
t mtOp<eT, T1, op_type>& X);
template<typename T1, typename T2, typename glue_type> inline Col(const Glue<T1, T2, glue_type>& X); template<typename T1, typename T2, typename glue_type> inline Col(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Col& operator=(const Glue<T1, T2, glue_type>& X); template<typename T1, typename T2, typename glue_type> inline const Col& operator=(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Col& operator*=(const Glue<T1, T2, glue_type>& X); template<typename T1, typename T2, typename glue_type> inline const Col& operator*=(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline Col(const eGlue<T1, T2, eglue_type>& X); template<typename T1, typename T2, typename eglue_type> inline Col(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Col& operator=(const eGlue<T1, T2, eglue_type>& X); template<typename T1, typename T2, typename eglue_type> inline const Col& operator=(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Col& operator*=(const eGlue<T1, T2, eglue_type>& X); template<typename T1, typename T2, typename eglue_type> inline const Col& operator*=(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename glue_type> inline
Col(const mtGlue<eT, T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Col&
operator=(const mtGlue<eT, T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Col&
operator*=(const mtGlue<eT, T1, T2, glue_type>& X);
inline void set_size(const u32 n_elem); inline void set_size(const u32 n_elem);
inline void set_size(const u32 n_rows, const u32 n_cols); inline void set_size(const u32 n_rows, const u32 n_cols);
template<typename eT2> template<typename eT2>
inline void copy_size(const Mat<eT2>& m); inline void copy_size(const Mat<eT2>& m);
inline void zeros(); inline void zeros();
inline void zeros(const u32 n_elem); inline void zeros(const u32 n_elem);
inline void zeros(const u32 n_rows, const u32 n_cols); inline void zeros(const u32 n_rows, const u32 n_cols);
 End of changes. 2 change blocks. 
0 lines changed or deleted 14 lines changed or added


 Mat_meat.hpp   Mat_meat.hpp 
skipping to change at line 1419 skipping to change at line 1419
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
isnt_same_type<eT, typename T1::elem_type>::check(); isnt_same_type<eT, typename T1::elem_type>::check();
eop_type::apply_inplace_div(*this, X); eop_type::apply_inplace_div(*this, X);
return *this; return *this;
} }
//! EXPERIMENTAL
template<typename eT>
template<typename T1, typename op_type>
inline
Mat<eT>::Mat(const mtOp<eT, T1, op_type>& X)
: n_rows(0)
, n_cols(0)
, n_elem(0)
, use_aux_mem(false)
//, mem(0)
, mem(mem)
{
arma_extra_debug_sigprint_this(this);
op_type::apply(*this, X);
}
//! EXPERIMENTAL
template<typename eT>
template<typename T1, typename op_type>
inline
const Mat<eT>&
Mat<eT>::operator=(const mtOp<eT, T1, op_type>& X)
{
arma_extra_debug_sigprint();
op_type::apply(*this, X);
return *this;
}
//! EXPERIMENTAL
template<typename eT>
template<typename T1, typename op_type>
inline
const Mat<eT>&
Mat<eT>::operator+=(const mtOp<eT, T1, op_type>& X)
{
arma_extra_debug_sigprint();
const Mat<eT> m(X);
return (*this).operator+=(m);
}
//! EXPERIMENTAL
template<typename eT>
template<typename T1, typename op_type>
inline
const Mat<eT>&
Mat<eT>::operator-=(const mtOp<eT, T1, op_type>& X)
{
arma_extra_debug_sigprint();
const Mat<eT> m(X);
return (*this).operator-=(m);
}
//! EXPERIMENTAL
template<typename eT>
template<typename T1, typename op_type>
inline
const Mat<eT>&
Mat<eT>::operator*=(const mtOp<eT, T1, op_type>& X)
{
arma_extra_debug_sigprint();
const Mat<eT> m(X);
return (*this).operator*=(m);
}
//! EXPERIMENTAL
template<typename eT>
template<typename T1, typename op_type>
inline
const Mat<eT>&
Mat<eT>::operator%=(const mtOp<eT, T1, op_type>& X)
{
arma_extra_debug_sigprint();
const Mat<eT> m(X);
return (*this).operator%=(m);
}
//! EXPERIMENTAL
template<typename eT>
template<typename T1, typename op_type>
inline
const Mat<eT>&
Mat<eT>::operator/=(const mtOp<eT, T1, op_type>& X)
{
arma_extra_debug_sigprint();
const Mat<eT> m(X);
return (*this).operator/=(m);
}
//! create a matrix from Glue, i.e. run the previously delayed binary opera tions //! create a matrix from Glue, i.e. run the previously delayed binary opera tions
template<typename eT> template<typename eT>
template<typename T1, typename T2, typename glue_type> template<typename T1, typename T2, typename glue_type>
inline inline
Mat<eT>::Mat(const Glue<T1, T2, glue_type>& X) Mat<eT>::Mat(const Glue<T1, T2, glue_type>& X)
: n_rows(0) : n_rows(0)
, n_cols(0) , n_cols(0)
, n_elem(0) , n_elem(0)
, use_aux_mem(false) , use_aux_mem(false)
//, mem(0) //, mem(0)
skipping to change at line 1683 skipping to change at line 1784
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
isnt_same_type<eT, typename T1::elem_type>::check(); isnt_same_type<eT, typename T1::elem_type>::check();
isnt_same_type<eT, typename T2::elem_type>::check(); isnt_same_type<eT, typename T2::elem_type>::check();
eglue_type::apply_inplace_div(*this, X); eglue_type::apply_inplace_div(*this, X);
return *this; return *this;
} }
//! EXPERIMENTAL: create a matrix from mtGlue, i.e. run the previously dela
yed binary operations
template<typename eT>
template<typename T1, typename T2, typename glue_type>
inline
Mat<eT>::Mat(const mtGlue<eT, T1, T2, glue_type>& X)
: n_rows(0)
, n_cols(0)
, n_elem(0)
, use_aux_mem(false)
//, mem(0)
, mem(mem)
{
arma_extra_debug_sigprint_this(this);
glue_type::apply(*this, X);
}
//! EXPERIMENTAL: create a matrix from Glue, i.e. run the previously delaye
d binary operations
template<typename eT>
template<typename T1, typename T2, typename glue_type>
inline
const Mat<eT>&
Mat<eT>::operator=(const mtGlue<eT, T1, T2, glue_type>& X)
{
arma_extra_debug_sigprint();
glue_type::apply(*this, X);
return *this;
}
//! EXPERIMENTAL: in-place matrix addition, with the right-hand-side operan
ds having delayed operations
template<typename eT>
template<typename T1, typename T2, typename glue_type>
inline
const Mat<eT>&
Mat<eT>::operator+=(const mtGlue<eT, T1, T2, glue_type>& X)
{
arma_extra_debug_sigprint();
const Mat<eT> m(X);
return (*this).operator+=(m);
}
//! EXPERIMENTAL: in-place matrix subtraction, with the right-hand-side ope
rands having delayed operations
template<typename eT>
template<typename T1, typename T2, typename glue_type>
inline
const Mat<eT>&
Mat<eT>::operator-=(const mtGlue<eT, T1, T2, glue_type>& X)
{
arma_extra_debug_sigprint();
const Mat<eT> m(X);
return (*this).operator-=(m);
}
//! EXPERIMENTAL: in-place matrix multiplications, with the right-hand-side
operands having delayed operations
template<typename eT>
template<typename T1, typename T2, typename glue_type>
inline
const Mat<eT>&
Mat<eT>::operator*=(const mtGlue<eT, T1, T2, glue_type>& X)
{
arma_extra_debug_sigprint();
const Mat<eT> m(X);
glue_times::apply_inplace(*this, m);
return *this;
}
//! EXPERIMENTAL: in-place matrix element-wise multiplication, with the rig
ht-hand-side operands having delayed operations
template<typename eT>
template<typename T1, typename T2, typename glue_type>
inline
const Mat<eT>&
Mat<eT>::operator%=(const mtGlue<eT, T1, T2, glue_type>& X)
{
arma_extra_debug_sigprint();
const Mat<eT> m(X);
return (*this).operator%=(m);
}
//! EXPERIMENTAL: in-place matrix element-wise division, with the right-han
d-side operands having delayed operations
template<typename eT>
template<typename T1, typename T2, typename glue_type>
inline
const Mat<eT>&
Mat<eT>::operator/=(const mtGlue<eT, T1, T2, glue_type>& X)
{
arma_extra_debug_sigprint();
const Mat<eT> m(X);
return (*this).operator/=(m);
}
//! linear element accessor (treats the matrix as a vector); bounds checkin g not done when ARMA_NO_DEBUG is defined //! linear element accessor (treats the matrix as a vector); bounds checkin g not done when ARMA_NO_DEBUG is defined
template<typename eT> template<typename eT>
arma_inline arma_inline
eT& eT&
Mat<eT>::operator() (const u32 i) Mat<eT>::operator() (const u32 i)
{ {
arma_debug_check( (i >= n_elem), "Mat::operator(): out of bounds"); arma_debug_check( (i >= n_elem), "Mat::operator(): out of bounds");
return access::rw(mem[i]); return access::rw(mem[i]);
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 211 lines changed or added


 Mat_proto.hpp   Mat_proto.hpp 
skipping to change at line 134 skipping to change at line 134
template<typename T1, typename op_type> inline const Mat& operator/=(cons t Op<T1, op_type>& X); template<typename T1, typename op_type> inline const Mat& operator/=(cons t Op<T1, op_type>& X);
template<typename T1, typename eop_type> inline Mat(con st eOp<T1, eop_type>& X); template<typename T1, typename eop_type> inline Mat(con st eOp<T1, eop_type>& X);
template<typename T1, typename eop_type> inline const Mat& operator=(con st eOp<T1, eop_type>& X); template<typename T1, typename eop_type> inline const Mat& operator=(con st eOp<T1, eop_type>& X);
template<typename T1, typename eop_type> inline const Mat& operator+=(con st eOp<T1, eop_type>& X); template<typename T1, typename eop_type> inline const Mat& operator+=(con st eOp<T1, eop_type>& X);
template<typename T1, typename eop_type> inline const Mat& operator-=(con st eOp<T1, eop_type>& X); template<typename T1, typename eop_type> inline const Mat& operator-=(con st eOp<T1, eop_type>& X);
template<typename T1, typename eop_type> inline const Mat& operator*=(con st eOp<T1, eop_type>& X); template<typename T1, typename eop_type> inline const Mat& operator*=(con st eOp<T1, eop_type>& X);
template<typename T1, typename eop_type> inline const Mat& operator%=(con st eOp<T1, eop_type>& X); template<typename T1, typename eop_type> inline const Mat& operator%=(con st eOp<T1, eop_type>& X);
template<typename T1, typename eop_type> inline const Mat& operator/=(con st eOp<T1, eop_type>& X); template<typename T1, typename eop_type> inline const Mat& operator/=(con st eOp<T1, eop_type>& X);
template<typename T1, typename op_type> inline Mat(cons
t mtOp<eT, T1, op_type>& X);
template<typename T1, typename op_type> inline const Mat& operator=(cons
t mtOp<eT, T1, op_type>& X);
template<typename T1, typename op_type> inline const Mat& operator+=(cons
t mtOp<eT, T1, op_type>& X);
template<typename T1, typename op_type> inline const Mat& operator-=(cons
t mtOp<eT, T1, op_type>& X);
template<typename T1, typename op_type> inline const Mat& operator*=(cons
t mtOp<eT, T1, op_type>& X);
template<typename T1, typename op_type> inline const Mat& operator%=(cons
t mtOp<eT, T1, op_type>& X);
template<typename T1, typename op_type> inline const Mat& operator/=(cons
t mtOp<eT, T1, op_type>& X);
template<typename T1, typename T2, typename glue_type> inline Mat(const Glue<T1, T2, glue_type>& X); template<typename T1, typename T2, typename glue_type> inline Mat(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Mat& operator=(const Glue<T1, T2, glue_type>& X); template<typename T1, typename T2, typename glue_type> inline const Mat& operator=(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Mat& operator+=(const Glue<T1, T2, glue_type>& X); template<typename T1, typename T2, typename glue_type> inline const Mat& operator+=(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Mat& operator-=(const Glue<T1, T2, glue_type>& X); template<typename T1, typename T2, typename glue_type> inline const Mat& operator-=(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Mat& operator*=(const Glue<T1, T2, glue_type>& X); template<typename T1, typename T2, typename glue_type> inline const Mat& operator*=(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Mat& operator%=(const Glue<T1, T2, glue_type>& X); template<typename T1, typename T2, typename glue_type> inline const Mat& operator%=(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Mat& operator/=(const Glue<T1, T2, glue_type>& X); template<typename T1, typename T2, typename glue_type> inline const Mat& operator/=(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2> inline const Mat& operator+=(const Glue<T1, T2, glue_times>& X); template<typename T1, typename T2> inline const Mat& operator+=(const Glue<T1, T2, glue_times>& X);
template<typename T1, typename T2> inline const Mat& operator-=(const Glue<T1, T2, glue_times>& X); template<typename T1, typename T2> inline const Mat& operator-=(const Glue<T1, T2, glue_times>& X);
template<typename T1, typename T2, typename eglue_type> inline Mat(const eGlue<T1, T2, eglue_type>& X); template<typename T1, typename T2, typename eglue_type> inline Mat(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Mat& operator=(const eGlue<T1, T2, eglue_type>& X); template<typename T1, typename T2, typename eglue_type> inline const Mat& operator=(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Mat& operator+=(const eGlue<T1, T2, eglue_type>& X); template<typename T1, typename T2, typename eglue_type> inline const Mat& operator+=(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Mat& operator-=(const eGlue<T1, T2, eglue_type>& X); template<typename T1, typename T2, typename eglue_type> inline const Mat& operator-=(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Mat& operator*=(const eGlue<T1, T2, eglue_type>& X); template<typename T1, typename T2, typename eglue_type> inline const Mat& operator*=(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Mat& operator%=(const eGlue<T1, T2, eglue_type>& X); template<typename T1, typename T2, typename eglue_type> inline const Mat& operator%=(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Mat& operator/=(const eGlue<T1, T2, eglue_type>& X); template<typename T1, typename T2, typename eglue_type> inline const Mat& operator/=(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename glue_type> inline
Mat(const mtGlue<eT, T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Mat&
operator=(const mtGlue<eT, T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Mat&
operator+=(const mtGlue<eT, T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Mat&
operator-=(const mtGlue<eT, T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Mat&
operator*=(const mtGlue<eT, T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Mat&
operator%=(const mtGlue<eT, T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Mat&
operator/=(const mtGlue<eT, T1, T2, glue_type>& X);
arma_inline eT& operator[] (const u32 i); arma_inline eT& operator[] (const u32 i);
arma_inline eT operator[] (const u32 i) const; arma_inline eT operator[] (const u32 i) const;
arma_inline eT& operator() (const u32 i); arma_inline eT& operator() (const u32 i);
arma_inline eT operator() (const u32 i) const; arma_inline eT operator() (const u32 i) const;
arma_inline eT& at (const u32 in_row, const u32 in_col); arma_inline eT& at (const u32 in_row, const u32 in_col);
arma_inline eT at (const u32 in_row, const u32 in_col) const; arma_inline eT at (const u32 in_row, const u32 in_col) const;
arma_inline eT& operator() (const u32 in_row, const u32 in_col); arma_inline eT& operator() (const u32 in_row, const u32 in_col);
arma_inline eT operator() (const u32 in_row, const u32 in_col) const; arma_inline eT operator() (const u32 in_row, const u32 in_col) const;
 End of changes. 2 change blocks. 
0 lines changed or deleted 30 lines changed or added


 Op_meat.hpp   Op_meat.hpp 
skipping to change at line 20 skipping to change at line 20
// and/or modify it under the terms of the GNU // and/or modify it under the terms of the GNU
// Lesser General Public License (LGPL) as published // Lesser General Public License (LGPL) as published
// by the Free Software Foundation, either version 3 // by the Free Software Foundation, either version 3
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
//! \addtogroup Op //! \addtogroup Op
//! @{ //! @{
template<typename T1, typename op_type> template<typename T1, typename op_type>
inline
Op<T1, op_type>::Op(const T1& in_m) Op<T1, op_type>::Op(const T1& in_m)
: m(in_m) : m(in_m)
, aux(aux) , aux(aux)
, aux_u32_a(aux_u32_a) , aux_u32_a(aux_u32_a)
, aux_u32_b(aux_u32_b) , aux_u32_b(aux_u32_b)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
template<typename T1, typename op_type> template<typename T1, typename op_type>
inline
Op<T1, op_type>::Op(const T1& in_m, const typename T1::elem_type in_aux) Op<T1, op_type>::Op(const T1& in_m, const typename T1::elem_type in_aux)
: m(in_m) : m(in_m)
, aux(in_aux) , aux(in_aux)
, aux_u32_a(aux_u32_a) , aux_u32_a(aux_u32_a)
, aux_u32_b(aux_u32_b) , aux_u32_b(aux_u32_b)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
template<typename T1, typename op_type> template<typename T1, typename op_type>
inline
Op<T1, op_type>::Op(const T1& in_m, const u32 in_aux_u32_a, const u32 in_au x_u32_b) Op<T1, op_type>::Op(const T1& in_m, const u32 in_aux_u32_a, const u32 in_au x_u32_b)
: m(in_m) : m(in_m)
, aux(aux) , aux(aux)
, aux_u32_a(in_aux_u32_a) , aux_u32_a(in_aux_u32_a)
, aux_u32_b(in_aux_u32_b) , aux_u32_b(in_aux_u32_b)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
template<typename T1, typename op_type> template<typename T1, typename op_type>
inline
Op<T1, op_type>::Op(const T1& in_m, const typename T1::elem_type in_aux, co nst u32 in_aux_u32_a, const u32 in_aux_u32_b) Op<T1, op_type>::Op(const T1& in_m, const typename T1::elem_type in_aux, co nst u32 in_aux_u32_a, const u32 in_aux_u32_b)
: m(in_m) : m(in_m)
, aux(in_aux) , aux(in_aux)
, aux_u32_a(in_aux_u32_a) , aux_u32_a(in_aux_u32_a)
, aux_u32_b(in_aux_u32_b) , aux_u32_b(in_aux_u32_b)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
template<typename T1, typename op_type> template<typename T1, typename op_type>
inline
Op<T1, op_type>::~Op() Op<T1, op_type>::~Op()
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
//! @} //! @}
 End of changes. 5 change blocks. 
0 lines changed or deleted 5 lines changed or added


 Proxy.hpp   Proxy.hpp 
skipping to change at line 308 skipping to change at line 308
, n_cols(A.P1.n_cols) , n_cols(A.P1.n_cols)
, n_elem(A.P1.n_elem) , n_elem(A.P1.n_elem)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
arma_inline elem_type operator[] (const u32 i) const { r eturn eglue_type::get_elem(Q, i); } arma_inline elem_type operator[] (const u32 i) const { r eturn eglue_type::get_elem(Q, i); }
arma_inline elem_type at (const u32 row, const u32 col) const { r eturn eglue_type::get_elem(Q, row, col); } arma_inline elem_type at (const u32 row, const u32 col) const { r eturn eglue_type::get_elem(Q, row, col); }
}; };
template<typename out_eT, typename T1, typename op_type>
class Proxy< mtOp<out_eT, T1, op_type> >
{
public:
typedef out_eT elem_type;
typedef typename get_pod_type<out_eT>::result pod_type;
typedef Mat<out_eT> stored_type;
const Mat<out_eT> Q;
const u32 n_rows;
const u32 n_cols;
const u32 n_elem;
inline explicit Proxy(const mtOp<out_eT, T1, op_type>& A)
: Q(A)
, n_rows(Q.n_rows)
, n_cols(Q.n_cols)
, n_elem(Q.n_elem)
{
arma_extra_debug_sigprint();
}
arma_inline elem_type operator[] (const u32 i) const { r
eturn Q[i]; }
arma_inline elem_type at (const u32 row, const u32 col) const { r
eturn Q.at(row,col); }
};
template<typename out_eT, typename T1, typename T2, typename glue_type>
class Proxy< mtGlue<out_eT, T1, T2, glue_type > >
{
public:
typedef out_eT elem_type;
typedef typename get_pod_type<out_eT>::result pod_type;
typedef Mat<out_eT> stored_type;
const Mat<out_eT> Q;
const u32 n_rows;
const u32 n_cols;
const u32 n_elem;
inline explicit Proxy(const mtGlue<out_eT, T1, T2, glue_type>& A)
: Q(A)
, n_rows(Q.n_rows)
, n_cols(Q.n_cols)
, n_elem(Q.n_elem)
{
arma_extra_debug_sigprint();
}
arma_inline elem_type operator[] (const u32 i) const { r
eturn Q[i]; }
arma_inline elem_type at (const u32 row, const u32 col) const { r
eturn Q.at(row,col); }
};
//! @} //! @}
 End of changes. 1 change blocks. 
0 lines changed or deleted 60 lines changed or added


 Row_meat.hpp   Row_meat.hpp 
skipping to change at line 455 skipping to change at line 455
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
Mat<eT>::operator*=(X); Mat<eT>::operator*=(X);
arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions" ); arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions" );
return *this; return *this;
} }
template<typename eT> template<typename eT>
template<typename T1, typename op_type>
inline
Row<eT>::Row(const mtOp<eT, T1, op_type>& X)
: Mat<eT>(X)
{
arma_extra_debug_sigprint();
arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions"
);
}
template<typename eT>
template<typename T1, typename op_type>
inline
const Row<eT>&
Row<eT>::operator=(const mtOp<eT, T1, op_type>& X)
{
arma_extra_debug_sigprint();
Mat<eT>::operator=(X);
arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions"
);
return *this;
}
template<typename eT>
template<typename T1, typename op_type>
inline
const Row<eT>&
Row<eT>::operator*=(const mtOp<eT, T1, op_type>& X)
{
arma_extra_debug_sigprint();
Mat<eT>::operator*=(X);
arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions"
);
return *this;
}
template<typename eT>
template<typename T1, typename T2, typename glue_type> template<typename T1, typename T2, typename glue_type>
inline inline
Row<eT>::Row(const Glue<T1, T2, glue_type>& X) Row<eT>::Row(const Glue<T1, T2, glue_type>& X)
: Mat<eT>(X) : Mat<eT>(X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions" ); arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions" );
} }
skipping to change at line 536 skipping to change at line 577
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
Mat<eT>::operator*=(X); Mat<eT>::operator*=(X);
arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions" ); arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions" );
return *this; return *this;
} }
template<typename eT>
template<typename T1, typename T2, typename glue_type>
inline
Row<eT>::Row(const mtGlue<eT, T1, T2, glue_type>& X)
: Mat<eT>(X)
{
arma_extra_debug_sigprint();
arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions"
);
}
template<typename eT>
template<typename T1, typename T2, typename glue_type>
inline
const Row<eT>&
Row<eT>::operator=(const mtGlue<eT, T1, T2, glue_type>& X)
{
arma_extra_debug_sigprint();
Mat<eT>::operator=(X);
arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions"
);
return *this;
}
template<typename eT>
template<typename T1, typename T2, typename glue_type>
inline
const Row<eT>&
Row<eT>::operator*=(const mtGlue<eT, T1, T2, glue_type>& X)
{
arma_extra_debug_sigprint();
Mat<eT>::operator*=(X);
arma_debug_check( (Mat<eT>::n_rows > 1), "Row(): incompatible dimensions"
);
return *this;
}
template<typename eT> template<typename eT>
inline inline
void void
Row<eT>::set_size(const u32 in_n_elem) Row<eT>::set_size(const u32 in_n_elem)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
Mat<eT>::set_size(1,in_n_elem); Mat<eT>::set_size(1,in_n_elem);
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 88 lines changed or added


 Row_proto.hpp   Row_proto.hpp 
skipping to change at line 74 skipping to change at line 74
inline explicit Row(const diagview<eT>& X); inline explicit Row(const diagview<eT>& X);
inline const Row& operator=(const diagview<eT>& X); inline const Row& operator=(const diagview<eT>& X);
inline const Row& operator*=(const diagview<eT>& X); inline const Row& operator*=(const diagview<eT>& X);
arma_inline eT& col(const u32 col_num); arma_inline eT& col(const u32 col_num);
arma_inline eT col(const u32 col_num) const; arma_inline eT col(const u32 col_num) const;
arma_inline subview_row<eT> cols(const u32 in_col1, const u32 in_co l2); arma_inline subview_row<eT> cols(const u32 in_col1, const u32 in_co l2);
arma_inline const subview_row<eT> cols(const u32 in_col1, const u32 in_co l2) const; arma_inline const subview_row<eT> cols(const u32 in_col1, const u32 in_co l2) const;
template<typename T1, typename op_type> inline Row(cons template<typename T1, typename op_type> inline Row(cons
t Op<T1, op_type> &X); t Op<T1, op_type>& X);
template<typename T1, typename op_type> inline const Row& operator=(cons template<typename T1, typename op_type> inline const Row& operator=(cons
t Op<T1, op_type> &X); t Op<T1, op_type>& X);
template<typename T1, typename op_type> inline const Row& operator*=(cons template<typename T1, typename op_type> inline const Row& operator*=(cons
t Op<T1, op_type> &X); t Op<T1, op_type>& X);
template<typename T1, typename eop_type> inline Row(con template<typename T1, typename eop_type> inline Row(con
st eOp<T1, eop_type> &X); st eOp<T1, eop_type>& X);
template<typename T1, typename eop_type> inline const Row& operator=(con template<typename T1, typename eop_type> inline const Row& operator=(con
st eOp<T1, eop_type> &X); st eOp<T1, eop_type>& X);
template<typename T1, typename eop_type> inline const Row& operator*=(con template<typename T1, typename eop_type> inline const Row& operator*=(con
st eOp<T1, eop_type> &X); st eOp<T1, eop_type>& X);
template<typename T1, typename T2, typename glue_type> inline template<typename T1, typename op_type> inline Row(cons
Row(const Glue<T1, T2, glue_type> &X); t mtOp<eT, T1, op_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Row& template<typename T1, typename op_type> inline const Row& operator=(cons
operator=(const Glue<T1, T2, glue_type> &X); t mtOp<eT, T1, op_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Row& template<typename T1, typename op_type> inline const Row& operator*=(cons
operator*=(const Glue<T1, T2, glue_type> &X); t mtOp<eT, T1, op_type>& X);
template<typename T1, typename T2, typename eglue_type> inline template<typename T1, typename T2, typename glue_type> inline
Row(const eGlue<T1, T2, eglue_type> &X); Row(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Row& template<typename T1, typename T2, typename glue_type> inline const Row&
operator=(const eGlue<T1, T2, eglue_type> &X); operator=(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Row& template<typename T1, typename T2, typename glue_type> inline const Row&
operator*=(const eGlue<T1, T2, eglue_type> &X); operator*=(const Glue<T1, T2, glue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline
Row(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Row&
operator=(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename eglue_type> inline const Row&
operator*=(const eGlue<T1, T2, eglue_type>& X);
template<typename T1, typename T2, typename glue_type> inline
Row(const mtGlue<eT, T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Row&
operator=(const mtGlue<eT, T1, T2, glue_type>& X);
template<typename T1, typename T2, typename glue_type> inline const Row&
operator*=(const mtGlue<eT, T1, T2, glue_type>& X);
inline void set_size(const u32 N); inline void set_size(const u32 N);
inline void set_size(const u32 n_rows, const u32 n_cols); inline void set_size(const u32 n_rows, const u32 n_cols);
template<typename eT2> template<typename eT2>
inline void copy_size(const Mat<eT2>& m); inline void copy_size(const Mat<eT2>& m);
inline void zeros(); inline void zeros();
inline void zeros(const u32 N); inline void zeros(const u32 N);
inline void zeros(const u32 n_rows, const u32 n_cols); inline void zeros(const u32 n_rows, const u32 n_cols);
 End of changes. 1 change blocks. 
27 lines changed or deleted 41 lines changed or added


 armadillo   armadillo 
skipping to change at line 84 skipping to change at line 84
#include "armadillo_bits/itpp_wrap.hpp" #include "armadillo_bits/itpp_wrap.hpp"
//! \namespace arma namespace for Armadillo classes and functions //! \namespace arma namespace for Armadillo classes and functions
namespace arma namespace arma
{ {
// preliminaries // preliminaries
#include "armadillo_bits/forward_proto.hpp" #include "armadillo_bits/forward_proto.hpp"
#include "armadillo_bits/static_assert.hpp" #include "armadillo_bits/arma_static_assert.hpp"
#include "armadillo_bits/typedef.hpp" #include "armadillo_bits/typedef.hpp"
#include "armadillo_bits/format_wrap.hpp" #include "armadillo_bits/format_wrap.hpp"
#include "armadillo_bits/cmath_wrap.hpp" #include "armadillo_bits/cmath_wrap.hpp"
#include "armadillo_bits/constants.hpp" #include "armadillo_bits/constants.hpp"
#include "armadillo_bits/version.hpp" #include "armadillo_bits/arma_version.hpp"
#include "armadillo_bits/arma_config.hpp"
#include "armadillo_bits/traits.hpp" #include "armadillo_bits/traits.hpp"
#include "armadillo_bits/promote_type.hpp" #include "armadillo_bits/promote_type.hpp"
#include "armadillo_bits/upgrade_val.hpp" #include "armadillo_bits/upgrade_val.hpp"
#include "armadillo_bits/restrictors.hpp" #include "armadillo_bits/restrictors.hpp"
#include "armadillo_bits/access.hpp" #include "armadillo_bits/access.hpp"
// //
// class prototypes // class prototypes
#include "armadillo_bits/syslib_proto.hpp" #include "armadillo_bits/syslib_proto.hpp"
skipping to change at line 132 skipping to change at line 133
#include "armadillo_bits/wall_clock_proto.hpp" #include "armadillo_bits/wall_clock_proto.hpp"
#include "armadillo_bits/running_stat_proto.hpp" #include "armadillo_bits/running_stat_proto.hpp"
#include "armadillo_bits/running_stat_vec_proto.hpp" #include "armadillo_bits/running_stat_vec_proto.hpp"
#include "armadillo_bits/Op_proto.hpp" #include "armadillo_bits/Op_proto.hpp"
#include "armadillo_bits/OpCube_proto.hpp" #include "armadillo_bits/OpCube_proto.hpp"
#include "armadillo_bits/eOp_proto.hpp" #include "armadillo_bits/eOp_proto.hpp"
#include "armadillo_bits/eOpCube_proto.hpp" #include "armadillo_bits/eOpCube_proto.hpp"
#include "armadillo_bits/mtOp_proto.hpp"
#include "armadillo_bits/Glue_proto.hpp" #include "armadillo_bits/Glue_proto.hpp"
#include "armadillo_bits/eGlue_proto.hpp" #include "armadillo_bits/eGlue_proto.hpp"
#include "armadillo_bits/mtGlue_proto.hpp"
#include "armadillo_bits/GlueCube_proto.hpp" #include "armadillo_bits/GlueCube_proto.hpp"
#include "armadillo_bits/eGlueCube_proto.hpp" #include "armadillo_bits/eGlueCube_proto.hpp"
#include "armadillo_bits/eop_core_proto.hpp" #include "armadillo_bits/eop_core_proto.hpp"
#include "armadillo_bits/eop_cube_core_proto.hpp" #include "armadillo_bits/eop_cube_core_proto.hpp"
#include "armadillo_bits/eglue_core_proto.hpp" #include "armadillo_bits/eglue_core_proto.hpp"
#include "armadillo_bits/eglue_cube_core_proto.hpp" #include "armadillo_bits/eglue_cube_core_proto.hpp"
skipping to change at line 169 skipping to change at line 173
#include "armadillo_bits/op_reshape_proto.hpp" #include "armadillo_bits/op_reshape_proto.hpp"
#include "armadillo_bits/op_cov_proto.hpp" #include "armadillo_bits/op_cov_proto.hpp"
#include "armadillo_bits/op_cor_proto.hpp" #include "armadillo_bits/op_cor_proto.hpp"
#include "armadillo_bits/op_shuffle_proto.hpp" #include "armadillo_bits/op_shuffle_proto.hpp"
#include "armadillo_bits/op_prod_proto.hpp" #include "armadillo_bits/op_prod_proto.hpp"
#include "armadillo_bits/op_pinv_proto.hpp" #include "armadillo_bits/op_pinv_proto.hpp"
#include "armadillo_bits/op_dotext_proto.hpp" #include "armadillo_bits/op_dotext_proto.hpp"
#include "armadillo_bits/op_flip_proto.hpp" #include "armadillo_bits/op_flip_proto.hpp"
#include "armadillo_bits/op_princomp_proto.hpp" #include "armadillo_bits/op_princomp_proto.hpp"
#include "armadillo_bits/op_princomp_cov_proto.hpp" #include "armadillo_bits/op_princomp_cov_proto.hpp"
#include "armadillo_bits/op_misc_proto.hpp"
#include "armadillo_bits/op_relational_proto.hpp"
#include "armadillo_bits/op_find_proto.hpp"
#include "armadillo_bits/op_chol_proto.hpp"
#include "armadillo_bits/op_cx_scalar_proto.hpp"
#include "armadillo_bits/glue_times_proto.hpp" #include "armadillo_bits/glue_times_proto.hpp"
#include "armadillo_bits/glue_mixed_proto.hpp"
#include "armadillo_bits/glue_cov_proto.hpp" #include "armadillo_bits/glue_cov_proto.hpp"
#include "armadillo_bits/glue_cor_proto.hpp" #include "armadillo_bits/glue_cor_proto.hpp"
#include "armadillo_bits/glue_kron_proto.hpp" #include "armadillo_bits/glue_kron_proto.hpp"
#include "armadillo_bits/glue_cross_proto.hpp" #include "armadillo_bits/glue_cross_proto.hpp"
#include "armadillo_bits/glue_join_proto.hpp" #include "armadillo_bits/glue_join_proto.hpp"
#include "armadillo_bits/glue_relational_proto.hpp"
#include "armadillo_bits/glue_solve_proto.hpp"
// for tests & experiments
// //
// debugging functions // debugging functions
#include "armadillo_bits/debug.hpp" #include "armadillo_bits/debug.hpp"
// //
// classes that underlay metaprogramming // classes that underlay metaprogramming
#include "armadillo_bits/Proxy.hpp" #include "armadillo_bits/Proxy.hpp"
skipping to change at line 198 skipping to change at line 212
#include "armadillo_bits/diagmat_proxy.hpp" #include "armadillo_bits/diagmat_proxy.hpp"
#include "armadillo_bits/unwrap.hpp" #include "armadillo_bits/unwrap.hpp"
#include "armadillo_bits/unwrap_cube.hpp" #include "armadillo_bits/unwrap_cube.hpp"
#include "armadillo_bits/strip.hpp" #include "armadillo_bits/strip.hpp"
#include "armadillo_bits/Op_meat.hpp" #include "armadillo_bits/Op_meat.hpp"
#include "armadillo_bits/OpCube_meat.hpp" #include "armadillo_bits/OpCube_meat.hpp"
#include "armadillo_bits/mtOp_meat.hpp"
#include "armadillo_bits/Glue_meat.hpp" #include "armadillo_bits/Glue_meat.hpp"
#include "armadillo_bits/GlueCube_meat.hpp" #include "armadillo_bits/GlueCube_meat.hpp"
#include "armadillo_bits/eop_aux.hpp" #include "armadillo_bits/eop_aux.hpp"
#include "armadillo_bits/eOp_meat.hpp" #include "armadillo_bits/eOp_meat.hpp"
#include "armadillo_bits/eOpCube_meat.hpp" #include "armadillo_bits/eOpCube_meat.hpp"
#include "armadillo_bits/eGlue_meat.hpp" #include "armadillo_bits/eGlue_meat.hpp"
#include "armadillo_bits/eGlueCube_meat.hpp" #include "armadillo_bits/eGlueCube_meat.hpp"
#include "armadillo_bits/mtGlue_meat.hpp"
#include "armadillo_bits/eglue_misc.hpp" #include "armadillo_bits/eglue_misc.hpp"
#include "armadillo_bits/eglue_cube_misc.hpp" #include "armadillo_bits/eglue_cube_misc.hpp"
// //
// ostream // ostream
#include "armadillo_bits/arma_ostream_proto.hpp" #include "armadillo_bits/arma_ostream_proto.hpp"
#include "armadillo_bits/arma_ostream_meat.hpp" #include "armadillo_bits/arma_ostream_meat.hpp"
// //
skipping to change at line 292 skipping to change at line 310
#include "armadillo_bits/fn_eps.hpp" #include "armadillo_bits/fn_eps.hpp"
#include "armadillo_bits/fn_pinv.hpp" #include "armadillo_bits/fn_pinv.hpp"
#include "armadillo_bits/fn_rank.hpp" #include "armadillo_bits/fn_rank.hpp"
#include "armadillo_bits/fn_kron.hpp" #include "armadillo_bits/fn_kron.hpp"
#include "armadillo_bits/fn_flip.hpp" #include "armadillo_bits/fn_flip.hpp"
#include "armadillo_bits/fn_as_scalar.hpp" #include "armadillo_bits/fn_as_scalar.hpp"
#include "armadillo_bits/fn_princomp.hpp" #include "armadillo_bits/fn_princomp.hpp"
#include "armadillo_bits/fn_princomp_cov.hpp" #include "armadillo_bits/fn_princomp_cov.hpp"
#include "armadillo_bits/fn_cross.hpp" #include "armadillo_bits/fn_cross.hpp"
#include "armadillo_bits/fn_join.hpp" #include "armadillo_bits/fn_join.hpp"
#include "armadillo_bits/fn_find.hpp"
// //
// class meat // class meat
#include "armadillo_bits/gemm.hpp" #include "armadillo_bits/gemm.hpp"
#include "armadillo_bits/gemv.hpp" #include "armadillo_bits/gemv.hpp"
#include "armadillo_bits/gemm_mixed.hpp" #include "armadillo_bits/gemm_mixed.hpp"
#include "armadillo_bits/eop_core_meat.hpp" #include "armadillo_bits/eop_core_meat.hpp"
#include "armadillo_bits/eop_cube_core_meat.hpp" #include "armadillo_bits/eop_cube_core_meat.hpp"
skipping to change at line 350 skipping to change at line 367
#include "armadillo_bits/op_reshape_meat.hpp" #include "armadillo_bits/op_reshape_meat.hpp"
#include "armadillo_bits/op_cov_meat.hpp" #include "armadillo_bits/op_cov_meat.hpp"
#include "armadillo_bits/op_cor_meat.hpp" #include "armadillo_bits/op_cor_meat.hpp"
#include "armadillo_bits/op_shuffle_meat.hpp" #include "armadillo_bits/op_shuffle_meat.hpp"
#include "armadillo_bits/op_prod_meat.hpp" #include "armadillo_bits/op_prod_meat.hpp"
#include "armadillo_bits/op_pinv_meat.hpp" #include "armadillo_bits/op_pinv_meat.hpp"
#include "armadillo_bits/op_dotext_meat.hpp" #include "armadillo_bits/op_dotext_meat.hpp"
#include "armadillo_bits/op_flip_meat.hpp" #include "armadillo_bits/op_flip_meat.hpp"
#include "armadillo_bits/op_princomp_meat.hpp" #include "armadillo_bits/op_princomp_meat.hpp"
#include "armadillo_bits/op_princomp_cov_meat.hpp" #include "armadillo_bits/op_princomp_cov_meat.hpp"
#include "armadillo_bits/op_misc_meat.hpp"
#include "armadillo_bits/op_relational_meat.hpp"
#include "armadillo_bits/op_find_meat.hpp"
#include "armadillo_bits/op_chol_meat.hpp"
#include "armadillo_bits/op_cx_scalar_meat.hpp"
#include "armadillo_bits/glue_times_meat.hpp" #include "armadillo_bits/glue_times_meat.hpp"
#include "armadillo_bits/glue_mixed_meat.hpp"
#include "armadillo_bits/glue_cov_meat.hpp" #include "armadillo_bits/glue_cov_meat.hpp"
#include "armadillo_bits/glue_cor_meat.hpp" #include "armadillo_bits/glue_cor_meat.hpp"
#include "armadillo_bits/glue_kron_meat.hpp" #include "armadillo_bits/glue_kron_meat.hpp"
#include "armadillo_bits/glue_cross_meat.hpp" #include "armadillo_bits/glue_cross_meat.hpp"
#include "armadillo_bits/glue_join_meat.hpp" #include "armadillo_bits/glue_join_meat.hpp"
#include "armadillo_bits/glue_relational_meat.hpp"
#include "armadillo_bits/glue_solve_meat.hpp"
} }
#endif #endif
 End of changes. 13 change blocks. 
3 lines changed or deleted 28 lines changed or added


 eGlueCube_meat.hpp   eGlueCube_meat.hpp 
skipping to change at line 34 skipping to change at line 34
} }
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
arma_inline arma_inline
eGlueCube<T1,T2,eglue_type>::eGlueCube(const T1& in_A, const T2& in_B) eGlueCube<T1,T2,eglue_type>::eGlueCube(const T1& in_A, const T2& in_B)
: P1(in_A) : P1(in_A)
, P2(in_B) , P2(in_B)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_assert_same_size(P1.n_rows, P1.n_cols, P1.n_slices, P2.n_rows, P2.n_ cols, P2.n_slices, eglue_type::id()); arma_assert_same_size(P1.n_rows, P1.n_cols, P1.n_slices, P2.n_rows, P2.n_ cols, P2.n_slices, eglue_type::text());
} }
//! @} //! @}
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 eGlue_meat.hpp   eGlue_meat.hpp 
skipping to change at line 34 skipping to change at line 34
} }
template<typename T1, typename T2, typename eglue_type> template<typename T1, typename T2, typename eglue_type>
arma_inline arma_inline
eGlue<T1,T2,eglue_type>::eGlue(const T1& in_A, const T2& in_B) eGlue<T1,T2,eglue_type>::eGlue(const T1& in_A, const T2& in_B)
: P1(in_A) : P1(in_A)
, P2(in_B) , P2(in_B)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_assert_same_size(P1.n_rows, P1.n_cols, P2.n_rows, P2.n_cols, eglue_t ype::id()); arma_assert_same_size(P1.n_rows, P1.n_cols, P2.n_rows, P2.n_cols, eglue_t ype::text());
} }
//! @} //! @}
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 eglue_cube_misc.hpp   eglue_cube_misc.hpp 
skipping to change at line 23 skipping to change at line 23
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
//! \addtogroup eglue_cube_misc //! \addtogroup eglue_cube_misc
//! @{ //! @{
class eglue_cube_plus : public eglue_cube_core<eglue_cube_plus> class eglue_cube_plus : public eglue_cube_core<eglue_cube_plus>
{ {
public: public:
inline static const char* id() { return "cube addition"; } inline static const char* text() { return "cube addition"; }
}; };
class eglue_cube_minus : public eglue_cube_core<eglue_cube_minus> class eglue_cube_minus : public eglue_cube_core<eglue_cube_minus>
{ {
public: public:
inline static const char* id() { return "cube subtraction"; } inline static const char* text() { return "cube subtraction"; }
}; };
class eglue_cube_div : public eglue_cube_core<eglue_cube_div> class eglue_cube_div : public eglue_cube_core<eglue_cube_div>
{ {
public: public:
inline static const char* id() { return "element-wise cube division"; } inline static const char* text() { return "element-wise cube division"; }
}; };
class eglue_cube_schur : public eglue_cube_core<eglue_cube_schur> class eglue_cube_schur : public eglue_cube_core<eglue_cube_schur>
{ {
public: public:
inline static const char* id() { return "element-wise cube multiplication "; } inline static const char* text() { return "element-wise cube multiplicati on"; }
}; };
//! @} //! @}
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 eglue_misc.hpp   eglue_misc.hpp 
skipping to change at line 23 skipping to change at line 23
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
//! \addtogroup eglue_misc //! \addtogroup eglue_misc
//! @{ //! @{
class eglue_plus : public eglue_core<eglue_plus> class eglue_plus : public eglue_core<eglue_plus>
{ {
public: public:
inline static const char* id() { return "matrix addition"; } inline static const char* text() { return "matrix addition"; }
}; };
class eglue_minus : public eglue_core<eglue_minus> class eglue_minus : public eglue_core<eglue_minus>
{ {
public: public:
inline static const char* id() { return "matrix subtraction"; } inline static const char* text() { return "matrix subtraction"; }
}; };
class eglue_div : public eglue_core<eglue_div> class eglue_div : public eglue_core<eglue_div>
{ {
public: public:
inline static const char* id() { return "element-wise matrix division"; } inline static const char* text() { return "element-wise matrix division"; }
}; };
class eglue_schur : public eglue_core<eglue_schur> class eglue_schur : public eglue_core<eglue_schur>
{ {
public: public:
inline static const char* id() { return "element-wise matrix multiplicati on"; } inline static const char* text() { return "element-wise matrix multiplica tion"; }
}; };
//! @} //! @}
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 eop_aux.hpp   eop_aux.hpp 
skipping to change at line 107 skipping to change at line 107
struct eop_aux_randn< std::complex<T> > struct eop_aux_randn< std::complex<T> >
{ {
arma_inline arma_inline
operator std::complex<T> () const operator std::complex<T> () const
{ {
return std::complex<T>( T(eop_aux_randn<T>()), T(eop_aux_randn<T>()) ); return std::complex<T>( T(eop_aux_randn<T>()), T(eop_aux_randn<T>()) );
} }
}; };
//! use of the SFINAE approach to work around compiler limitations
//! http://en.wikipedia.org/wiki/SFINAE
class eop_aux class eop_aux
{ {
public: public:
#if defined(ARMA_USE_BOOST) #if defined(ARMA_USE_BOOST)
#define arma_boost_wrap(trig_fn, val) ( (boost::math::trig_fn)(val) ) #define arma_boost_wrap(trig_fn, val) ( (boost::math::trig_fn)(val) )
#else #else
#define arma_boost_wrap(trig_fn, val) ( arma_stop( #trig_fn "(): need B oost libraries" ), val ) #define arma_boost_wrap(trig_fn, val) ( arma_stop( #trig_fn "(): need B oost libraries" ), val )
#endif #endif
skipping to change at line 146 skipping to change at line 149
template<typename T> arma_inline static std::complex<T> acosh (const std ::complex<T>& x) { return arma_boost_wrap(acosh, x); } template<typename T> arma_inline static std::complex<T> acosh (const std ::complex<T>& x) { return arma_boost_wrap(acosh, x); }
template<typename T> arma_inline static std::complex<T> asinh (const std ::complex<T>& x) { return arma_boost_wrap(asinh, x); } template<typename T> arma_inline static std::complex<T> asinh (const std ::complex<T>& x) { return arma_boost_wrap(asinh, x); }
template<typename T> arma_inline static std::complex<T> atanh (const std ::complex<T>& x) { return arma_boost_wrap(atanh, x); } template<typename T> arma_inline static std::complex<T> atanh (const std ::complex<T>& x) { return arma_boost_wrap(atanh, x); }
#undef arma_boost_wrap #undef arma_boost_wrap
template<typename eT> arma_inline static eT conj(const eT& x) { return x; } template<typename eT> arma_inline static eT conj(const eT& x) { return x; }
template<typename T> arma_inline static std::complex<T> conj(const std:: complex<T>& x) { return std::conj(x); } template<typename T> arma_inline static std::complex<T> conj(const std:: complex<T>& x) { return std::conj(x); }
template<typename eT> arma_inline static typename arma_integral_only<eT>:
:result sqrt (const eT& x) { return std::sqrt (double(x)); }
template<typename eT> arma_inline static typename arma_integral_only<eT>:
:result log10 (const eT& x) { return std::log10(double(x)); }
template<typename eT> arma_inline static typename arma_integral_only<eT>:
:result log (const eT& x) { return std::log (double(x)); }
template<typename eT> arma_inline static typename arma_integral_only<eT>:
:result exp (const eT& x) { return std::exp (double(x)); }
template<typename eT> arma_inline static typename arma_integral_only<eT>:
:result cos (const eT& x) { return std::cos (double(x)); }
template<typename eT> arma_inline static typename arma_integral_only<eT>:
:result sin (const eT& x) { return std::sin (double(x)); }
template<typename eT> arma_inline static typename arma_integral_only<eT>:
:result tan (const eT& x) { return std::tan (double(x)); }
template<typename eT> arma_inline static typename arma_integral_only<eT>:
:result cosh (const eT& x) { return std::cosh (double(x)); }
template<typename eT> arma_inline static typename arma_integral_only<eT>:
:result sinh (const eT& x) { return std::sinh (double(x)); }
template<typename eT> arma_inline static typename arma_integral_only<eT>:
:result tanh (const eT& x) { return std::tanh (double(x)); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e
T>::result sqrt (const eT& x) { return std::sqrt (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e
T>::result log10 (const eT& x) { return std::log10(x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e
T>::result log (const eT& x) { return std::log (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e
T>::result exp (const eT& x) { return std::exp (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e
T>::result cos (const eT& x) { return std::cos (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e
T>::result sin (const eT& x) { return std::sin (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e
T>::result tan (const eT& x) { return std::tan (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e
T>::result cosh (const eT& x) { return std::cosh (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e
T>::result sinh (const eT& x) { return std::sinh (x); }
template<typename eT> arma_inline static typename arma_float_or_cx_only<e
T>::result tanh (const eT& x) { return std::tanh (x); }
template<typename T1, typename T2> arma_inline static template<typename T1, typename T2> arma_inline static
T1 pow(const T1 base, const T2 exponent) { return std::pow(base, ex ponent); } T1 pow(const T1 base, const T2 exponent) { return std::pow(base, ex ponent); }
template<typename T2> arma_inline static template<typename T2> arma_inline static
char pow(const char base, const T2 exponent) { typedef char out_t; ret urn out_t( std::pow(double(base), double(exponent) ) ); } char pow(const char base, const T2 exponent) { typedef char out_t; ret urn out_t( std::pow(double(base), double(exponent) ) ); }
template<typename T2> arma_inline static template<typename T2> arma_inline static
short pow(const short base, const T2 exponent) { typedef short out_t; ret urn out_t( std::pow(double(base), double(exponent) ) ); } short pow(const short base, const T2 exponent) { typedef short out_t; ret urn out_t( std::pow(double(base), double(exponent) ) ); }
template<typename T2> arma_inline static template<typename T2> arma_inline static
 End of changes. 2 change blocks. 
0 lines changed or deleted 45 lines changed or added


 eop_core_meat.hpp   eop_core_meat.hpp 
skipping to change at line 66 skipping to change at line 66
// the optimiser will keep only one return statement // the optimiser will keep only one return statement
if(is_same_type<eop_type, eop_neg >::value == true) { r eturn -val; } if(is_same_type<eop_type, eop_neg >::value == true) { r eturn -val; }
else if(is_same_type<eop_type, eop_scalar_plus >::value == true) { r eturn val + x.aux; } else if(is_same_type<eop_type, eop_scalar_plus >::value == true) { r eturn val + x.aux; }
else if(is_same_type<eop_type, eop_scalar_minus_pre >::value == true) { r eturn x.aux - val; } else if(is_same_type<eop_type, eop_scalar_minus_pre >::value == true) { r eturn x.aux - val; }
else if(is_same_type<eop_type, eop_scalar_minus_post>::value == true) { r eturn val - x.aux; } else if(is_same_type<eop_type, eop_scalar_minus_post>::value == true) { r eturn val - x.aux; }
else if(is_same_type<eop_type, eop_scalar_times >::value == true) { r eturn val * x.aux; } else if(is_same_type<eop_type, eop_scalar_times >::value == true) { r eturn val * x.aux; }
else if(is_same_type<eop_type, eop_scalar_div_pre >::value == true) { r eturn x.aux / val; } else if(is_same_type<eop_type, eop_scalar_div_pre >::value == true) { r eturn x.aux / val; }
else if(is_same_type<eop_type, eop_scalar_div_post >::value == true) { r eturn val / x.aux; } else if(is_same_type<eop_type, eop_scalar_div_post >::value == true) { r eturn val / x.aux; }
else if(is_same_type<eop_type, eop_square >::value == true) { r eturn val*val; } else if(is_same_type<eop_type, eop_square >::value == true) { r eturn val*val; }
else if(is_same_type<eop_type, eop_sqrt >::value == true) { r else if(is_same_type<eop_type, eop_sqrt >::value == true) { r
eturn std::sqrt(val); } eturn eop_aux::sqrt(val); }
else if(is_same_type<eop_type, eop_log10 >::value == true) { r else if(is_same_type<eop_type, eop_log10 >::value == true) { r
eturn std::log10(val); } eturn eop_aux::log10(val); }
else if(is_same_type<eop_type, eop_log >::value == true) { r else if(is_same_type<eop_type, eop_log >::value == true) { r
eturn std::log(val); } eturn eop_aux::log(val); }
else if(is_same_type<eop_type, eop_trunc_log >::value == true) { r eturn eop_aux::trunc_log(val); } else if(is_same_type<eop_type, eop_trunc_log >::value == true) { r eturn eop_aux::trunc_log(val); }
else if(is_same_type<eop_type, eop_exp >::value == true) { r eturn std::exp(val); } else if(is_same_type<eop_type, eop_exp >::value == true) { r eturn eop_aux::exp(val); }
else if(is_same_type<eop_type, eop_trunc_exp >::value == true) { r eturn eop_aux::trunc_exp(val); } else if(is_same_type<eop_type, eop_trunc_exp >::value == true) { r eturn eop_aux::trunc_exp(val); }
else if(is_same_type<eop_type, eop_cos >::value == true) { r else if(is_same_type<eop_type, eop_cos >::value == true) { r
eturn std::cos(val); } eturn eop_aux::cos(val); }
else if(is_same_type<eop_type, eop_sin >::value == true) { r else if(is_same_type<eop_type, eop_sin >::value == true) { r
eturn std::sin(val); } eturn eop_aux::sin(val); }
else if(is_same_type<eop_type, eop_tan >::value == true) { r else if(is_same_type<eop_type, eop_tan >::value == true) { r
eturn std::tan(val); } eturn eop_aux::tan(val); }
else if(is_same_type<eop_type, eop_acos >::value == true) { r eturn eop_aux::acos(val); } else if(is_same_type<eop_type, eop_acos >::value == true) { r eturn eop_aux::acos(val); }
else if(is_same_type<eop_type, eop_asin >::value == true) { r eturn eop_aux::asin(val); } else if(is_same_type<eop_type, eop_asin >::value == true) { r eturn eop_aux::asin(val); }
else if(is_same_type<eop_type, eop_atan >::value == true) { r eturn eop_aux::atan(val); } else if(is_same_type<eop_type, eop_atan >::value == true) { r eturn eop_aux::atan(val); }
else if(is_same_type<eop_type, eop_cosh >::value == true) { r else if(is_same_type<eop_type, eop_cosh >::value == true) { r
eturn std::cosh(val); } eturn eop_aux::cosh(val); }
else if(is_same_type<eop_type, eop_sinh >::value == true) { r else if(is_same_type<eop_type, eop_sinh >::value == true) { r
eturn std::sinh(val); } eturn eop_aux::sinh(val); }
else if(is_same_type<eop_type, eop_tanh >::value == true) { r else if(is_same_type<eop_type, eop_tanh >::value == true) { r
eturn std::tanh(val); } eturn eop_aux::tanh(val); }
else if(is_same_type<eop_type, eop_acosh >::value == true) { r eturn eop_aux::acosh(val); } else if(is_same_type<eop_type, eop_acosh >::value == true) { r eturn eop_aux::acosh(val); }
else if(is_same_type<eop_type, eop_asinh >::value == true) { r eturn eop_aux::asinh(val); } else if(is_same_type<eop_type, eop_asinh >::value == true) { r eturn eop_aux::asinh(val); }
else if(is_same_type<eop_type, eop_atanh >::value == true) { r eturn eop_aux::atanh(val); } else if(is_same_type<eop_type, eop_atanh >::value == true) { r eturn eop_aux::atanh(val); }
else if(is_same_type<eop_type, eop_eps >::value == true) { r eturn eop_aux::direct_eps(val); } else if(is_same_type<eop_type, eop_eps >::value == true) { r eturn eop_aux::direct_eps(val); }
else if(is_same_type<eop_type, eop_abs >::value == true) { r eturn eop_aux::arma_abs(val); } else if(is_same_type<eop_type, eop_abs >::value == true) { r eturn eop_aux::arma_abs(val); }
else if(is_same_type<eop_type, eop_conj >::value == true) { r eturn eop_aux::conj(val); } else if(is_same_type<eop_type, eop_conj >::value == true) { r eturn eop_aux::conj(val); }
else if(is_same_type<eop_type, eop_pow >::value == true) { r eturn eop_aux::pow(val, x.aux); } else if(is_same_type<eop_type, eop_pow >::value == true) { r eturn eop_aux::pow(val, x.aux); }
else if(is_same_type<eop_type, eop_pow_int >::value == true) else if(is_same_type<eop_type, eop_pow_int >::value == true)
{ {
const int exponent = (x.aux_u32_b == 0) ? int(x.aux_u32_a) : -int(x.aux _u32_a); const int exponent = (x.aux_u32_b == 0) ? int(x.aux_u32_a) : -int(x.aux _u32_a);
skipping to change at line 185 skipping to change at line 185
inline inline
void void
eop_core<eop_type>::apply_unwrap(Mat<typename T1::elem_type>& out, const eO p<T1, eop_type>& x) eop_core<eop_type>::apply_unwrap(Mat<typename T1::elem_type>& out, const eO p<T1, eop_type>& x)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
const Proxy<T1>& P = x.P; const Proxy<T1>& P = x.P;
// cout << "*** P.n_rows = " << P.n_rows << endl;
// cout << "*** P.n_cols = " << P.n_cols << endl;
out.set_size(P.n_rows, P.n_cols); out.set_size(P.n_rows, P.n_cols);
eT* out_mem = out.memptr(); eT* out_mem = out.memptr();
const u32 n_elem = P.n_elem; const u32 n_elem = P.n_elem;
const unwrap<typename Proxy<T1>::stored_type> tmp(P.Q); const unwrap<typename Proxy<T1>::stored_type> tmp(P.Q);
const Mat<eT>& A = tmp.M; const Mat<eT>& A = tmp.M;
if(is_generator<eop_type>::value == true) if(is_generator<eop_type>::value == true)
{ {
 End of changes. 5 change blocks. 
19 lines changed or deleted 22 lines changed or added


 fn_accu.hpp   fn_accu.hpp 
skipping to change at line 90 skipping to change at line 90
arma_inline arma_inline
arma_warn_unused arma_warn_unused
typename T1::elem_type typename T1::elem_type
accu(const Base<typename T1::elem_type,T1>& X) accu(const Base<typename T1::elem_type,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return (is_Mat<T1>::value == true) ? accu_unwrap(X) : accu_proxy(X); return (is_Mat<T1>::value == true) ? accu_unwrap(X) : accu_proxy(X);
} }
//! explicit handling of Hamming norm (also known as zero norm)
template<typename T1>
arma_inline
arma_warn_unused
u32
accu(const mtOp<u32,T1,op_rel_noteq>& X)
{
arma_extra_debug_sigprint();
typedef typename T1::elem_type eT;
const Proxy<T1> A(X.m);
const u32 n_elem = A.n_elem;
const eT val = X.aux;
u32 n_nonzero = 0;
for(u32 i=0; i<n_elem; ++i)
{
if(A[i] != val)
{
++n_nonzero;
}
}
return n_nonzero;
}
//! accumulate the elements of a cube //! accumulate the elements of a cube
template<typename T1> template<typename T1>
arma_hot arma_hot
arma_warn_unused arma_warn_unused
inline inline
typename T1::elem_type typename T1::elem_type
accu(const BaseCube<typename T1::elem_type,T1>& X) accu(const BaseCube<typename T1::elem_type,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
 End of changes. 1 change blocks. 
0 lines changed or deleted 28 lines changed or added


 fn_chol.hpp   fn_chol.hpp 
skipping to change at line 21 skipping to change at line 21
// Lesser General Public License (LGPL) as published // Lesser General Public License (LGPL) as published
// by the Free Software Foundation, either version 3 // by the Free Software Foundation, either version 3
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
//! \addtogroup fn_chol //! \addtogroup fn_chol
//! @{ //! @{
template<typename T1> template<typename T1>
inline inline
bool const Op<T1, op_chol>
chol(Mat<typename T1::elem_type>& out, const Base<typename T1::elem_type,T1 chol(const Base<typename T1::elem_type,T1>& X)
>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; return Op<T1, op_chol>(X.get_ref());
const unwrap_check<T1> tmp(X.get_ref(), out);
const Mat<eT>& A = tmp.M;
arma_debug_check( (A.is_square() == false), "chol(): given matrix is not
square");
return auxlib::chol(out, A);
} }
template<typename T1> template<typename T1>
inline inline
Mat<typename T1::elem_type> bool
chol(const Base<typename T1::elem_type,T1>& X) chol(Mat<typename T1::elem_type>& out, const Base<typename T1::elem_type,T1
>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT; out = chol(X);
Mat<eT> out;
const bool ok = chol(out, X);
if(ok == false)
{
arma_print("chol(): matrix factorisation failed");
}
return out; return (out.n_elem == 0) ? false : true;
} }
//! @} //! @}
 End of changes. 5 change blocks. 
25 lines changed or deleted 8 lines changed or added


 fn_kron.hpp   fn_kron.hpp 
skipping to change at line 38 skipping to change at line 38
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return Glue<T1, T2, glue_kron>(A.get_ref(), B.get_ref()); return Glue<T1, T2, glue_kron>(A.get_ref(), B.get_ref());
} }
//! \brief //! \brief
//! kronecker product of two matrices, //! kronecker product of two matrices,
//! with the matrices having different element types //! with the matrices having different element types
template<typename T, typename T1, typename T2> template<typename T, typename T1, typename T2>
inline inline
Mat<typename promote_type<typename T1::elem_type,typename T2::elem_type>::r esult> Mat<typename eT_promoter<T1,T2>::eT>
kron(const Base<std::complex<T>,T1>& X, const Base<T,T2>& Y) kron(const Base<std::complex<T>,T1>& X, const Base<T,T2>& Y)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<T> eT1; typedef typename std::complex<T> eT1;
promote_type<eT1,T>::check(); promote_type<eT1,T>::check();
const unwrap<T1> tmp1(X.get_ref()); const unwrap<T1> tmp1(X.get_ref());
const unwrap<T2> tmp2(Y.get_ref()); const unwrap<T2> tmp2(Y.get_ref());
const Mat< eT1 >& A = tmp1.M; const Mat<eT1>& A = tmp1.M;
const Mat<T>& B = tmp2.M; const Mat<T >& B = tmp2.M;
Mat<eT1> out; Mat<eT1> out;
glue_kron::direct_kron(out, A, B); glue_kron::direct_kron(out, A, B);
return out; return out;
} }
//! \brief //! \brief
//! kronecker product of two matrices, //! kronecker product of two matrices,
//! with the matrices having different element types //! with the matrices having different element types
template<typename T, typename T1, typename T2> template<typename T, typename T1, typename T2>
inline inline
Mat<typename promote_type<typename T1::elem_type,typename T2::elem_type>::r esult> Mat<typename eT_promoter<T1,T2>::eT>
kron(const Base<T,T1>& X, const Base<std::complex<T>,T2>& Y) kron(const Base<T,T1>& X, const Base<std::complex<T>,T2>& Y)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<T> eT2; typedef typename std::complex<T> eT2;
promote_type<T,eT2>::check(); promote_type<T,eT2>::check();
const unwrap<T1> tmp1(X.get_ref()); const unwrap<T1> tmp1(X.get_ref());
const unwrap<T2> tmp2(Y.get_ref()); const unwrap<T2> tmp2(Y.get_ref());
const Mat<T>& A = tmp1.M; const Mat<T >& A = tmp1.M;
const Mat< eT2 >& B = tmp2.M; const Mat<eT2>& B = tmp2.M;
Mat<eT2> out; Mat<eT2> out;
glue_kron::direct_kron(out, A, B); glue_kron::direct_kron(out, A, B);
return out; return out;
} }
//! @} //! @}
 End of changes. 4 change blocks. 
6 lines changed or deleted 6 lines changed or added


 fn_misc.hpp   fn_misc.hpp 
skipping to change at line 76 skipping to change at line 76
} }
inline inline
mat mat
linspace(const double start, const double end, const u32 num, const u32 dim = 0) linspace(const double start, const double end, const u32 num, const u32 dim = 0)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return linspace<mat>(start, end, num, dim); return linspace<mat>(start, end, num, dim);
} }
template<typename eT, typename T1>
inline
const mtOp<u32, T1, op_find>
find(const Base<eT,T1>& X, const u32 k = 0, const char* direction = "first"
)
{
arma_extra_debug_sigprint();
const char sig = direction[0];
arma_debug_check( (sig != 'f' && sig != 'F' && sig != 'l' && sig != 'L'),
"find(): 3rd input argument must be \"first\" or \"last\"" );
const u32 type = (sig == 'f' || sig == 'F') ? 0 : 1;
return mtOp<u32, T1, op_find>(X.get_ref(), k, type);
}
// //
// real // real
template<typename T1> template<typename T1>
arma_inline arma_inline
const T1& const T1&
real(const Base<typename T1::pod_type, T1>& X) real(const Base<typename T1::pod_type, T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
skipping to change at line 101 skipping to change at line 117
const T1& const T1&
real(const BaseCube<typename T1::pod_type, T1>& X) real(const BaseCube<typename T1::pod_type, T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return X.get_ref(); return X.get_ref();
} }
template<typename T1> template<typename T1>
inline inline
Mat<typename T1::pod_type> const mtOp<typename T1::pod_type, T1, op_real>
real(const Base<std::complex<typename T1::pod_type>, T1>& X) real(const Base<std::complex<typename T1::pod_type>, T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::pod_type T; return mtOp<typename T1::pod_type, T1, op_real>( X.get_ref() );
const Proxy<T1> A(X.get_ref());
Mat<T> out(A.n_rows, A.n_cols);
T* out_mem = out.memptr();
for(u32 i=0; i<out.n_elem; ++i)
{
out_mem[i] = std::real(A[i]);
}
return out;
} }
template<typename T1> template<typename T1>
inline inline
Cube<typename T1::pod_type> Cube<typename T1::pod_type>
real(const BaseCube<std::complex<typename T1::pod_type>, T1>& X) real(const BaseCube<std::complex<typename T1::pod_type>, T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::pod_type T; typedef typename T1::pod_type T;
skipping to change at line 174 skipping to change at line 177
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
const ProxyCube<T1> A(X.get_ref()); const ProxyCube<T1> A(X.get_ref());
return eOpCube<Cube<typename T1::pod_type>, eop_cube_zeros>(A.n_rows, A.n _cols, A.n_slices); return eOpCube<Cube<typename T1::pod_type>, eop_cube_zeros>(A.n_rows, A.n _cols, A.n_slices);
} }
template<typename T1> template<typename T1>
inline inline
Mat<typename T1::pod_type> const mtOp<typename T1::pod_type, T1, op_imag>
imag(const Base<std::complex<typename T1::pod_type>,T1>& X) imag(const Base<std::complex<typename T1::pod_type>, T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::pod_type T; return mtOp<typename T1::pod_type, T1, op_imag>( X.get_ref() );
const Proxy<T1> A(X.get_ref());
Mat<T> out(A.n_rows, A.n_cols);
T* out_mem = out.memptr();
for(u32 i=0; i<out.n_elem; ++i)
{
out_mem[i] = std::imag(A[i]);
}
return out;
} }
template<typename T1> template<typename T1>
inline inline
Cube<typename T1::pod_type> Cube<typename T1::pod_type>
imag(const BaseCube<std::complex<typename T1::pod_type>,T1>& X) imag(const BaseCube<std::complex<typename T1::pod_type>,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::pod_type T; typedef typename T1::pod_type T;
skipping to change at line 387 skipping to change at line 377
const eOpCube<T1, eop_cube_abs> const eOpCube<T1, eop_cube_abs>
abs(const BaseCube<typename T1::elem_type,T1>& X) abs(const BaseCube<typename T1::elem_type,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOpCube<T1, eop_cube_abs>(X.get_ref()); return eOpCube<T1, eop_cube_abs>(X.get_ref());
} }
template<typename T1> template<typename T1>
inline inline
Mat<typename T1::pod_type> const mtOp<typename T1::pod_type, T1, op_abs>
abs(const Base< std::complex<typename T1::pod_type>,T1>& X) abs(const Base<std::complex<typename T1::pod_type>, T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
const Proxy<T1> A(X.get_ref()); return mtOp<typename T1::pod_type, T1, op_abs>( X.get_ref() );
// if T1 is a complex matrix,
// pod_type is the underlying type used by std::complex;
// otherwise pod_type is the same as elem_type
typedef typename T1::elem_type in_eT;
typedef typename T1::pod_type out_eT;
Mat<out_eT> out(A.n_rows, A.n_cols);
out_eT* out_mem = out.memptr();
for(u32 i=0; i<out.n_elem; ++i)
{
out_mem[i] = std::abs(A[i]);
}
return out;
} }
template<typename T1> template<typename T1>
inline inline
Mat<typename T1::pod_type> Mat<typename T1::pod_type>
abs(const BaseCube< std::complex<typename T1::pod_type>,T1>& X) abs(const BaseCube< std::complex<typename T1::pod_type>,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
const ProxyCube<T1> A(X.get_ref()); const ProxyCube<T1> A(X.get_ref());
skipping to change at line 465 skipping to change at line 437
arma_inline arma_inline
const eOpCube<T1, eop_cube_abs> const eOpCube<T1, eop_cube_abs>
fabs(const BaseCube<typename T1::pod_type,T1>& X) fabs(const BaseCube<typename T1::pod_type,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOpCube<T1, eop_cube_abs>(X.get_ref()); return eOpCube<T1, eop_cube_abs>(X.get_ref());
} }
template<typename T1> template<typename T1>
arma_inline inline
Mat<typename T1::pod_type> const mtOp<typename T1::pod_type, T1, op_abs>
fabs(const Base< std::complex<typename T1::pod_type>,T1>& X) fabs(const Base<std::complex<typename T1::pod_type>, T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return abs(X); return mtOp<typename T1::pod_type, T1, op_abs>( X.get_ref() );
} }
template<typename T1> template<typename T1>
arma_inline arma_inline
Mat<typename T1::pod_type> Mat<typename T1::pod_type>
fabs(const BaseCube< std::complex<typename T1::pod_type>,T1>& X) fabs(const BaseCube< std::complex<typename T1::pod_type>,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return abs(X); return abs(X);
 End of changes. 9 change blocks. 
56 lines changed or deleted 30 lines changed or added


 fn_norm.hpp   fn_norm.hpp 
skipping to change at line 299 skipping to change at line 299
} }
template<typename T1> template<typename T1>
arma_inline arma_inline
arma_warn_unused arma_warn_unused
typename T1::pod_type typename T1::pod_type
norm(const Base<typename T1::elem_type,T1>& X, const u32 k) norm(const Base<typename T1::elem_type,T1>& X, const u32 k)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(is_Mat<T1>::value == true) return (is_Mat<T1>::value == true) ? norm_unwrap(X, k) : norm_proxy(X, k)
{ ;
return norm_unwrap(X, k);
}
else
{
return norm_proxy(X, k);
}
} }
template<typename T1> template<typename T1>
arma_inline arma_inline
arma_warn_unused arma_warn_unused
typename T1::pod_type typename T1::pod_type
norm(const Base<typename T1::elem_type,T1>& X, const char* method) norm(const Base<typename T1::elem_type,T1>& X, const char* method)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(is_Mat<T1>::value == true) return (is_Mat<T1>::value == true) ? norm_unwrap(X, method) : norm_proxy(
{ X, method);
return norm_unwrap(X, method);
}
else
{
return norm_proxy(X, method);
}
} }
//! @} //! @}
 End of changes. 2 change blocks. 
16 lines changed or deleted 4 lines changed or added


 fn_qr.hpp   fn_qr.hpp 
skipping to change at line 41 skipping to change at line 41
const unwrap_check<T1> tmp1(X.get_ref(), Q); const unwrap_check<T1> tmp1(X.get_ref(), Q);
const Mat<eT>& A = tmp1.M; const Mat<eT>& A = tmp1.M;
const unwrap_check< Mat<eT> > tmp2(A, R); const unwrap_check< Mat<eT> > tmp2(A, R);
const Mat<eT>& B = tmp2.M; const Mat<eT>& B = tmp2.M;
const bool ok = auxlib::qr(Q, R, B); const bool ok = auxlib::qr(Q, R, B);
if(ok == false) if(ok == false)
{ {
arma_print("qr(): matrix factorisation failed"); Q.reset();
R.reset();
arma_print("qr(): factorisation failed");
} }
} }
//! @} //! @}
 End of changes. 1 change blocks. 
1 lines changed or deleted 3 lines changed or added


 fn_solve.hpp   fn_solve.hpp 
skipping to change at line 27 skipping to change at line 27
//! @{ //! @{
//! Solve a system of linear equations, i.e., A*X = B, where X is unknown. //! Solve a system of linear equations, i.e., A*X = B, where X is unknown.
//! For a square matrix A, this function is conceptually the same as X = in v(A)*B, //! For a square matrix A, this function is conceptually the same as X = in v(A)*B,
//! but is done more efficiently. //! but is done more efficiently.
//! The number of rows in A and B must be the same. //! The number of rows in A and B must be the same.
//! B can be either a column vector or a matrix. //! B can be either a column vector or a matrix.
//! This function will also try to provide approximate solutions //! This function will also try to provide approximate solutions
//! to under-determined as well as over-determined systems (non-square A ma trices). //! to under-determined as well as over-determined systems (non-square A ma trices).
template<typename eT, typename T1, typename T2> template<typename T1, typename T2>
inline inline
bool const Glue<T1, T2, glue_solve>
solve(Mat<eT>& X, const Base<eT,T1>& A_in, const Base<eT,T2>& B_in) solve(const Base<typename T1::elem_type,T1>& A, const Base<typename T1::ele
m_type,T2>& B)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
const unwrap<T1> tmp1(A_in.get_ref()); return Glue<T1, T2, glue_solve>(A.get_ref(), B.get_ref());
const unwrap<T2> tmp2(B_in.get_ref());
const Mat<eT>& A = tmp1.M;
const Mat<eT>& B = tmp2.M;
arma_debug_check( (A.n_rows != B.n_rows), "solve(): number of rows in A a
nd B must be the same" );
bool status;
if(A.n_rows == A.n_cols)
{
status = auxlib::solve(X, A, B);
}
else
if(A.n_rows > A.n_cols)
{
arma_extra_debug_print("solve(): detected over-determined system");
status = auxlib::solve_od(X, A, B);
}
else
{
arma_extra_debug_print("solve(): detected under-determined system");
status = auxlib::solve_ud(X, A, B);
}
if(status == false)
{
X.reset();
}
return status;
} }
template<typename eT, typename T1, typename T2> template<typename T1, typename T2>
inline inline
Mat<eT> bool
solve(const Base<eT,T1>& A_in, const Base<eT,T2>& B_in) solve(Mat<typename T1::elem_type>& out, const Base<typename T1::elem_type,T
1>& A, const Base<typename T1::elem_type,T2>& B)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
Mat<eT> X; out = solve(A,B);
const bool status = solve(X, A_in, B_in);
if(status == false)
{
arma_print("solve(): solution not found");
X.reset();
}
return X; return (out.n_elem == 0) ? false : true;
} }
//! @} //! @}
 End of changes. 7 change blocks. 
49 lines changed or deleted 11 lines changed or added


 forward_proto.hpp   forward_proto.hpp 
skipping to change at line 44 skipping to change at line 44
class diskio; class diskio;
class op_min; class op_min;
class op_max; class op_max;
class op_trans; class op_trans;
class op_htrans; class op_htrans;
class op_inv; class op_inv;
class op_sum; class op_sum;
class op_diagmat; class op_diagmat;
class op_abs;
class eop_conj; class eop_conj;
class glue_times; class glue_times;
class glue_times_diag; class glue_times_diag;
class glue_rel_lt;
class glue_rel_gt;
class glue_rel_lteq;
class glue_rel_gteq;
class glue_rel_eq;
class glue_rel_noteq;
class op_rel_lt_pre;
class op_rel_lt_post;
class op_rel_gt_pre;
class op_rel_gt_post;
class op_rel_lteq_pre;
class op_rel_lteq_post;
class op_rel_gteq_pre;
class op_rel_gteq_post;
class op_rel_eq;
class op_rel_noteq;
template<const bool, const bool, const bool, const bool> class gemm; template<const bool, const bool, const bool, const bool> class gemm;
template<const bool, const bool, const bool> class gemv; template<const bool, const bool, const bool> class gemv;
template<typename T1, typename op_type> class Op; template<typename T1, typename op_type> class Op;
template<typename T1, typename eop_type> class eOp; template<typename T1, typename eop_type> class eOp;
template<typename T1, typename op_type> class OpCube; template<typename T1, typename op_type> class OpCube;
template<typename T1, typename eop_type> class eOpCube; template<typename T1, typename eop_type> class eOpCube;
template<typename T1, typename T2, typename glue_type> class Glue; template<typename T1, typename T2, typename glue_type> class Glue;
template<typename T1, typename T2, typename eglue_type> class eGlue; template<typename T1, typename T2, typename eglue_type> class eGlue;
template<typename out_eT, typename T1, typename op_type > cla
ss mtOp;
template<typename out_eT, typename T1, typename T2, typename glue_type> cla
ss mtGlue;
template<typename T1, typename T2, typename glue_type> class GlueCube; template<typename T1, typename T2, typename glue_type> class GlueCube;
template<typename T1, typename T2, typename eglue_type> class eGlueCube; template<typename T1, typename T2, typename eglue_type> class eGlueCube;
template<typename T1> class Proxy; template<typename T1> class Proxy;
template<typename T1> class ProxyCube; template<typename T1> class ProxyCube;
//! \addtogroup diskio //! \addtogroup diskio
//! @{ //! @{
 End of changes. 3 change blocks. 
2 lines changed or deleted 26 lines changed or added


 glue_times_meat.hpp   glue_times_meat.hpp 
skipping to change at line 338 skipping to change at line 338
gemv<true, true, true>::apply(out.memptr(), A, B.memptr(), alph a, eT(1)); gemv<true, true, true>::apply(out.memptr(), A, B.memptr(), alph a, eT(1));
} }
else else
{ {
gemm<true, true, true, true>::apply(out, A, B, alpha, eT(1)); gemm<true, true, true, true>::apply(out, A, B, alpha, eT(1));
} }
} }
} }
//! matrix multiplication with different element types
template<typename eT1, typename eT2>
inline
void
glue_times::apply_mixed(Mat<typename promote_type<eT1,eT2>::result>& out, c
onst Mat<eT1>& X, const Mat<eT2>& Y)
{
arma_extra_debug_sigprint();
typedef typename promote_type<eT1,eT2>::result out_eT;
arma_debug_assert_mul_size(X,Y, "matrix multiply");
out.set_size(X.n_rows,Y.n_cols);
gemm_mixed<>::apply(out, X, Y);
}
template<typename eT> template<typename eT>
arma_inline arma_inline
u32 u32
glue_times::mul_storage_cost(const Mat<eT>& A, const Mat<eT>& B, const bool do_trans_A, const bool do_trans_B) glue_times::mul_storage_cost(const Mat<eT>& A, const Mat<eT>& B, const bool do_trans_A, const bool do_trans_B)
{ {
const u32 final_A_n_rows = (do_trans_A == false) ? A.n_rows : A.n_cols; const u32 final_A_n_rows = (do_trans_A == false) ? A.n_rows : A.n_cols;
const u32 final_B_n_cols = (do_trans_B == false) ? B.n_cols : B.n_rows; const u32 final_B_n_cols = (do_trans_B == false) ? B.n_cols : B.n_rows;
return final_A_n_rows * final_B_n_cols; return final_A_n_rows * final_B_n_cols;
} }
 End of changes. 1 change blocks. 
17 lines changed or deleted 0 lines changed or added


 operator_div.hpp   operator_div.hpp 
skipping to change at line 49 skipping to change at line 49
( (
const typename T1::elem_type k, const typename T1::elem_type k,
const Base<typename T1::elem_type,T1>& X const Base<typename T1::elem_type,T1>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOp<T1, eop_scalar_div_pre>(X.get_ref(), k); return eOp<T1, eop_scalar_div_pre>(X.get_ref(), k);
} }
//! non-complex Base / complex scalar (experimental) //! complex scalar / non-complex Base (experimental)
template<typename T1> template<typename T1>
arma_inline arma_inline
Mat<typename std::complex<typename T1::pod_type> > const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_d iv_pre>
operator/ operator/
( (
const Base<typename T1::pod_type, T1>& X, const std::complex<typename T1::pod_type>& k,
const std::complex<typename T1::pod_type>& k const Base<typename T1::pod_type, T1>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; return mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scala
typedef typename T1::pod_type T; r_div_pre>('j', X.get_ref(), k);
const Proxy<T1> A(X.get_ref());
Mat<eT> out(A.n_rows, A.n_cols);
const u32 n_elem = A.n_elem;
eT* out_mem = out.memptr();
for(u32 i=0; i<n_elem; ++i)
{
out_mem[i] = A[i] / k;
}
return out;
} }
//! complex scalar / non-complex Base (experimental) //! non-complex Base / complex scalar (experimental)
template<typename T1> template<typename T1>
arma_inline arma_inline
Mat<typename std::complex<typename T1::pod_type> > const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_d iv_post>
operator/ operator/
( (
const std::complex<typename T1::pod_type>& k, const Base<typename T1::pod_type, T1>& X,
const Base<typename T1::pod_type, T1>& X const std::complex<typename T1::pod_type>& k
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; return mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scala
typedef typename T1::pod_type T; r_div_post>('j', X.get_ref(), k);
const Proxy<T1> A(X.get_ref());
Mat<eT> out(A.n_rows, A.n_cols);
const u32 n_elem = A.n_elem;
eT* out_mem = out.memptr();
for(u32 i=0; i<n_elem; ++i)
{
out_mem[i] = k / A[i];
}
return out;
} }
//! element-wise division of Base objects with same element type //! element-wise division of Base objects with same element type
template<typename T1, typename T2> template<typename T1, typename T2>
arma_inline arma_inline
const eGlue<T1, T2, eglue_div> const eGlue<T1, T2, eglue_div>
operator/ operator/
( (
const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_type,T1>& X,
const Base<typename T1::elem_type,T2>& Y const Base<typename T1::elem_type,T2>& Y
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eGlue<T1, T2, eglue_div>(X.get_ref(), Y.get_ref()); return eGlue<T1, T2, eglue_div>(X.get_ref(), Y.get_ref());
} }
//! element-wise division of Base objects with different element types //! element-wise division of Base objects with different element types
template<typename T1, typename T2> template<typename T1, typename T2>
arma_inline inline
Mat<typename promote_type<typename T1::elem_type, typename T2::elem_type>:: const mtGlue<typename promote_type<typename T1::elem_type, typename T2::ele
result> m_type>::result, T1, T2, glue_mixed_div>
operator/ operator/
( (
const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T1_result, T1>& X, const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T1_result, T1>& X,
const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T2_result, T2>& Y const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T2_result, T2>& Y
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT1; typedef typename T1::elem_type eT1;
typedef typename T2::elem_type eT2; typedef typename T2::elem_type eT2;
typedef typename promote_type<eT1,eT2>::result out_eT; typedef typename promote_type<eT1,eT2>::result out_eT;
promote_type<eT1,eT2>::check(); promote_type<eT1,eT2>::check();
const Proxy<T1> A(X.get_ref()); return mtGlue<out_eT, T1, T2, glue_mixed_div>( X.get_ref(), Y.get_ref() )
const Proxy<T2> B(Y.get_ref()); ;
arma_debug_assert_same_size(A, B, "element-wise matrix division");
Mat<out_eT> out(A.n_rows, A.n_cols);
out_eT* out_mem = out.memptr();
const u32 n_elem = out.n_elem;
for(u32 i=0; i<n_elem; ++i)
{
out_mem[i] = upgrade_val<eT1,eT2>::apply(A[i]) / upgrade_val<eT1,eT2>::
apply(B[i]);
}
return out;
} }
//! @} //! @}
 End of changes. 10 change blocks. 
60 lines changed or deleted 17 lines changed or added


 operator_minus.hpp   operator_minus.hpp 
skipping to change at line 73 skipping to change at line 73
( (
const typename T1::elem_type k, const typename T1::elem_type k,
const Base<typename T1::elem_type,T1>& X const Base<typename T1::elem_type,T1>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOp<T1, eop_scalar_minus_pre>(X.get_ref(), k); return eOp<T1, eop_scalar_minus_pre>(X.get_ref(), k);
} }
//! non-complex Base - complex scalar (experimental) //! complex scalar - non-complex Base (experimental)
template<typename T1> template<typename T1>
arma_inline arma_inline
Mat<typename std::complex<typename T1::pod_type> > const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_m inus_pre>
operator- operator-
( (
const Base<typename T1::pod_type, T1>& X, const std::complex<typename T1::pod_type>& k,
const std::complex<typename T1::pod_type>& k const Base<typename T1::pod_type, T1>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; return mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scala
typedef typename T1::pod_type T; r_minus_pre>('j', X.get_ref(), k);
const Proxy<T1> A(X.get_ref());
Mat<eT> out(A.n_rows, A.n_cols);
const u32 n_elem = A.n_elem;
eT* out_mem = out.memptr();
for(u32 i=0; i<n_elem; ++i)
{
out_mem[i] = A[i] - k;
}
return out;
} }
//! complex scalar - non-complex Base (experimental) //! non-complex Base - complex scalar (experimental)
template<typename T1> template<typename T1>
arma_inline arma_inline
Mat<typename std::complex<typename T1::pod_type> > const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_m inus_post>
operator- operator-
( (
const std::complex<typename T1::pod_type>& k, const Base<typename T1::pod_type, T1>& X,
const Base<typename T1::pod_type, T1>& X const std::complex<typename T1::pod_type>& k
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; return mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scala
typedef typename T1::pod_type T; r_minus_post>('j', X.get_ref(), k);
const Proxy<T1> A(X.get_ref());
Mat<eT> out(A.n_rows, A.n_cols);
const u32 n_elem = A.n_elem;
eT* out_mem = out.memptr();
for(u32 i=0; i<n_elem; ++i)
{
out_mem[i] = k - A[i];
}
return out;
} }
//! subtraction of Base objects with same element type //! subtraction of Base objects with same element type
template<typename T1, typename T2> template<typename T1, typename T2>
arma_inline arma_inline
const eGlue<T1, T2, eglue_minus> const eGlue<T1, T2, eglue_minus>
operator- operator-
( (
const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_type,T1>& X,
const Base<typename T1::elem_type,T2>& Y const Base<typename T1::elem_type,T2>& Y
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eGlue<T1, T2, eglue_minus>(X.get_ref(), Y.get_ref()); return eGlue<T1, T2, eglue_minus>(X.get_ref(), Y.get_ref());
} }
//! subtraction of Base objects with different element types //! subtraction of Base objects with different element types
template<typename T1, typename T2> template<typename T1, typename T2>
arma_inline inline
Mat<typename promote_type<typename T1::elem_type, typename T2::elem_type>:: const mtGlue<typename promote_type<typename T1::elem_type, typename T2::ele
result> m_type>::result, T1, T2, glue_mixed_minus>
operator- operator-
( (
const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T1_result, T1>& X, const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T1_result, T1>& X,
const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T2_result, T2>& Y const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T2_result, T2>& Y
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT1; typedef typename T1::elem_type eT1;
typedef typename T2::elem_type eT2; typedef typename T2::elem_type eT2;
typedef typename promote_type<eT1,eT2>::result out_eT; typedef typename promote_type<eT1,eT2>::result out_eT;
promote_type<eT1,eT2>::check(); promote_type<eT1,eT2>::check();
const Proxy<T1> A(X.get_ref()); return mtGlue<out_eT, T1, T2, glue_mixed_minus>( X.get_ref(), Y.get_ref()
const Proxy<T2> B(Y.get_ref()); );
arma_debug_assert_same_size(A, B, "matrix subtraction");
Mat<out_eT> out(A.n_rows, A.n_cols);
out_eT* out_mem = out.memptr();
const u32 n_elem = out.n_elem;
for(u32 i=0; i<n_elem; ++i)
{
out_mem[i] = upgrade_val<eT1,eT2>::apply(A[i]) - upgrade_val<eT1,eT2>::
apply(B[i]);
}
return out;
} }
//! @} //! @}
 End of changes. 10 change blocks. 
60 lines changed or deleted 17 lines changed or added


 operator_ostream.hpp   operator_ostream.hpp 
skipping to change at line 19 skipping to change at line 19
// for any purpose. You can redistribute this file // for any purpose. You can redistribute this file
// and/or modify it under the terms of the GNU // and/or modify it under the terms of the GNU
// Lesser General Public License (LGPL) as published // Lesser General Public License (LGPL) as published
// by the Free Software Foundation, either version 3 // by the Free Software Foundation, either version 3
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
//! \addtogroup operator_ostream //! \addtogroup operator_ostream
//! @{ //! @{
template<typename T1> template<typename eT, typename T1>
inline inline
std::ostream& std::ostream&
operator<< (std::ostream& o, const Base<typename T1::elem_type,T1>& X) operator<< (std::ostream& o, const Base<eT,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
const unwrap<T1> tmp(X.get_ref()); const unwrap<T1> tmp(X.get_ref());
arma_ostream::print(o, tmp.M, true); arma_ostream::print(o, tmp.M, true);
return o; return o;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 operator_plus.hpp   operator_plus.hpp 
skipping to change at line 58 skipping to change at line 58
(const typename T1::elem_type k, const Base<typename T1::elem_type,T1>& X) (const typename T1::elem_type k, const Base<typename T1::elem_type,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOp<T1, eop_scalar_plus>(X.get_ref(), k); // NOTE: order is swapp ed return eOp<T1, eop_scalar_plus>(X.get_ref(), k); // NOTE: order is swapp ed
} }
//! non-complex Base + complex scalar (experimental) //! non-complex Base + complex scalar (experimental)
template<typename T1> template<typename T1>
arma_inline arma_inline
Mat<typename std::complex<typename T1::pod_type> > const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_p lus>
operator+ operator+
( (
const Base<typename T1::pod_type, T1>& X, const Base<typename T1::pod_type, T1>& X,
const std::complex<typename T1::pod_type>& k const std::complex<typename T1::pod_type>& k
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; return mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scala
typedef typename T1::pod_type T; r_plus>('j', X.get_ref(), k);
const Proxy<T1> A(X.get_ref());
Mat<eT> out(A.n_rows, A.n_cols);
const u32 n_elem = A.n_elem;
eT* out_mem = out.memptr();
for(u32 i=0; i<n_elem; ++i)
{
out_mem[i] = A[i] + k;
}
return out;
} }
//! complex scalar + non-complex Base (experimental) //! complex scalar + non-complex Base (experimental)
template<typename T1> template<typename T1>
arma_inline arma_inline
Mat<typename std::complex<typename T1::pod_type> > const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_p lus>
operator+ operator+
( (
const std::complex<typename T1::pod_type>& k, const std::complex<typename T1::pod_type>& k,
const Base<typename T1::pod_type, T1>& X const Base<typename T1::pod_type, T1>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; return mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scala
typedef typename T1::pod_type T; r_plus>('j', X.get_ref(), k); // NOTE: order is swapped
const Proxy<T1> A(X.get_ref());
Mat<eT> out(A.n_rows, A.n_cols);
const u32 n_elem = A.n_elem;
eT* out_mem = out.memptr();
for(u32 i=0; i<n_elem; ++i)
{
out_mem[i] = k + A[i];
}
return out;
} }
//! addition of Base objects with same element type //! addition of Base objects with same element type
template<typename T1, typename T2> template<typename T1, typename T2>
arma_inline arma_inline
const eGlue<T1, T2, eglue_plus> const eGlue<T1, T2, eglue_plus>
operator+ operator+
( (
const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_type,T1>& X,
const Base<typename T1::elem_type,T2>& Y const Base<typename T1::elem_type,T2>& Y
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eGlue<T1, T2, eglue_plus>(X.get_ref(), Y.get_ref()); return eGlue<T1, T2, eglue_plus>(X.get_ref(), Y.get_ref());
} }
//! addition of Base objects with different element types //! addition of Base objects with different element types
template<typename T1, typename T2> template<typename T1, typename T2>
arma_inline inline
Mat<typename promote_type<typename T1::elem_type, typename T2::elem_type>:: const mtGlue<typename promote_type<typename T1::elem_type, typename T2::ele
result> m_type>::result, T1, T2, glue_mixed_plus>
operator+ operator+
( (
const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T1_result, T1>& X, const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T1_result, T1>& X,
const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T2_result, T2>& Y const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T2_result, T2>& Y
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT1; typedef typename T1::elem_type eT1;
typedef typename T2::elem_type eT2; typedef typename T2::elem_type eT2;
typedef typename promote_type<eT1,eT2>::result out_eT; typedef typename promote_type<eT1,eT2>::result out_eT;
promote_type<eT1,eT2>::check(); promote_type<eT1,eT2>::check();
const Proxy<T1> A(X.get_ref()); return mtGlue<out_eT, T1, T2, glue_mixed_plus>( X.get_ref(), Y.get_ref()
const Proxy<T2> B(Y.get_ref()); );
arma_debug_assert_same_size(A, B, "matrix addition");
Mat<out_eT> out(A.n_rows, A.n_cols);
out_eT* out_mem = out.memptr();
const u32 n_elem = out.n_elem;
for(u32 i=0; i<n_elem; ++i)
{
out_mem[i] = upgrade_val<eT1,eT2>::apply(A[i]) + upgrade_val<eT1,eT2>::
apply(B[i]);
}
return out;
} }
//! @} //! @}
 End of changes. 6 change blocks. 
54 lines changed or deleted 11 lines changed or added


 operator_relational.hpp   operator_relational.hpp 
skipping to change at line 19 skipping to change at line 19
// for any purpose. You can redistribute this file // for any purpose. You can redistribute this file
// and/or modify it under the terms of the GNU // and/or modify it under the terms of the GNU
// Lesser General Public License (LGPL) as published // Lesser General Public License (LGPL) as published
// by the Free Software Foundation, either version 3 // by the Free Software Foundation, either version 3
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
//! \addtogroup operator_relational //! \addtogroup operator_relational
//! @{ //! @{
// < : lt
// > : gt
// <= : lteq
// >= : gteq
// == : eq
// != : noteq
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
umat const mtGlue<u32, T1, T2, glue_rel_lt>
operator== operator<
(const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_typ (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, co
e,T2>& Y) nst Base<typename arma_not_cx<typename T1::elem_type>::result,T2>& Y)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtGlue<u32, T1, T2, glue_rel_lt>( X.get_ref(), Y.get_ref() );
const Proxy<T1> A(X.get_ref());
const Proxy<T2> B(Y.get_ref());
arma_debug_assert_same_size(A, B, "operator==");
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(A[i] == B[i])
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
umat const mtGlue<u32, T1, T2, glue_rel_gt>
operator!= operator>
(const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_typ (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, co
e,T2>& Y) nst Base<typename arma_not_cx<typename T1::elem_type>::result,T2>& Y)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtGlue<u32, T1, T2, glue_rel_gt>( X.get_ref(), Y.get_ref() );
const Proxy<T1> A(X.get_ref());
const Proxy<T2> B(Y.get_ref());
arma_debug_assert_same_size(A, B, "operator!=");
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(A[i] != B[i])
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
umat const mtGlue<u32, T1, T2, glue_rel_lteq>
operator>= operator<=
(const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_typ (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, co
e,T2>& Y) nst Base<typename arma_not_cx<typename T1::elem_type>::result,T2>& Y)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtGlue<u32, T1, T2, glue_rel_lteq>( X.get_ref(), Y.get_ref() );
const Proxy<T1> A(X.get_ref());
const Proxy<T2> B(Y.get_ref());
arma_debug_assert_same_size(A, B, "operator>=");
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(A[i] >= B[i])
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
umat const mtGlue<u32, T1, T2, glue_rel_gteq>
operator<= operator>=
(const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_typ (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, co
e,T2>& Y) nst Base<typename arma_not_cx<typename T1::elem_type>::result,T2>& Y)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtGlue<u32, T1, T2, glue_rel_gteq>( X.get_ref(), Y.get_ref() );
const Proxy<T1> A(X.get_ref());
const Proxy<T2> B(Y.get_ref());
arma_debug_assert_same_size(A, B, "operator<=");
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(A[i] <= B[i])
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
umat const mtGlue<u32, T1, T2, glue_rel_eq>
operator> operator==
(const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_typ e,T2>& Y) (const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_typ e,T2>& Y)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtGlue<u32, T1, T2, glue_rel_eq>( X.get_ref(), Y.get_ref() );
const Proxy<T1> A(X.get_ref());
const Proxy<T2> B(Y.get_ref());
arma_debug_assert_same_size(A, B, "operator>");
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(A[i] > B[i])
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
template<typename T1, typename T2> template<typename T1, typename T2>
inline inline
umat const mtGlue<u32, T1, T2, glue_rel_noteq>
operator< operator!=
(const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_typ e,T2>& Y) (const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_typ e,T2>& Y)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtGlue<u32, T1, T2, glue_rel_noteq>( X.get_ref(), Y.get_ref() );
const Proxy<T1> A(X.get_ref());
const Proxy<T2> B(Y.get_ref());
arma_debug_assert_same_size(A, B, "operator<");
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(A[i] < B[i])
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
//
//
//
template<typename T1> template<typename T1>
inline inline
umat const mtOp<u32, T1, op_rel_lt_pre>
operator== operator<
(const Base<typename T1::elem_type,T1>& X, const typename T1::elem_type val (const typename arma_not_cx<typename T1::elem_type>::result val, const Base
) <typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtOp<u32, T1, op_rel_lt_pre>(X.get_ref(), val);
const Proxy<T1> A(X.get_ref());
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(A[i] == val)
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
template<typename T1> template<typename T1>
inline inline
umat const mtOp<u32, T1, op_rel_lt_post>
operator!= operator<
(const Base<typename T1::elem_type,T1>& X, const typename T1::elem_type val (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, co
) nst typename arma_not_cx<typename T1::elem_type>::result val)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtOp<u32, T1, op_rel_lt_post>(X.get_ref(), val);
const Proxy<T1> A(X.get_ref());
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(A[i] != val)
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
template<typename T1> template<typename T1>
inline inline
umat const mtOp<u32, T1, op_rel_gt_pre>
operator>= operator>
(const Base<typename T1::elem_type,T1>& X, const typename T1::elem_type val (const typename arma_not_cx<typename T1::elem_type>::result val, const Base
) <typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtOp<u32, T1, op_rel_gt_pre>(X.get_ref(), val);
const Proxy<T1> A(X.get_ref());
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(A[i] >= val)
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
template<typename T1> template<typename T1>
inline inline
umat const mtOp<u32, T1, op_rel_gt_post>
operator<= operator>
(const Base<typename T1::elem_type,T1>& X, const typename T1::elem_type val (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, co
) nst typename arma_not_cx<typename T1::elem_type>::result val)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtOp<u32, T1, op_rel_gt_post>(X.get_ref(), val);
const Proxy<T1> A(X.get_ref());
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(A[i] <= val)
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
template<typename T1> template<typename T1>
inline inline
umat const mtOp<u32, T1, op_rel_lteq_pre>
operator> operator<=
(const Base<typename T1::elem_type,T1>& X, const typename T1::elem_type val (const typename arma_not_cx<typename T1::elem_type>::result val, const Base
) <typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtOp<u32, T1, op_rel_lteq_pre>(X.get_ref(), val);
const Proxy<T1> A(X.get_ref());
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(A[i] > val)
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
template<typename T1> template<typename T1>
inline inline
umat const mtOp<u32, T1, op_rel_lteq_post>
operator< operator<=
(const Base<typename T1::elem_type,T1>& X, const typename T1::elem_type val (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, co
) nst typename arma_not_cx<typename T1::elem_type>::result val)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtOp<u32, T1, op_rel_lteq_post>(X.get_ref(), val);
const Proxy<T1> A(X.get_ref());
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(A[i] < val)
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
template<typename T1> template<typename T1>
inline inline
umat const mtOp<u32, T1, op_rel_gteq_pre>
operator== operator>=
(const typename T1::elem_type val, const Base<typename T1::elem_type,T1>& X (const typename arma_not_cx<typename T1::elem_type>::result val, const Base
) <typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
{ {
return operator==(X,val); arma_extra_debug_sigprint();
return mtOp<u32, T1, op_rel_gteq_pre>(X.get_ref(), val);
} }
template<typename T1> template<typename T1>
inline inline
umat const mtOp<u32, T1, op_rel_gteq_post>
operator!= operator>=
(const typename T1::elem_type val, const Base<typename T1::elem_type,T1>& X (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, co
) nst typename arma_not_cx<typename T1::elem_type>::result val)
{ {
return operator!=(X,val); arma_extra_debug_sigprint();
return mtOp<u32, T1, op_rel_gteq_post>(X.get_ref(), val);
} }
template<typename T1> template<typename T1>
inline inline
umat const mtOp<u32, T1, op_rel_eq>
operator>= operator==
(const typename T1::elem_type val, const Base<typename T1::elem_type,T1>& X ) (const typename T1::elem_type val, const Base<typename T1::elem_type,T1>& X )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtOp<u32, T1, op_rel_eq>(X.get_ref(), val);
const Proxy<T1> A(X.get_ref());
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(val >= A[i])
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
template<typename T1> template<typename T1>
inline inline
umat const mtOp<u32, T1, op_rel_eq>
operator<= operator==
(const typename T1::elem_type val, const Base<typename T1::elem_type,T1>& X (const Base<typename T1::elem_type,T1>& X, const typename T1::elem_type val
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtOp<u32, T1, op_rel_eq>(X.get_ref(), val);
const Proxy<T1> A(X.get_ref());
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(val <= A[i])
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
template<typename T1> template<typename T1>
inline inline
umat const mtOp<u32, T1, op_rel_noteq>
operator> operator!=
(const typename T1::elem_type val, const Base<typename T1::elem_type,T1>& X ) (const typename T1::elem_type val, const Base<typename T1::elem_type,T1>& X )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtOp<u32, T1, op_rel_noteq>(X.get_ref(), val);
const Proxy<T1> A(X.get_ref());
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(val > A[i])
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
template<typename T1> template<typename T1>
inline inline
umat const mtOp<u32, T1, op_rel_noteq>
operator< operator!=
(const typename T1::elem_type val, const Base<typename T1::elem_type,T1>& X (const Base<typename T1::elem_type,T1>& X, const typename T1::elem_type val
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename umat::elem_type umat_eT; return mtOp<u32, T1, op_rel_noteq>(X.get_ref(), val);
const Proxy<T1> A(X.get_ref());
umat out(A.n_rows, A.n_cols);
umat_eT* out_mem = out.memptr();
for(u32 i=0; i<A.n_elem; ++i)
{
if(val < A[i])
{
out_mem[i] = umat_eT(1);
}
else
{
out_mem[i] = umat_eT(0);
}
}
return out;
} }
//! @} //! @}
 End of changes. 38 change blocks. 
420 lines changed or deleted 97 lines changed or added


 operator_schur.hpp   operator_schur.hpp 
skipping to change at line 38 skipping to change at line 38
const Base<typename T1::elem_type,T2>& Y const Base<typename T1::elem_type,T2>& Y
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eGlue<T1, T2, eglue_schur>(X.get_ref(), Y.get_ref()); return eGlue<T1, T2, eglue_schur>(X.get_ref(), Y.get_ref());
} }
//! element-wise multiplication of Base objects with different element type s //! element-wise multiplication of Base objects with different element type s
template<typename T1, typename T2> template<typename T1, typename T2>
arma_inline inline
Mat<typename promote_type<typename T1::elem_type, typename T2::elem_type>:: const mtGlue<typename promote_type<typename T1::elem_type, typename T2::ele
result> m_type>::result, T1, T2, glue_mixed_schur>
operator% operator%
( (
const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T1_result, T1>& X, const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T1_result, T1>& X,
const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T2_result, T2>& Y const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T2_result, T2>& Y
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT1; typedef typename T1::elem_type eT1;
typedef typename T2::elem_type eT2; typedef typename T2::elem_type eT2;
typedef typename promote_type<eT1,eT2>::result out_eT; typedef typename promote_type<eT1,eT2>::result out_eT;
promote_type<eT1,eT2>::check(); promote_type<eT1,eT2>::check();
const Proxy<T1> A(X.get_ref()); return mtGlue<out_eT, T1, T2, glue_mixed_schur>( X.get_ref(), Y.get_ref()
const Proxy<T2> B(Y.get_ref()); );
arma_debug_assert_same_size(A, B, "element-wise matrix multiplication");
Mat<out_eT> out(A.n_rows, A.n_cols);
out_eT* out_mem = out.memptr();
const u32 n_elem = out.n_elem;
for(u32 i=0; i<n_elem; ++i)
{
out_mem[i] = upgrade_val<eT1,eT2>::apply(A[i]) * upgrade_val<eT1,eT2>::
apply(B[i]);
}
return out;
} }
//! @} //! @}
 End of changes. 2 change blocks. 
20 lines changed or deleted 5 lines changed or added


 operator_times.hpp   operator_times.hpp 
skipping to change at line 46 skipping to change at line 46
(const typename T1::elem_type k, const Base<typename T1::elem_type,T1>& X) (const typename T1::elem_type k, const Base<typename T1::elem_type,T1>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return eOp<T1, eop_scalar_times>(X.get_ref(),k); // NOTE: order is swapp ed return eOp<T1, eop_scalar_times>(X.get_ref(),k); // NOTE: order is swapp ed
} }
//! non-complex Base * complex scalar (experimental) //! non-complex Base * complex scalar (experimental)
template<typename T1> template<typename T1>
arma_inline arma_inline
Mat<typename std::complex<typename T1::pod_type> > const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_t imes>
operator* operator*
( (
const Base<typename T1::pod_type, T1>& X, const Base<typename T1::pod_type, T1>& X,
const std::complex<typename T1::pod_type>& k const std::complex<typename T1::pod_type>& k
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; return mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scala
typedef typename T1::pod_type T; r_times>('j', X.get_ref(), k);
const Proxy<T1> A(X.get_ref());
Mat<eT> out(A.n_rows, A.n_cols);
const u32 n_elem = A.n_elem;
eT* out_mem = out.memptr();
for(u32 i=0; i<n_elem; ++i)
{
out_mem[i] = A[i] * k;
}
return out;
} }
//! complex scalar * non-complex Base (experimental) //! complex scalar * non-complex Base (experimental)
template<typename T1> template<typename T1>
arma_inline arma_inline
Mat<typename std::complex<typename T1::pod_type> > const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_t imes>
operator* operator*
( (
const std::complex<typename T1::pod_type>& k, const std::complex<typename T1::pod_type>& k,
const Base<typename T1::pod_type, T1>& X const Base<typename T1::pod_type, T1>& X
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename std::complex<typename T1::pod_type> eT; return mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scala
typedef typename T1::pod_type T; r_times>('j', X.get_ref(), k);
const Proxy<T1> A(X.get_ref());
Mat<eT> out(A.n_rows, A.n_cols);
const u32 n_elem = A.n_elem;
eT* out_mem = out.memptr();
for(u32 i=0; i<n_elem; ++i)
{
out_mem[i] = k * A[i];
}
return out;
} }
//! scalar * trans(T1) //! scalar * trans(T1)
template<typename T1> template<typename T1>
arma_inline arma_inline
const Op<T1, op_trans2> const Op<T1, op_trans2>
operator* operator*
(const typename T1::elem_type k, const Op<T1, op_trans>& X) (const typename T1::elem_type k, const Op<T1, op_trans>& X)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
skipping to change at line 200 skipping to change at line 170
operator* operator*
(const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_typ e,T2>& Y) (const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_typ e,T2>& Y)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return Glue<T1, T2, glue_times>(X.get_ref(), Y.get_ref()); return Glue<T1, T2, glue_times>(X.get_ref(), Y.get_ref());
} }
//! multiplication of Base objects with different element types //! multiplication of Base objects with different element types
template<typename T1, typename T2> template<typename T1, typename T2>
arma_inline inline
Mat<typename promote_type<typename T1::elem_type, typename T2::elem_type>:: const mtGlue< typename promote_type<typename T1::elem_type, typename T2::el
result> em_type>::result, T1, T2, glue_mixed_times >
operator* operator*
( (
const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T1_result, T1>& X, const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T1_result, T1>& X,
const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T2_result, T2>& Y const Base< typename force_different_type<typename T1::elem_type, typenam e T2::elem_type>::T2_result, T2>& Y
) )
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
typedef typename T1::elem_type eT1; typedef typename T1::elem_type eT1;
typedef typename T2::elem_type eT2; typedef typename T2::elem_type eT2;
typedef typename promote_type<eT1,eT2>::result out_eT; typedef typename promote_type<eT1,eT2>::result out_eT;
promote_type<eT1,eT2>::check(); promote_type<eT1,eT2>::check();
const unwrap<T1> tmp1(X.get_ref()); return mtGlue<out_eT, T1, T2, glue_mixed_times>( X.get_ref(), Y.get_ref()
const unwrap<T2> tmp2(Y.get_ref()); );
const Mat<eT1>& A = tmp1.M;
const Mat<eT2>& B = tmp2.M;
Mat<out_eT> out;
glue_times::apply_mixed(out, A, B);
return out;
} }
//! @} //! @}
 End of changes. 6 change blocks. 
48 lines changed or deleted 11 lines changed or added


 promote_type.hpp   promote_type.hpp 
skipping to change at line 136 skipping to change at line 136
template<> struct promote_type<u16, s16> : public promote_type_ok { typedef s16 result; }; // s32 ? template<> struct promote_type<u16, s16> : public promote_type_ok { typedef s16 result; }; // s32 ?
template<> struct promote_type<s8 , s16> : public promote_type_ok { typedef s16 result; }; template<> struct promote_type<s8 , s16> : public promote_type_ok { typedef s16 result; };
template<> struct promote_type<u8 , s16> : public promote_type_ok { typedef s16 result; }; template<> struct promote_type<u8 , s16> : public promote_type_ok { typedef s16 result; };
template<> struct promote_type<s8, u16> : public promote_type_ok { typedef s16 result; }; // s32 ? template<> struct promote_type<s8, u16> : public promote_type_ok { typedef s16 result; }; // s32 ?
template<> struct promote_type<u8, u16> : public promote_type_ok { typedef u16 result; }; template<> struct promote_type<u8, u16> : public promote_type_ok { typedef u16 result; };
template<> struct promote_type<u8, s8> : public promote_type_ok { typedef s 8 result; }; // s16 ? template<> struct promote_type<u8, s8> : public promote_type_ok { typedef s 8 result; }; // s16 ?
template<typename T1, typename T2>
struct eT_promoter
{
typedef typename promote_type<typename T1::elem_type, typename T2::elem_t
ype>::result eT;
};
//! @} //! @}
 End of changes. 1 change blocks. 
0 lines changed or deleted 7 lines changed or added


 restrictors.hpp   restrictors.hpp 
skipping to change at line 19 skipping to change at line 19
// for any purpose. You can redistribute this file // for any purpose. You can redistribute this file
// and/or modify it under the terms of the GNU // and/or modify it under the terms of the GNU
// Lesser General Public License (LGPL) as published // Lesser General Public License (LGPL) as published
// by the Free Software Foundation, either version 3 // by the Free Software Foundation, either version 3
// of the License or (at your option) any later version. // of the License or (at your option) any later version.
// (see http://www.opensource.org/licenses for more info) // (see http://www.opensource.org/licenses for more info)
//! \addtogroup restrictors //! \addtogroup restrictors
//! @{ //! @{
// structures for template based restrictions of input/output arguments
// (part of the SFINAE approach)
// http://en.wikipedia.org/wiki/SFINAE
template<typename T> struct arma_scalar_only { }; template<typename T> struct arma_scalar_only { };
template<> struct arma_scalar_only<char> { typedef char result; }; template<> struct arma_scalar_only<char> { typedef char result; };
template<> struct arma_scalar_only<short> { typedef short result; }; template<> struct arma_scalar_only<short> { typedef short result; };
template<> struct arma_scalar_only<int> { typedef int result; }; template<> struct arma_scalar_only<int> { typedef int result; };
template<> struct arma_scalar_only<long> { typedef long result; }; template<> struct arma_scalar_only<long> { typedef long result; };
template<> struct arma_scalar_only<float> { typedef float result; }; template<> struct arma_scalar_only<float> { typedef float result; };
template<> struct arma_scalar_only<double> { typedef double result; }; template<> struct arma_scalar_only<double> { typedef double result; };
template<> struct arma_scalar_only<unsigned char> { typedef unsigned char result; }; template<> struct arma_scalar_only<unsigned char> { typedef unsigned char result; };
skipping to change at line 66 skipping to change at line 70
template<> struct arma_signed_integral_only<char> { typedef char result ; }; template<> struct arma_signed_integral_only<char> { typedef char result ; };
template<> struct arma_signed_integral_only<short> { typedef short result ; }; template<> struct arma_signed_integral_only<short> { typedef short result ; };
template<> struct arma_signed_integral_only<int> { typedef int result ; }; template<> struct arma_signed_integral_only<int> { typedef int result ; };
template<> struct arma_signed_integral_only<long> { typedef long result ; }; template<> struct arma_signed_integral_only<long> { typedef long result ; };
template<typename T> struct arma_float_only { }; template<typename T> struct arma_float_only { };
template<> struct arma_float_only<float> { typedef float result; }; template<> struct arma_float_only<float> { typedef float result; };
template<> struct arma_float_only<double> { typedef double result; }; template<> struct arma_float_only<double> { typedef double result; };
template<typename T> struct arma_float_or_cx_only { };
template<> struct arma_float_or_cx_only< float > { typedef f
loat result; };
template<> struct arma_float_or_cx_only< double > { typedef d
ouble result; };
template<> struct arma_float_or_cx_only< std::complex<float> > { typedef s
td::complex<float> result; };
template<> struct arma_float_or_cx_only< std::complex<double> > { typedef s
td::complex<double> result; };
template<typename T> struct arma_cx_only { };
template<typename T> struct arma_cx_only< std::complex<T> > { typedef std::
complex<T> result; };
template<typename T> struct arma_not_cx { typedef T resu
lt; };
template<typename T> struct arma_not_cx< std::complex<T> > { };
template<typename T> struct arma_op_rel_only { };
template<> struct arma_op_rel_only< op_rel_lt_pre > { typedef int result
; };
template<> struct arma_op_rel_only< op_rel_lt_post > { typedef int result
; };
template<> struct arma_op_rel_only< op_rel_gt_pre > { typedef int result
; };
template<> struct arma_op_rel_only< op_rel_gt_post > { typedef int result
; };
template<> struct arma_op_rel_only< op_rel_lteq_pre > { typedef int result
; };
template<> struct arma_op_rel_only< op_rel_lteq_post > { typedef int result
; };
template<> struct arma_op_rel_only< op_rel_gteq_pre > { typedef int result
; };
template<> struct arma_op_rel_only< op_rel_gteq_post > { typedef int result
; };
template<> struct arma_op_rel_only< op_rel_eq > { typedef int result
; };
template<> struct arma_op_rel_only< op_rel_noteq > { typedef int result
; };
template<typename T> struct arma_not_op_rel { typedef int result; };
template<> struct arma_not_op_rel< op_rel_lt_pre > { };
template<> struct arma_not_op_rel< op_rel_lt_post > { };
template<> struct arma_not_op_rel< op_rel_gt_pre > { };
template<> struct arma_not_op_rel< op_rel_gt_post > { };
template<> struct arma_not_op_rel< op_rel_lteq_pre > { };
template<> struct arma_not_op_rel< op_rel_lteq_post > { };
template<> struct arma_not_op_rel< op_rel_gteq_pre > { };
template<> struct arma_not_op_rel< op_rel_gteq_post > { };
template<> struct arma_not_op_rel< op_rel_eq > { };
template<> struct arma_not_op_rel< op_rel_noteq > { };
template<typename T> struct arma_glue_rel_only { };
template<> struct arma_glue_rel_only< glue_rel_lt > { typedef int result
; };
template<> struct arma_glue_rel_only< glue_rel_gt > { typedef int result
; };
template<> struct arma_glue_rel_only< glue_rel_lteq > { typedef int result
; };
template<> struct arma_glue_rel_only< glue_rel_gteq > { typedef int result
; };
template<> struct arma_glue_rel_only< glue_rel_eq > { typedef int result
; };
template<> struct arma_glue_rel_only< glue_rel_noteq > { typedef int result
; };
//! @} //! @}
 End of changes. 2 change blocks. 
0 lines changed or deleted 74 lines changed or added


 traits.hpp   traits.hpp 
skipping to change at line 187 skipping to change at line 187
{ static const bool value = false; }; { static const bool value = false; };
template<typename T1> template<typename T1>
struct is_op_diagmat< Op<T1,op_diagmat> > struct is_op_diagmat< Op<T1,op_diagmat> >
{ static const bool value = true; }; { static const bool value = true; };
// //
// //
// //
template<typename T>
struct is_op_rel
{ static const bool value = false; };
template<typename out_eT, typename T1>
struct is_op_rel< mtOp<out_eT, T1, op_rel_lt_pre> >
{ static const bool value = true; };
template<typename out_eT, typename T1>
struct is_op_rel< mtOp<out_eT, T1, op_rel_lt_post> >
{ static const bool value = true; };
template<typename out_eT, typename T1>
struct is_op_rel< mtOp<out_eT, T1, op_rel_gt_pre> >
{ static const bool value = true; };
template<typename out_eT, typename T1>
struct is_op_rel< mtOp<out_eT, T1, op_rel_gt_post> >
{ static const bool value = true; };
template<typename out_eT, typename T1>
struct is_op_rel< mtOp<out_eT, T1, op_rel_lteq_pre> >
{ static const bool value = true; };
template<typename out_eT, typename T1>
struct is_op_rel< mtOp<out_eT, T1, op_rel_lteq_post> >
{ static const bool value = true; };
template<typename out_eT, typename T1>
struct is_op_rel< mtOp<out_eT, T1, op_rel_gteq_pre> >
{ static const bool value = true; };
template<typename out_eT, typename T1>
struct is_op_rel< mtOp<out_eT, T1, op_rel_gteq_post> >
{ static const bool value = true; };
template<typename out_eT, typename T1>
struct is_op_rel< mtOp<out_eT, T1, op_rel_eq> >
{ static const bool value = true; };
template<typename out_eT, typename T1>
struct is_op_rel< mtOp<out_eT, T1, op_rel_noteq> >
{ static const bool value = true; };
//
//
//
template<typename T1> template<typename T1>
struct is_arma_type struct is_arma_type
{ {
static const bool value static const bool value
= is_Mat<T1>::value = is_Mat<T1>::value
|| is_Op<T1>::value || is_Op<T1>::value
|| is_Glue<T1>::value || is_Glue<T1>::value
|| is_subview<T1>::value || is_subview<T1>::value
|| is_diagview<T1>::value || is_diagview<T1>::value
|| is_eOp<T1>::value || is_eOp<T1>::value
 End of changes. 1 change blocks. 
0 lines changed or deleted 48 lines changed or added


 unwrap.hpp   unwrap.hpp 
skipping to change at line 77 skipping to change at line 77
inline unwrap(const Col<eT>& A) inline unwrap(const Col<eT>& A)
: M(A) : M(A)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
} }
const Col<eT>& M; const Col<eT>& M;
}; };
template<typename out_eT, typename T1, typename T2, typename glue_type>
class unwrap< mtGlue<out_eT, T1, T2, glue_type> >
{
public:
inline unwrap(const mtGlue<out_eT, T1, T2, glue_type>& A)
: M(A)
{
arma_extra_debug_sigprint();
}
const Mat<out_eT> M;
};
template<typename out_eT, typename T1, typename op_type>
class unwrap< mtOp<out_eT, T1, op_type> >
{
public:
inline unwrap(const mtOp<out_eT, T1, op_type>& A)
: M(A)
{
arma_extra_debug_sigprint();
}
const Mat<out_eT> M;
};
// //
// //
// //
template<typename T1> template<typename T1>
class unwrap_check class unwrap_check
{ {
public: public:
typedef typename T1::elem_type eT; typedef typename T1::elem_type eT;
 End of changes. 1 change blocks. 
0 lines changed or deleted 28 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/