Chris@49: // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) Chris@49: // Copyright (C) 2008-2011 Conrad Sanderson Chris@49: // Chris@49: // This Source Code Form is subject to the terms of the Mozilla Public Chris@49: // License, v. 2.0. If a copy of the MPL was not distributed with this Chris@49: // file, You can obtain one at http://mozilla.org/MPL/2.0/. Chris@49: Chris@49: Chris@49: //! \addtogroup fn_reshape Chris@49: //! @{ Chris@49: Chris@49: Chris@49: Chris@49: template Chris@49: inline Chris@49: const Op Chris@49: reshape(const Base& X, const uword in_n_rows, const uword in_n_cols, const uword dim = 0) Chris@49: { Chris@49: arma_extra_debug_sigprint(); Chris@49: Chris@49: arma_debug_check( (dim > 1), "reshape(): dim must be 0 or 1"); Chris@49: Chris@49: return Op(X.get_ref(), in_n_rows, in_n_cols, dim, 'j'); Chris@49: } Chris@49: Chris@49: Chris@49: Chris@49: template Chris@49: inline Chris@49: const OpCube Chris@49: reshape(const BaseCube& X, const uword in_n_rows, const uword in_n_cols, const uword in_n_slices, const uword dim = 0) Chris@49: { Chris@49: arma_extra_debug_sigprint(); Chris@49: Chris@49: arma_debug_check( (dim > 1), "reshape(): dim must be 0 or 1"); Chris@49: Chris@49: return OpCube(X.get_ref(), in_n_rows, in_n_cols, in_n_slices, dim, 'j'); Chris@49: } Chris@49: Chris@49: Chris@49: Chris@49: //! @}