codac
2.0.0
Loading...
Searching...
No Matches
src
core
domains
codac2_Wrapper.h
Go to the documentation of this file.
1
9
10
#pragma once
11
12
#include "
codac2_Interval.h
"
13
#include "
codac2_Vector.h
"
14
#include "
codac2_Matrix.h
"
15
#include "
codac2_IntervalVector.h
"
16
#include "
codac2_IntervalMatrix.h
"
17
18
namespace
codac2
19
{
20
template
<
typename
T,
typename
Enable=
void
>
21
struct
Wrapper
22
{ };
23
24
template
<>
25
struct
Wrapper<int> {
26
using
Domain = Interval;
27
};
28
29
template
<>
30
struct
Wrapper<Index> {
31
using
Domain = Interval;
32
};
33
34
template
<>
35
struct
Wrapper<double> {
36
using
Domain = Interval;
37
};
38
39
template
<
typename
T,
typename
D>
40
struct
AnalyticType;
41
42
template
<
typename
T,
typename
D>
43
struct
Wrapper<AnalyticType<T,D>> {
44
using
Domain = D;
45
};
46
47
template
<
typename
OtherDerived>
48
struct
Wrapper<OtherDerived,
49
typename std::enable_if<std::is_base_of_v<Eigen::MatrixBase<OtherDerived>,OtherDerived>>::type>
50
{
51
using
Domain = Eigen::Matrix<Interval,OtherDerived::RowsAtCompileTime,OtherDerived::ColsAtCompileTime>;
52
// Automatically sets:
53
// Wrapper<Vector>::Domain = IntervalVector
54
// Wrapper<IntervalVector>::Domain = IntervalVector
55
// Wrapper<Matrix>::Domain = IntervalMatrix
56
// Wrapper<IntervalMatrix>::Domain = IntervalMatrix
57
// + related possible expression templates
58
};
59
}
codac2_Interval.h
codac2_IntervalMatrix.h
codac2_IntervalVector.h
codac2_Matrix.h
codac2_Vector.h
Generated by
1.13.0