1 #ifndef _FMATVEC_SYMBOLIC_FUNCTION_H_
2 #define _FMATVEC_SYMBOLIC_FUNCTION_H_
11 template<
class MatVec,
class NewAT>
24 template<
class Shape,
class NewAT>
29 template<
class Shape,
class NewAT>
34 template<
class MatType,
class RowShape,
class ColShape,
class NewAT>
40 template<
class ATIndep>
42 static void initIndep(ATIndep &x,
int size) { x=ATIndep(); }
43 static int size1(
const ATIndep &x) {
return 1; }
44 static int size2(
const ATIndep &x) {
return 1; }
47 template<
class Shape,
class ATIndep>
48 struct Helper<Vector<Shape, ATIndep>> {
49 static void initIndep(Vector<Shape, ATIndep> &x,
int size) { x <<= Vector<Shape, ATIndep>(size, NONINIT); }
50 static int size1(
const Vector<Shape, ATIndep> &x) {
return x.size(); }
51 static int size2(
const Vector<Shape, ATIndep> &x) {
return 1; }
54 template<
class Type,
class RowShape,
class ColShape,
class ATIndep>
55 struct Helper<Matrix<Type, RowShape, ColShape, ATIndep>> {
56 static int size1(
const Matrix<Type, RowShape, ColShape, ATIndep> &x) {
return x.rows(); }
57 static int size2(
const Matrix<Type, RowShape, ColShape, ATIndep> &x) {
return x.cols(); }
61 template<
typename Sig>
66 #define TEMPLATE typename Ret, typename ATArg
69 #include "symbolic_function1_temp.h"
77 #define ARG Vector<ArgShape, ATArg>
78 #define TEMPLATE typename Ret, typename ArgShape, typename ATArg
81 #include "symbolic_function1_temp.h"
88 #define RET RowVector<RetShape, ATRet>
89 #define ARG Vector<ArgShape, ATArg>
90 #define TEMPLATE typename RetShape, typename ATRet, typename ArgShape, typename ATArg
93 #include "symbolic_function1_temp.h"
100 #define RET Matrix<Type, ColShape, RowShape, ATRet>
101 #define ARG Vector<ArgShape, ATArg>
102 #define TEMPLATE typename Type, typename ColShape, typename RowShape, typename ATRet, typename ArgShape, typename ATArg
105 #include "symbolic_function1_temp.h"
112 #define RET Matrix<Rotation, Fixed<3>, Fixed<3>, ATRet>
113 #define ARG Vector<ArgShape, ATArg>
114 #define TEMPLATE typename ATRet, typename ArgShape, typename ATArg
117 #include "symbolic_function1_temp.h"
129 #define TEMPLATE typename Ret, typename ATArg1, typename ATArg2
132 #define PARDER1PARDER1
133 #define PARDER2PARDER2
134 #define PARDER1PARDER2
135 #include "symbolic_function2_temp.h"
142 #undef PARDER1PARDER1
143 #undef PARDER2PARDER2
144 #undef PARDER1PARDER2
147 #define ARG1 Vector<Shape, ATArg>
149 #define TEMPLATE typename Ret, typename Shape, typename ATArg
153 #define PARDER2PARDER2
154 #define PARDER1PARDER2
155 #include "symbolic_function2_temp.h"
162 #undef PARDER1PARDER1
163 #undef PARDER2PARDER2
164 #undef PARDER1PARDER2
166 #define RET Matrix<Rotation, Fixed<3>, Fixed<3>, ATRet>
167 #define ARG1 Vector<Shape, ATArg>
169 #define TEMPLATE typename ATRet, typename Shape, typename ATArg
173 #define PARDER2PARDER2
174 #define PARDER1PARDER2
175 #include "symbolic_function2_temp.h"
182 #undef PARDER1PARDER1
183 #undef PARDER2PARDER2
184 #undef PARDER1PARDER2
188 #define ARG2 Vector<Shape, ATArg>
189 #define TEMPLATE typename Ret, typename Shape, typename ATArg
192 #define PARDER1PARDER1
194 #define PARDER1PARDER2
195 #include "symbolic_function2_temp.h"
202 #undef PARDER1PARDER1
203 #undef PARDER2PARDER2
204 #undef PARDER1PARDER2
206 #define RET Matrix<Rotation, Fixed<3>, Fixed<3>, ATRet>
208 #define ARG2 Vector<Shape, ATArg>
209 #define TEMPLATE typename ATRet, typename Shape, typename ATArg
212 #define PARDER1PARDER1
214 #define PARDER1PARDER2
215 #include "symbolic_function2_temp.h"
222 #undef PARDER1PARDER1
223 #undef PARDER2PARDER2
224 #undef PARDER1PARDER2
227 #define ARG1 Vector<Shape1, ATArg>
228 #define ARG2 Vector<Shape2, ATArg>
229 #define TEMPLATE typename Ret, typename Shape1, typename Shape2, typename ATArg
235 #include "symbolic_function2_temp.h"
242 #undef PARDER1PARDER1
243 #undef PARDER2PARDER2
244 #undef PARDER1PARDER2
246 #define RET Matrix<Rotation, Fixed<3>, Fixed<3>, ATRet>
247 #define ARG1 Vector<Shape1, ATArg>
248 #define ARG2 Vector<Shape2, ATArg>
249 #define TEMPLATE typename ATRet, typename Shape1, typename Shape2, typename ATArg
255 #include "symbolic_function2_temp.h"
262 #undef PARDER1PARDER1
263 #undef PARDER2PARDER2
264 #undef PARDER1PARDER2
266 #define RET RowVector<RetShape, ATRet>
267 #define ARG1 Vector<Shape, ATArg>
269 #define TEMPLATE typename RetShape, typename ATRet, typename Shape, typename ATArg
273 #define PARDER2PARDER2
275 #include "symbolic_function2_temp.h"
282 #undef PARDER1PARDER1
283 #undef PARDER2PARDER2
284 #undef PARDER1PARDER2
286 #define RET Matrix<Type, RowShape, ColShape, ATRet>
287 #define ARG1 Vector<Shape, ATArg>
289 #define TEMPLATE typename Type, typename RowShape, typename ColShape, typename ATRet, typename Shape, typename ATArg
293 #define PARDER2PARDER2
295 #include "symbolic_function2_temp.h"
302 #undef PARDER1PARDER1
303 #undef PARDER2PARDER2
304 #undef PARDER1PARDER2
306 #define RET RowVector<RetShape, ATRet>
308 #define ARG2 Vector<Shape, ATArg>
309 #define TEMPLATE typename RetShape, typename ATRet, typename Shape, typename ATArg
312 #define PARDER1PARDER1
315 #include "symbolic_function2_temp.h"
322 #undef PARDER1PARDER1
323 #undef PARDER2PARDER2
324 #undef PARDER1PARDER2
326 #define RET Matrix<Type, RowShape, ColShape, ATRet>
328 #define ARG2 Vector<Shape, ATArg>
329 #define TEMPLATE typename Type, typename RowShape, typename ColShape, typename ATRet, typename Shape, typename ATArg
332 #define PARDER1PARDER1
335 #include "symbolic_function2_temp.h"
342 #undef PARDER1PARDER1
343 #undef PARDER2PARDER2
344 #undef PARDER1PARDER2
346 #define RET RowVector<RetShape, ATRet>
347 #define ARG1 Vector<Shape1, ATArg>
348 #define ARG2 Vector<Shape2, ATArg>
349 #define TEMPLATE typename RetShape, typename ATRet, typename Shape1, typename ATArg, typename Shape2
355 #include "symbolic_function2_temp.h"
362 #undef PARDER1PARDER1
363 #undef PARDER2PARDER2
364 #undef PARDER1PARDER2
366 #define RET Matrix<Type, RowShape, ColShape, ATRet>
367 #define ARG1 Vector<Shape1, ATArg>
368 #define ARG2 Vector<Shape2, ATArg>
369 #define TEMPLATE typename Type, typename RowShape, typename ColShape, typename ATRet, typename Shape1, typename ATArg, typename Shape2
375 #include "symbolic_function2_temp.h"
382 #undef PARDER1PARDER1
383 #undef PARDER2PARDER2
384 #undef PARDER1PARDER2
This is the basic matrix class for arbitrary matrices.
Definition: fmatvec.h:41
Definition: function.h:13
Definition: symbolic_function.h:62
Definition: symbolic_function.h:12