xvec_htrans_bones.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 xvec_htrans
  16. //! @{
  17. template<typename eT>
  18. class xvec_htrans : public Base<eT, xvec_htrans<eT> >
  19. {
  20. public:
  21. typedef eT elem_type;
  22. typedef typename get_pod_type<elem_type>::result pod_type;
  23. static const bool is_row = false;
  24. static const bool is_col = false;
  25. static const bool is_xvec = true;
  26. arma_aligned const eT* const mem;
  27. const uword n_rows;
  28. const uword n_cols;
  29. const uword n_elem;
  30. inline explicit xvec_htrans(const eT* const in_mem, const uword in_n_rows, const uword in_n_cols);
  31. inline void extract(Mat<eT>& out) const;
  32. inline eT operator[](const uword ii) const;
  33. inline eT at_alt (const uword ii) const;
  34. inline eT at (const uword in_row, const uword in_col) const;
  35. };
  36. //! @}