Mat_meat.hpp | Mat_meat.hpp | |||
---|---|---|---|---|
skipping to change at line 2364 | skipping to change at line 2364 | |||
Mat<eT>::const_row_iterator::const_row_iterator(const Mat<eT>& in_M, const u32 in_row) | Mat<eT>::const_row_iterator::const_row_iterator(const Mat<eT>& in_M, const u32 in_row) | |||
: M (in_M ) | : M (in_M ) | |||
, row(in_row) | , row(in_row) | |||
, col(0 ) | , col(0 ) | |||
{ | { | |||
arma_extra_debug_sigprint(); | arma_extra_debug_sigprint(); | |||
} | } | |||
template<typename eT> | template<typename eT> | |||
inline | inline | |||
Mat<eT>::const_row_iterator::const_row_iterator(const Mat<eT>::row_iterator & X) | Mat<eT>::const_row_iterator::const_row_iterator(const typename Mat<eT>::row _iterator& X) | |||
: M (X.M) | : M (X.M) | |||
, row(X.row) | , row(X.row) | |||
, col(X.col) | , col(X.col) | |||
{ | { | |||
arma_extra_debug_sigprint(); | arma_extra_debug_sigprint(); | |||
} | } | |||
template<typename eT> | template<typename eT> | |||
inline | inline | |||
eT | eT | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
field_meat.hpp | field_meat.hpp | |||
---|---|---|---|---|
skipping to change at line 721 | skipping to change at line 721 | |||
inline | inline | |||
field<oT>::const_iterator::const_iterator(const field<oT>& in_M, const bool at_end) | field<oT>::const_iterator::const_iterator(const field<oT>& in_M, const bool at_end) | |||
: M(in_M) | : M(in_M) | |||
, i( (at_end == false) ? 0 : in_M.n_elem ) | , i( (at_end == false) ? 0 : in_M.n_elem ) | |||
{ | { | |||
arma_extra_debug_sigprint(); | arma_extra_debug_sigprint(); | |||
} | } | |||
template<typename oT> | template<typename oT> | |||
inline | inline | |||
field<oT>::const_iterator::const_iterator(const field<oT>::iterator& X) | field<oT>::const_iterator::const_iterator(const typename field<oT>::iterato r& X) | |||
: M(X.M) | : M(X.M) | |||
, i(X.i) | , i(X.i) | |||
{ | { | |||
arma_extra_debug_sigprint(); | arma_extra_debug_sigprint(); | |||
} | } | |||
template<typename oT> | template<typename oT> | |||
inline | inline | |||
const oT& | const oT& | |||
field<oT>::const_iterator::operator*() const | field<oT>::const_iterator::operator*() const | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 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) | ||||
template<typename T1> | ||||
arma_inline | ||||
Mat<typename std::complex<typename T1::pod_type> > | ||||
operator/ | ||||
( | ||||
const Base<typename T1::pod_type, T1>& X, | ||||
const std::complex<typename T1::pod_type>& k | ||||
) | ||||
{ | ||||
arma_extra_debug_sigprint(); | ||||
typedef typename std::complex<typename T1::pod_type> eT; | ||||
typedef typename T1::pod_type T; | ||||
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) | ||||
template<typename T1> | ||||
arma_inline | ||||
Mat<typename std::complex<typename T1::pod_type> > | ||||
operator/ | ||||
( | ||||
const std::complex<typename T1::pod_type>& k, | ||||
const Base<typename T1::pod_type, T1>& X | ||||
) | ||||
{ | ||||
arma_extra_debug_sigprint(); | ||||
typedef typename std::complex<typename T1::pod_type> eT; | ||||
typedef typename T1::pod_type T; | ||||
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 | |||
) | ) | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 60 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) | ||||
template<typename T1> | ||||
arma_inline | ||||
Mat<typename std::complex<typename T1::pod_type> > | ||||
operator- | ||||
( | ||||
const Base<typename T1::pod_type, T1>& X, | ||||
const std::complex<typename T1::pod_type>& k | ||||
) | ||||
{ | ||||
arma_extra_debug_sigprint(); | ||||
typedef typename std::complex<typename T1::pod_type> eT; | ||||
typedef typename T1::pod_type T; | ||||
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) | ||||
template<typename T1> | ||||
arma_inline | ||||
Mat<typename std::complex<typename T1::pod_type> > | ||||
operator- | ||||
( | ||||
const std::complex<typename T1::pod_type>& k, | ||||
const Base<typename T1::pod_type, T1>& X | ||||
) | ||||
{ | ||||
arma_extra_debug_sigprint(); | ||||
typedef typename std::complex<typename T1::pod_type> eT; | ||||
typedef typename T1::pod_type T; | ||||
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 | |||
) | ) | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 60 lines changed or added | |||
operator_plus.hpp | operator_plus.hpp | |||
---|---|---|---|---|
skipping to change at line 55 | skipping to change at line 55 | |||
arma_inline | arma_inline | |||
const eOp<T1, eop_scalar_plus> | const eOp<T1, eop_scalar_plus> | |||
operator+ | operator+ | |||
(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) | ||||
template<typename T1> | ||||
arma_inline | ||||
Mat<typename std::complex<typename T1::pod_type> > | ||||
operator+ | ||||
( | ||||
const Base<typename T1::pod_type, T1>& X, | ||||
const std::complex<typename T1::pod_type>& k | ||||
) | ||||
{ | ||||
arma_extra_debug_sigprint(); | ||||
typedef typename std::complex<typename T1::pod_type> eT; | ||||
typedef typename T1::pod_type T; | ||||
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) | ||||
template<typename T1> | ||||
arma_inline | ||||
Mat<typename std::complex<typename T1::pod_type> > | ||||
operator+ | ||||
( | ||||
const std::complex<typename T1::pod_type>& k, | ||||
const Base<typename T1::pod_type, T1>& X | ||||
) | ||||
{ | ||||
arma_extra_debug_sigprint(); | ||||
typedef typename std::complex<typename T1::pod_type> eT; | ||||
typedef typename T1::pod_type T; | ||||
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 | |||
) | ) | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 60 lines changed or added | |||
operator_times.hpp | operator_times.hpp | |||
---|---|---|---|---|
skipping to change at line 43 | skipping to change at line 43 | |||
arma_inline | arma_inline | |||
const eOp<T1, eop_scalar_times> | const eOp<T1, eop_scalar_times> | |||
operator* | operator* | |||
(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) | ||||
template<typename T1> | ||||
arma_inline | ||||
Mat<typename std::complex<typename T1::pod_type> > | ||||
operator* | ||||
( | ||||
const Base<typename T1::pod_type, T1>& X, | ||||
const std::complex<typename T1::pod_type>& k | ||||
) | ||||
{ | ||||
arma_extra_debug_sigprint(); | ||||
typedef typename std::complex<typename T1::pod_type> eT; | ||||
typedef typename T1::pod_type T; | ||||
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) | ||||
template<typename T1> | ||||
arma_inline | ||||
Mat<typename std::complex<typename T1::pod_type> > | ||||
operator* | ||||
( | ||||
const std::complex<typename T1::pod_type>& k, | ||||
const Base<typename T1::pod_type, T1>& X | ||||
) | ||||
{ | ||||
arma_extra_debug_sigprint(); | ||||
typedef typename std::complex<typename T1::pod_type> eT; | ||||
typedef typename T1::pod_type T; | ||||
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(); | |||
return Op<T1, op_trans2>(X.m, k); | return Op<T1, op_trans2>(X.m, k); | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 60 lines changed or added | |||
version.hpp | version.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 version | //! \addtogroup version | |||
//! @{ | //! @{ | |||
struct arma_version | struct arma_version | |||
{ | { | |||
static const unsigned int major = 0; | static const unsigned int major = 0; | |||
static const unsigned int minor = 9; | static const unsigned int minor = 9; | |||
static const unsigned int patch = 6; | static const unsigned int patch = 8; | |||
static | ||||
inline | ||||
std::string | ||||
as_string() | ||||
{ | ||||
std::stringstream ss; | ||||
ss << arma_version::major << '.' << arma_version::minor << '.' << arma_ | ||||
version::patch; | ||||
return ss.str(); | ||||
} | ||||
}; | }; | |||
struct arma_config | struct arma_config | |||
{ | { | |||
#if defined(ARMA_USE_ATLAS) | #if defined(ARMA_USE_ATLAS) | |||
static const bool atlas = true; | static const bool atlas = true; | |||
#else | #else | |||
static const bool atlas = false; | static const bool atlas = false; | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 13 lines changed or added | |||