"Fossies" - the Fresh Open Source Software Archive

Member "armadillo-9.800.3/include/armadillo_bits/eOpCube_meat.hpp" (16 Jun 2016, 3858 Bytes) of package /linux/misc/armadillo-9.800.3.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "eOpCube_meat.hpp" see the Fossies "Dox" file reference documentation.

    1 // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
    2 // Copyright 2008-2016 National ICT Australia (NICTA)
    3 // 
    4 // Licensed under the Apache License, Version 2.0 (the "License");
    5 // you may not use this file except in compliance with the License.
    6 // You may obtain a copy of the License at
    7 // http://www.apache.org/licenses/LICENSE-2.0
    8 // 
    9 // Unless required by applicable law or agreed to in writing, software
   10 // distributed under the License is distributed on an "AS IS" BASIS,
   11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   12 // See the License for the specific language governing permissions and
   13 // limitations under the License.
   14 // ------------------------------------------------------------------------
   15 
   16 
   17 //! \addtogroup eOpCube
   18 //! @{
   19 
   20 
   21 
   22 template<typename T1, typename eop_type>
   23 inline
   24 eOpCube<T1, eop_type>::eOpCube(const BaseCube<typename T1::elem_type, T1>& in_m)
   25   : P (in_m.get_ref())
   26   {
   27   arma_extra_debug_sigprint();
   28   }
   29   
   30 
   31 
   32 template<typename T1, typename eop_type>
   33 inline
   34 eOpCube<T1, eop_type>::eOpCube(const BaseCube<typename T1::elem_type, T1>& in_m, const typename T1::elem_type in_aux)
   35   : P   (in_m.get_ref())
   36   , aux (in_aux)
   37   {
   38   arma_extra_debug_sigprint();
   39   }
   40   
   41 
   42 
   43 template<typename T1, typename eop_type>
   44 inline
   45 eOpCube<T1, eop_type>::eOpCube(const BaseCube<typename T1::elem_type, T1>& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b)
   46   : P           (in_m.get_ref())
   47   , aux_uword_a (in_aux_uword_a)
   48   , aux_uword_b (in_aux_uword_b)
   49   {
   50   arma_extra_debug_sigprint();
   51   }
   52 
   53 
   54 
   55 template<typename T1, typename eop_type>
   56 inline
   57 eOpCube<T1, eop_type>::eOpCube(const BaseCube<typename T1::elem_type, T1>& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c)
   58   : P           (in_m.get_ref())
   59   , aux_uword_a (in_aux_uword_a)
   60   , aux_uword_b (in_aux_uword_b)
   61   , aux_uword_c (in_aux_uword_c)
   62   {
   63   arma_extra_debug_sigprint();
   64   }
   65 
   66 
   67 
   68 template<typename T1, typename eop_type>
   69 inline
   70 eOpCube<T1, eop_type>::eOpCube(const BaseCube<typename T1::elem_type, T1>& in_m, const typename T1::elem_type in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c)
   71   : P           (in_m.get_ref())
   72   , aux         (in_aux)
   73   , aux_uword_a (in_aux_uword_a)
   74   , aux_uword_b (in_aux_uword_b)
   75   , aux_uword_c (in_aux_uword_c)
   76   {
   77   arma_extra_debug_sigprint();
   78   }
   79 
   80 
   81 
   82 template<typename T1, typename eop_type>
   83 inline
   84 eOpCube<T1, eop_type>::~eOpCube()
   85   {
   86   arma_extra_debug_sigprint();
   87   }
   88 
   89 
   90 
   91 template<typename T1, typename eop_type>
   92 arma_inline
   93 uword
   94 eOpCube<T1, eop_type>::get_n_rows() const
   95   {
   96   return P.get_n_rows();
   97   }
   98   
   99 
  100 
  101 template<typename T1, typename eop_type>
  102 arma_inline
  103 uword
  104 eOpCube<T1, eop_type>::get_n_cols() const
  105   {
  106   return P.get_n_cols();
  107   }
  108 
  109 
  110 
  111 template<typename T1, typename eop_type>
  112 arma_inline
  113 uword
  114 eOpCube<T1, eop_type>::get_n_elem_slice() const
  115   {
  116   return P.get_n_elem_slice();
  117   }
  118 
  119 
  120 
  121 template<typename T1, typename eop_type>
  122 arma_inline
  123 uword
  124 eOpCube<T1, eop_type>::get_n_slices() const
  125   {
  126   return P.get_n_slices();
  127   }
  128 
  129 
  130 
  131 template<typename T1, typename eop_type>
  132 arma_inline
  133 uword
  134 eOpCube<T1, eop_type>::get_n_elem() const
  135   {
  136   return P.get_n_elem();
  137   }
  138 
  139 
  140 
  141 template<typename T1, typename eop_type>
  142 arma_inline
  143 typename T1::elem_type
  144 eOpCube<T1, eop_type>::operator[] (const uword i) const
  145   {
  146   return eop_core<eop_type>::process(P[i], aux);
  147   }
  148 
  149 
  150 
  151 template<typename T1, typename eop_type>
  152 arma_inline
  153 typename T1::elem_type
  154 eOpCube<T1, eop_type>::at(const uword row, const uword col, const uword slice) const
  155   {
  156   return eop_core<eop_type>::process(P.at(row, col, slice), aux);
  157   }
  158 
  159 
  160 
  161 template<typename T1, typename eop_type>
  162 arma_inline
  163 typename T1::elem_type
  164 eOpCube<T1, eop_type>::at_alt(const uword i) const
  165   {
  166   return eop_core<eop_type>::process(P.at_alt(i), aux);
  167   }
  168 
  169 
  170 
  171 //! @}