sigma  1.0.0
Loading...
Searching...
No Matches
eigen_compat.hpp
Go to the documentation of this file.
1#pragma once
2
6
7#ifdef ENABLE_EIGEN_SUPPORT
8#include <Eigen/Dense>
9
10// Foward Declarations
11namespace sigma {
12template<typename T>
13class Taylor;
14
15template<typename T>
16class TaylorModel;
17
18} // namespace sigma
19
23#define EIGEN_NUMTRAITS(float_type) \
24 \
25 template<> \
26 struct NumTraits<sigma::Taylor<float_type>> : NumTraits<float_type> { \
27 \
28 using Taylor = sigma::Taylor<float_type>; \
29 \
30 using Real = Taylor; \
31 \
32 using NonInteger = Taylor; \
33 \
34 using Literal = Taylor; \
35 \
36 using Nested = Taylor; \
37 enum { \
38 IsComplex = 0, \
39 IsInteger = 0, \
40 IsSigned = 1, \
41 RequireInitialization = 1, \
42 ReadCost = 1, \
43 AddCost = 3, \
44 MulCost = 3 \
45 }; \
46 }; \
47 \
48 template<> \
49 struct NumTraits<sigma::TaylorModel<float_type>> : NumTraits<float_type> { \
50 \
51 using Taylor = sigma::TaylorModel<float_type>; \
52 \
53 using Real = Taylor; \
54 \
55 using NonInteger = Taylor; \
56 \
57 using Literal = Taylor; \
58 \
59 using Nested = Taylor; \
60 enum { \
61 IsComplex = 0, \
62 IsInteger = 0, \
63 IsSigned = 1, \
64 RequireInitialization = 1, \
65 ReadCost = 1, \
66 AddCost = 3, \
67 MulCost = 3 \
68 }; \
69 }
70
77namespace Eigen {
78
81
82} // namespace Eigen
83
84#undef EIGEN_NUMTRAITS
85#endif // ENABLE_EIGEN_SUPPORT
#define EIGEN_NUMTRAITS(float_type)
Factorization for Eigen::NumTraits Specialization for Affine.
Definition eigen_compat.hpp:23
Pairs a Taylor polynomial with a remainder interval to guarantee Eq. .
Definition taylor_model.hpp:51
Implements truncated multivariate polynomial algebra.
Definition taylor.hpp:46
The namespace of the Eigen library.
The primary namespace for the sigma library.
Definition affine.hpp:12