10 #ifndef EIGEN_INVERSE_H 11 #define EIGEN_INVERSE_H 15 template<
typename XprType,
typename StorageKind>
class InverseImpl;
19 template<
typename XprType>
20 struct traits<Inverse<XprType> >
21 : traits<typename XprType::PlainObject>
23 typedef typename XprType::PlainObject PlainObject;
24 typedef traits<PlainObject> BaseTraits;
42 template<
typename XprType>
43 class Inverse :
public InverseImpl<XprType,typename internal::traits<XprType>::StorageKind>
46 typedef typename XprType::StorageIndex StorageIndex;
47 typedef typename XprType::PlainObject PlainObject;
48 typedef typename XprType::Scalar Scalar;
49 typedef typename internal::ref_selector<XprType>::type XprTypeNested;
50 typedef typename internal::remove_all<XprTypeNested>::type XprTypeNestedCleaned;
51 typedef typename internal::ref_selector<Inverse>::type Nested;
52 typedef typename internal::remove_all<XprType>::type NestedExpression;
54 explicit EIGEN_DEVICE_FUNC
Inverse(
const XprType &xpr)
58 EIGEN_DEVICE_FUNC
Index rows()
const {
return m_xpr.rows(); }
59 EIGEN_DEVICE_FUNC
Index cols()
const {
return m_xpr.cols(); }
61 EIGEN_DEVICE_FUNC
const XprTypeNestedCleaned& nestedExpression()
const {
return m_xpr; }
68 template<
typename XprType,
typename StorageKind>
70 :
public internal::generic_xpr_base<Inverse<XprType> >::type
73 typedef typename internal::generic_xpr_base<Inverse<XprType> >::type Base;
74 typedef typename XprType::Scalar Scalar;
78 Scalar coeff(
Index i)
const;
93 template<
typename ArgType>
94 struct unary_evaluator<Inverse<ArgType> >
95 :
public evaluator<typename Inverse<ArgType>::PlainObject>
98 typedef typename InverseType::PlainObject PlainObject;
99 typedef evaluator<PlainObject> Base;
103 unary_evaluator(
const InverseType& inv_xpr)
104 : m_result(inv_xpr.rows(), inv_xpr.cols())
106 ::new (static_cast<Base*>(
this)) Base(m_result);
107 internal::call_assignment_no_alias(m_result, inv_xpr);
111 PlainObject m_result;
118 #endif // EIGEN_INVERSE_H Namespace containing all symbols from the Eigen library.
Definition: Core:287
const unsigned int RowMajorBit
Definition: Constants.h:61
Expression of the inverse of another expression.
Definition: Inverse.h:43
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
Definition: Eigen_Colamd.h:50
const unsigned int EvalBeforeNestingBit
Definition: Constants.h:65