codac 2.0.0
Loading...
Searching...
No Matches
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"
17
18namespace codac2
19{
20 template<typename T, typename Enable=void>
21 struct Wrapper
22 { };
23
24 template<typename T>
25 requires (std::is_arithmetic_v<T>)
26 struct Wrapper<T> {
27 using Domain = Interval;
28 };
29
30 template<>
31 struct Wrapper<Index> {
32 using Domain = Interval;
33 };
34
35 template<>
36 struct Wrapper<Interval> {
37 using Domain = Interval;
38 };
39
40 template<typename T,typename D>
41 struct AnalyticType;
42
43 template<typename T,typename D>
44 struct Wrapper<AnalyticType<T,D>> {
45 using Domain = D;
46 };
47
48 template<typename OtherDerived>
49 struct Wrapper<OtherDerived,
50 typename std::enable_if<std::is_base_of_v<Eigen::MatrixBase<OtherDerived>,OtherDerived>>::type>
51 {
52 using Domain = Eigen::Matrix<Interval,OtherDerived::RowsAtCompileTime,OtherDerived::ColsAtCompileTime>;
53 // Automatically sets:
54 // Wrapper<Vector>::Domain = IntervalVector
55 // Wrapper<IntervalVector>::Domain = IntervalVector
56 // Wrapper<Matrix>::Domain = IntervalMatrix
57 // Wrapper<IntervalMatrix>::Domain = IntervalMatrix
58 // + related possible expression templates
59 };
60}
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:49
Definition codac2_OctaSym.h:21