// Copyright (C) 2010-2015 National ICT Australia (NICTA) // // 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 // file, You can obtain one at http://mozilla.org/MPL/2.0/. // ------------------------------------------------------------------- // // Written by Conrad Sanderson - http://conradsanderson.id.au //! \addtogroup op_flip //! @{ template inline void op_flipud::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(in.m); const Mat& X = tmp.M; const uword X_n_rows = T1::is_row ? uword(1) : X.n_rows; const uword X_n_cols = T1::is_col ? uword(1) : X.n_cols; if(&out != &X) { out.copy_size(X); for(uword col=0; col inline void op_fliplr::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(in.m); const Mat& X = tmp.M; const uword X_n_cols = X.n_cols; if(&out != &X) { out.copy_size(X); if(T1::is_row || X.is_rowvec()) { for(uword i=0; i