void mod_size( MatT& A, unsigned r, unsigned c, unsigned s ) { A.resize( r, c, s ); A.randn( r, c, s ); for( unsigned i=0; i<r; i++ ) { for( unsigned j=0; j<c; j++ ) { for( unsigned k=0; k<s; k++ ) { A(i,j,k) = (typename MatT::elem_type)(i*100+j*10+k); } } } };
void mod_content( MatT& A ) { A.randn( A.n_rows, A.n_cols, A.n_slices ); A.fill(25); A(0,0,0)=0; };