arma_version.hpp   arma_version.hpp 
skipping to change at line 13 skipping to change at line 13
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
//! \addtogroup arma_version //! \addtogroup arma_version
//! @{ //! @{
#define ARMA_VERSION_MAJOR 4 #define ARMA_VERSION_MAJOR 4
#define ARMA_VERSION_MINOR 550 #define ARMA_VERSION_MINOR 550
#define ARMA_VERSION_PATCH 1 #define ARMA_VERSION_PATCH 2
#define ARMA_VERSION_NAME "Singapore Sling Deluxe" #define ARMA_VERSION_NAME "Singapore Sling Deluxe"
struct arma_version struct arma_version
{ {
static const unsigned int major = ARMA_VERSION_MAJOR; static const unsigned int major = ARMA_VERSION_MAJOR;
static const unsigned int minor = ARMA_VERSION_MINOR; static const unsigned int minor = ARMA_VERSION_MINOR;
static const unsigned int patch = ARMA_VERSION_PATCH; static const unsigned int patch = ARMA_VERSION_PATCH;
static static
inline inline
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 op_all_meat.hpp   op_all_meat.hpp 
skipping to change at line 32 skipping to change at line 32
const uword n_elem = P.get_n_elem(); const uword n_elem = P.get_n_elem();
uword count = 0; uword count = 0;
if(Proxy<T1>::prefer_at_accessor == false) if(Proxy<T1>::prefer_at_accessor == false)
{ {
typename Proxy<T1>::ea_type Pea = P.get_ea(); typename Proxy<T1>::ea_type Pea = P.get_ea();
for(uword i=0; i<n_elem; ++i) for(uword i=0; i<n_elem; ++i)
{ {
if(Pea[i] != eT(0)) { ++count; } count += (Pea[i] != eT(0)) ? uword(1) : uword(0);
} }
} }
else else
{ {
const uword n_rows = P.get_n_rows(); const uword n_rows = P.get_n_rows();
const uword n_cols = P.get_n_cols(); const uword n_cols = P.get_n_cols();
for(uword col=0; col < n_cols; ++col) for(uword col=0; col < n_cols; ++col)
for(uword row=0; row < n_rows; ++row) for(uword row=0; row < n_rows; ++row)
{ {
skipping to change at line 83 skipping to change at line 83
uword count = 0; uword count = 0;
if(Proxy<T1>::prefer_at_accessor == false) if(Proxy<T1>::prefer_at_accessor == false)
{ {
typename Proxy<T1>::ea_type Pea = P.get_ea(); typename Proxy<T1>::ea_type Pea = P.get_ea();
for(uword i=0; i < n_elem; ++i) for(uword i=0; i < n_elem; ++i)
{ {
const eT tmp = Pea[i]; const eT tmp = Pea[i];
if(is_same_type<op_type, op_rel_lt_pre >::yes) { if(val < tm if(is_same_type<op_type, op_rel_lt_pre >::yes) { count += (va
p) { ++count; } } l < tmp) ? uword(1) : uword(0); }
else if(is_same_type<op_type, op_rel_lt_post >::yes) { if(tmp < va else if(is_same_type<op_type, op_rel_lt_post >::yes) { count += (tm
l) { ++count; } } p < val) ? uword(1) : uword(0); }
else if(is_same_type<op_type, op_rel_gt_pre >::yes) { if(val > tm else if(is_same_type<op_type, op_rel_gt_pre >::yes) { count += (va
p) { ++count; } } l > tmp) ? uword(1) : uword(0); }
else if(is_same_type<op_type, op_rel_gt_post >::yes) { if(tmp > va else if(is_same_type<op_type, op_rel_gt_post >::yes) { count += (tm
l) { ++count; } } p > val) ? uword(1) : uword(0); }
else if(is_same_type<op_type, op_rel_lteq_pre >::yes) { if(val <= tm else if(is_same_type<op_type, op_rel_lteq_pre >::yes) { count += (va
p) { ++count; } } l <= tmp) ? uword(1) : uword(0); }
else if(is_same_type<op_type, op_rel_lteq_post>::yes) { if(tmp <= va else if(is_same_type<op_type, op_rel_lteq_post>::yes) { count += (tm
l) { ++count; } } p <= val) ? uword(1) : uword(0); }
else if(is_same_type<op_type, op_rel_gteq_pre >::yes) { if(val >= tm else if(is_same_type<op_type, op_rel_gteq_pre >::yes) { count += (va
p) { ++count; } } l >= tmp) ? uword(1) : uword(0); }
else if(is_same_type<op_type, op_rel_gteq_post>::yes) { if(tmp >= va else if(is_same_type<op_type, op_rel_gteq_post>::yes) { count += (tm
l) { ++count; } } p >= val) ? uword(1) : uword(0); }
else if(is_same_type<op_type, op_rel_eq >::yes) { if(tmp == va else if(is_same_type<op_type, op_rel_eq >::yes) { count += (tm
l) { ++count; } } p == val) ? uword(1) : uword(0); }
else if(is_same_type<op_type, op_rel_noteq >::yes) { if(tmp != va else if(is_same_type<op_type, op_rel_noteq >::yes) { count += (tm
l) { ++count; } } p != val) ? uword(1) : uword(0); }
} }
} }
else else
{ {
const uword n_rows = P.get_n_rows(); const uword n_rows = P.get_n_rows();
const uword n_cols = P.get_n_cols(); const uword n_cols = P.get_n_cols();
for(uword col=0; col < n_cols; ++col) for(uword col=0; col < n_cols; ++col)
for(uword row=0; row < n_rows; ++row) for(uword row=0; row < n_rows; ++row)
{ {
skipping to change at line 164 skipping to change at line 164
if(prefer_at_accessor == false) if(prefer_at_accessor == false)
{ {
ea_type1 PA = A.get_ea(); ea_type1 PA = A.get_ea();
ea_type2 PB = B.get_ea(); ea_type2 PB = B.get_ea();
for(uword i=0; i<n_elem; ++i) for(uword i=0; i<n_elem; ++i)
{ {
const eT1 tmp1 = PA[i]; const eT1 tmp1 = PA[i];
const eT2 tmp2 = PB[i]; const eT2 tmp2 = PB[i];
if(is_same_type<glue_type, glue_rel_lt >::yes) { if(tmp1 < if(is_same_type<glue_type, glue_rel_lt >::yes) { count += (t
tmp2) { ++count; } } mp1 < tmp2) ? uword(1) : uword(0); }
else if(is_same_type<glue_type, glue_rel_gt >::yes) { if(tmp1 > else if(is_same_type<glue_type, glue_rel_gt >::yes) { count += (t
tmp2) { ++count; } } mp1 > tmp2) ? uword(1) : uword(0); }
else if(is_same_type<glue_type, glue_rel_lteq >::yes) { if(tmp1 <= else if(is_same_type<glue_type, glue_rel_lteq >::yes) { count += (t
tmp2) { ++count; } } mp1 <= tmp2) ? uword(1) : uword(0); }
else if(is_same_type<glue_type, glue_rel_gteq >::yes) { if(tmp1 >= else if(is_same_type<glue_type, glue_rel_gteq >::yes) { count += (t
tmp2) { ++count; } } mp1 >= tmp2) ? uword(1) : uword(0); }
else if(is_same_type<glue_type, glue_rel_eq >::yes) { if(tmp1 == else if(is_same_type<glue_type, glue_rel_eq >::yes) { count += (t
tmp2) { ++count; } } mp1 == tmp2) ? uword(1) : uword(0); }
else if(is_same_type<glue_type, glue_rel_noteq >::yes) { if(tmp1 != else if(is_same_type<glue_type, glue_rel_noteq >::yes) { count += (t
tmp2) { ++count; } } mp1 != tmp2) ? uword(1) : uword(0); }
else if(is_same_type<glue_type, glue_rel_and >::yes) { if(tmp1 && else if(is_same_type<glue_type, glue_rel_and >::yes) { count += (t
tmp2) { ++count; } } mp1 && tmp2) ? uword(1) : uword(0); }
else if(is_same_type<glue_type, glue_rel_or >::yes) { if(tmp1 || else if(is_same_type<glue_type, glue_rel_or >::yes) { count += (t
tmp2) { ++count; } } mp1 || tmp2) ? uword(1) : uword(0); }
} }
} }
else else
{ {
const uword n_rows = A.get_n_rows(); const uword n_rows = A.get_n_rows();
const uword n_cols = A.get_n_cols(); const uword n_cols = A.get_n_cols();
for(uword col=0; col < n_cols; ++col) for(uword col=0; col < n_cols; ++col)
for(uword row=0; row < n_rows; ++row) for(uword row=0; row < n_rows; ++row)
{ {
skipping to change at line 241 skipping to change at line 241
const unwrap<typename Proxy<T1>::stored_type> U(P.Q); const unwrap<typename Proxy<T1>::stored_type> U(P.Q);
for(uword col=0; col < n_cols; ++col) for(uword col=0; col < n_cols; ++col)
{ {
const eT* colmem = U.M.colptr(col); const eT* colmem = U.M.colptr(col);
uword count = 0; uword count = 0;
for(uword row=0; row < n_rows; ++row) for(uword row=0; row < n_rows; ++row)
{ {
if(colmem[row] != eT(0)) { ++count; } count += (colmem[row] != eT(0)) ? uword(1) : uword(0);
} }
out_mem[col] = (n_rows == count) ? uword(1) : uword(0); out_mem[col] = (n_rows == count) ? uword(1) : uword(0);
} }
} }
else else
{ {
for(uword col=0; col < n_cols; ++col) for(uword col=0; col < n_cols; ++col)
{ {
uword count = 0; uword count = 0;
skipping to change at line 280 skipping to change at line 280
if(is_Mat<typename Proxy<T1>::stored_type>::value == true) if(is_Mat<typename Proxy<T1>::stored_type>::value == true)
{ {
const unwrap<typename Proxy<T1>::stored_type> U(P.Q); const unwrap<typename Proxy<T1>::stored_type> U(P.Q);
for(uword col=0; col < n_cols; ++col) for(uword col=0; col < n_cols; ++col)
{ {
const eT* colmem = U.M.colptr(col); const eT* colmem = U.M.colptr(col);
for(uword row=0; row < n_rows; ++row) for(uword row=0; row < n_rows; ++row)
{ {
if(colmem[row] != eT(0)) { ++out_mem[row]; } out_mem[row] += (colmem[row] != eT(0)) ? uword(1) : uword(0);
} }
} }
} }
else else
{ {
for(uword col=0; col < n_cols; ++col) for(uword col=0; col < n_cols; ++col)
{ {
for(uword row=0; row < n_rows; ++row) for(uword row=0; row < n_rows; ++row)
{ {
if(P.at(row,col) != eT(0)) { ++out_mem[row]; } if(P.at(row,col) != eT(0)) { ++out_mem[row]; }
 End of changes. 5 change blocks. 
39 lines changed or deleted 39 lines changed or added


 op_expmat_meat.hpp   op_expmat_meat.hpp 
skipping to change at line 45 skipping to change at line 45
out.at(i,i) = std::exp( out.at(i,i) ); out.at(i,i) = std::exp( out.at(i,i) );
} }
} }
else else
{ {
const unwrap<T1> tmp(expr.m); const unwrap<T1> tmp(expr.m);
const Mat<eT>& A = tmp.M; const Mat<eT>& A = tmp.M;
arma_debug_check( (A.is_square() == false), "expmat(): given matrix is not square sized" ); arma_debug_check( (A.is_square() == false), "expmat(): given matrix is not square sized" );
const uword s = (std::max)(uword(0), uword(eop_aux::log2(norm(A, "inf") )) + uword(1) + uword(1)); const T norm_val = arma::norm(A, "inf");
const Mat<eT> AA = A / std::pow(double(2), s); const T log2_val = eop_aux::log2(norm_val);
const uword s = (std::max)(uword(0), uword(log2_val) + uword(1) + uword
(1));
const Mat<eT> AA = A / eT(eop_aux::pow(double(2), double(s)));
T c = T(0.5); T c = T(0.5);
Mat<eT> E(AA.n_rows, AA.n_rows, fill::eye); E += c * AA; Mat<eT> E(AA.n_rows, AA.n_rows, fill::eye); E += c * AA;
Mat<eT> D(AA.n_rows, AA.n_rows, fill::eye); D -= c * AA; Mat<eT> D(AA.n_rows, AA.n_rows, fill::eye); D -= c * AA;
Mat<eT> X = AA; Mat<eT> X = AA;
bool positive = true; bool positive = true;
 End of changes. 2 change blocks. 
2 lines changed or deleted 7 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/