Chris@49: // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) Chris@49: // Copyright (C) 2008-2012 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_eye Chris@49: //! @{ Chris@49: Chris@49: Chris@49: Chris@49: arma_inline Chris@49: const Gen Chris@49: eye(const uword n_rows, const uword n_cols) Chris@49: { Chris@49: arma_extra_debug_sigprint(); Chris@49: Chris@49: return Gen(n_rows, n_cols); Chris@49: } Chris@49: Chris@49: Chris@49: Chris@49: template Chris@49: arma_inline Chris@49: const Gen Chris@49: eye(const uword n_rows, const uword n_cols, const typename arma_Mat_Col_Row_only::result* junk = 0) Chris@49: { Chris@49: arma_extra_debug_sigprint(); Chris@49: arma_ignore(junk); Chris@49: Chris@49: if(is_Col::value == true) Chris@49: { Chris@49: arma_debug_check( (n_cols != 1), "eye(): incompatible size" ); Chris@49: } Chris@49: else Chris@49: if(is_Row::value == true) Chris@49: { Chris@49: arma_debug_check( (n_rows != 1), "eye(): incompatible size" ); Chris@49: } Chris@49: Chris@49: return Gen(n_rows, n_cols); Chris@49: } Chris@49: Chris@49: Chris@49: Chris@49: //! @}