op_find_bones.hpp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 op_find
  16. //! @{
  17. class op_find
  18. : public traits_op_col
  19. {
  20. public:
  21. template<typename T1>
  22. inline static uword
  23. helper
  24. (
  25. Mat<uword>& indices,
  26. const Base<typename T1::elem_type, T1>& X
  27. );
  28. template<typename T1, typename op_type>
  29. inline static uword
  30. helper
  31. (
  32. Mat<uword>& indices,
  33. const mtOp<uword, T1, op_type>& X,
  34. const typename arma_op_rel_only<op_type>::result* junk1 = 0,
  35. const typename arma_not_cx<typename T1::elem_type>::result* junk2 = 0
  36. );
  37. template<typename T1, typename op_type>
  38. inline static uword
  39. helper
  40. (
  41. Mat<uword>& indices,
  42. const mtOp<uword, T1, op_type>& X,
  43. const typename arma_op_rel_only<op_type>::result* junk1 = 0,
  44. const typename arma_cx_only<typename T1::elem_type>::result* junk2 = 0
  45. );
  46. template<typename T1, typename T2, typename glue_type>
  47. inline static uword
  48. helper
  49. (
  50. Mat<uword>& indices,
  51. const mtGlue<uword, T1, T2, glue_type>& X,
  52. const typename arma_glue_rel_only<glue_type>::result* junk1 = 0,
  53. const typename arma_not_cx<typename T1::elem_type>::result* junk2 = 0,
  54. const typename arma_not_cx<typename T2::elem_type>::result* junk3 = 0
  55. );
  56. template<typename T1, typename T2, typename glue_type>
  57. inline static uword
  58. helper
  59. (
  60. Mat<uword>& indices,
  61. const mtGlue<uword, T1, T2, glue_type>& X,
  62. const typename arma_glue_rel_only<glue_type>::result* junk1 = 0,
  63. const typename arma_cx_only<typename T1::elem_type>::result* junk2 = 0,
  64. const typename arma_cx_only<typename T2::elem_type>::result* junk3 = 0
  65. );
  66. template<typename T1>
  67. inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_find>& X);
  68. };
  69. class op_find_simple
  70. : public traits_op_col
  71. {
  72. public:
  73. template<typename T1>
  74. inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_find_simple>& X);
  75. };
  76. class op_find_finite
  77. : public traits_op_col
  78. {
  79. public:
  80. template<typename T1>
  81. inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_find_finite>& X);
  82. };
  83. class op_find_nonfinite
  84. : public traits_op_col
  85. {
  86. public:
  87. template<typename T1>
  88. inline static void apply(Mat<uword>& out, const mtOp<uword, T1, op_find_nonfinite>& X);
  89. };
  90. //! @}