"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "include/armadillo_bits/op_median_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.

op_median_meat.hpp  (armadillo-10.2.0.tar.xz):op_median_meat.hpp  (armadillo-10.2.1.tar.xz)
skipping to change at line 23 skipping to change at line 23
// limitations under the License. // limitations under the License.
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
//! \addtogroup op_median //! \addtogroup op_median
//! @{ //! @{
//! \brief //! \brief
//! For each row or for each column, find the median value. //! For each row or for each column, find the median value.
//! The result is stored in a dense matrix that has either one column or one row . //! The result is stored in a dense matrix that has either one column or one row .
//! The dimension, for which the medians are found, is set via the median() func tion. //! The dimension, for which the medians are found, is set via the median() func tion.
template<typename T1> template<typename eT, typename T1>
inline inline
void void
op_median::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_median>& in) op_median::apply(Mat<eT>& out, const Op<T1,op_median>& in, const typename arma_n ot_cx<eT>::result* junk)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_ignore(junk);
typedef typename T1::elem_type eT; // typedef typename T1::elem_type eT;
const uword dim = in.aux_uword_a; const uword dim = in.aux_uword_a;
arma_debug_check( (dim > 1), "median(): parameter 'dim' must be 0 or 1" ); arma_debug_check( (dim > 1), "median(): parameter 'dim' must be 0 or 1" );
const Proxy<T1> P(in.m); const Proxy<T1> P(in.m);
typedef typename Proxy<T1>::stored_type P_stored_type; typedef typename Proxy<T1>::stored_type P_stored_type;
const bool is_alias = P.is_alias(out); const bool is_alias = P.is_alias(out);
skipping to change at line 132 skipping to change at line 133
for(uword col=0; col < P_n_cols; ++col) { tmp_vec[col] = P.at(row,col ); } for(uword col=0; col < P_n_cols; ++col) { tmp_vec[col] = P.at(row,col ); }
out[row] = op_median::direct_median(tmp_vec); out[row] = op_median::direct_median(tmp_vec);
} }
} }
} }
} }
} }
//! Implementation for complex numbers //! Implementation for complex numbers
template<typename T, typename T1> template<typename eT, typename T1>
inline inline
void void
op_median::apply(Mat< std::complex<T> >& out, const Op<T1,op_median>& in) op_median::apply(Mat<eT>& out, const Op<T1,op_median>& in, const typename arma_c x_only<eT>::result* junk)
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
arma_ignore(junk);
typedef typename std::complex<T> eT; // typedef typename std::complex<T> eT;
typedef typename get_pod_type<eT>::result T;
arma_type_check(( is_same_type<eT, typename T1::elem_type>::no )); arma_type_check(( is_same_type<eT, typename T1::elem_type>::no ));
const unwrap_check<T1> tmp(in.m, out); const unwrap_check<T1> tmp(in.m, out);
const Mat<eT>& X = tmp.M; const Mat<eT>& X = tmp.M;
const uword X_n_rows = X.n_rows; const uword X_n_rows = X.n_rows;
const uword X_n_cols = X.n_cols; const uword X_n_cols = X.n_cols;
const uword dim = in.aux_uword_a; const uword dim = in.aux_uword_a;
 End of changes. 8 change blocks. 
6 lines changed or deleted 9 lines changed or added

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