source: mmcs/armadillo_bits/op_strans_bones.hpp @ 8ad4484

matrices
Last change on this file since 8ad4484 was 9dd61b1, checked in by rboet <rboet@…>, 9 years ago

Avance del proyecto 60%

  • Property mode set to 100644
File size: 2.5 KB
Line 
1// Copyright (C) 2008-2013 Conrad Sanderson
2// Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
3//
4// This Source Code Form is subject to the terms of the Mozilla Public
5// License, v. 2.0. If a copy of the MPL was not distributed with this
6// file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8
9//! \addtogroup op_strans
10//! @{
11
12
13//! 'matrix transpose' operation (simple transpose, ie. without taking the conjugate of the elements)
14
15class op_strans
16  {
17  public:
18 
19  template<const bool do_flip, const uword row, const uword col>
20  struct pos
21    {
22    static const uword n2 = (do_flip == false) ? (row + col*2) : (col + row*2);
23    static const uword n3 = (do_flip == false) ? (row + col*3) : (col + row*3);
24    static const uword n4 = (do_flip == false) ? (row + col*4) : (col + row*4);
25    };
26 
27  template<typename eT, typename TA>
28  arma_hot inline static void apply_mat_noalias_tinysq(Mat<eT>& out, const TA& A);
29 
30  template<typename eT, typename TA>
31  arma_hot inline static void apply_mat_noalias(Mat<eT>& out, const TA& A);
32 
33  template<typename eT>
34  arma_hot inline static void apply_mat_inplace(Mat<eT>& out);
35 
36  template<typename eT, typename TA>
37  arma_hot inline static void apply_mat(Mat<eT>& out, const TA& A);
38 
39  template<typename T1>
40  arma_hot inline static void apply_proxy(Mat<typename T1::elem_type>& out, const T1& X);
41 
42  template<typename T1>
43  arma_hot inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_strans>& in);
44  };
45
46
47
48class op_strans2
49  {
50  public:
51 
52  template<const bool do_flip, const uword row, const uword col>
53  struct pos
54    {
55    static const uword n2 = (do_flip == false) ? (row + col*2) : (col + row*2);
56    static const uword n3 = (do_flip == false) ? (row + col*3) : (col + row*3);
57    static const uword n4 = (do_flip == false) ? (row + col*4) : (col + row*4);
58    };
59 
60  template<typename eT, typename TA>
61  arma_hot inline static void apply_noalias_tinysq(Mat<eT>& out, const TA& A, const eT val);
62 
63  template<typename eT, typename TA>
64  arma_hot inline static void apply_noalias(Mat<eT>& out, const TA& A, const eT val);
65 
66  template<typename eT, typename TA>
67  arma_hot inline static void apply(Mat<eT>& out, const TA& A, const eT val);
68 
69  template<typename T1>
70  arma_hot inline static void apply_proxy(Mat<typename T1::elem_type>& out, const T1& X, const typename T1::elem_type val);
71 
72  // NOTE: there is no direct handling of Op<T1,op_strans2>, as op_strans2::apply_proxy() is currently only called by op_htrans2 for non-complex numbers
73  };
74
75
76
77//! @}
Note: See TracBrowser for help on using the repository browser.