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