// Copyright (C) 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 fn_find_unique //! @{ template inline typename enable_if2 < is_arma_type::value, const mtOp >::result find_unique ( const T1& X, const bool ascending_indices = true ) { arma_extra_debug_sigprint(); return mtOp(X, ((ascending_indices) ? uword(1) : uword(0)), uword(0)); } template inline uvec find_unique ( const BaseCube& X, const bool ascending_indices = true ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_cube tmp(X.get_ref()); const Mat R( const_cast< eT* >(tmp.M.memptr()), tmp.M.n_elem, 1, false ); return find_unique(R,ascending_indices); } //! @}