"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "include/armadillo_bits/running_stat_vec_meat.hpp" between
armadillo-10.2.0.tar.xz and armadillo-10.2.1.tar.xz

About: Armadillo is a C++ linear algebra library (matrix maths) aiming towards a good balance between speed and ease of use.

running_stat_vec_meat.hpp  (armadillo-10.2.0.tar.xz):running_stat_vec_meat.hpp  (armadillo-10.2.1.tar.xz)
skipping to change at line 394 skipping to change at line 394
const eT r_mean_val = r_mean_mem[i]; const eT r_mean_val = r_mean_mem[i];
const eT tmp = val - r_mean_val; const eT tmp = val - r_mean_val;
r_var_mem[i] = N_minus_1/N * r_var_mem[i] + (tmp*tmp)/N_plus_1; r_var_mem[i] = N_minus_1/N * r_var_mem[i] + (tmp*tmp)/N_plus_1;
r_mean_mem[i] = r_mean_val + (val - r_mean_val)/N_plus_1; r_mean_mem[i] = r_mean_val + (val - r_mean_val)/N_plus_1;
} }
} }
else else
{ {
arma_debug_check( (sample.is_vec() == false), "running_stat_vec(): given sam ple is not a vector"); arma_debug_check( (sample.is_vec() == false), "running_stat_vec(): given sam ple is not a vector" );
x.r_mean.set_size(sample.n_rows, sample.n_cols); x.r_mean.set_size(sample.n_rows, sample.n_cols);
x.r_var.zeros(sample.n_rows, sample.n_cols); x.r_var.zeros(sample.n_rows, sample.n_cols);
if(x.calc_cov) if(x.calc_cov)
{ {
x.r_cov.zeros(sample.n_elem, sample.n_elem); x.r_cov.zeros(sample.n_elem, sample.n_elem);
} }
skipping to change at line 546 skipping to change at line 546
const eT& r_mean_val = r_mean_mem[i]; const eT& r_mean_val = r_mean_mem[i];
r_var_mem[i] = N_minus_1/N * r_var_mem[i] + std::norm(val - r_mean_val)/N_ plus_1; r_var_mem[i] = N_minus_1/N * r_var_mem[i] + std::norm(val - r_mean_val)/N_ plus_1;
r_mean_mem[i] = r_mean_val + (val - r_mean_val)/N_plus_1; r_mean_mem[i] = r_mean_val + (val - r_mean_val)/N_plus_1;
} }
} }
else else
{ {
arma_debug_check( (sample.is_vec() == false), "running_stat_vec(): given sam ple is not a vector"); arma_debug_check( (sample.is_vec() == false), "running_stat_vec(): given sam ple is not a vector" );
x.r_mean.set_size(sample.n_rows, sample.n_cols); x.r_mean.set_size(sample.n_rows, sample.n_cols);
x.r_var.zeros(sample.n_rows, sample.n_cols); x.r_var.zeros(sample.n_rows, sample.n_cols);
if(x.calc_cov) if(x.calc_cov)
{ {
x.r_cov.zeros(sample.n_elem, sample.n_elem); x.r_cov.zeros(sample.n_elem, sample.n_elem);
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)