10 #ifndef EIGEN_MISC_IMAGE_H
11 #define EIGEN_MISC_IMAGE_H
22 template<
typename DecompositionType>
23 struct traits<image_retval_base<DecompositionType> >
28 MatrixType::RowsAtCompileTime,
32 MatrixType::MaxRowsAtCompileTime,
33 MatrixType::MaxColsAtCompileTime
37 template<
typename DecompositionType_>
struct image_retval_base
38 :
public ReturnByValue<image_retval_base<DecompositionType_> >
40 typedef DecompositionType_ DecompositionType;
42 typedef ReturnByValue<image_retval_base>
Base;
44 image_retval_base(
const DecompositionType& dec,
const MatrixType& originalMatrix)
45 : m_dec(dec), m_rank(dec.rank()),
46 m_cols(m_rank == 0 ? 1 : m_rank),
47 m_originalMatrix(originalMatrix)
50 inline Index rows()
const {
return m_dec.rows(); }
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; }
54 inline const MatrixType& originalMatrix()
const {
return m_originalMatrix; }
56 template<
typename Dest>
inline void evalTo(Dest& dst)
const
58 static_cast<const image_retval<DecompositionType>*
>(
this)->
evalTo(dst);
62 const DecompositionType& m_dec;
69 #define EIGEN_MAKE_IMAGE_HELPERS(DecompositionType) \
70 typedef typename DecompositionType::MatrixType MatrixType; \
71 typedef typename MatrixType::Scalar Scalar; \
72 typedef typename MatrixType::RealScalar RealScalar; \
73 typedef Eigen::internal::image_retval_base<DecompositionType> Base; \
75 using Base::originalMatrix; \
79 image_retval(const DecompositionType& dec, const MatrixType& originalMatrix) \
80 : Base(dec, originalMatrix) {}
Matrix< float, 1, Dynamic > MatrixType
internal::traits< Derived >::Scalar Scalar
internal::dense_xpr_base< ReturnByValue >::type Base
void evalTo(Dest &dst) const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.