10#ifndef EIGEN_MISC_KERNEL_H
11#define EIGEN_MISC_KERNEL_H
14#include "./InternalHeaderCheck.h"
23template <
typename DecompositionType>
24struct traits<kernel_retval_base<DecompositionType> > {
25 typedef typename DecompositionType::MatrixType MatrixType;
26 typedef Matrix<
typename MatrixType::Scalar,
27 MatrixType::ColsAtCompileTime,
31 traits<MatrixType>::Options,
32 MatrixType::MaxColsAtCompileTime,
33 MatrixType::MaxColsAtCompileTime
39template <
typename DecompositionType_>
40struct kernel_retval_base :
public ReturnByValue<kernel_retval_base<DecompositionType_> > {
41 typedef DecompositionType_ DecompositionType;
42 typedef ReturnByValue<kernel_retval_base> Base;
44 explicit kernel_retval_base(
const DecompositionType& dec)
45 : m_dec(dec), m_rank(dec.rank()), m_cols(m_rank == dec.cols() ? 1 : dec.cols() - m_rank) {}
47 inline Index rows()
const {
return m_dec.cols(); }
48 inline Index cols()
const {
return m_cols; }
49 inline Index rank()
const {
return m_rank; }
50 inline const DecompositionType& dec()
const {
return m_dec; }
52 template <
typename Dest>
53 inline void evalTo(Dest& dst)
const {
54 static_cast<const kernel_retval<DecompositionType>*
>(
this)->evalTo(dst);
58 const DecompositionType& m_dec;
64#define EIGEN_MAKE_KERNEL_HELPERS(DecompositionType) \
65 typedef typename DecompositionType::MatrixType MatrixType; \
66 typedef typename MatrixType::Scalar Scalar; \
67 typedef typename MatrixType::RealScalar RealScalar; \
68 typedef Eigen::internal::kernel_retval_base<DecompositionType> Base; \
73 kernel_retval(const DecompositionType& dec) : Base(dec) {}
Namespace containing all symbols from the Eigen library.
Definition B01_Experimental.dox:1
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:82
const int Dynamic
Definition Constants.h:25