Wildmeshing Toolkit
Loading...
Searching...
No Matches
array_to_map.hpp
Go to the documentation of this file.
1#pragma once
2
3namespace wmtk::utils {
4
5template <typename T, int R, int C>
6auto array_to_map(const T (&a)[R][C])
7{
8 return typename Eigen::Matrix<T, R, C>::ConstMapType(a);
9}
10template <typename T, int R, int C>
11auto array_to_map(T (&a)[R][C])
12{
13 return typename Eigen::Matrix<T, R, C>::MapType(a);
14}
15template <typename T, int R>
16auto array_to_map(const T (&a)[R])
17{
18 return typename Eigen::Matrix<T, R, 1>::ConstMapType(a);
19}
20template <typename T, int R>
21auto array_to_map(T (&a)[R])
22{
23 return typename Eigen::Matrix<T, R, 1>::MapType(a);
24}
25} // namespace wmtk::utils
auto array_to_map(const T(&a)[R][C])