"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "include/armadillo_bits/op_shuffle_meat.hpp" between
armadillo-10.8.2.tar.xz and armadillo-11.0.0.tar.xz

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

op_shuffle_meat.hpp  (armadillo-10.8.2.tar.xz):op_shuffle_meat.hpp  (armadillo-11.0.0.tar.xz)
skipping to change at line 34 skipping to change at line 34
op_shuffle::apply_direct(Mat<eT>& out, const Mat<eT>& X, const uword dim) op_shuffle::apply_direct(Mat<eT>& out, const Mat<eT>& X, const uword dim)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
if(X.is_empty()) { out.copy_size(X); return; } if(X.is_empty()) { out.copy_size(X); return; }
const uword N = (dim == 0) ? X.n_rows : X.n_cols; const uword N = (dim == 0) ? X.n_rows : X.n_cols;
// see op_sort_index_bones.hpp for the definition of arma_sort_index_packet // see op_sort_index_bones.hpp for the definition of arma_sort_index_packet
// and the associated comparison functor // and the associated comparison functor
std::vector< arma_sort_index_packet<int> > packet_vec(N);
typedef arma_sort_index_packet<int> packet;
std::vector<packet> packet_vec(N);
for(uword i=0; i<N; ++i) for(uword i=0; i<N; ++i)
{ {
packet_vec[i].val = int(arma_rng::randi<int>()); packet_vec[i].val = int(arma_rng::randi<int>());
packet_vec[i].index = i; packet_vec[i].index = i;
} }
arma_sort_index_helper_ascend<int> comparator; arma_sort_index_helper_ascend<int> comparator;
std::sort( packet_vec.begin(), packet_vec.end(), comparator ); std::sort( packet_vec.begin(), packet_vec.end(), comparator );
 End of changes. 1 change blocks. 
1 lines changed or deleted 4 lines changed or added

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