codac 2.0.0
Loading...
Searching...
No Matches
codac2_Scalar.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 Scalar
22 { };
23
24 template<>
25 struct Scalar<Interval> {
26 using Type = double;
27 };
28
29 template<typename OtherDerived>
30 struct Scalar<OtherDerived,
31 typename std::enable_if<std::is_base_of_v<Eigen::MatrixBase<OtherDerived>,OtherDerived>>::type>
32 {
33 using Type = Eigen::Matrix<double,OtherDerived::RowsAtCompileTime,OtherDerived::ColsAtCompileTime>;
34 // Automatically sets:
35 // Scalar<IntervalVector>::Type = Vector
36 // Scalar<IntervalMatrix>::Type = Matrix
37 // + related possible expression templates
38 };
39}
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:49
Definition codac2_OctaSym.h:21