fn_trans.hpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 fn_trans
  16. //! @{
  17. template<typename T1>
  18. arma_warn_unused
  19. arma_inline
  20. const Op<T1, op_htrans>
  21. trans
  22. (
  23. const T1& X,
  24. const typename enable_if< is_arma_type<T1>::value == true >::result* junk = 0
  25. )
  26. {
  27. arma_extra_debug_sigprint();
  28. arma_ignore(junk);
  29. return Op<T1, op_htrans>(X);
  30. }
  31. template<typename T1>
  32. arma_warn_unused
  33. arma_inline
  34. const Op<T1, op_htrans>
  35. htrans
  36. (
  37. const T1& X,
  38. const typename enable_if< is_arma_type<T1>::value == true >::result* junk = 0
  39. )
  40. {
  41. arma_extra_debug_sigprint();
  42. arma_ignore(junk);
  43. return Op<T1, op_htrans>(X);
  44. }
  45. //
  46. // handling of sparse matrices
  47. template<typename T1>
  48. arma_warn_unused
  49. arma_inline
  50. const SpOp<T1, spop_htrans>
  51. trans
  52. (
  53. const T1& X,
  54. const typename enable_if< is_arma_sparse_type<T1>::value == true >::result* junk = 0
  55. )
  56. {
  57. arma_extra_debug_sigprint();
  58. arma_ignore(junk);
  59. return SpOp<T1, spop_htrans>(X);
  60. }
  61. template<typename T1>
  62. arma_warn_unused
  63. arma_inline
  64. const SpOp<T1, spop_htrans>
  65. htrans
  66. (
  67. const T1& X,
  68. const typename enable_if< is_arma_sparse_type<T1>::value == true >::result* junk = 0
  69. )
  70. {
  71. arma_extra_debug_sigprint();
  72. arma_ignore(junk);
  73. return SpOp<T1, spop_htrans>(X);
  74. }
  75. //! @}