diff options
author | 2009-09-03 02:50:42 -0400 | |
---|---|---|
committer | 2009-09-03 02:50:42 -0400 | |
commit | 89557ac41d50196f17d48ada5137fcf435abe73a (patch) | |
tree | 6808a1add797acfc7055a5a2fab9fcc321ad6402 /Eigen/src/Core/util/Macros.h | |
parent | 7d18c30641a57cde5246614e3f7dd88fe867a7b0 (diff) |
introduce EIGEN_SIZE_MIN
now we should check if some EIGEN_ENUM_MIN usage needs to be replaced by that... potential bug when using mixed-size matrice
Diffstat (limited to 'Eigen/src/Core/util/Macros.h')
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 4e00df759..ec8337e33 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -260,11 +260,11 @@ using Base::operator +=; \ using Base::operator -=; \ using Base::operator *=; \ using Base::operator /=; \ -EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) \
-{ \
- return Base::operator=(other); \
-}
-#endif
+EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) \ +{ \ + return Base::operator=(other); \ +} +#endif #define _EIGEN_GENERIC_PUBLIC_INTERFACE(Derived, BaseClass) \ typedef BaseClass Base; \ @@ -287,6 +287,9 @@ enum { RowsAtCompileTime = Eigen::ei_traits<Derived>::RowsAtCompileTime, \ _EIGEN_GENERIC_PUBLIC_INTERFACE(Derived, Eigen::MatrixBase<Derived>) #define EIGEN_ENUM_MIN(a,b) (((int)a <= (int)b) ? (int)a : (int)b) +#define EIGEN_SIZE_MIN(a,b) (((int)a == 1 || (int)b == 1) ? 1 \ + : ((int)a == Dynamic || (int)b == Dynamic) ? Dynamic \ + : ((int)a <= (int)b) ? (int)a : (int)b) #define EIGEN_ENUM_MAX(a,b) (((int)a >= (int)b) ? (int)a : (int)b) #define EIGEN_LOGICAL_XOR(a,b) (((a) || (b)) && !((a) && (b))) |