max@0
|
1 // Copyright (C) 2008-2012 NICTA (www.nicta.com.au)
|
max@0
|
2 // Copyright (C) 2008-2012 Conrad Sanderson
|
max@0
|
3 //
|
max@0
|
4 // This file is part of the Armadillo C++ library.
|
max@0
|
5 // It is provided without any warranty of fitness
|
max@0
|
6 // for any purpose. You can redistribute this file
|
max@0
|
7 // and/or modify it under the terms of the GNU
|
max@0
|
8 // Lesser General Public License (LGPL) as published
|
max@0
|
9 // by the Free Software Foundation, either version 3
|
max@0
|
10 // of the License or (at your option) any later version.
|
max@0
|
11 // (see http://www.opensource.org/licenses for more info)
|
max@0
|
12
|
max@0
|
13
|
max@0
|
14 //! \addtogroup Base
|
max@0
|
15 //! @{
|
max@0
|
16
|
max@0
|
17
|
max@0
|
18
|
max@0
|
19 template<typename elem_type, typename derived>
|
max@0
|
20 arma_inline
|
max@0
|
21 const derived&
|
max@0
|
22 Base<elem_type,derived>::get_ref() const
|
max@0
|
23 {
|
max@0
|
24 return static_cast<const derived&>(*this);
|
max@0
|
25 }
|
max@0
|
26
|
max@0
|
27
|
max@0
|
28
|
max@0
|
29 template<typename elem_type, typename derived>
|
max@0
|
30 arma_inline
|
max@0
|
31 const Op<derived,op_htrans>
|
max@0
|
32 Base<elem_type,derived>::t() const
|
max@0
|
33 {
|
max@0
|
34 return Op<derived,op_htrans>( (*this).get_ref() );
|
max@0
|
35 }
|
max@0
|
36
|
max@0
|
37
|
max@0
|
38
|
max@0
|
39 template<typename elem_type, typename derived>
|
max@0
|
40 arma_inline
|
max@0
|
41 const Op<derived,op_htrans>
|
max@0
|
42 Base<elem_type,derived>::ht() const
|
max@0
|
43 {
|
max@0
|
44 return Op<derived,op_htrans>( (*this).get_ref() );
|
max@0
|
45 }
|
max@0
|
46
|
max@0
|
47
|
max@0
|
48
|
max@0
|
49 template<typename elem_type, typename derived>
|
max@0
|
50 arma_inline
|
max@0
|
51 const Op<derived,op_strans>
|
max@0
|
52 Base<elem_type,derived>::st() const
|
max@0
|
53 {
|
max@0
|
54 return Op<derived,op_strans>( (*this).get_ref() );
|
max@0
|
55 }
|
max@0
|
56
|
max@0
|
57
|
max@0
|
58
|
max@0
|
59 template<typename elem_type, typename derived>
|
max@0
|
60 inline
|
max@0
|
61 void
|
max@0
|
62 Base<elem_type,derived>::print(const std::string extra_text) const
|
max@0
|
63 {
|
max@0
|
64 const unwrap<derived> tmp( (*this).get_ref() );
|
max@0
|
65
|
max@0
|
66 tmp.M.impl_print(extra_text);
|
max@0
|
67 }
|
max@0
|
68
|
max@0
|
69
|
max@0
|
70
|
max@0
|
71 template<typename elem_type, typename derived>
|
max@0
|
72 inline
|
max@0
|
73 void
|
max@0
|
74 Base<elem_type,derived>::print(std::ostream& user_stream, const std::string extra_text) const
|
max@0
|
75 {
|
max@0
|
76 const unwrap<derived> tmp( (*this).get_ref() );
|
max@0
|
77
|
max@0
|
78 tmp.M.impl_print(user_stream, extra_text);
|
max@0
|
79 }
|
max@0
|
80
|
max@0
|
81
|
max@0
|
82
|
max@0
|
83 template<typename elem_type, typename derived>
|
max@0
|
84 inline
|
max@0
|
85 void
|
max@0
|
86 Base<elem_type,derived>::print_trans(const std::string extra_text) const
|
max@0
|
87 {
|
max@0
|
88 const unwrap<derived> tmp( (*this).get_ref() );
|
max@0
|
89
|
max@0
|
90 tmp.M.impl_print_trans(extra_text);
|
max@0
|
91 }
|
max@0
|
92
|
max@0
|
93
|
max@0
|
94
|
max@0
|
95 template<typename elem_type, typename derived>
|
max@0
|
96 inline
|
max@0
|
97 void
|
max@0
|
98 Base<elem_type,derived>::print_trans(std::ostream& user_stream, const std::string extra_text) const
|
max@0
|
99 {
|
max@0
|
100 const unwrap<derived> tmp( (*this).get_ref() );
|
max@0
|
101
|
max@0
|
102 tmp.M.impl_print_trans(user_stream, extra_text);
|
max@0
|
103 }
|
max@0
|
104
|
max@0
|
105
|
max@0
|
106
|
max@0
|
107 template<typename elem_type, typename derived>
|
max@0
|
108 inline
|
max@0
|
109 void
|
max@0
|
110 Base<elem_type,derived>::raw_print(const std::string extra_text) const
|
max@0
|
111 {
|
max@0
|
112 const unwrap<derived> tmp( (*this).get_ref() );
|
max@0
|
113
|
max@0
|
114 tmp.M.impl_raw_print(extra_text);
|
max@0
|
115 }
|
max@0
|
116
|
max@0
|
117
|
max@0
|
118
|
max@0
|
119 template<typename elem_type, typename derived>
|
max@0
|
120 inline
|
max@0
|
121 void
|
max@0
|
122 Base<elem_type,derived>::raw_print(std::ostream& user_stream, const std::string extra_text) const
|
max@0
|
123 {
|
max@0
|
124 const unwrap<derived> tmp( (*this).get_ref() );
|
max@0
|
125
|
max@0
|
126 tmp.M.impl_raw_print(user_stream, extra_text);
|
max@0
|
127 }
|
max@0
|
128
|
max@0
|
129
|
max@0
|
130
|
max@0
|
131 template<typename elem_type, typename derived>
|
max@0
|
132 inline
|
max@0
|
133 void
|
max@0
|
134 Base<elem_type,derived>::raw_print_trans(const std::string extra_text) const
|
max@0
|
135 {
|
max@0
|
136 const unwrap<derived> tmp( (*this).get_ref() );
|
max@0
|
137
|
max@0
|
138 tmp.M.impl_raw_print_trans(extra_text);
|
max@0
|
139 }
|
max@0
|
140
|
max@0
|
141
|
max@0
|
142
|
max@0
|
143 template<typename elem_type, typename derived>
|
max@0
|
144 inline
|
max@0
|
145 void
|
max@0
|
146 Base<elem_type,derived>::raw_print_trans(std::ostream& user_stream, const std::string extra_text) const
|
max@0
|
147 {
|
max@0
|
148 const unwrap<derived> tmp( (*this).get_ref() );
|
max@0
|
149
|
max@0
|
150 tmp.M.impl_raw_print_trans(user_stream, extra_text);
|
max@0
|
151 }
|
max@0
|
152
|
max@0
|
153
|
max@0
|
154
|
max@0
|
155 //! @}
|