tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
Loading...
Searching...
No Matches
scalar_expr_algebraic_traits.h
Go to the documentation of this file.
1#pragma once
2
3/*
4 A scalar expression inherits the tensor-ness of the tensor operand:
5 ✔ tensor * scalar → tensor
6 ✔ scalar * tensor → tensor
7 ✔ vector space preserved
8 ✔ algebra preserved only if tensor supports it
9 */
10template <typename EXPR,
11 typename ScalarT,
12 template <typename, my_size_t, typename> class Op>
13class ScalarExprRHS;
14
15template <typename EXPR,
16 typename ScalarT,
17 template <typename, my_size_t, typename> class Op>
18class ScalarExprLHS;
19
20namespace algebra
21{
22 template <typename EXPR,
23 typename ScalarT,
24 template <typename, my_size_t, typename> class Op>
26 {
27 static constexpr bool vector_space = is_vector_space_v<EXPR>;
28 static constexpr bool algebra = is_algebra_v<EXPR>;
29 static constexpr bool lie_group = false;
30 static constexpr bool metric = is_metric_v<EXPR>;
31 static constexpr bool tensor = is_tensor_v<EXPR>;
32 };
33
34 template <typename EXPR,
35 typename ScalarT,
36 template <typename, my_size_t, typename> class Op>
38 {
39 static constexpr bool vector_space = is_vector_space_v<EXPR>;
40 static constexpr bool algebra = is_algebra_v<EXPR>;
41 static constexpr bool lie_group = false;
42 static constexpr bool metric = is_metric_v<EXPR>;
43 static constexpr bool tensor = is_tensor_v<EXPR>;
44 };
45} // namespace algebra
Definition ScalarExpr.h:95
Definition ScalarExpr.h:14
Definition basic_algebraic_traits.h:4
constexpr bool is_vector_space_v
Definition basic_algebraic_traits.h:123
Definition basic_algebraic_traits.h:10
static constexpr bool lie_group
Definition basic_algebraic_traits.h:78
static constexpr bool vector_space
Definition basic_algebraic_traits.h:30
static constexpr bool tensor
Definition basic_algebraic_traits.h:116
static constexpr bool metric
Definition basic_algebraic_traits.h:96