10#ifndef EIGEN_MISC_IMAGE_H
11#define EIGEN_MISC_IMAGE_H
14#include "./InternalHeaderCheck.h"
23template <
typename DecompositionType>
24struct traits<image_retval_base<DecompositionType> > {
25 typedef typename DecompositionType::MatrixType MatrixType;
26 typedef Matrix<
typename MatrixType::Scalar,
27 MatrixType::RowsAtCompileTime,
30 traits<MatrixType>::Options,
31 MatrixType::MaxRowsAtCompileTime,
33 MatrixType::MaxColsAtCompileTime
38template <
typename DecompositionType_>
39struct image_retval_base :
public ReturnByValue<image_retval_base<DecompositionType_> > {
40 typedef DecompositionType_ DecompositionType;
41 typedef typename DecompositionType::MatrixType MatrixType;
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()), m_cols(m_rank == 0 ? 1 : m_rank), m_originalMatrix(originalMatrix) {}
47 inline Index rows()
const {
return m_dec.rows(); }
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; }
51 inline const MatrixType& originalMatrix()
const {
return m_originalMatrix; }
53 template <
typename Dest>
54 inline void evalTo(Dest& dst)
const {
55 static_cast<const image_retval<DecompositionType>*
>(
this)->evalTo(dst);
59 const DecompositionType& m_dec;
61 const MatrixType& m_originalMatrix;
66#define EIGEN_MAKE_IMAGE_HELPERS(DecompositionType) \
67 typedef typename DecompositionType::MatrixType MatrixType; \
68 typedef typename MatrixType::Scalar Scalar; \
69 typedef typename MatrixType::RealScalar RealScalar; \
70 typedef Eigen::internal::image_retval_base<DecompositionType> Base; \
72 using Base::originalMatrix; \
76 image_retval(const DecompositionType& dec, const MatrixType& originalMatrix) : Base(dec, originalMatrix) {}
Namespace containing all symbols from the Eigen library.
Definition Core:137
const int Dynamic
Definition Constants.h:25