1 #ifndef CASM_symmetry_to_real
2 #define CASM_symmetry_to_real
5 #include "casm/external/Eigen/Core"
10 namespace SymRepTools_v2 {
20 using Type = std::vector<_Real<T>>;
23 template <
typename Scalar,
int RowsAtCompileTime,
int ColsAtCompileTime>
24 struct _RealType<
Eigen::Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime>> {
25 using Type = Eigen::Matrix<double, RowsAtCompileTime, ColsAtCompileTime>;
28 template <
typename Derived>
30 return mat.real().template cast<double>();
35 std::vector<_Real<T>> result;
36 result.reserve(vec.size());
37 for (T
const &el : vec) {
38 result.emplace_back(
to_real(el));