eOp_bones.hpp 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. //! \addtogroup eOp
  16. //! @{
  17. template<typename T1, typename eop_type>
  18. class eOp : public Base<typename T1::elem_type, eOp<T1, eop_type> >
  19. {
  20. public:
  21. typedef typename T1::elem_type elem_type;
  22. typedef typename get_pod_type<elem_type>::result pod_type;
  23. typedef Proxy<T1> proxy_type;
  24. static const bool use_at = Proxy<T1>::use_at;
  25. static const bool use_mp = Proxy<T1>::use_mp || eop_type::use_mp;
  26. static const bool has_subview = Proxy<T1>::has_subview;
  27. static const bool is_row = Proxy<T1>::is_row;
  28. static const bool is_col = Proxy<T1>::is_col;
  29. static const bool is_xvec = Proxy<T1>::is_xvec;
  30. arma_aligned const Proxy<T1> P;
  31. arma_aligned elem_type aux; //!< storage of auxiliary data, user defined format
  32. arma_aligned uword aux_uword_a; //!< storage of auxiliary data, uword format
  33. arma_aligned uword aux_uword_b; //!< storage of auxiliary data, uword format
  34. inline ~eOp();
  35. inline explicit eOp(const T1& in_m);
  36. inline eOp(const T1& in_m, const elem_type in_aux);
  37. inline eOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b);
  38. inline eOp(const T1& in_m, const elem_type in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b);
  39. arma_inline uword get_n_rows() const;
  40. arma_inline uword get_n_cols() const;
  41. arma_inline uword get_n_elem() const;
  42. arma_inline elem_type operator[] (const uword ii) const;
  43. arma_inline elem_type at (const uword row, const uword col) const;
  44. arma_inline elem_type at_alt (const uword ii) const;
  45. };
  46. //! @}