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