10 #ifndef EIGEN_MISC_KERNEL_H
11 #define EIGEN_MISC_KERNEL_H
20 template<
typename DecompositionType>
21 struct traits<kernel_retval_base<DecompositionType> >
23 typedef typename DecompositionType::MatrixType MatrixType;
25 typename MatrixType::Scalar,
26 MatrixType::ColsAtCompileTime,
31 MatrixType::MaxColsAtCompileTime,
32 MatrixType::MaxColsAtCompileTime
37 template<
typename _DecompositionType>
struct kernel_retval_base
38 :
public ReturnByValue<kernel_retval_base<_DecompositionType> >
40 typedef _DecompositionType DecompositionType;
41 typedef ReturnByValue<kernel_retval_base> Base;
42 typedef typename Base::Index Index;
44 kernel_retval_base(
const DecompositionType& dec)
47 m_cols(m_rank==dec.cols() ? 1 : dec.cols() - m_rank)
50 inline Index rows()
const {
return m_dec.cols(); }
51 inline Index cols()
const {
return m_cols; }
52 inline Index rank()
const {
return m_rank; }
53 inline const DecompositionType& dec()
const {
return m_dec; }
55 template<
typename Dest>
inline void evalTo(Dest& dst)
const
57 static_cast<const kernel_retval<DecompositionType>*
>(
this)->evalTo(dst);
61 const DecompositionType& m_dec;
67 #define EIGEN_MAKE_KERNEL_HELPERS(DecompositionType) \
68 typedef typename DecompositionType::MatrixType MatrixType; \
69 typedef typename MatrixType::Scalar Scalar; \
70 typedef typename MatrixType::RealScalar RealScalar; \
71 typedef typename MatrixType::Index Index; \
72 typedef Eigen::internal::kernel_retval_base<DecompositionType> Base; \
77 kernel_retval(const DecompositionType& dec) : Base(dec) {}
81 #endif // EIGEN_MISC_KERNEL_H
const int Dynamic
Definition: Constants.h:21