$search
00001 // Copyright (C) 2010 NICTA (www.nicta.com.au) 00002 // Copyright (C) 2010 Conrad Sanderson 00003 // Copyright (C) 2010 Dimitrios Bouzas 00004 // 00005 // This file is part of the Armadillo C++ library. 00006 // It is provided without any warranty of fitness 00007 // for any purpose. You can redistribute this file 00008 // and/or modify it under the terms of the GNU 00009 // Lesser General Public License (LGPL) as published 00010 // by the Free Software Foundation, either version 3 00011 // of the License or (at your option) any later version. 00012 // (see http://www.opensource.org/licenses for more info) 00013 00014 00015 00018 00019 00020 00021 class op_find 00022 { 00023 public: 00024 00025 template<typename T1> 00026 inline static uword 00027 helper 00028 ( 00029 Mat<uword>& indices, 00030 const Base<typename T1::elem_type, T1>& X 00031 ); 00032 00033 template<typename T1, typename op_type> 00034 inline static uword 00035 helper 00036 ( 00037 Mat<uword>& indices, 00038 const mtOp<uword, T1, op_type>& X, 00039 const typename arma_op_rel_only<op_type>::result junk1 = 0, 00040 const typename arma_not_cx<typename T1::elem_type>::result junk2 = 0 00041 ); 00042 00043 template<typename T1, typename op_type> 00044 inline static uword 00045 helper 00046 ( 00047 Mat<uword>& indices, 00048 const mtOp<uword, T1, op_type>& X, 00049 const typename arma_op_rel_only<op_type>::result junk1 = 0, 00050 const typename arma_cx_only<typename T1::elem_type>::result junk2 = 0 00051 ); 00052 00053 template<typename T1, typename T2, typename glue_type> 00054 inline static uword 00055 helper 00056 ( 00057 Mat<uword>& indices, 00058 const mtGlue<uword, T1, T2, glue_type>& X, 00059 const typename arma_glue_rel_only<glue_type>::result junk1 = 0, 00060 const typename arma_not_cx<typename T1::elem_type>::result junk2 = 0, 00061 const typename arma_not_cx<typename T2::elem_type>::result junk3 = 0 00062 ); 00063 00064 template<typename T1, typename T2, typename glue_type> 00065 inline static uword 00066 helper 00067 ( 00068 Mat<uword>& indices, 00069 const mtGlue<uword, T1, T2, glue_type>& X, 00070 const typename arma_glue_rel_only<glue_type>::result junk1 = 0, 00071 const typename arma_cx_only<typename T1::elem_type>::result junk2 = 0, 00072 const typename arma_cx_only<typename T2::elem_type>::result junk3 = 0 00073 ); 00074 00075 template<typename T1> 00076 inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_find>& X); 00077 }; 00078 00079 00080