Feature/skew symmetric matrix3

This commit is contained in:
Thomas Gloor
2022-09-08 20:44:40 +00:00
committed by Rasmus Munk Larsen
parent 311ba66f7c
commit ec9c7163a3
9 changed files with 697 additions and 0 deletions

View File

@@ -270,6 +270,11 @@ template<typename T> struct plain_matrix_type<T,DiagonalShape>
typedef typename T::PlainObject type;
};
template<typename T> struct plain_matrix_type<T,SkewSymmetricShape>
{
typedef typename T::PlainObject type;
};
template<typename T, int Flags> struct plain_matrix_type_dense<T,MatrixXpr,Flags>
{
typedef Matrix<typename traits<T>::Scalar,
@@ -316,6 +321,11 @@ template<typename T> struct eval<T,DiagonalShape>
typedef typename plain_matrix_type<T>::type type;
};
template<typename T> struct eval<T,SkewSymmetricShape>
{
typedef typename plain_matrix_type<T>::type type;
};
// for matrices, no need to evaluate, just use a const reference to avoid a useless copy
template<typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
struct eval<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>, Dense>
@@ -554,6 +564,12 @@ template <typename B, int ProductTag> struct product_promote_storage_type<Diagon
template <int ProductTag> struct product_promote_storage_type<Dense, DiagonalShape, ProductTag> { typedef Dense ret; };
template <int ProductTag> struct product_promote_storage_type<DiagonalShape, Dense, ProductTag> { typedef Dense ret; };
template <typename A, int ProductTag> struct product_promote_storage_type<A, SkewSymmetricShape, ProductTag> { typedef A ret; };
template <typename B, int ProductTag> struct product_promote_storage_type<SkewSymmetricShape, B, ProductTag> { typedef B ret; };
template <int ProductTag> struct product_promote_storage_type<Dense, SkewSymmetricShape, ProductTag> { typedef Dense ret; };
template <int ProductTag> struct product_promote_storage_type<SkewSymmetricShape, Dense, ProductTag> { typedef Dense ret; };
template <int ProductTag> struct product_promote_storage_type<SkewSymmetricShape, SkewSymmetricShape, ProductTag> { typedef Dense ret; };
template <typename A, int ProductTag> struct product_promote_storage_type<A, PermutationStorage, ProductTag> { typedef A ret; };
template <typename B, int ProductTag> struct product_promote_storage_type<PermutationStorage, B, ProductTag> { typedef B ret; };
template <int ProductTag> struct product_promote_storage_type<Dense, PermutationStorage, ProductTag> { typedef Dense ret; };