10 #ifndef EIGEN_MISC_SOLVE_H
11 #define EIGEN_MISC_SOLVE_H
20 template<
typename DecompositionType,
typename Rhs>
21 struct traits<solve_retval_base<DecompositionType, Rhs> >
23 typedef typename DecompositionType::MatrixType MatrixType;
24 typedef Matrix<
typename Rhs::Scalar,
25 MatrixType::ColsAtCompileTime,
26 Rhs::ColsAtCompileTime,
27 Rhs::PlainObject::Options,
28 MatrixType::MaxColsAtCompileTime,
29 Rhs::MaxColsAtCompileTime> ReturnType;
32 template<
typename _DecompositionType,
typename Rhs>
struct solve_retval_base
33 :
public ReturnByValue<solve_retval_base<_DecompositionType, Rhs> >
35 typedef typename remove_all<typename Rhs::Nested>::type RhsNestedCleaned;
36 typedef _DecompositionType DecompositionType;
37 typedef ReturnByValue<solve_retval_base> Base;
38 typedef typename Base::Index Index;
40 solve_retval_base(
const DecompositionType& dec,
const Rhs& rhs)
41 : m_dec(dec), m_rhs(rhs)
44 inline Index rows()
const {
return m_dec.cols(); }
45 inline Index cols()
const {
return m_rhs.cols(); }
46 inline const DecompositionType& dec()
const {
return m_dec; }
47 inline const RhsNestedCleaned& rhs()
const {
return m_rhs; }
49 template<
typename Dest>
inline void evalTo(Dest& dst)
const
51 static_cast<const solve_retval<DecompositionType,Rhs>*
>(
this)->evalTo(dst);
55 const DecompositionType& m_dec;
56 typename Rhs::Nested m_rhs;
61 #define EIGEN_MAKE_SOLVE_HELPERS(DecompositionType,Rhs) \
62 typedef typename DecompositionType::MatrixType MatrixType; \
63 typedef typename MatrixType::Scalar Scalar; \
64 typedef typename MatrixType::RealScalar RealScalar; \
65 typedef typename MatrixType::Index Index; \
66 typedef Eigen::internal::solve_retval_base<DecompositionType,Rhs> Base; \
71 solve_retval(const DecompositionType& dec, const Rhs& rhs) \
76 #endif // EIGEN_MISC_SOLVE_H