Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef EIGEN_SKYLINEUTIL_H
00011 #define EIGEN_SKYLINEUTIL_H
00012
00013 namespace Eigen {
00014
00015 #ifdef NDEBUG
00016 #define EIGEN_DBG_SKYLINE(X)
00017 #else
00018 #define EIGEN_DBG_SKYLINE(X) X
00019 #endif
00020
00021 const unsigned int SkylineBit = 0x1200;
00022 template<typename Lhs, typename Rhs, int ProductMode> class SkylineProduct;
00023 enum AdditionalProductEvaluationMode {SkylineTimeDenseProduct, SkylineTimeSkylineProduct, DenseTimeSkylineProduct};
00024 enum {IsSkyline = SkylineBit};
00025
00026
00027 #define EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, Op) \
00028 template<typename OtherDerived> \
00029 EIGEN_STRONG_INLINE Derived& operator Op(const Eigen::SkylineMatrixBase<OtherDerived>& other) \
00030 { \
00031 return Base::operator Op(other.derived()); \
00032 } \
00033 EIGEN_STRONG_INLINE Derived& operator Op(const Derived& other) \
00034 { \
00035 return Base::operator Op(other); \
00036 }
00037
00038 #define EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, Op) \
00039 template<typename Other> \
00040 EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \
00041 { \
00042 return Base::operator Op(scalar); \
00043 }
00044
00045 #define EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATORS(Derived) \
00046 EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, =) \
00047 EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, +=) \
00048 EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(Derived, -=) \
00049 EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, *=) \
00050 EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, /=)
00051
00052 #define _EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, BaseClass) \
00053 typedef BaseClass Base; \
00054 typedef typename Eigen::internal::traits<Derived>::Scalar Scalar; \
00055 typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; \
00056 typedef typename Eigen::internal::traits<Derived>::StorageKind StorageKind; \
00057 typedef typename Eigen::internal::index<StorageKind>::type Index; \
00058 enum { Flags = Eigen::internal::traits<Derived>::Flags, };
00059
00060 #define EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived) \
00061 _EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, Eigen::SkylineMatrixBase<Derived>)
00062
00063 template<typename Derived> class SkylineMatrixBase;
00064 template<typename _Scalar, int _Flags = 0> class SkylineMatrix;
00065 template<typename _Scalar, int _Flags = 0> class DynamicSkylineMatrix;
00066 template<typename _Scalar, int _Flags = 0> class SkylineVector;
00067 template<typename _Scalar, int _Flags = 0> class MappedSkylineMatrix;
00068
00069 namespace internal {
00070
00071 template<typename Lhs, typename Rhs> struct skyline_product_mode;
00072 template<typename Lhs, typename Rhs, int ProductMode = skyline_product_mode<Lhs,Rhs>::value> struct SkylineProductReturnType;
00073
00074 template<typename T> class eval<T,IsSkyline>
00075 {
00076 typedef typename traits<T>::Scalar _Scalar;
00077 enum {
00078 _Flags = traits<T>::Flags
00079 };
00080
00081 public:
00082 typedef SkylineMatrix<_Scalar, _Flags> type;
00083 };
00084
00085 }
00086
00087 }
00088
00089 #endif // EIGEN_SKYLINEUTIL_H