12#ifndef ARCCORE_ALINA_VALUETYPEEIGEN_H
13#define ARCCORE_ALINA_VALUETYPEEIGEN_H
28#include "arccore/alina/BuiltinBackend.h"
29#include "arccore/alina/ValueTypeInterface.h"
34namespace Arcane::Alina::backend
41template <
typename T,
int N,
int M>
53namespace Arcane::Alina::math
60template <
class T,
int N,
int M>
63 typedef typename math::scalar_of<T>::type type;
67template <
class T,
int N,
int M,
class S>
70 typedef Eigen::Matrix<S, N, M> type;
74template <
class T,
int N>
77 typedef Eigen::Matrix<T, N, 1> type;
81template <
class T,
int N,
int M>
88template <
class T,
int N,
int M>
93template <
class T,
int N,
int M>
98template <
class T,
int N,
int M>
103template <
typename T,
int N,
int M>
106 typedef typename Eigen::Matrix<T, N, M>::AdjointReturnType return_type;
108 static return_type get(
const Eigen::Matrix<T, N, M>& x)
115template <
class T,
int N>
118 typedef T return_type;
119 static T get(
const Eigen::Matrix<T, N, 1>& x,
const Eigen::Matrix<T, N, 1>& y)
121 return x.adjoint() * y;
126template <
class T,
int N,
int M>
129 typedef Eigen::Matrix<T, M, M> return_type;
131 static return_type get(
const Eigen::Matrix<T, N, M>& x,
const Eigen::Matrix<T, N, M>& y)
133 return x.adjoint() * y;
138template <
typename T,
int N,
int M>
141 static typename math::scalar_of<T>::type get(
const Eigen::Matrix<T, N, M>& x)
148template <
typename T,
int N,
int M>
151 static Eigen::Matrix<T, N, M> get()
153 return Eigen::Matrix<T, N, M>::Zero();
158template <
typename T,
int N,
int M>
161 static bool get(
const Eigen::Matrix<T, N, M>& x)
168template <
typename T,
int N>
171 static Eigen::Matrix<T, N, N> get()
173 return Eigen::Matrix<T, N, N>::Identity();
178template <
typename T,
int N,
int M>
181 static Eigen::Matrix<T, N, M> get(T c)
183 return Eigen::Matrix<T, N, M>::Constant(c);
188template <
typename T,
int N>
191 static Eigen::Matrix<T, N, N> get(
const Eigen::Matrix<T, N, N>& x)
211template <
class A,
class B>
212bool operator<(
const MatrixBase<A>& a,
const MatrixBase<B>& b)
214 return a.trace() < b.trace();
Matrix class, to be used by user.
bool operator<(const Item &item1, const Item &item2)
Compare deux entités.
Default implementation for conjugate transpose.
Default implementation for the constant element.
Element type of a non-scalar type.
Default implementation for the identity element.
Default implementation for inner product.
Default implementation of inversion operation.
Whether the value type is a statically sized matrix.
Default implementation for zero check.
Default implementation for element norm.
Replace scalar type in the static matrix.
RHS type corresponding to a non-scalar type.
Scalar type of a non-scalar type.
Number of columns for statically sized matrix types.
Number of rows for statically sized matrix types.
Default implementation for the zero element.