ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
eigen.hpp
1// This file is part of the ACTS project.
2//
3// Copyright (C) 2016 CERN for the benefit of the ACTS project
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9#pragma once
10
11// Project include(s).
12#include "algebra/impl/eigen_getter.hpp"
13#include "algebra/impl/eigen_matrix.hpp"
14#include "algebra/impl/eigen_types.hpp"
15#include "algebra/impl/eigen_vector.hpp"
16#include "detray/algebra/common/boolean.hpp"
17#include "detray/algebra/common/math.hpp"
18#include "detray/algebra/generic/generic.hpp"
19
20// Eigen include(s).
21#ifdef _MSC_VER
22#pragma warning(push, 0)
23#endif // MSVC
24#include <Eigen/Core>
25#ifdef _MSC_VER
26#pragma warning(pop)
27#endif // MSVC
28
29namespace detray {
30
33template <concepts::value V>
34struct eigen {
36 using value_type = V;
37
39 template <concepts::element T>
40 using simd = T;
41
43 using boolean = bool;
47 using index_type = algebra::eigen::index_type;
49 using transform3D = algebra::eigen::transform3<value_type>;
51 using point2D = algebra::eigen::point2<value_type>;
53 using point3D = algebra::eigen::point3<value_type>;
55 using vector2D = algebra::eigen::vector2<value_type>;
57 using vector3D = algebra::eigen::vector3<value_type>;
58
60 template <std::size_t ROWS, std::size_t COLS>
62 using matrix = algebra::eigen::matrix_type<value_type, ROWS, COLS>;
63};
64
65
66namespace getter {
67
70
71using algebra::eigen::storage::block;
72using algebra::eigen::storage::element;
73using algebra::eigen::storage::set_block;
74using algebra::eigen::storage::vector;
75
77
78} // namespace getter
79
80namespace vector {
81
84
85using algebra::eigen::math::cross;
86using algebra::eigen::math::dot;
87using algebra::eigen::math::eta;
88using algebra::eigen::math::norm;
89using algebra::eigen::math::normalize;
90using algebra::eigen::math::perp;
91using algebra::eigen::math::phi;
92using algebra::eigen::math::theta;
93
94} // namespace vector
95
96namespace matrix {
97
100
101using algebra::eigen::math::cholesky_decomposition;
102using algebra::eigen::math::column_wise_cross;
103using algebra::eigen::math::column_wise_multiply;
104using algebra::eigen::math::determinant;
105using algebra::eigen::math::identity;
106using algebra::eigen::math::inverse;
107using algebra::eigen::math::outer_product;
108using algebra::eigen::math::set_identity;
109using algebra::eigen::math::set_zero;
110using algebra::eigen::math::transpose;
111using algebra::eigen::math::zero;
112
113using algebra::generic::math::cross_matrix;
114using algebra::generic::math::set_inplace_product_left;
115using algebra::generic::math::set_inplace_product_left_transpose;
116using algebra::generic::math::set_inplace_product_right;
117using algebra::generic::math::set_inplace_product_right_transpose;
118using algebra::generic::math::set_product;
119using algebra::generic::math::set_product_left_transpose;
120using algebra::generic::math::set_product_right_transpose;
121using algebra::generic::math::transposed_product;
122
124
125} // namespace matrix
126
127} // namespace detray
Detray include(s).
Definition array_operators.hpp:18
Define the plugin types.
Definition eigen.hpp:34
algebra::eigen::index_type index_type
Index type used for matrix and vector access.
Definition eigen.hpp:47
algebra::eigen::point2< value_type > point2D
Two-dimensional point type.
Definition eigen.hpp:51
algebra::eigen::matrix_type< value_type, ROWS, COLS > matrix
Fixed-size matrix type with the requested dimensions.
Definition eigen.hpp:62
algebra::eigen::vector3< value_type > vector3D
Three-dimensional vector type.
Definition eigen.hpp:57
algebra::eigen::vector2< value_type > vector2D
Two-dimensional vector type.
Definition eigen.hpp:55
V value_type
Define scalar type.
Definition eigen.hpp:36
value_type scalar
Scalar type represented by this backend.
Definition eigen.hpp:45
algebra::eigen::point3< value_type > point3D
Three-dimensional point type.
Definition eigen.hpp:53
T simd
Backend vectorized representation of an element type.
Definition eigen.hpp:40
algebra::eigen::transform3< value_type > transform3D
Three-dimensional transform type.
Definition eigen.hpp:49
bool boolean
Boolean type used for element-wise predicates.
Definition eigen.hpp:43