codac 1.5.6
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<>
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<>
40 struct Wrapper<Interval> {
41 using Domain = Interval;
42 };
43
44 template<typename OtherDerived>
45 struct Wrapper<OtherDerived,
46 typename std::enable_if<std::is_base_of_v<Eigen::MatrixBase<OtherDerived>,OtherDerived>>::type>
47 {
48 using Domain = Eigen::Matrix<Interval,OtherDerived::RowsAtCompileTime,OtherDerived::ColsAtCompileTime>;
49 // Automatically sets:
50 // Wrapper<Vector>::Domain = IntervalVector
51 // Wrapper<IntervalVector>::Domain = IntervalVector
52 // Wrapper<Matrix>::Domain = IntervalMatrix
53 // Wrapper<IntervalMatrix>::Domain = IntervalMatrix
54 // + related possible expression templates
55 };
56}
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:62