codac 1.5.6
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"
18
19namespace codac2
20{
21 template<typename T>
22 struct ValueType
23 { };
24
25 template<typename T>
26 requires (std::is_arithmetic_v<T>)
27 struct ValueType<T> {
28 using Type = ScalarType;
29 };
30
31 template<>
32 struct ValueType<Interval> {
33 using Type = ScalarType;
34 };
35
36 template<>
37 struct ValueType<Vector> {
38 using Type = VectorType;
39 };
40
41 template<>
42 struct ValueType<IntervalVector> {
43 using Type = VectorType;
44 };
45
46 template<>
47 struct ValueType<Matrix> {
48 using Type = MatrixType;
49 };
50
51 template<>
52 struct ValueType<IntervalMatrix> {
53 using Type = MatrixType;
54 };
55
56 template<typename T>
57 requires (T::RowsAtCompileTime!=1 && T::ColsAtCompileTime==1)
58 struct ValueType<T> {
59 using Type = VectorType;
60 };
61
62 template<typename T>
63 requires (T::RowsAtCompileTime!=1 && T::ColsAtCompileTime!=1)
64 struct ValueType<T> {
65 using Type = MatrixType;
66 };
67}
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:62