10#ifndef EIGEN_MISC_KERNEL_H
11#define EIGEN_MISC_KERNEL_H
20template<
typename DecompositionType>
21struct traits<kernel_retval_base<DecompositionType> >
23 typedef typename DecompositionType::MatrixType MatrixType;
25 typename MatrixType::Scalar,
26 MatrixType::ColsAtCompileTime,
31 MatrixType::MaxColsAtCompileTime,
32 MatrixType::MaxColsAtCompileTime
37template<
typename _DecompositionType>
struct kernel_retval_base
38 :
public ReturnByValue<kernel_retval_base<_DecompositionType> >
40 typedef _DecompositionType DecompositionType;
41 typedef ReturnByValue<kernel_retval_base> Base;
43 explicit kernel_retval_base(
const DecompositionType& dec)
46 m_cols(m_rank==dec.cols() ? 1 : dec.cols() - m_rank)
49 inline Index rows()
const {
return m_dec.cols(); }
50 inline Index cols()
const {
return m_cols; }
51 inline Index rank()
const {
return m_rank; }
52 inline const DecompositionType& dec()
const {
return m_dec; }
54 template<
typename Dest>
inline void evalTo(Dest& dst)
const
56 static_cast<const kernel_retval<DecompositionType>*
>(
this)->evalTo(dst);
60 const DecompositionType& m_dec;
66#define EIGEN_MAKE_KERNEL_HELPERS(DecompositionType) \
67 typedef typename DecompositionType::MatrixType MatrixType; \
68 typedef typename MatrixType::Scalar Scalar; \
69 typedef typename MatrixType::RealScalar RealScalar; \
70 typedef Eigen::internal::kernel_retval_base<DecompositionType> Base; \
75 kernel_retval(const DecompositionType& dec) : Base(dec) {}
Namespace containing all symbols from the Eigen library.
Definition: Core:141
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
const int Dynamic
Definition: Constants.h:22