10 #ifndef EIGEN_INVERSE_H
11 #define EIGEN_INVERSE_H
17 template<
typename XprType,
typename StorageKind>
class InverseImpl;
21 template<
typename XprType>
22 struct traits<Inverse<XprType> >
23 : traits<typename XprType::PlainObject>
25 typedef typename XprType::PlainObject PlainObject;
26 typedef traits<PlainObject> BaseTraits;
44 template<
typename XprType>
45 class Inverse :
public InverseImpl<XprType,typename internal::traits<XprType>::StorageKind>
48 typedef typename XprType::StorageIndex StorageIndex;
49 typedef typename XprType::PlainObject PlainObject;
50 typedef typename internal::ref_selector<XprType>::type XprTypeNested;
51 typedef typename internal::remove_all<XprTypeNested>::type XprTypeNestedCleaned;
53 explicit Inverse(
const XprType &xpr)
57 EIGEN_DEVICE_FUNC Index rows()
const {
return m_xpr.rows(); }
58 EIGEN_DEVICE_FUNC Index cols()
const {
return m_xpr.cols(); }
60 EIGEN_DEVICE_FUNC
const XprTypeNestedCleaned& nestedExpression()
const {
return m_xpr; }
71 template<
typename XprType>
72 class InverseImpl<XprType,
Dense>
80 EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
81 typedef typename
internal::remove_all<XprType>::type NestedExpression;
85 Scalar coeff(Index row, Index col) const;
86 Scalar coeff(Index i) const;
101 template<
typename ArgType>
102 struct unary_evaluator<
Inverse<ArgType> >
103 :
public evaluator<typename Inverse<ArgType>::PlainObject>
106 typedef typename InverseType::PlainObject PlainObject;
107 typedef evaluator<PlainObject> Base;
111 unary_evaluator(
const InverseType& inv_xpr)
112 : m_result(inv_xpr.rows(), inv_xpr.cols())
114 ::new (static_cast<Base*>(
this)) Base(m_result);
115 internal::call_assignment_no_alias(m_result, inv_xpr);
119 PlainObject m_result;
126 #endif // EIGEN_INVERSE_H
const unsigned int RowMajorBit
Definition: Constants.h:53
Expression of the inverse of another expression.
Definition: Inverse.h:45
Definition: Eigen_Colamd.h:54
Definition: Constants.h:482
const unsigned int EvalBeforeNestingBit
Definition: Constants.h:57
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48