10#ifndef EIGEN_INVERSE_H
11#define EIGEN_INVERSE_H
13#include "./InternalHeaderCheck.h"
17template<
typename XprType,
typename StorageKind>
class InverseImpl;
21template<
typename XprType>
22struct traits<Inverse<XprType> >
23 : traits<typename XprType::PlainObject>
25 typedef typename XprType::PlainObject PlainObject;
26 typedef traits<PlainObject> BaseTraits;
44template<
typename XprType>
45class Inverse :
public InverseImpl<XprType,typename internal::traits<XprType>::StorageKind>
48 typedef typename XprType::StorageIndex StorageIndex;
49 typedef typename XprType::Scalar Scalar;
50 typedef typename internal::ref_selector<XprType>::type XprTypeNested;
51 typedef typename internal::remove_all<XprTypeNested>::type XprTypeNestedCleaned;
52 typedef typename internal::ref_selector<Inverse>::type Nested;
53 typedef typename internal::remove_all<XprType>::type NestedExpression;
55 explicit EIGEN_DEVICE_FUNC
Inverse(
const XprType &xpr)
59 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
Index rows()
const EIGEN_NOEXCEPT {
return m_xpr.cols(); }
60 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
Index cols()
const EIGEN_NOEXCEPT {
return m_xpr.rows(); }
62 EIGEN_DEVICE_FUNC
const XprTypeNestedCleaned& nestedExpression()
const {
return m_xpr; }
69template<
typename XprType,
typename StorageKind>
71 :
public internal::generic_xpr_base<Inverse<XprType> >::type
74 typedef typename internal::generic_xpr_base<Inverse<XprType> >::type Base;
75 typedef typename XprType::Scalar Scalar;
79 Scalar coeff(
Index i)
const;
94template<
typename ArgType>
95struct unary_evaluator<Inverse<ArgType> >
96 :
public evaluator<typename Inverse<ArgType>::PlainObject>
98 typedef Inverse<ArgType> InverseType;
99 typedef typename InverseType::PlainObject PlainObject;
100 typedef evaluator<PlainObject> Base;
104 unary_evaluator(
const InverseType& inv_xpr)
105 : m_result(inv_xpr.rows(), inv_xpr.cols())
107 ::new (
static_cast<Base*
>(
this)) Base(m_result);
108 internal::call_assignment_no_alias(m_result, inv_xpr);
112 PlainObject m_result;
Expression of the inverse of another expression.
Definition: Inverse.h:46
const unsigned int EvalBeforeNestingBit
Definition: Constants.h:72
const unsigned int RowMajorBit
Definition: Constants.h:68
Namespace containing all symbols from the Eigen library.
Definition: B01_Experimental.dox:1
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:59