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 Interval;
14} // namespace sigma
15
19#define EIGEN_NUMTRAITS(float_type) \
20 \
21 template<> \
22 struct NumTraits<sigma::Interval<float_type>> : NumTraits<float_type> { \
23 \
24 using Interval = sigma::Interval<float_type>; \
25 \
26 using Real = Interval; \
27 \
28 using NonInteger = Interval; \
29 \
30 using Literal = Interval; \
31 \
32 using Nested = Interval; \
33 enum { \
34 IsComplex = 0, \
35 IsInteger = 0, \
36 IsSigned = 1, \
37 RequireInitialization = 1, \
38 ReadCost = 1, \
39 AddCost = 3, \
40 MulCost = 3 \
41 }; \
42 }
43
49namespace Eigen {
50
53
54} // namespace Eigen
55
56#undef EIGEN_NUMTRAITS
57#endif // ENABLE_EIGEN_SUPPORT
#define EIGEN_NUMTRAITS(float_type)
Factorization for Eigen::NumTraits Specialization for Affine.
Definition eigen_compat.hpp:19
Models a numeric interval.
Definition interval.hpp:23
The namespace of the Eigen library.
The primary namespace for the sigma library.
Definition affine.hpp:12