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