codac 1.5.6
Loading...
Searching...
No Matches
codac2_ExprType.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#include "codac2_AnalyticType.h"
19
20namespace codac2
21{
22 template<typename T>
23 struct ExprType
24 { };
25
26 template<typename T>
27 requires (std::is_arithmetic_v<T>)
28 struct ExprType<T> {
29 using Type = ScalarType;
30 };
31
32 template<>
33 struct ExprType<Interval> {
34 using Type = ScalarType;
35 };
36
37 template<>
38 struct ExprType<ScalarVar> {
39 using Type = ScalarType;
40 };
41
42 template<>
43 struct ExprType<Vector> {
44 using Type = VectorType;
45 };
46
47 template<>
48 struct ExprType<IntervalVector> {
49 using Type = VectorType;
50 };
51
52 template<>
53 struct ExprType<VectorVar> {
54 using Type = VectorType;
55 };
56
57 template<>
58 struct ExprType<Matrix> {
59 using Type = MatrixType;
60 };
61
62 template<>
63 struct ExprType<IntervalMatrix> {
64 using Type = MatrixType;
65 };
66
67 template<>
68 struct ExprType<MatrixVar> {
69 using Type = MatrixType;
70 };
71
72 template<typename T>
73 requires (T::RowsAtCompileTime!=1 && T::ColsAtCompileTime==1)
74 struct ExprType<T> {
75 using Type = VectorType;
76 };
77
78 template<typename T>
79 requires (T::RowsAtCompileTime!=1 && T::ColsAtCompileTime!=1)
80 struct ExprType<T> {
81 using Type = MatrixType;
82 };
83
84 template<typename T>
85 struct ExprType<AnalyticExprWrapper<T>> {
86 using Type = T;
87 };
88}
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:62